synapse-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Senaka Fernando" <senaka...@gmail.com>
Subject Re: Adding a Field to the AlgorithmContext
Date Fri, 19 Dec 2008 10:03:24 GMT
Sorry for not making myself clear. What I meant was, to make it possible for
you to store an object say AlgorithmXX in the context, in such a manner that
it will be useful along with a LoadbalanceAlgorithm. Instead of merely
storing an Object type. This is because an Object is very general notion,
and I don't think the intention here is to allow someone store anything on
the AlgorithmContext, but some additional data, which is required by the
Algorithm. AlgorithmXX can be a base object, or an interface.

However, this is a mere suggestion, and I may be wrong here as well. And,

s/"since your introduction is to introduce a new algorithm"/"since your
introduction is to assist a new algorithm"/

Regards,
Senaka

On Fri, Dec 19, 2008 at 3:14 PM, Hiranya Jayathilaka
<hiranya911@gmail.com>wrote:

> We already have such an interface called LoadbalanceAlgorithm. Round robin
> algorithm is implemented against this interface.
>
> How is adding another interface going to help? Please do explain.
>
> Thanks
>
> Best Regards,
> Hiranya
>
>
> On Fri, Dec 19, 2008 at 3:06 PM, Senaka Fernando <senakafdo@gmail.com>wrote:
>
>> Hi Hiranya,
>>
>> just a suggestion, instead of passing a type Object, and since your
>> introduction is to introduce a new algorithm, what about an "Algorithm"
>> Object (or may be an interface)?
>>
>> Thanks,
>> Senaka
>>
>>
>> On Fri, Dec 19, 2008 at 2:00 PM, Hiranya Jayathilaka <
>> hiranya911@gmail.com> wrote:
>>
>>> Hi Devs,
>>>
>>> Currently Synapse uses a class called AlgorithmContext to pass various
>>> parameters to the load balance algorithm implementations.  At the moment it
>>> can be used to pass the endpoint index values and the configuration context
>>> objects. This works fine with the round robin load balance algorithm which
>>> is the only load balance algorithm in Synapse at the moment. However when
>>> developing more advanced load balance algorithm implementations we might
>>> want to pass several other parameters using the AlgorithmContext.
>>>
>>> In order to fulfill this requirement I would like to suggest adding a new
>>> field (of type Object) to the AlgorithmContext class along with the
>>> necessary getter-setter methods.
>>>
>>> This addition does not change the existing functionality at all. What do
>>> you folks think?
>>>
>>> Thanks
>>>
>>> Best Regards,
>>> Hiranya
>>>
>>
>>
>

Mime
View raw message