[standards-jig] Re: [JDEV] PubSub (0060) Max_items -> Range?
jabber.org at ralphm.ik.nu
Tue May 20 14:51:18 UTC 2003
On Tue, May 20, 2003 at 10:18:00AM -0400, Matt Mankins wrote:
> > This is a valid point, but what if the subscriber does not know how many
> > have been missed?
> This seems to be a client side issue.
> Since the items are unique and don't change over their lifetime, one
> could imagine an algorithm like this:
Item *IDs* are unique within a node, their payload can change over time.
> ...which should keep the client up to date.
> Note too that the JEP suggests that max_items="2" return the two *most
> recent* items...so there already exists a counting, done by time.
Look at the following events:
the item with item id 'myitem' is ordered as #12, and you ask for the items #1-#10 (counting from 1).
the item 'myitem' is updated by a new publish, thus moving to #1 (and letting
the items previously ordered as #1-#11 move up one place.
You ask for the second set (#11-#20). This doesn't include 'myitem' because
it has been updated.
An obvious solution would be to keep track of published items since your
initial query and compensate the requested ranges accordingly, but that assumes
publishes, notifications and queries are handled sequentially, so that doesn't
By the way, this never gives you a consistent set of published items when
publishes happen in between.
More information about the Standards