[Standards] pubsub item count

Justin Karneges justin-keyword-jabber.093179 at affinix.com
Tue May 10 20:16:15 UTC 2011


On Tuesday, May 10, 2011 12:57:22 PM Sergey Dobrov wrote:
> On 05/11/2011 02:44 AM, Justin Karneges wrote:
> > On Tuesday, May 10, 2011 11:57:19 AM Sergey Dobrov wrote:
> >> On 05/11/2011 01:46 AM, Justin Karneges wrote:
> >>> On Tuesday, May 10, 2011 11:14:04 AM Sergey Dobrov wrote:
> >>>> I think that it is enough to retrieve it by request with
> >>>> node's metadata.
> >>> 
> >>> The problem there is that you cannot track updates to the count without
> >>> polling.
> >> 
> >> Every event adds to the count one, am I wrong? :)
> > 
> > Ah, so perform the query after an event happens?  I guess that would
> > work.
> 
> Why? Query once, increment at each event.

This /almost/ works.  Updated items that are not yet known to the client would 
incorrectly cause an increment.

> Select count of items to often can be very inefficient, I think.

Well, exposing the count would be optional.  There are efficient ways to do it 
if the server cares.

Justin



More information about the Standards mailing list