The data itself.
For a "getAll" this is a Map of AddressEntry objects, and for
a "list" this is a Set of String names. In case of failure
this may be an Exception (e.g. "access denied").
The client should send its latest view of its entries.
Rebound entries should show their latest value, unbound
entries should be excluded, and already-leased values should be
included.
The client should send a new Record with a new UID every time
it changes its local data. Renewals and retries should send
the current UID.
NOTE:
This design currently doesn't support "bind" operations; it
upgrades all binds to rebinds. This was done to expedite the
white pages implementation, but should be revisited in the near
future. The problem with "bind" operations is that they are
difficult to replicate (is "already bound" tested at one server
or all servers?) and difficult to retry if a server is down
(what if one server says "ok" and the other says "already
bound?).
The proposed implementation is to tag entries with a
"bind-only" flag, then allow any server to reject these
specific entries. If a server rejects any of the "bind-only"
entries, and the request contains rebind or unbind operations,
then the client must send a new Record modification (excluding
the "bind-only" operations) with a new UID. This will
guarantee that duplicate or lost messages won't cause
confusion over bind-only operations.
The reason for throwing away the failed bind modification is
illustrated in this example: say the record proposed two
actions:
uid=u/1
bind X=Y
rebind P=Q
The request is sent to server A, which attempts to send back
a partial-failure that accepts "P=Q" but rejects "X=Y" due
to a prior binding. At this point the network goes down, so
the client retries at server B, which accepts both actions
and tells the client the new lease. Server B crashes, server
A comes back up, and the client attempts to renew its
lease on uid u/1 at server A. Server A renews just
"P=Q", which is the wrong partial record instead of the full
record data.
|