-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Token API #33
Comments
The implementation is as follows. Standard PathEach riak_kv node should have a It is possible to start in riak a A token request can be issued for a tokenID, by starting a The The
On granting a token, or queueing a request, the Once a token has been granted to a An inactivity timeout will be triggered on the session process. If the Any riak_client request may be forwarded through the On completing the session, a If the session needs to be prolonged, despite being inactive, a Failure ScenariosShould the Should the node which is currently head of the preflist stop or crash, subsequent requests will see a new head node for that tokenID. As all sessions associated with the crashed node will have been killed as part of the crash, this new head needs no prior knowledge of any previously granted tokens before granting tokens in its new role. Should a node recover from a crash, there may have been a token granted by a node downstream in the preflist - hence why the two downstream nodes are checked before granting or queueing a request. Extreme Edge Cases (non-exhaustive)
|
The initial implementation is to provide stronger conditional PUT by using the token mechanism within Riak to wrap the GET/PUT process in a conditional PUT in a single session. |
Feature request to have a Token API:
GET tokens/<TokenID>?type=request&request_timeout=<RequestTimeoutS>&token_timeout=<TokenTimeoutS>
GET tokens/<TokenID>?type=renew&session=<EncodedSessionReference>
GET tokens/<TokenID>?type=release&session=<EncodedSessionReference>
Whereby only one token session can be active in the cluster for any one token ID at the same time
Whereby an additional header can be provided to a Riak API request
X-Riak-Session: <EncodedSessionReference>
Such that the request will only be processed if the session (granted as a result of a request to the token API) is currently active.
The text was updated successfully, but these errors were encountered: