ws-sandesha-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chamikara Jayalath <>
Subject [Sandesha2] The Policy model
Date Fri, 11 Nov 2005 01:30:33 GMT
Hi All,

I'm working on implementing the policy model for sandesha2. Sanka has
already created a RMPolicyBean and a PolicyUtil class which can be used to
extract a RMPolicyBean out of a large Policy OM Element. The problem is how
to pass this extracted information around the Sandesha2 framework.

This is what I have in mind.

Each messageContext should have an associated RMPolicyBean which contains
its policy information. In the client side this information will be set by
the user (probably wrapped by the stub). In the server side, a fixed set of
policy values (given in the module.xml) will be loaded to the RMPolicyBean.
This infoamtion will be later set to each messageContext.

Here are how these policies can be used.

Rretransmission interval, exponention backoff
The RetransmitterBean will adjust the nextTimeToSend after each
retransmission. To calculate the nextTimeToSend, the sender will use these
two policy values (with the sentCount property which gives the no. of times
the message has been retransmitted) which can be obtained from the
associated RMPolicyBean of the current message Context.

Acknowledgement interval
When adding a ack message the timeToSend will alsays be set to
currentTime+Acknowledgement Interval so that the ack message will not be
send before the interval get expired. When the sender detect an
applicationMessage it will look for an ack of the same sequence. If it find
one, the ack will be piggybacked. otherwise the ack will be sent as a
standalone message.

Inactivity timeout
Each sequence has an associated lastRespondedTime property which gives the
last time the other end responsed. Sender thread in it's each loop will look
at the the lastRespondedTime of each sequence, if it find tha
currentTime>lastRespondedTime+inactivityTimeout it will end that sequence.

Comments ???


View raw message