2.3 Using a Stateless Object Model
This section describes how object state management is used with the Registrar
and Teller
objects in the Production sample applications to increase the application’s scalability. For an introduction to object state management, see Using Object State Management.
To increase scalability, the Registrar
and
Teller
objects are configured in the Production server
application with the method
activation policy. The
method
activation policy assigned to these two objects
results in the following behavior changes:
- Whenever these objects are invoked, they are instantiated by the Oracle Tuxedo domain in the appropriate server group.
- After the invocation is complete, the Oracle Tuxedo domain deactivates these objects.
With the Basic through the Wrapper sample applications, the
Registrar
object was process-bound
(process
activation policy). All client requests on
the Registrar
object invariably went to the same
object instance in the memory of the server machine. The Basic
sample application design may be adequate for a small-scale
deployment. However, as client application demands increase, client
requests on the Registrar
object eventually become
queued, and response time drops.
However, when the Registrar
and Teller
objects are stateless (method
activation policy), and
the server processes that manage these objects are replicated, the
Registrar
and Teller objects can process multiple
client requests in parallel. The only constraint on the number of
simultaneous client requests that these objects can handle is the
number of server processes that are available that can instantiate
the Registrar
and Teller
objects. These
stateless objects, thereby, make for more efficient use of machine
resources and reduced client response time.
Most importantly, so that Oracle Tuxedo CORBA can instantiate
copies of the Registrar
and Teller
objects in each of the replicated server processes, each copy of
these objects must be unique. To make each instance of these
objects unique, the factories for those objects must assign unique
object IDs to them.
For the Oracle Tuxedo application to instantiate copies of the Registrar
and Teller
objects in each of the replicated server application processes, each copy of the Registrar
and Teller
objects have an unique object ID (OID). The factories that create these objects are responsible for assigning them unique OIDs. For information about generating unique object IDs, see Creating CORBA Server Applications. For more information about other design considerations, see Additional Design Considerations.
Parent topic: Scaling CORBA Server Applications