TMF Introduction (G06.24+)

TMF Application Programming
HP NonStop Transaction Management Facility (TMF) Introduction522414-001
5-2
The Requester/Server Model
The Requester/Server Model
In the Pathway application environment, applications consist of two types of
programs: requesters and servers. This design allows application logic to reside
near the resources it manages. For example, presentation logic is located near
workstations or terminal devices; database logic resides in server programs near
the database. The requester sends a request to the server, which performs the
requested action and then replies to the requester. The requester and server may
reside on the same processor or on different processors. Requesters and servers
communicate by using the Guardian file system or the message system that is part
of the NonStop Kernel operating system. For a sample application based on the
requester/server model, see Designing Applications for the Pathway Environment
on page 5-9.
Even though transactions are typically controlled by the requester, most servers
need transaction control to back out (abort) a transaction if errors occur.
Servers must always reply to requesters to indicate whether they were able to
perform the requested work. The reply satisfies TMF requirements for committing
or aborting transactions. If a server does not reply to a requester with the status of
the transaction, the requester is left with an outstanding request to the server and
cannot complete the transaction.
Accessing and Locking Data
TMF automatically manages database access and locking of audited files. It generally
operates in the same way, regardless of the API or programming language used to
access the database. The syntax the applications use to access a database, however,
varies, depending on the programming language and the type of database.
The issues involved in accessing and locking data include:
Controlling transaction isolation
Accessing SQL data
Accessing Enscribe data
Managing deadlock
Note. In distributed applications, the client/server model is often used. This model
extends the requester/server model. In general, but not always, in this model the client
process resides on a workstation and the server process resides on a second workstation,
minicomputer, or mainframe system. Communication takes the form of request and reply
pairs, which are initiated by the client and serviced by the server. Client/server computing
is often used to connect different types of workstations or personal computers to a host
computer system by means of communication protocols.