IBMlogo
IBM eNetwork Communications Server for Windows NT
Host Publisher Feature, Version 6.01
[Next|Previous|Contents]

Host Publisher Hints and Tips

Scoping and Connection Caching

Scoping and Connection Caching are two features that improve performance of Host Access integration objects. They can be used together or separately.

Scoping

Each integration object has a Scope setting, which is set to Client or Page.

The default Scope setting is Page. The Disconnect macro executes immediately after the Data Loop macro. When a Web page accesses the integration object, it must log in again.

If the Scope is set to Client, the Disconnect macro is not executed immediately after the Data Loop macro. The integration object returns the data to the Page Server, but the integration object waits for a specified time before executing the Disconnect macro. If the integration object is accessed again within that time from the same client, the integration object begins execution immediately with the Data Loop macro, avoiding logging off and logging on again.

For this to work, the Data Loop macro must return the session to the same state it was in immediately after logging in.

Scoping to client enables the same client to access the same integration object from multiple Web pages. The Web pages might use Web form parameters or session variables to control the integration object execution and perform different tasks.

For example, in each Web page, code the name of the host application to invoke, define a different screen in the integration object for each application, and collect different data.

The client accesses the same host repeatedly without logging off and on, improving performance.

Different clients use different host sessions, providing security.

Note: The online documentation reversed the definitions of Scoped to Page and Scoped to Client in one place. The definitions given here are correct.

Changing the Scope setting

  1. Select the integration object for which you want to set the scope.
  2. Click the State tab.
  3. Under Scoped to, click Page or Client.
  4. If setting Scope to Client, in Expire After, select or type a number and set a unit of time.

Connection Caching

Connection Caching provides one or more named pools of connections which are shared by multiple integration objects. Each pool is called a Host Session. Each Host Session represents one or more connections with a single network configuration, i.e. transport protocol, terminal type, LU name or host server, etc.

The first time each connection is used by an integration object, that integration object's connect macro is used to log on. Disconnect macros are never used for cached connections. If a cached connection loses its network connection to the host, the connection will be logged on again with the connect macro of the next integration object that uses the cached connection.

Important Notes:

  1. The Host Session configuration is stored in the Windows registry, not in a file. You must use the Integrator to configure Host Sessions on each machine where you will run a Page Server using connection caching.
  2. All integration objects that use a given Host Session should have similar connect macros, since it is unpredictable which object's connect macro will be used to logon each cached connection.

Configuring Connection Caching

By default, the maximum number of connections per pool is 32. You can increase this by creating a Windows registry entry called HKEY_LOCAL_MACHINE\SOFTWARE\IBM\Host Publisher\Config\Host Access SIM\MaxCachedConnections of type DWORD and setting it to a number higher than 32. Numbers lower than 32 are ignored.
  1. On the Tools menu, click Data Connection Cache. The Data Connection Cache dialog box appears.
  2. Select Host Sessions and click Configure. The Host Access Cache dialog box appears.
  3. Set the options and click OK.

    Use

    To

    Session Name

    Select a session. Click Add to add a session. Click Remove to remove a selected session.

    Cache

    Select a number or type a new number indicating the number of connections for this session.

    Serialize access. . .

    One thread at a time accesses the cached connections. Only connections in the connection cache can connect. Queued requests wait until the connection cache is available. The wait time is set in Milliseconds to wait for a connection. If the wait time expires, the request fails.

    If you do not select this box and all connections in the cache are in use, new requests immediately make a new connection.

    Milliseconds to wait for a connection

    Type the number of milliseconds to allow requests to wait for a cached connection. Type -1 for an unlimited wait.

    Temporarily disable caching for this component

    Select this check box to temporarily disable caching connections for the session, such as for testing purposes. Otherwise, do not select this box.

Selecting connection caching for an integration object

By default, a new unique connection is used for each connection request.

  1. Configure the connection caching.
  2. Select the desired integration object.
  3. Click the Connection tab.
  4. Select Use Cached Connection or Use Unique Connection
  5. If using cached connections, select a configured session from the list.

Performance

You might be able to improve performance somewhat by leaving the session in the host application. This avoids the overhead of starting and stopping the host application.

In other words, start the host application from the connect macro, and do not exit the host application from the data loop macro. (This might not be appropriate for all host applications.)

Scoping vs. Connection Caching

Here's a summary comparing the two techniques:

Scoping Connection Caching
Reuse host connection without logging off yes yes
Client-specific yes no
Let multiple integration objects use the same host connection no yes

Reuse host connection without logging off

Scope to Client and connection caching both reduce the overhead of logging on and off. The integration object sends the data back to the page server after executing the Data Loop macro, but does not immediately execute the Disconnect macro and end the connection.

Client-specific

Setting scope to client allows a particular user to continue using the same host connection. This might be important when doing user-specific processing. Connection caching does not necessarily assign the same connection to the same user.

Let multiple integration objects use the same host connection

Scoping affects a single integration object. If the page server accesses the same integration object repeatedly from the same client, setting Scope to Client avoids logging off and on.

Connection Caching is applied to multiple integration objects, so logging on and off is avoided even if the page server is accessing different integration objects. This works even for integration objects in different WBLs.

User management

Some systems prevent a particular account from logging on more than once. You cannot easily use connection caching with such systems, since there is no way to arrange for the different connections to use different accounts.

Scope to client is also difficult to use with such systems, except in situations in which the user specifies the account to use.

See User ID Management for more information about this general problem.


[Next|Previous|Contents]
IBM eNetwork Communications Server for Windows NT
Host Publisher Feature, Version 6.01