Remote Access Subsystem
Installed with the ThingWorx Remote Access Extension (RAE), the RemoteAccessSubsystem provides support for Create, Run, Update, and Delete operations for remote sessions. The subsystem persists remote sessions in a ThingWorx data store for the lifetime of the remote session. Once a remote session is completed (TERMINATED), it is removed from persistence.
|
While the data store for remote sessions can scale to at least 100K records without issue, the number of remote sessions for Axeda Global Access Server should be much lower than 100K — likely closer to 1000 or 2000 sessions.
|
The subsystem has the following configuration settings:
• Maximum Number of Sessions to Return from Data Storage specifies the maximum number of persisted remote sessions to return when there is a request for remote sessions. The default value is 500 sessions.
• Timeout to indicate that the RemoteAccessClient is not installed locally specifies the number of milliseconds to wait before generating a message that says the ThingWorx Remote Access Client (RAC) is not installed on the user's computer.
• Maximum Session Duration (in hours) specifies the maximum number of hours that a remote session can remain active. The default value is 24 hours, with a minimum value of 1 hour and a maximum value of 240 hours.
• Inactive Session Timeout (in minutes) specifies the number of minutes that a remote session is allowed to remain inactive before it is timed out. The default value is 15 minutes, with a minimum value of 1 minute and a maximum value of 60 minutes.
Here is the configuration screen for the subsystem:
The subsystem configuration can be edited. The subsystem is started automatically when the ThingWorx Platform is started.
| The RemoteAccessSubsystem will throw exceptions if callers attempt to set values outside of the minimum and maximum value ranges from both ThingWorx Composer and the SetConfigurationTable service. |
The subsystem provides the following services to clean up old sessions and end inactive sessions:
Service | Description | Responsibilities |
---|
CleanupOldSessions | Cleans up any sessions that have exceeded the maximum session duration by updating status to CLOSE_REQUESTED. | • Determine expirationTime (in ms). • Find all Remote Sessions with a createdTime field that is less than or equal to expirationTime. • For each session returned, set status to CLOSE_REQUESTED and then set the terminationCause to "Remote session close was requested due to max session duration of %s hours" and then update the session. |
TerminateInactiveSessions | Ends any inactive sessions and sets the status to TERMINATED. | • Determine inactiveTime (in millis). • Find all Remote Sessions with a lastActivityTime field less than or equal to inactiveTime. • For each session returned, set the status to TERMINATED and then set the terminationCause to "Remote session was terminated due to session inactive timeout of %s minutes". Then, update the session. | Since the status is TERMINATED, the session is removed from persistence and also from the subsystem. |
|