She walked out of the building and the server never noticed
A field app on phones. Users leave the depot's wifi and pick up cellular halfway across the car park, and support tickets say messages arrive twice, or arrive an hour late, or never.
A TCP connection is identified by four things: both addresses and both ports. Changing network changes the phone's address, so the old connection is not degraded, it is gone. The phone finds out within a second. The server does not find out at all — nothing was sent to tell it — so it is still holding an established connection to an address that no longer belongs to anyone, and it will keep sending to it.
- R1A phone that reconnects after changing network must be recognisable as the same session as before, so the new connection can be joined to work already in progress. The thing that identifies it is chosen by the client and outlives any single connection, so it cannot be the connection's own identifier — that one died with the connection.
- R2When a session reappears on a new connection, the earlier one must be closed deliberately rather than left to time out. It is still established as far as the server is concerned, it will keep being sent to, and on a front door billed per message those sends are paid for and delivered nowhere.
- R3Messages addressed to a session while it has no connection attached must be held, and delivered once and in order when one attaches. Not broadcast to whoever is listening, and not lost because nothing was listening.
Outside every boundary: Front door (holds both connections), The old connection (still established; FAILED: nobody is on the other end), Phone (wifi, then cellular), Application (sends to the session), an empty slot for the the name a phone brings back with it, tier 1, an empty slot for the closes the one nobody is on, tier 1, an empty slot for the messages waiting for a connection, tier 2 Connections: Phone holds an open connection to Front door Application calls Front door Front door calls the name a phone brings back with it — who is this Front door calls messages waiting for a connection Front door controls closes the one nobody is on closes the one nobody is on controls The old connection — close it