Way of the Force

Keeping the mudlist in sync

The mudlist is a shared datastore with a deterministic approach to conflicting data.

Each entry in the mudlist is 'owned by the router on which the corresponding mud was last connected. When a mud connects to a different router, this router takes over ownership of the corresponding record in the mudlist.

Initial connection

After connecting to a remote router for the first time, the local router should send an irn-mudlist-req packet using 0 for mudlistid.

The remote router should respond with an irn-mudlist-altered packet containing a new mudlist. If the mudlist is too large for a single packet, the part which does not fit should be sent as delta packets.

subsequent connections

After connecting to a remote router, send an irn-mudlist-req containing the mudlist id last received from that router.

The remote router should respond by sending all changes since that mudlist id as delta packets. If it cannot reconstruct the history (ie: the mudlist id is too old), it will respond with an altered packet, and behave as if it received a 0 mudlist id

Online operation

irn-mudlist-deltas

Upon receiving an irn-mudlist-delta concerning a specific mud, a router should implement the following checks:

  1. Is this about an existing mud or a new one. If new, accept the record and add it.
  2. Is the update claiming the mud to be online on another router? if so, the router should modify its local mudlist to assign ownership of the record to the router on which the mud came online. If there exists a local connection with the mud, the router should disconnect it.
  3. Is the update claiming the mud went offline on another router? If the mud is locally connected, respond with an irn-mudlist-delta claiming it is online at the local router. If it is not locally connected, verify if the router from which the update was received owns the mudlist entry. If so, modify it, if not, ignore the delta.

irn-mudlist-altered

Upon receiving an irn-mudlist-altered packet a router should:

  1. Delete any muds from its local mudlist for which the sending router is responsible.
  2. Add all the muds in the packet if they are either not yet listed, or are currently connected to the source of the altered packet.

Back to index