Xiao,

That is a very good point. I hoped someone would ask about that.

It is a tradeoff. The disadvantage of requiring the server to send full
map(s) at the start of each stream is that if the connection drops, we have
to send the full map over again. But the advantage is that incremental
updates are only within the context of this particular stream. We don't need
keep track of where we were.

To see the issue, suppose we wanted to avoid re-sending the full map when
the client reestablishes the connection. Then the server must assign a
unique id to every incremental update event. When the client reconnects, the
client gives the server the last known event id, and the server sends any
events the client missed.

BTW, SSE does define event ids. Each event has an id, and when connecting,
the client gives a Last-Event-Id header with the last id it received (if
any).

So what is the problem with that? First, the server MUST assign a unique id
to every incremental update, and they must be the same for all clients. That
is, if the server has several increment-update clients, the server must
"clock" their update event streams at the same rate. Second, the server must
keep a buffer of old update events, in case a client needs to reconnect. And
third, because a reconnecting client may send an old (or bogus)
Last-Event-Id, the server may have send the full map(s) anyway.

If we do not use event ids, then it is much simpler. Incremental updates are
in the context of this stream. Period. No persistent state that must survive
the end of the connection. And if desired, the server can send updates are
different rates to different clients.

So I think it boils down to how often we expect connections to drop
unintentionally. If that is common, then, yes, we need to define event ids
to avoid resending the full maps. But if we can assume accidental drops are
rare, then I think it is simpler just to send the full map(s) for every new
connection.

- Wendy Roome

From:  Xiao SHI <[email protected]>
Date:  Thu, October 16, 2014 at 18:22
To:  Wendy Roome <[email protected]>
Cc:  "Y. Richard Yang" <[email protected]>, IETF ALTO <[email protected]>
Subject:  Re: [alto] Incremental updates transport using SSE?

Hi Wendy,

If a client accidentally dropped the connection and hopes to re-connect and
receive the merge-patch events, would it make sense for the server not to
send the first full-map event? It will save quite some effort that way.

Best,
Xiao



_______________________________________________
alto mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/alto

Reply via email to