Advantages of thread-safe agents

Threading offers the following advantages over serial agents:

  • Computer resources on Domino® Web servers are used more efficiently.
  • The system allows concurrent use by many people.
  • The client/server programming model can be used.

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.

Time

Operation

Comments

0

User A activates Agent 1.

1

Compute

Agent 1 starts. User B activates Agent 2.

2

Compute

Agent 1 running.

3

Compute

Agent 1 running.

4

Compute

Agent 1 running.

5

Print

Agent 1 ends.

6

Compute

Start User B's Agent 2.

7

Print

Agent 2 ends.

Threaded agents

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

Time

Thread1

Thread2

Comments

0

User A activates Agent 1.

1

Compute

Agent 1 starts. User B activates Agent B.

2

Compute

Agent 1 running.

3

Compute

Agent 1 swapped out. Agent 2 starts.

4

Print

Agent 2 ends.

5

Compute

Agent 1 running.

6

Compute

Agent 1 running.

7

Print

Agent 1 ends.