Session Lifecycle
Sessions maintain information regarding a particular user's connection to the DataSplice Server. When users connect to DataSplice, either a new session is created or an existing session from a previous connection is used.
Each session consumes a server license for the lifetime of the session. In the case of online users, the session is released when disconnecting. Offline sessions continue to use a license until the user logs out of the system.
In practice, this means that online installations can support a larger number of users with fewer licenses than offline installations, because licenses are only in use when a user is actively connected to the server and can be automatically freed if the connection is idle for a specific amount of time.
Online Operation
For online applications, connections and sessions don't have any meaningful distinction. The session lifecycle looks like:
- The Remote Client establishes a new connection with the DataSplice Server.
- The user attempts to authenticate.
- If the authentication succeeds, a new session is created for the connection.
- When the Remote Client disconnects, the session is destroyed.
Offline Operation
In offline applications, the server must persist session information across multiple connections. This means that the session object is not destroyed when the Remote Client disconnects, but rather is saved to disk so it can be reused when the Client reconnects. The same session might be used for any number of connections.
Modified Records
Each session tracks the records modified by the user and the order in which the changes were performed. When committing changes, which happens when the user commits changes, synchronizes settings with the server, or logs out, each modified record is committed to the server in the order the original modification was made. This ensures that data dependencies are respected between multiple records (for instance parent-child views).
Logging Out
Uncommitted changes are always committed to the server prior to logging out. If this cannot be performed successfully the user is given the option to delete the local changes (accompanied by a stern warning).
Logging out of an online session simply releases the current session and disconnects the client. Offline sessions will attempt to connect to the server and release the session so the license will no longer be in use. If this cannot be performed for some reason, the session name is remembered and the client will attempt to release the session the next time the server is successfully contacted. However, this has the possibility of orphaning sessions on the server that will continue to consume licenses until they are released by an administrator. In practice, users should be trained to log out in situations where network connectivity is available so the session can be released.
Last modified 2009-10-13 01:12 PM