Peter Saint-Andre wrote: > On 6/3/09 9:43 AM, Dirk Meyer wrote: >> Brian Cully wrote: >>> I'm not sure if it's entirely appropriate to shoehorn it into >>> pubsub, since you can probably take care of this within a given >>> application, but doing it at the pubsub level would make it easier >>> for app developers and allow for easier distribution of item >>> publishes without having to share state outside of XMPP. >> >> It works without extra support in pubsub. It would be similar to roster: >> on every startup my application would contact all pubsub servers it >> stores stuff on and fetches all items from the persistent storage. My >> idea would reduce the traffic just like roster versioning does. It is a >> nice add-on. > > What exactly needs to change in the spec to make this happen?
Bob Wyman gave me the idea to re-use the timestamps discussed on another thread. The idea is good and solves half my problem. Using the timestamp I can keep track of changes on the server. What's missing is a way to use auto-subscribe with that feature. I want to know if the node has new or deleted items since I was last (auto) subscribed. Instead of sending the latest item on subscribe, the server sends the last timestamp of a change on the node (which could be a delete event that can not be detected by sending the latest item). So what I need as spec besides the timestamp discussed in the other thread are a two new possible values for the configuration option pubsub#send_last_published_item: timestamp_on_sub and timestamp_on_sub_and_presence. The behave similar to the values without the timestamp_ prefix. The difference is that the server does not send the real last published item and only the timestamp of the last change instead: <message from='pubsub.shakespeare.lit' to='[email protected]' id='autosub'> <event xmlns='http://jabber.org/protocol/pubsub#event'> <items node='princely_musings' timestamp='...'> </event> </message> Does this make sense? Dirk -- $100 placed at 7 percent interest compounded quarterly for 200 years will increase to more than $100,000,000 - by which time it will be worth nothing. [Robert A. Heinlein 1907-1988]
