Bind current session with the user id. It would push the uid to frontend server and bind uid to the frontend internal session.
user id
callback function
Export the key/values for serialization.
Get the value from backend session by key.
key
value
Push the key/value in backend session to the front internal session.
key
callback function
Push all the key/values in backend session to the frontend internal session.
callback function
Set the key/value into backend session.
key
value
Unbind current session with the user id. It would push the uid to frontend server and unbind uid from the frontend internal session.
user id
callback function
BackendSession is the proxy for the frontend internal session passed to handlers and it helps to keep the key/value pairs for the server locally. Internal session locates in frontend server and should not be accessed directly.
The mainly operation on backend session should be read and any changes happen in backend session is local and would be discarded in next request. You have to push the changes to the frontend manually if necessary. Any push would overwrite the last push of the same key silently and the changes would be saw in next request. And you have to make sure the transaction outside if you would push the session concurrently in different processes.
See the api below for more details.