synapse-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Asankha C. Perera" <asan...@apache.org>
Subject Re: Endpoint API Change
Date Wed, 12 Nov 2008 14:20:23 GMT
Actually this was an excellent suggestion by Eric Hubert [1], and I'm 
sure many users will find these enhancements extremely useful.. Like the 
JIRA says, I'm at fault for not yet updating the docs and samples.. 
Actually there is quite a lot of documentation around these changes, 
from feature/behavior to management and monitoring via JMX.. I will 
document this as soon as I can..

asankha

[1] https://issues.apache.org/jira/browse/SYNAPSE-466

indika kumara wrote:
> Ruwan
>
> I just did a part of it . Asankha did the major part
>
> thanks
> Indika
>
>
> On Wed, Nov 12, 2008 at 6:11 PM, Ruwan Linton <ruwan.linton@gmail.com> wrote:
>   
>> Indika,
>>
>> This explains all of it, and you should have send this explanation earlier
>> once you did the changes :-) I was trying to figure out the value addition
>> of the changes and now it is very clear.
>>
>> Thanks for the explanation.
>>
>> Thanks,
>> Ruwan
>>
>> On Wed, Nov 12, 2008 at 5:50 PM, indika kumara <indika.kuma@gmail.com>
>> wrote:
>>     
>>> Hi Hiranya
>>>
>>> First thing, now endpoint can be at four states. Previously, only
>>> there were two states. I can't draw state diagram and just try to
>>> describe how state transition works.
>>>
>>> Following are the four states
>>>
>>> [1] Active      - I think, word is self descriptive
>>>
>>> [2] TimeOut     - With new endpoint enhancements, there is a feature that
>>> you can retry on failure of endpoint invocation. This behavior can be
>>> configured at endpoint level through synapse endpoint API.
>>> You can configure what are the error codes that should retry, retry
>>> delay, number of retry, etc... Configuration section is called
>>> 'markForSuspension'. If any errors (not only for timeout) that have
>>> been defined within ''markForSuspension' is occurred and if it is need
>>> to retry (positive retry count), endpoint is moved to 'TimeOut' State
>>> …Of course, name is not self descriptive. Endpoint in this state is
>>> moved to 'Suspended" state, if endpoint invocation will not be
>>> successful even in retries. If any retry got success, endpoint is
>>> moved to 'Active' state.
>>>
>>> [3] Suspended – There is a new configuration section, called
>>> 'suspendOnFailure' where defines error codes and some other
>>> parameters. If any of these errors is occurred during endpoint
>>> invocation, it is moved in to 'Suspended' state. It can only be active
>>> after, suspended duration is over.
>>>
>>> [4] Switch off - This is state endpoint is moved to maintenance.
>>> State change between any states to 'Switch off' only can be through
>>> manually through JMX based API we have provided. Endpoint which is in
>>> 'Switch off' state can only be moved to 'Active' state and it too can
>>> only be done through JMX.
>>>
>>>
>>> Now there is no method for 'isActive' …But there is a one
>>> readyToSend() that can be used for that. For a leaf endpoint, it
>>> returns true, if it is in active state or timeout state with remaining
>>> reties. For node endpoint, it is deepened on type of endpoint.
>>>
>>> There is no method called 'setActive' as we have multiple states. You
>>> can change states ... please   Look at 'AddressEndpoint' and
>>> 'EndpointContext .
>>>
>>> API may not reflect these. I may nice to move state change API into
>>> extended life cycle management interface –Endpoint Lifecycle
>>> Management and accessing separate behavior through separate API (Like
>>> JDK I/O 'Closable' interface) and separate leaf and node endpoint
>>> functionality into separate interface and base classes.
>>>
>>> I have't look at Dynamic Endpoint code ...
>>>
>>> BTW, Following shows a snapshot of a new endpoint configuration. To
>>> get know about meaning of error code please refer SynapseConstants
>>> class
>>>
>>>  <syn:endpoint name="one">
>>>               <syn:address uri="some loaction">
>>>                   <syn:suspendOnFailure>
>>>                       <syn:initialDuration>5</syn:initialDuration>
>>>                       <syn:progressionFactor>1.0</syn:progressionFactor>
>>>                       <syn:maximumDuration>10000</syn:maximumDuration>
>>>                   </syn:suspendOnFailure>
>>>                   <syn:markForSuspension>
>>>                       <syn:errorCodes>101504,101505</syn:errorCodes>
>>>
>>> <syn:retriesBeforeSuspension>5</syn:retriesBeforeSuspension>
>>>                       <syn:retryDelay>10</syn:retryDelay>
>>>                   </syn:markForSuspension>
>>>               </syn:address>
>>>           </syn:endpoint>
>>>
>>> Thanks
>>> Indika
>>>
>>> On Wed, Nov 12, 2008 at 3:23 PM, Hiranya Jayathilaka
>>> <hiranya911@gmail.com> wrote:
>>>       
>>>> Hi Folks,
>>>>
>>>> I'm attempting to rectify the issues in the dynamic load balance code.
>>>> When
>>>> going through the commit history I noticed that some of the methods in
>>>> the
>>>> Endpoint interface have been removed recently. For example methods like
>>>> isActive and setActive are no longer available in the Endpoint
>>>> interface. I
>>>> believe these are required by the dynamic load balance code. Were they
>>>> removed intentionally? If yes where is this functionality now?
>>>>
>>>> Thanks
>>>>
>>>> Best Regards,
>>>> Hiranya

-- 
Asankha C. Perera
http://adroitlogic.org

http://esbmagic.blogspot.com


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


Mime
View raw message