-
Notifications
You must be signed in to change notification settings - Fork 0
How _changes works
Adam Fraser edited this page Jan 20, 2015
·
4 revisions
- Request comes in with a
sincevalue - Gets the set of channels associated with the user making the request. For each channel, calls the channel cache to get an ordered list of sequences since
since. The Channel cache will run a view query if needed. - Works the ordered channel lists to serve revisions in sequence, and avoid duplicates.
- Sends last_seq, which is just the sequence of the last revision that was sent.
- Basically runs a loop that does the equivalent of the non-continuous case in each iteration. The first run of the loop is the same as the non-continuous case. Subsequent iterations set
since=lastSeqfrom the previous iteration. - The loop pauses after each iteration waiting for notification that new updates have come through on the feed. Notifications are managed by the Change cache (which works the feed).