Hi Folks,
Indika, thanks a lot for the detailed explanation. It helps a lot.

I also noticed some changes in the AlgorithmContext API. A couple of methods
have been removed and their invocations are commented out from the  dynamic
load balance endpoint code. Any idea what's up with them?

Thanks

Best Regards,
Hiranya

On Wed, Nov 12, 2008 at 5:50 PM, indika kumara <[EMAIL PROTECTED]>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
> <[EMAIL PROTECTED]> 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
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to