Bind the session with the specified user id. It would finally invoke the the sessionService.bind in the cooperating frontend server.
cooperating frontend server id
session id
user id
callback function
Get backend session by frontend server id and session id.
frontend server id that session attached
session id
callback function. args: cb(err, BackendSession)
Get backend sessions by frontend server id and user id.
frontend server id that session attached
user id binded with the session
callback function. args: cb(err, BackendSessions)
Kick a session by session id.
cooperating frontend server id
session id
callback function
Kick sessions by user id.
cooperating frontend server id
user id
kick reason
callback function
Push the specified customized change to the frontend internal session.
cooperating frontend server id
session id
key in session that should be push
value in session, primitive js object
callback function
Push all the customized changes to the frontend internal session.
cooperating frontend server id
session id
key/values in session that should be push
callback function
Unbind the session with the specified user id. It would finally invoke the the sessionService.unbind in the cooperating frontend server.
cooperating frontend server id
session id
user id
callback function
Service that maintains backend sessions and the communication with frontend servers.
BackendSessionService would be created in each server process and maintains backend sessions for current process and communicates with the relative frontend servers.
BackendSessionService instance could be accessed by
app.get('backendSessionService')
or app.backendSessionService.