[Standards] pubsub item count

Sergey Dobrov binary at jrudevels.org
Wed May 11 10:06:22 UTC 2011


On 05/11/2011 03:16 AM, Justin Karneges wrote:
> 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.
I already asked in JDEV why we don't include timestamps with events.
Timestamps can solve this problem.

> 
>> 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
> 


-- 
With best regards,
Sergey Dobrov,
XMPP Developer and JRuDevels.org founder.




More information about the Standards mailing list