When registering a client must present a client-ID UUID and a callback HOST:PORT.
For a new registration, a new handle UUID will be returned to the client if the registration was successful.
However, if the client is doing a re-registration (because of a stale Thrift connection, a client restart, a Llama restart, etc) the following protocol must be observed:
Client-ID UUID | Callback HOST:PORT | Returned handle | Llama behavior | Client behavior |
NEW | NEW | NEW | There is no previous state associated with the handle | There is no previous Llama state associated with the handle |
NEW | EXISTING | NEW | Previous state with the existing handle is erased | Client should not have a prior Llama state as it provided a new client-ID |
EXISTING | NEW | ERROR | Registration is rejected, existing state associated with the handle remains valid | Client either use a new client-ID with a clean Llama state or provide the same client-ID preserving existing Llama state |
EXISTING | EXISTING | EXISTING | Existing state associated with the handle remains valid. The client-ID and callback must be associated to the same handle, else it is an ERROR | Client should known have existing Llama state for the handle |
EXISTING | EXISTING | NEW | There is no previous state associated with the handle | Client should discard all previous Llama state as it is not valid anymore |