Table of Contents

Search

  1. Preface
  2. Introduction
  3. Program Design
  4. SSA-NAME3 Functions
  5. Language Specific Guidelines
  6. Controls
  7. Advanced Controls
  8. Address Standardization
  9. ASM Workbench

SSA-NAME3 API Reference Guide

SSA-NAME3 API Reference Guide

SSA-NAME3 Sessions

SSA-NAME3 Sessions

SSA-NAME3 manages the resources it needs to satisfy API call requests in memory areas called "sessions". SSA-NAME3 acquires, manages and releases these memory areas.
A session is established explicitly, via an
ssan3_open
call, or implicitly, via any other call if SSANAME3 does not recognize the caller.
The establishment of a session goes through an initialization process. During this process, the specified Population Rules are loaded, and a work-area for SSA-NAME3’s use is allocated. This is work that should happen as infrequently as possible, and this is to some extent under the control of the application designer.
It is important for performance that all of the function calls from the same transaction or process use the same session. In other words, calls to SSA-NAME3 from the same transaction or process for
ssan3_get_keys_encoded
,
ssan3_get_ranges_encoded
, and
ssan3_match_encoded
, will perform faster and use fewer resources if the same session is used during these calls.
One copy of SSA-NAME3 can handle 1024 sessions. In some cases, a large number of concurrent users, a large number of inactive sessions, or a large number of calls that do not properly re-use sessions, could lead to SSA-NAME3 running out of sessions.
If it is truly a large number of real concurrent users, then another copy of SSA-NAME3 may need to be started/loaded.
Otherwise, SSA-NAME3 will do its best to reuse sessions intelligently. However, if all else fails the SSA-NAME3 instance may need to be unloaded/reloaded or the SSA-NAME3 server re-started.
If a large number of users are expected to be using SSA-NAME3 services, it is recommended that the application be designed as a server process that manages a pool of available sessions for calling client applications.

Explicit Sessions

As said previously, it is recommended that an application open explicit sessions, as this provides more control over the system’s resources and performance.
To request an explicit session, an
ssan3_open call
should be done passing a Session-ID of -1. This will cause a new valid Session-ID to be allocated and returned to the calling program (example, Session-ID 1048576), providing SSA-NAME3 with a handle to the initialized resources. It is this Session-ID (example, 1048576) that should be used for all subsequent SSA-NAME3 calls in the current transaction/ process in order for it to use the same session.
Do not pass a value of "-1" in the Session-ID field of a function unless you wish to force SSA-NAME3 to do an implicit
ssan3_open
again.
A session allocated through an
ssan3_open call
is locked and cannot be re-used by another session until released through the
ssan3_close call
, or by exceeding an inactivity time-out value as discussed below.
Once a session is finished with, it should be released through the
ssan3_close
call using the allocated Session-ID (example, 1048576). The Session-ID is then set to -1 by the
ssan3_close
call.
If it is likely to be common that sessions will be left open and become inactive, without being explicitly closed, then it is possible to control the length of time a session is held by SSA-NAME3. An inactivity time-out value (in seconds) may be passed in the
ssan3_open
call, or if using the SSA-NAME3 server, may be specified as a server start-up parameter. Once a period of inactivity has reached the time-out value, the session may be closed and reallocated to another caller. If the original caller tries to later reuse that session, it will be allocated a new Session-ID and cause the initialization process to be repeated.

Ephemeral Sessions

If an explicit
ssan3_open
call is not made, an implicit or "ephemeral" session is initiated for the calling application. An ephemeral session will be created if:
  • The session id passed in any call is not known to SSA-NAME3
  • The
    ssan3_open
    call does not pass a Session-ID value of -1
While ephemeral opens save the application from issuing the
ssan3_open
call, if SSA-NAME3 at some stage runs out of session handles, it may allocate a new session to an existing ephemeral session slot.
This means that the next call from the application who’s ephemeral session was re-used will cause the initialization process to be repeated, and may lead to some performance degradation.
SSA-NAME3 will overwrite ephemeral sessions before checking for timed-out sessions.
Once a session is finished with, it should be released through the
ssan3_close
call.

0 COMMENTS

We’d like to hear from you!