LOTUSSCRIPT LANGUAGE


Advantages of thread-safe agents
Threading offers the following advantages over serial agents:
Domino Release 4.5.1 and later supports multiple Web agents, allowing each LotusScript agent to run in a separate thread in the same process. In Domino, if multiple users activate Web agents simultaneously and the server is not thread-enabled, the agents will be serialized. To enable Domino synchronized agents, see the section "Running asynchronous agents on the Domino server."

Agents run serially

In this example, User A's agent had control over the server until it completed. User B saw no activity until Agent 1 was finished.

TimeOperationComments
0 User A activates Agent 1.
1 ComputeAgent 1 starts. User B activates Agent 2.
2 ComputeAgent 1 running.
3 ComputeAgent 1 running.
4 ComputeAgent 1 running.
5 PrintAgent 1 ends.
6 ComputeStart User B's Agent 2.
7 PrintAgent 2 ends.

Threaded agents

In this example, User B sees results sooner. User A sees response later, but the time difference is not noticeable.

TimeThread1Thread2Comments
0User A activates Agent 1.
1ComputeAgent 1 starts. User B activates Agent B.
2ComputeAgent 1 running.
3ComputeAgent 1 swapped out. Agent 2 starts.
4PrintAgent 2 ends.
5ComputeAgent 1 running.
6ComputeAgent 1 running.
7PrintAgent 1 ends.

See Also