SessionTypes section

A session type defines a group of configuration settings for session attributes. Multiple session types can be defined in this section with different configuration settings for each session type. Symphony also defines a system default session type with the name "". You can add or update (or remove) a session type to an existing application dynamically using PMC.

A client application specifies the session type when creating a session. The session type that the client specifies must be configured in this section or it should use the system default.

Type

The Type element defines a session type, which is a group of configuration settings for session attributes.

name

Session type name is an identifier for the group of configuration settings. A client application specifies the session type name when creating a session. When a session is created, the configuration settings for the specified session type are applied to that session.

The session type is optional. If you leave this parameter blank " " or do not set a session type, system default values are used for session attributes. If you specify a session type in the client application, you must also configure the session type in the application profile—the session type name in your application profile and session type you specify in the client must match. If you use an incorrect session type in the client and the specified session type cannot be found in the applicatin profile, an exception is thrown to the client.

Where used

SessionTypes > Type

Required/Optional

Required

Valid values

1—256 alphanumeric characters, including all printable characters.

serviceName

Name of service that is used to execute the workload for the sessions in this session type. This is any name that you assign to the service to link the session type to the service definition. The name you enter here must match the name entered in the <Service> section.

Specify a service name only when multiple services are defined in the application profile and when you want to assign the session type a different service than the default service. In the client application you can use the appropriate API to override the service that is used to execute the workload for the session that you are creating. Refer to the API Reference for more details.

Where used

SessionTypes > Type

Required/Optional

Optional

Valid values

1—256 alphanumeric characters, including all printable characters.

Default value

If only one service section is defined in the application profile, uses the service defined in the Service section by default. If more than one service is defined in the application profile, uses the service identified as the default service by default.

priority

Specifies the session priority, where 1 is the lowest priority and 10000 is the highest priority. If there are multiple open sessions, the session priority affects how resources are distributed across sessions.

The resource distribution is also affected by the scheduling policy of the session manager. For more details, refer to the policy attribute in the Consumer section.

Where used

SessionTypes > Type

Required/Optional

Optional

Valid values

1 to 10000

Default value

1

Related attributes

policy—Determines how resources are allocated to sessions according to the scheduling policy used

minServices

Minimum number of CPU slots required for each open session of this type. The minServices attribute is applicable only when the R_MinimumServices scheduling policy is used.

Symphony attempts to allocate the minimum required number of CPU slots to each session before proportionally allocating additional available CPUs based on

Service instances started on the minimum number of CPU slots remain bound to the session until the session is suspended, killed or closed.

Where used

Consumer > policy

Required/Optional

Optional

Valid values

0-10000

Default value

0

Related attributes

  • policy—Determines how resources are allocated to sessions according to the scheduling policy used. The minServices attribute is applicable only when the R_MinimumServices scheduling policy is used.

recoverable

Specifies whether the session and its workload can be recovered if the session manager restarts or fails over.

If true, the data for tasks and other session information are retained to attempt to recover the session in a failover situation.

Where used

SessionTypes > Type

Required/Optional

Optional

Valid values

true | false

Default value

false

Related attributes

  • workDir (SOAM > SSM) —Defines where working files are stored

sessionRetryLimit

Specifies the number of times the session manager retries to bind the service to a session if the service fails in the SessionEnter or SessionUpdate API method. After the session experiences the specified number of retries, the session is aborted.

Note:

The retry count for both of these methods are considered together. For example, if SessionEnter fails once and SessionUpdate fails twice, then the session rerun count is equal to 3. Therefore the SessionRetryCount should be set to a value that accounts for both SessionEnter and SessionUpdate failures.

You can specify what events you want Symphony to consider as bind failures by configuring attributes in the Service > Control > Method section for your service.

Where used

SessionTypes > Type

Required/Optional

Optional

Valid values

0 or more

Default value

3

taskRetryLimit

Specifies the number of attempts to retry a task in the session if the task does not complete successfully. After a task has reached this number of retries and still does not complete successfully, the task is put into the Error state.

This attribute is used if the service fails during the API Invoke method.

If the value of taskRetryLimit is 3, the system makes a maximum of 4 attempts to run the task before the task fails.

Where used

SessionTypes > Type

Required/Optional

Optional

Valid values

0 or more

Default value

3

taskGracePeriod

Number of milliseconds to allow a task to continue running after a session of the task is suspended by a user.

Number of milliseconds to allow the running service method to complete and to allow the service instance to clean up after the resource on which the service instance is running is reclaimed.

For clean up, Symphony will initiate the onSessionLeave() method and the onDestroyService() (if applicable) after the current running service method completes.

  • If a task is running and the Invoke method completes during the task grace period, the result of that method is treated as it would be treated under normal circumstances.

  • If a task is running and the Invoke method does not complete before the task grace period expires, the service instance on which the task is running is terminated and the task is requeued.

Where used

SessionTypes > Type

Required/Optional

Optional

Valid values

0 or more

Default value

100 milliseconds

