Should mementos be used instead of (or in addition to) Timestamps?
This page has been created to capture the argument from AggregatorBehaviorRules of whether a Memento would be better to use than a Timestamp in delta updating. The general consensus is that Timestamps are best, Mementos are not needed.
A memento/cookie system? The client makes a request. The server returns the result + a memento/cookie. The next client request includes the memento/cookie and the server knows only to return changes made "after" whatever the memento/cookie refers to. The memento/cookie has meaning to the server, but is an opaque string to the client.
-
[JamesAylett RefactorOk] This would have to be an alternative to "changes since TIMESTAMP", because it doesn't support catch-up as efficiently. If I go on holiday for two weeks and know before I start my aggregator's first fetch that I won't bother reading anything from a particular feed, I could mark its last update as now; with a memento, the aggregator would have to fetch the feed with no memento, throwing away all data. It also raises an interesting issue of how far back should entries be returned? If I ask for everything in the last year, should I get it? What about if I give a memento that decodes to a year ago? Some feeds will be happy to return everything (say, company internal memos for a staff member who has been on sabbatical, or ill; or a very low volume feed - noting that MovableType, at least, defaults to showing "last entries in TIMEPERIOD" rather than last N entries"). Best practices will probably have to note that these requests will happen, and that the server developer will have to consider the correct behaviour for their situation.
-
[DavidJanes RefactorOk] If we do changes since Timestamp, there's probably not a lot of pressure to do memento/cookies. The timestamp can be looked at a memento that's not opaque to the client... As for the other issues, I think the main thing is that the server tells the client the "completeness" of the request.
[JamesAylett RefactorOk] So you'd get information to allow the aggregator to say "most recent 17 entries of total 317 in feed", or something? I'm not convinced that's actually helpful, given that I don't think you're going to be able to divine entry-ids or permalinks just by knowing a couple of them. Perhaps just warning='entry-list-truncated' or something? (That's an ugly syntax, but you get the idea, I hope.)
[DavidJanes RefactorOk] We'll a "incomplete" message for sure, possibly followed by the reasons why (or how) it's incomplete. I see this as filtering up to the user level, so that if they see they haven't got all of Instapundit's messages sucked into their client, they can still do something else if they see fit. This is only one possibility of many, of course.
[JeremyGray] Lets try to keep things simple, everyone. Mementos/cookies don't really provide anything beyond what can be provided via a timestamp. Unless someone has an application in mind which a timestamp wouldn't cover, and, if so, I'd love to hear about it.
-
[JamesAylett] +1 I don't see the utility of mementos over timestamps
[AsbjornUlsberg] I just want to mention that my proposal on the "extended search" can make it fairly easy to retrieve entries since yyyy.mm.dd. I'm not sure wether this helps this discussion, but I felt it was worth mentioning.