FW: [Openais] Certain Things Regarding Event Service API

Mark Haverkamp markh at osdl.org
Tue Jul 26 08:39:59 PDT 2005


On Tue, 2005-07-26 at 20:46 +0530, Arunachalam wrote:
> Yes Sir,
> 	
> 	As u said the event is sent to the subscriber only, but if there are
> n subscribers, the 'LOST EVENT' event message must be sent to all of them if
> patterns match for them too.
> 
> 	Kindly follow the case below and correct me If I am wrong in this
> case or I've not explained well.
> 
> Consider this case,
> 
> 	Two events are to be published. There are two subscribers say s1 and
> s2 are subscribed with the same pattern. The MAX delivery queue size is 2.
> First event is published (Low priority event) and queued for both
> subscribers (both pattern match and opened two times, the channel
> individually). Now the deliver queue size is 2 containing same event matched
> for both of them. Both still are not dispatched. 
> 	
> 	Now an event of High priority comes, in the first pass of the loop
> it matches with the subscriber 1 and placed in the deliver queue and 'LOST
> EVENT' event is sent to him (queued for him assigned with his subscription
> ID). 	In the second pass of the loop, the subscriber 2 (next open
> channel), the High priority event is placed in the deliver queue removing
> the Low priority event and the this LOST EVENT is not being notified. 
> 	
> 	This I say because of, In the code the variable "do_deliver_warning"
> will not be set for this time because the queue is already blocked. Since
> the above variable is not sent, the part of the code which generates 'LOST
> EVENT', will not be executed.

The LOST EVENT message only says that one or more messages have been
lost.  You will not know how many events were dropped. So, the LOST
EVENT message is only sent one time when the first message was dropped.
The code continues to drop messages until the queue is empty enough to
accept new messages for delivery.  Once the queue is accepting new
messages for delivery, the do_deliver_warning flag will be set so that
if we need to drop messages again we'll send a new LOST EVENT message.

Does that make sense? 
I believe that the code notifies any process that has events dropped
that it should have received. If I'm not understanding your situation
please let me know.  I've copied the openais list so that others could
comment if they wish.

Thanks,
Mark.

> 
> 
> 
> 
> 
> Regards
> A P Sarathy
> 
> 
> 
> -----Original Message-----
> From: Mark Haverkamp [mailto:markh at osdl.org] 
> Sent: Tuesday, July 26, 2005 7:58 PM
> To: arunachalamp at huawei.com
> Cc: Steven Dake; Openais List
> Subject: Re: FW: [Openais] Certain Things Regarding Event Service API
> 
> On Tue, 2005-07-26 at 10:07 +0530, Arunachalam wrote:
> > Sir,
> > 
> > 	And about the 2nd question of 'LOST EVENT' event ?
> 
> I disagree that a lost event message should be sent to the entire
> cluster.  The situations causing, and response to, a lost event are
> described on page 23 of the specification.  The way that I understand
> this section is that it applies to individual subscribers.  If an event
> cannot be delivered to an individual subscriber for some reason, the
> LOST EVENT event is sent to that subscriber only. 
> 
> Mark.
> 
> 
> > 
> > Regards
> > A P Sarathy
> > 
> > 
> > 
> > -----Original Message-----
> > From: Steven Dake [mailto:sdake at mvista.com] 
> > Sent: Friday, July 22, 2005 10:04 PM
> > To: arunachalamp at huawei.com
> > Cc: openais at lists.osdl.org
> > Subject: Re: [Openais] Certain Things Regarding Event Service API
> > 
> > On Fri, 2005-07-22 at 16:34 +0530, Arunachalam wrote:
> > >      1. In the Publish API (library part)SA_AIS_ERR_TOO_BIG should be
> > >         returned if the event data size is greater than
> > >         SA_EVT_DATA_MAX_LEN (With reference to SAF Spec B 01
> > >         Page.No:15, Line.Nos: 10-13). Presently the error code
> > >         returned is SA_AIS_ERR_INVALID_PARAM.
> > > 
> > >  
> > 
> > I agree I'll open a bug.
> > 
> > > 
> > > 2. In the implementation of SAF B 01 Spec of  OpenAis 'LOST EVENT'
> > > Event is not delivered to all the subscribers for the particular
> > > channel. The message is sent only to the subscriber pass of the loop
> > > when the lost event is generated.
> > > 
> > I think your right here.  What we need is when a lost even occurs, the
> > event executive should send a "lost event" message via executive message
> > handler.
> > 
> > I leave it up to mark to solve this one though :)
> > 
> > regards
> > -steve
> > 
> > 
> 
-- 
Mark Haverkamp <markh at osdl.org>




More information about the Openais mailing list