Related attributes

  • suspendGracePeriod - If suspendGracePeriod is defined in the application profile, it overrides the value for taskGracePeriod for the suspend scenario.

  • reclaimGracePeriod - If reclaimGracePeriod is defined in the application profile, it overrides the value for taskGracePeriod for the reclaim scenario.

reclaimGracePeriod

Number of milliseconds to allow the current running service method to complete and the service instance to clean up when the resource on which the service instance is running is reclaimed. If the service method and cleanup does not complete within the set time, then Symphony will terminate the instance. If the timeout has not expired, Symphony will initiate cleanup after the current running service method completes.

When this reclaimGracePeriod < EGO Consumer reclaim grace period, the reclaimGracePeriod takes effect.

When this reclaimGracePeriod >= EGO Consumer reclaim grace period, the EGO Consumer reclaim grace period takes effect.

If the Invoke method was running and completes during the applied reclaim grace period, the result of that method is treated as it would be treated under normal circumstances.

If the Invoke method was running and does not complete before the applied reclaim grace period expires, the service instance on which the task is running is terminated and the task is requeued.

Where used

SessionTypes > Type

Required/Optional

Optional

Valid values

  • 0 or more

  • -1 indicates unlimited grace period, the EGO Consumer reclaim grace period is used instead

Default value

-1

suspendGracePeriod

Number of milliseconds to allow a task to continue running after the session for the task is suspended by a user.

A task is considered to be running on a service instance when that service instance is executing its Invoke method for that particular task.

  • If the Invoke method completes during the suspend grace period, the result of that method is treated as it would be treated under normal circumstances.

  • If the Invoke method does not complete before the suspend grace period expires, the service instance on which the task is running is terminated and the task is requeued.

Where used

SessionTypes > Type

Required/Optional

Optional

Valid values

0 or more

Default value

100 milliseconds

taskCleanupPeriod

Number of milliseconds to allow a running task to finish executing when the corresponding session has been aborted by the system or a user, or a task is killed by a user. When a session is aborted, the running tasks of the session are canceled, and the service instance manager will not return any task output from the service instance to the session manager even if the task completes before the taskCleanupPeriod expires.

The service instances which have running tasks will not be released until the taskCleanupPeriod expires or the API Invoke call returns.

Where used

SessionTypes

Required /Optional

Optional

Valid values

0 or more

Default value

250 milliseconds

abortSessionIfClientDisconnect

Specifies whether the session is aborted if the session manager detects that the connection between the client and the session manager is broken.

  • If true, and the transientDisconnectionTimeout expires, the session is aborted.

  • If false, and the transientDisconnectionTimeout expires, the session is retained and its workload continues to run. The client can reconnect to session to resume its workload.

Note:

Note that if in a new connection a session that was previously disconnected is opened within the transientDisconnectionTimeout period after the original client exited abnormally, the session is not aborted even if abortSessionIfClientDisconnect is set to true.

Where used

SessionTypes > Type

Required/Optional

Optional

Valid values

true | false

Default value

true

Related attributes

transientDisconnectionTimeout—Defines how long the session manager waits for a client to reconnect before it aborts the sessions that are open on the client’s connection.

abortSessionIfTaskFail

Specifies whether the session is aborted if a task fails (enters the Error state).

Where used

SessionTypes > Type

Required/Optional

Optional

Valid values

true | false

Default value

false

persistSessionHistory

Specifies whether to persist session history. If any form of task history is retained, session history must also be retained.

Session history information includes, but is not limited to:

  • Session creation and end times

  • Final state reached by the session

  • Summary of tasks for the session

Any unrecoverable sessions that are not in their final states are not recorded.

Where used

SessionTypes > Type

Required/Optional

Optional

Valid values

none | all

Default value

all

Related attributes

  • path(SOAM > DataHistory)—Session history is stored in the history files whose location is defined by path

  • persistTaskHistory—If task history is retained, session history must also be retained

persistTaskHistory

Specifies whether to retain no task history, all task history, or only task history for error tasks. Session history must also be retained for task history to be retained.

  • none—Does not persist task history

  • all—Persists history for all tasks

  • error—Persists history only for tasks that end in error

The task history contains details about the task such as run time, rerun, and rerun counts.

Any unrecoverable tasks that are not in their final states are not recorded.

Where used

SessionTypes > Type

Required/Optional

Optional

Valid values

none | all| error

Default value

all

Related attributes

  • path (SOAM > DataHistory)—Task history is stored in the task history files whose location is defined by path

  • persistSessionHistory—If task history is retained, session history must also be retained

discardResultsOnDelivery

Specifies whether the system discards task output for the session when output has been retrieved by the client.

A value of true sets data to be discarded once output has been retrieved by the client.

A value of false sets data to be discarded only after a session is closed or aborted. Note that if set to false, outstanding output for all sessions are tracked until the session completes.

Where used

SessionTypes > Type

Required/Optional

Optional

Valid values

true | false

Default value

true