Redis usage#

TeaL listeners are made to be fast in their response to the end user. In order to do this, for callback events, they redirect the end user to the final redirect URI as soon as possible, then pushes the callback event on the message queues (see Callback events).

For TeaL listeners to be able to do this, they need stored callback state information available, as stored by the dispatchers. This is accomplished using a Redis database.

Callback state information are stored by state, using callback_ followed by the state as the callback state information key, e.g. callback_123. Information is stored as UTF-8 JSON-encoded objects, using the structure defined in StoredState.

When a listener reads an existing state, if the expiration date and time are later than the current UTC date and time, the state must be deleted on the Redis database, and discarded as an unexisting callback state.