Digital's Transaction Processing Monitors. Digital VAX 6000, VAX TPC Benchmark A, VAX DECtp, VAX DECdta, VAX ACMS, VAX Server, VAX ft, VAX 9000, VAX cluster, VAX KODA
विज्ञापन
विज्ञापन
Thomas G. Speer
Mark W Storm
Digital's Transaction
Processing Monitors
Digital provides tulo transaction processing
(TP)
~non.itor products
-
cation Control). Each ]nonitor is a iilzified set oftlvnsactionyrocessing servicesfor the application enviro~zmelzt.
VIW
operating sys- tem. Althozigh there is a large fi~nctional overlap between the two, both prodz~cts strategies, Flow control crnd nzultithreading in the
ACiMS
monitor is managed
by
means o f a fot~rth-genercltiorz
(4GL)
Flow control
by
third-generation language
(3CW
cc~lls a libra[]j ofservices. The
ACMS
monitor supports a deferred task model of queuing, and the DECintact monitor supports a
Transaction processing is the execution of an application that performs an administrative func- tion by accessing a shared database. Within trans- action processing, processing monitors provide the software "glue" that ties together many soft- ware components into a transaction processing system solution.
A typical transaction processing application involves interaction with many terminal users by means o f a presentation manager or forms system to collect user requests. Information gathered by the presentation manager is then used to query or update one or more databases that reflect the cur- rent state of the business.
A characteristic of trans- action processing systems and applications is many users performing a small number of similar functions against a common database.
A trans- action processing monitor is a system environment that supports the efficient development, execu- tion, ancl management of such applications.
Processing monitors are usually built on top of or as extensions to the operating system and other products such as database systems and presenta- tion services. By so doing, additional components can be integrated into a system and can fill "holes" by providing functions that are specifically needed by transaction processing applications. Some examples of these functions are application con- trol and management, transaction-processing- specific execution environments, and transaction- processing-specific programming interfaces.
Digital provides two transaction processing monitors: the Application Control and Manage- ment System (ACMS) and the DECintact monitor.
Both monitors are built on top of the VPlS operat- ing system. Each monitor provicles a uniIied set of transaction-processing-specific services to the application environment, and a large functional overlap exists between the services each monitor provides. The distinguishing factor between the two monitors is in the area of application program- ming styles and interfaces
- language (4~1.) versus third-generation language
(3GL). This distinction represents Digital's recog- nition that customers have their own styles of application programming. Those that prefer 4 < ; ~ styles should be able to build transaction process- ing applications using Digital's
TP monitors with- out changing their style. Similarly, those that prefer
3GL styles shoultl also be able to built1 TP applica- tions using Digital's TP monitors without changing their style.
The
ACMS monitor was first introducetl by Digital in 1984. The
ACMS monitor addresses the require- ments of large, complex transaction processing applications by making them easier to develop and manage. The
ACMS monitor also creates an efficient execution environment for these applications.
Vol
. j
iVo
I
Wirzter
1931
D i g i t a l Tecbnical Jorrrtral
Di'itul's
Trcinsuction Processing Monitors
The I>M;intact monitor (Integrated Application
Control) was originally cleveloped by a third-party vendor. Purchasecl and introduced by Digital i n
1988, it has been installed in major financial insti- tutions and manufacturing sites. 'The I>ECintact sul,l>ort h)r I)E(:fornis,
;I
I-ccoverable queuing sub- system, a tr;~ns;~ction
;I resource man- ager th:~t
lt\lS
(Record
;ind differences of the t\(:MS
;inti
I)E(:intact monitors
Developnzent
Ercvironrnent
Trans;iction processing monitors provide a view o f t h e transaction processing system for appli- cation development. Therefore, t h e ACMS and
I)E<:int;lct monitors must embody a style of pro- gram development.
ACMS Progmmming Style
A "divide and conquer" al'proach was used in t h e
ACMS monitor. T h e w o r k typically involved in tleveloping
a
TP applic;~tion cally separate functions described below. Each of utility o r approach.
In the A<;IMS monitor, an "application" is defined as a collection of selectable units of work calletl tasks.
A
separate application definition facility isolates the system management characteristics of the applic;~tion (such
;IS resource ;~llocation, file location, and protection) from the logic of the applici~tion.
The specific;ltion of menus is also tlecoi~pled nonprocedural
(4GI.)
the layouts are compilecl into form files and data structures to be used at run-time. Each menu entry points either t o another menu o r to an application and
;I task. (Ilecoupling menus from t h e applica- tion allows user menus to be independent of how
In ;uldition to separate menu specification and tion logic is broken down into t h e three logical parts of interactive
TP
;~pplic;~tions:
Exchange steps s u p p o r t t h e exchange of data with t h e e n d user. This exch;lnge is typically accomplished by displaying a form on a terminal screen and collecting the input.
rn
Processing steps perform computational pro- cessing and database o r file
I/O through standard subroutines. T h e subroutines are written in any language that accepts records passed by reference.
The task definition language tlefines the flow of control between processing steps ant1 exchange steps and specifies tr;~nsaction clemarcation.
Work spaces arc special records that the
ACMS monitor provides to pass data between the task definition, exchange steps, and processing steps.
A
compiler, called the application clefinition util- ity
(ADU), is implemented in t h e ACMS monitor t o compile t h e task definition language into binary data structures. The run-time system is table-driven, rather than interpreted, by these structures.
Digital is the only vendor that supplies this "divide and conquer" solution t o building large complex
'rP applications. We believe this approach
- t h e industry - applications easier t o produce and t o manage.
DECintactProgmmming
Style
The approach t o application development used in t h e DE<:intact monitor provides t h e application developer with
3<;L
control over the transaction processing services requirecl. This approach allows application prototyping and development t o be d o n e rapidly. Moreover, the application can make t h e most efficjent use of monitor services by selecting and controlling only those services required for a particular task.
In t h e DECintact monitor, an application is defined as o n e o r more programs written entirely in
3GL and supported by thc
VMS
system. The code written by the application tleveloper manages all flow control, user interaction, ancl clata manipu- lation through the utilities and service libraries provided by the DECintact monitor. All DECintact services are callable, including most services pro- vided by t h e 1)ECintact utilities. T h e l)E<:intact services are as follows:
A library of presentation services used for all interaction with users. The application developer includes calls t o these services for form manip- ulation and display. Forms are created with a forms editor utility and can be updated dynami- cally. Forms a r e displayed by t h e DECintact terminal manager in emulated block mode.
Device- and terminal-dcpentlent information is completely separated from t h e implementation of t h e application.
Digital T&cbnicalJournal h l .
.j
No.
I
Winter
1991
19
Transaction Processing, Databases, and Fault-tolerant Systems
The separation of specification of menus from the application. DECintact menus arc defined by means of a menu database and are compiled into data structures accessed at run-time. The menus are tree-structured. Each e n t r y points e i t h e r t o another menu entry o r t o an executable applica- tion image. The specification of menus is linked t o the DECintact monitor's security subsystem.
T h e I>E<:intact terminal u s e r s e e s only t h o s e specific m e n u entries for which t h e user has been granted access.
A library of services for t h e control of file and clueile operations. In addition t o layered access t o the
KiMS file system, t h e DECintact monitor s u p p o r t s i t s o w n hash file format (a filnctional analog to single-keyed indexed files in
RIMS) which provides very fast, efficient record retrieval. T h e application developer includes calls to these services for managing
RiMS and hash file
I/O operations, demarcating recovery unit boundaries, creating queues, placing data items o n queues, and removing data items from intcgral part of application design and work flow c o n t r o l . Application-defined DECintact recovery units ensure that
RIMS, hash, and clueue operations can be committed o r aborted atomi- cally; that is, e i t h e r all permanent effects of t h e recovery unit happen, o r none happen.
B e c a ~ l s e DECintact's 3GL development envi- ronment, application programmers w h o are accus- tolnetl to calling procedure libraries from standard
VMS languages o r w h o a r e familiar w i t h o t h e r transaction processing monitors can easily learn
DECintact's services. Application prototypes can be producetl quickly because o n l y skills in
3<;L a r e required. Further, completed applications is minimal.
On-line Execution Environment
Transaction processing monitors provide an execu- tion environment tailored to the characteristics and needs of transaction processing applications. This environment generally has two aspects: on-line, for interactive applications that use terminals; ant1 off- line, for noninteractive applications that use o t h e r devices.
Traditional
VMS timesharing applications are implemented by allocating o n e
VMS process to each terminal user w h e n t h e user logs in t o t h e system. ib image activation is then d o n e each time the ter- minal user invokes a n e w filnction. This method is most beneficial in simple transaction processing applications that have a relatively small nitmlxr of users. However, as t h e number of users grows o r as the application becomes larger and more complex, several problem areas may arise with this method: m o r e ancl m o r e m e m o r y is needed t o r u n t h e system effectively.
Start-up costs. Process creation, image activa- tion, file o p e n s , and datitbase binds a r e expen- sive operations in terms of system resources utilized and time elapsed. These operations can degrade system performance if d o n e frequently.
Contention. As t h e n u m b e r of u s e r s simul- taneously accessing a database o r file grows, contention for locks also increases. For many factor in t h r o u g h p ~ ~ t .
Processing location. Single process implenienta- tions limit distribution options.
ACMS On-line
Execution
-1.0 mented a client/server architecture in t h e
ACMS monitor. (Client/server is also callecl request/ response.) The basic run-time architecture consists of three types of processes, as s h o w n in Figure I : the command process, execution controller, and procedure servers.
An agent in t h e
ACMS monitor is a process that submits work requests t o an application. In t h e
ACMS system, t h e comm;tnd process is a special agent responsible for interactions with t h e termi- nal user. (In terms of t h e DECdta architecture, the con1m;tnd p r o c e s s implements t h e functions of a reqilest initiator, p r e s e n t a t i o n manager, and request manager for direct requests.)' T h e com- mand process is generally created at system start- u p time, although
ACMS c o ~ u m a n d s b e started at o t h e r times. T h e process is multi- threaded through t h e use of
I i M S
asynchronous system traps (AS73. Thus, o n e command process p e r n o d e is generally sufficient for all terminals handled by that node.
There are two subcomponents of the
ACMS moni- tor within t h e command process:
System interface, which is a set of services for submitting work requests and for interacting with the
ACMS application
Vr11
.i
I Winlev
1991
Digital Tech~rical
) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
FRONT-END NODE
Digital's
Transaction Processing Monitors
- - _ - _ - _ - - - -
I I
BACK-END NODE
DEFINITION
I I
1
I
KEY:
APPLICATION
PROCESSES
SERVER
I _ _ _ _ _ _ - _ _ _ _ _ _ _ - - - - - I
EXECUTION
CONTROLLER
I I
I
I
I
I
I
SERVERS
5
I
I u
I
USER DATABASES
,----------A
I
I
Figure
1
Busic Run-time Architecture of the ACMS Monitor
DECforms, Digital's forms management product, which implements the
ANSI/IS<)
Forms Inter- face management System
(FIMS)
that provides the presentation server for executing the exchange steps
The commantl process reads the menu defini- tion for a particular terminal user and determines which menu to display. W e n the terminal user selects a particular menu entry, the command pro- cess calls the
ACMS
system interface services to submit the task. The system interface uses logical names from the
VMS
system to translate the appli- cation name into the address of the execution con- troller that represents that application. The system interface then sends a message to the execution controller. The message contains the locations of the presentation server and an index into the task definition tables for the particular task. The status course of task execution, the command process accepts callbacks from the task to display a form for interaction with the terminal user.
The execution controller executes the task definition language and creates and manages pro- cedure servers. The controller is created at appli- cation start-up time and is rnultithreaded by using
VMS
ASTs.
There is one execution controller per application. (In terms of the DECdta archi- tecture, the execution controller and the proce- dure servers implement the functions of a trans- action server.)'
When the execution controller receives a request from the command process, i t invokes DE(:dtm
(Digital Distributed Transaction Manager) services to join the transaction if the agent passes the transaction identifier. If the agent does not pass a transaction identifier, there is no transaction to join and a DECdtm or resource-manager-specific transaction is started as specified in the task defini- tion. The execution controller then uses the task index to find the tables that represent the task.
When the execution of a task reaches an exchange step, the execution controller sends a callback to the command process for a form to be displayed and the input to be collected for the task. When the request to display a form is sent to the com- mand process, the execution controller dismisses the
AST
to enable other threads to execute. When the response to the request arrives from the exchange step, an
AST
is added to the queue for the execution controller.
When a task comes to a processing step, the exe- cution controller allocates a free procedure server to the task. It then sends a request to the proce- dure server to execute the particular procedure and dismisses the
AST.
If no procedure server is free, the execution controller puts the request on a waiting list and dismisses the
AST.
When a
Digital Tecbnicnl Jourrinl W'ol.
.I
:\?A
1
W'i~~tc,r
2
1
Transaction Processing, Databases, and Fault-tolerant Systems
procedure server becomes free, the execution con- troller checks the wait list ant1 allocates the proce- dure server to the next task, if any, on the wait list.
Procedure servers are created and deleted by the execution controller. I'rocedure servers are
;I collection of user-written procetlures that perform conlputation and provide database or file accesses for the application. The procedures are written in standard languages and use no special services. 'l'he
ACMS system creates a transfer vector from the server definition. This transfer vector is linked into the server image. With this vector, the
A<:MS system code can receive incoming messages and translate them into calls to the procedure.
A
procedure server is specifietl with initialization and termination procedures, which are routines supplied by the user. The
A<:MS monitor calls these procedures whenever a procedure server is created and deleted. The initialization procedure opens files and performs database bind operations. The termination procedure does clean-up work, such as closing files prior to process exit.
The
ACMS architecture addresses the problem areas discussetl in the On-line Execution Environ- ment section in several ways.
Reso~irce
Because procedure se. vers are allo- cated only for the time required to execute a pro- cessing step, the servers are available for other use while a terminal user types in tlata for the form. Thus, the system can execute efficiently with fewer procedure servers than active terminal users. Improvement gains in resource use can vary, depending on the application. Our debit ;ind credit benchmark experiments with the
AC:MS monitor and the Rtlb/vMS relational database system indi- cated that the most improvement occurs with one procedure server for every one or two transactions p e r second (TPS). These benchmarks equate to
1 procedure server for every
10
to 20 active termi- nal users.
The use of procedure servers ancl the multi- threaded character of the execution controller and the command process allow the architecture to reduce the number of processes and, therefore, the number of resources needed. 'The optimal solution for resource use would consist of one Iarge multi- threaded process that perhrmed all processing.
However, we chose to trade off some resource use in the architecture in favor of other gains.
Ease of use generally more difficult to code than single- thre;idecl applications. For this reason, proce- tlure server subroutines in the
ACMS system can be written in a standartl fashion by using stantlarcl calls to Rdb/VMS and the
VMS system.
Error isolation
- process, the threacls ;ire not conlpletely pro- tected within the process. An application logic error in one threat1 can corrupt data in a thread that is executing for a different user.
A severe error in one thread coultl potentially bring down the entire application. The multithreaded processes in the
ACMS architecture ( i t . , the execution controller and command process) are provided by Digital. Because no applica- tion code executes directly in these processes, we can gugiriintee that no application cotling error can affect them. l-'rocedure servers are single-thresided. Therefore, an application logic only the task that is executing jn the proce- tlure server.
Sturt-up Costs
The run-time environment is basi- cally "static;' which means that the start-up costs
(i.e., system resources and elapsed time) are incirrretl infrequently ( i t . , at system and appli- cation start-up time).
A
timesharing user who is running many different applications causes image iictivations ;~ntl by switching among im;iges. Because the terminal user in the
ACMS system is separated from the applications pro- cesses, the process of switching applications involves only changing message destinations and incurs minimal overhead.
Cnnterition
The database accesses in the
ACMS environment are channeled through a relatively few, but heavily used, number of processes. The typical v,MS timesharing environment uses a large number of lightly used processes. By reclucing the number of processes that access the database, the contention for locks is reduced.
I-'rvces.siizg Locutiolz
Because the
ACMS monitor is a multiprocess architecture, the command pro- cess ancl forms processing can be clone close to the ternlinal user on small, inexpensive machines. This method takes aclvantage of the inexpensive pro- cessing power available on these smaller machines while the rest of the application executes on a larger VAScluster system.
Ihl.
. j
No.
Wiwler
1991 Digital Technical
Joctrnnl
Digital's Transaction Processing Monitors
DECintact On-line Execution
Although the specific components of the DECintact monitor vary from those of the
ACMS monitor, the basic architecture is very similar. Figure 2 shows the application configured locally to the front end. The run-time architecture consists of three types of
DECintact system processes
- dispatcher, DECforms servers, server manager - and, typically, one or more application processes.
When forms processing is distributed, the same application is configured as shown in Figure
3.
The DECintact monitor can run in multiple copies on any one
VAS
node. Each copy can be an independent run-time environment; or it can share data and resources, such as user security profiles and menu definitions, with other copies on the same system. Thus, independent development, testing, and production environments can reside on the same node.
In the DECintact system, the terminal manager/ dispatcher process (one per copy) is responsible for the following:
Displaying DECintact forms
Coordinating DECforms forms display
Interacting with local applications
Communicating, through DECnet, with remote
DECintact copies
Maintaining security authorization, including the dynamic generation of user-specific menus
Applications designated in the local menu data- base as remote applications cause the front-end terminal manager/dispatcher process to communi- cate with the cooperating back-end terminal manager/dispatcher process through a task-to-task
DECnet link. (In terms of the DECdta architecture, the terminal manager/dispatcher implements the functions of presentation manager, request initia- tor, and request manager for direct requests.)'
When a user selects the remote task, that user's request is sent to the back end and is treated by the application as a local request. The terminal man- ager/dispatcher process is started automatically as part of a copy start-up and is multithreaded.
Therefore, one such process can handle all the ter- minal users for a particular DECintact copy.
When the terminal user selects a menu task, one of the following actions occurs, depending on whether the task is local or remote and whether it is single- or multithreaded.
If the application is local and single-threaded, a
VMS process may be created that activates the application image associated with this task. The terminal manager/dispatcher, upon start up, may create a user-specified number of application shell
VMS
processes to activate subsequent application images. If such a shell exists when the user selects a task, this process is used to run the application image. Each user who selects a given menu entry receives an individual
VMS
process and image.
If the application is local and multithreaded, the terminal manager/dispatcher first determines l
DATABASE
TERMINAL MANAGER1
DISPATCHER
MULTITHREADED
APPLICATION
I
6
USERDATABASES
-
MANAGER
KEY:
DECINTACT
PROCESSES
APPLICATION
PROCESSES
Figure 2 Bmic Run-time Architecture of the DECintact Monitor
Digitul Technical
.i
I Winler
I991
23
Transaction Processing, Databases, and Fault-tolerant Systems
!
FRONT-END NODE
DATABASE
I
-
I
BACK-END NODE
DATABASE
-
!
I
DATABASE
11
KEY
DECINTACT
PROCESSES
APPLICATION
7
PROCESSES
Figure
3
I
I
USER DATABASES
- - - - - - - - - - - - - - - - - - J
urith
Forms Processing
I whether this task has already been activated by pre- vious users. If the task has not been activated ant1 a shell is not available, the terminal manager/ dispatcher creates a
VMS process for the applica- tion and activates the image.
If the task is ;llre;idy activated, the terminal manager/dispatcher con- nects the user to the active task. The user becomes another thread of execution within the image.
Multithreaded applications handle many simulta- neous users within the context of one
VMS
process and image.
Remote applications, whether single- o r multi- threaded, route the menu task selection to a remote terminal manager/dispatcher process. On receipt of the request, t h e remote terminal manager/ dispatcher processes the selection locally by using the same procedures as described above.
Local DECintact forms interaction is handled in the following manner by the local terminal man- ager/dispatcher. The application's call to display a form sends a request t o the terminal manager. The terminal manager locates the form in its tlatabase of active forms, displays the form o n the user's ter- minal, ant1 returns control to the application when the user has entered all clata in the form. If the applic;~tion is remote, form information is sent bctwcen cooperating local and remote terminal rniinsger processes; the interface is transparent to the application.
In addition to supporting DECintact forms, the
1)ECintact monitor also supports applications that use I)E<:forms as their presentation service. The implementation of this support follows the same client/server model used by the
ACMS system's support for DECforms and shares much of the underlying run-time interprocess communication code used by the
ACMS
monitor. Functionally, the similar t o the
ACMS
monitor. Both implemen- tations offer transparent support for distributed
DECforms processing, automatic forms caching
( i t . , propagation of updated DECforms in a distrib- uted environment), and DECforms session caching for increased performance.
The DECintact monitor supports application- level, single- and multithreaded environments. The
DECintact monitor's threading package allows appli- cation programmers t o use standard languages
24
Val.
. j
No. l W i ~ r l r r
supported by t h e
ViMS system t o write multi- threaded processes. Applications tleclare them- selves as either single- o r multitlireaded. With t h e exception of the declaration, there is little differ- e n c e between t h e way an on-line multithreaded application and its single-threaded counterpart must be codecl. For on-line applications, thread creation, deletion, and management are automatic.
New threads are created w h e n a terminal user selects t h e multithreaded application and are deleted when the user leaves the application.
In a single-threaded application, the following occurs:
Each user receives an individual
VMS
process and image context (e.g., 200 users, 200 processes).
All terminal and file
VO
is synchronous.
The application image normally exits w h e n the application work is completed.
In a multithreaded on-line application, the fol- lowing occurs:
O n e
VMS process/image can handle many simul- taneous users.
All terminal and file I/O is asynchronous.
Ncw threads are created automatically when n e w users are connected to the process.
.
The application image does not exit when all currently allocated threads have completed exe- cution but remains for use by new on-ljne users.
For each thread in a multithreaded application image, the DECintact system maintains thread con- text and state information. Each
I/O request is issuecl asynchronously. Immediately after control is returned, but before the
1/0 request completes, the DECintact system saves the currently executing threatl's context and schedules another thread to execute. When the thread's I/O completion AST is delivered, the thread's context is restored, and t h e thread is inserted on an internally maintained list of threads eligible for execution.
A thread's context consists of the following:
An internally maintained thread block contain- ing state information
Thestack
Standard DECintact work spaces that are allo- cated t o each thread and that maintain terminal and file management context
Digital's Transtrction Processing iMonitors
.
Local storage (e.g., t h e
$L<)<:AL
PSECT in COBOL applications) that the application has designated as thread-specific
T h e PSECT naming convention allows t h e application t o decide which variable storage is thread-specific ant1 which is process-global.
Thread-specific storage is unavailable t o o t h e r threads in t h e same process because it is saved and restored o n each thread switch. Process-global storage is always available t o all threads in t h e process and can be used when interthread commu- nication o r synchronization is desired.
The use of multithreading in t h e IIECintact sys- tem is appropriate for higher volume multiuser applications that perform frequent I/O. Such appli- cation usage is typical in transaction processing environments. Because thread switches occur only w h e n I/O is requested o r when locking requests mended for applications that perform infrequent
I/O o r that expect very small numbers of concur- rent users, such 21s end-of-day accounting pro- grams o r other batch-oricnted processing. These kinds of applications typically choose to declare themselves as single-threaded.
All I/O from within a multithreatled DECintact application process is asynchronous. Therefore, the DECintact system provides a client/server inter- face between multithreatletl applications and syn- c h r o n o u s database systems, such as
Vi\x
DBMS
(Database Management System) and lidb/VMS sys- tems. The interface is providetl because calling a synchronous database operation directly from within a multithreaded application would stall the calling thread and all other threads until the call completed. Figure
2 shows that a typical on-line
DECintact application accessing Rdb/Vi\lS, for example, is written in two pieces:
A
multithreaded, on-line piece (the client), that handles forms requests from multiple users
A single-threaded, database server piece (a server instance), that performs t h e actual synchronous database
1/0
This client/server approach t o database access is functionally very similar t o that of
ACMS procedure servers and offers similar benefits. Like t h e ACMS monitor, t h e DECintact monitor offers system man- agement facilities t o define pools of servers and t o adjust them dynamically at run-time in accordance with load. Similar algorithms are used in both mon- itors t o allocate server instances t o client threads
Digital Technical Journal I.'r)l. ,'VIA l W'i''irzfor 1991
Transaction Processing, Databases, and Fault-tolerant Systems and to start up new instances, as necessary. The
DECintact server code, like the
ACMS procedure server code, can define initialization and termina- tion procedures to perform once-only start-up and shut-down processing. With DECintact transaction semantics, which are layered on DECtltm services, a client can declare a global transaction that the server instance will join. The server instance can also declare its own independent transaction or no transaction. (In terms of the DECdta architecture, this client/server approach implements the fi~nc- tions of a transaction server.)' The principal differ- ence between the DECintact and
ACMS approach is that DECintact clients and servers use a nlessage- based
3GL communications interface to send and receive work requests. Control in the
ACMS moni- tor resides in the execution controller.
As the
ACMS monitor does, the DECintact archi- tecture addresses the problem areas tliscussed in the On-line Execution section in several ways.
AJso, as with the
ACMS approach, the factors we chose to trade off allowed us to achieve better effi- ciency, performance, and ease of use.
Resource [Jse The DECintact systcm's multi- threaded methotlology economizes on
VMS
resources. Similar to the method used in the
ACMS monitor, the system reduces process creations and image activations.
ii
major difference between the
ACMS and DECintact architectures is the way the DECintact monitor implements multithread- ing support. The transparent implementation of threading capabilities means that coding multi- threaded applications is no more difficult than coding traditional single-threaded applications. As with any application-level threading scheme, how- ever. the responsibility for ensuring that a logic error in one thread is isolated to that thread lies with the application. The DECintact client/server facilities for accessing databases, like those used in the
ACMS monitor, can realize similar benefits in process reuse, throughput, and error isolation.
Start-zip Costs
The DECintact architecture, like the
ACMS architecture, distributes start-up costs
(i.e., system resources and elapsed time) between two points: the start of the DECintact system, and the start of applications. System start-up can involve prestarting process shells (as dis- cussed previously) for subsequent application image activation. On-line application start-up is executed on demand when the first user selects a particular menu task. Multithreaded applications, once st;irted, do not exit but wait for new user threads as users select the application. Thus, the cation images ancl incur only an inexpensive thread creation.
Conterztion As in the
ACMS monitor, database accesses in the DECintact client/server environ- ment are channeled through a relatively few, but heavily used, number of processes rather than through a large number of lightly used processes.
This retluction decreases lock contention.
Processing Locc~tion
Forms processing can be off-loatled to a front end and brought closer to the terminal user. Thus smaller, less expensive Cl'lls can be used while the rest of the application exe- cutes on a larger back-end machine or cluster. In the I>E(:intact monitor, the front end can consist of forms processing only or a mix of forms process- ing ant1 application remote queuing work.
Off-line Execution
Many transaction processing applications are used with nonterrninal devices, such as a bar code reader or a communications link used for ;In elec- tronic funds transfer application. Because there is no human interaction with these applici~tions, they have two requirements that differ from the be simple data entries, and the system must handle failures transparently.
ACMS Off-line Execution
The
ACMS monitor's goal for off-line processing is to allow simple transaction capture to continue when the application is not available.
A
typical example is the continued capture of data on a man- ufacturing assembly line by a MicroVAX system when the application is unavailable. The
A<;MS monitor provides two mechanisms for support- ing nonterminal devices: queuing agents and user- written agents.
Figure
4
illustrates the
ACMS queuing model.
A queuing system is a resource manager that processes entries, with priorities, in first-in, first- out (FIFO) order. (In terms of DECdta, this is the queue resource manager.)' The
ACMS queuing facil- ity is built upon RiS-indexed files. The primary goal of ACMS queuing is to provicle a store- and-forward mechanism to allow task requests to be collected for later execution. By using the ACMS$ENQUE-TASK a user can write
Vol.
. j
No. I
Winter
1391
Digilal Technical Jourrral
Digital's Transaction Processing Monitors
I
r---------------------
I
NODE A
I
I
I
BARCODE
READER
I
NODE B
-
AGENT
ACMS$ENQUEUE-TASK()
-------------
- - - - - I
EXECUTION
CONTROLLER
I
I
I
I
I
I
I
USER DATABASES
I-------------------J
KEY: a
APPLICATION
PROCESSES
PROCEDURE
I
Figure 4 ACMS Queuing Agents
a process that captures a task request and safely stores the task on a local disk queue.
The
ACMS monitor provides a special agent, called the clueuetl task initiator (QTI), which takes a task entry from the queue and submits it to the appropriate execution controller. The QTI starts a
DE(:dtm transaction, removes the task entry from the queue within that transaction, invokes the
ACMS task, and passes the transaction identifier. (In the DECdta architecture, the QTI implements the functions of a request manager for queued requests.)' The task then joins that transaction.
The removal from the queue is atomic with the commit of the task, and no task entry is lost or executed twice.
Figure 5 shows the A<:MS user-written agent model for off-line processing. With the
ACMS sys- tem interface, users may write their own versions of the command process. Note that because these agents cannot be safely stored on disks, this method is generally not as reliable as using queues.
User-written agents can be used, however, with
DECdtm and the fault-tolerant VAXft 3000 system to produce a reliable front-end system. To do so, a
I
I
I
I
I user writes an agent that captures the input for the task and then starts a DECdtm transaction. The agent uses the system interface services to invoke the
ACMS task and passes the transaction identifier and the input data. When the task call completes, the agent commits the transaction. If DECdtm returns an error on the commit, the agent loops back to start another transaction and to resubmit the task. If a VAXcluster system is used for the appli- cation, this configuration will survive any single point of failure.
DECintact Off-line Execution
The DECintact monitor provides several facilities for applications to perform off-line processing.
These facilities allow applications to
Interface with and process data from nontermi- nal devices and asynchronous events
Control transaction capture, store and forward, interprocess communication, and business work flow through the DECintact queuing subsystem
Of-line Multithreading
Off-line, multithreaded
DEcintact applications are typically used to service r - - - - - - - - - - - - - - - - - - - - -
I
VAXFT 3000
I
I
I
BACK-END NODE
EXECUTION
CONTROLLER mL==
USERDATABASES
PROCEDU
SERVERS
KEY.
O
:F;%EssEs
APPLICATION
0
Figure
5
ACMS User-written Agent Model for Off-line Processing
I
/
Digital Tecbnicul Jofrrnal
Lh1.
.3
No.
I
Winter
1991
Transaction Processing, Databases, and Fault-tolerant Systems
asynchronous events, such 21s the arrival of ;in electronic funds transfer message or the adclition to the qucile of an item already on a
DECintact queue. The application programmer cxpl~citly controls how ni;iny threads are created, when they are created, ;ind which execution path or paths each thread will follow. Off-line, multithreatletl applications are well-suited to message switching systems and other aspects of electronic fi~nds transfer in which each thread may be dedicated to servicing a different kind of event.
DECintnct
Queues
The primary goal of the
1)EC:intact queuing subsystem is to support a work flow model of business transactions. (In the
DE<;dta architecture, the DECintact queuing sub- system implements the functions of a queue resource manager and request initiator for queued requests.)' In a typical DECintact application that relies on queuing, the state of the business trans- action may be represented by the queue on which a particular queue item resides at the moment. hi item moves from queue to queue as the item's processing state changes, much as a work item moves from desk to desk. The superset 06 cliieue items that reside on queues throughout the appli- cation at any one time represents the state of trans- actions current] y executing. Depending on the number of programs that need to process data dur- ing the course of a transaction, a queue item may be inserted on several different queues before the transaction completes. The application also may wish to chain together several small transactions within the context of a larger business transaction.
The DECintact queuing system functions through- out the application: from the front end, where queues collect and route incoming data; to the back end, where queues can be integrated with data files in recovery units; and in between, whcre different programs in the application can use queues to share data. comprehensive set of callable services for the cre- ation ant1 manipulation of queues, queue sets, and qileue items. Queue item operations performed within the context of a DECintact transaction are fiilly atomic along with DECintact file operations.
In addition to overall workflow control, the
DECintact queuing system allows the following:
Deferred processing
- item can be queuecl by one process and then removed from the queue later by another process for processing.
Deferred processing is useful when the volume one or more queues and can be notified when
;in item is inserted on the queue.
Store-and-forwarcl processing - thc front end of the system write items to local qiicx~es, data entry can be continuous in the event of back-end system failure or whenever a program tl1;lt is needed to process clata is tem- porarily unavailable. applications sharing a node and by means of the 1)ECintact remote queuing facility, applica- tions can use the queuing system to reliably exchange application data between processes and applications.
A
fundamental difference betwccn i\(;hls queues and OECintact queues is that the
ACMS system inserts tasks onto the queues, ;mtl the I>k<:intact system inserts data items. In DE<:intrrct queuing, cacti d;ita item contains both user-supplietl data anel a lieader that includes an item key and other control information. The header is ilsed by the queuing system to control the movenlent o f the item from clileue to queue. Each qileue item can be
;issigncd ;In item priority. Items can be removed from the q\ieue in
FlFO
order, in
FlFO
order within item priority, or by direct access using the item key. Queues can be stopped and started for inser- tion, removal, or both. Queues can also bc redi- rected transparently at the system management levcl to running applications. specified on a queue-by-queue basis to alert the system manager when queue levels reach defined amounts. Individual queue items can be held against removal or released. Queues can be grouped together into logical entities, called queue sets, which look ancl behave to the application the same ties for broatlcast insertion on all members of a queue set anel a choice of removing algorithms that can weight relative item- and queue-level priorities from the queue. l>E<:intact queues can be automatically clistrib- i ~ t e d .
;I local queue can be designatetl as remote outbouncl. That is to say, items added to this queue are shippecl transparently across the network to a correspond- ing remote inbound queue on the clestination notle. The transfer is handlecl by the DECintact queuing system by using exactly-once semantics
Val.
.i
I Winlev
1991 Digilnl Tecbrrical Journal
Digital's Trcinsaction Processing Monitors
(i.e., the item is guaranteed to be sent once and only once). From the point of view of the appli- cation that is adding or removing items from the queue, remote queues behave exactly as local queues behave.
To better understand some of the uses for
DECintact queuing, consider a simplified but repre- sentative electronic funds transfer example built on the DECintact monitor. Figure
6 shows the ele- ments of such an application. In this application, transactions might be initiated either locally by clerks entering data into the system from user- generated documents or by an off-line application that receives data from another branch or bank.
The transactions are verified or repaired by other clerks in a different department of the bank. The transactions are then sent to destination banks over one or more network services.
To implement this application, the developer uses queues to route, safely store, and synchronize data as it progresses through the system, and to priori- tize data items. Data items are given priority levels, based on application-defined criteria, such as trans- fer amount, destination bank, or time-to-closing.
I - _ _ - - - - - - - - _ - _ _ _ _ _ - - - - - - - - - - - - - -
I
,
NODEA
I
I
I
I
I
I
I
I
I
TERMINAL MANAGER1
DISPATCHER
r--------------------------------
I
NODE B
OUTBOUND
QUEUE
+
v
VERIFY AND
REPAIR
QUEUE
I
FEDWIRE
XMT
QUEUE
I
I
I
DATABASE
SERVERS
L
I
I
I
USER DATABASES
-
I
L-------------------------------J
KEY:
DECINTACT
PROCESSES
FEDWIRE
PROCESS
APPLICATION
PROCESSES
DATA
ENTRY
APPLICATION
-
QUEUE
SUPERVISOR
-
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
-
FEDWIRE
I
I
NETWORK
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
Figure
6
Elements of a DECint~tct
Digilul
Tecbnfcnl
Jozwnrrl
Ihl
.i
I Wir~lcr.
Transaction Processing, Databases, and Fault-tolerant Systems
As illustrated in Figure
6 ,
the terminal manager Controlling and restricting terminal user environments
Repair applications. Clerks enter data from user- generated documents on-line as complete messages.
Verification ant1 repair clerks receive these mes- sages as work items from the ver* and repair qiletle through the Verify and Repair application.
The result of verification is either a validated mes- or an unverifiable message, which is routed to the supervisor queue for special hand ling. After special handling, the message rejoins the processing flow by returning to the verify and repair queue. After validation, the messages are inserted in the
Fedwire Xmt queue and sent over the network to the Federal Reserve System. The Fedwire I'rocess application controls the physical interface to the communication line and irnplernents tlie
Fedwire protocol. The validated messages are also used to update
;I local database by means of database server procgrarns.
The Fedwirc Xmt queue could be defined ;is a queue set, which would permit the Fedwire
Process ;ipplication to remove items from the
Application ~Matzagernent
ACMSApplication Management
Controlling and restricting the application
Ability to dynaniically make changes to the appli- cation without stopping work
In addition to using the
VIMS user authorization file (VMS SYSIJAF), the
ACMS monitor provicles utili- ties to define which users and terminals have access to the
ACMS system. Controlled tcrminals are terminals defined by one of these utilities to be owned by the
ACMS monitoc These terminals are allocated by the
ACMS
~ i i o n i t o r
A<:IMS system is started. When a user presses the Return key, the A<;MS monitor displays its login prompt.
Unless the user has login access, the vMS system cannot be accessed. The user's access is restricted to only those
,.\<:MS functions that the i ~ s e r mitted to invoke. This restriction prevents a user from tlaniaging the integrity of data on the system.
The
AGMS monitor also allows access support for terminals that are automatically logged in to the
A<:MS system, such as a terminal on a shop floor.
Such access is useful for unprivilegetl users who are not accustomed to computers. They can enter data without understanding the process for log- ging in to the system.
For application control, the
ACMS monitor uses a transfer amount by queue and item priority.
Similarly, this queue set could be passively repriori- tized near the close of the business clay. In other words, the 1)ECintact system administrator could use tlie DECintact queue utility near the end of the day to change queue-wide priorities and ensure that items with a higher priority level in the queue set would be sent over the Fedwire first, without changing any application code. crucial to the business running the applications. If the applications cannot perform their functions reliably or securely, business activity may have to cease altogether or be curtailed, as in the case of ;in inventory control application or electronic f ~ ~ n d s tions require adclitional controls to ensure that the applications and the access by users to tlie appli- cations are limited to exactly what is needed for the business.
Of the many features and tools for monitoring and controlling the system offered in the tor, three areas are most often used.
AC>lS moni- application definition files. The application autho- rization utility
(AAU) ensures that special authori- zation is required for a user to make changes to an application.
In the
ACIMS monitor, the application is a single point of control. The AC>lS/START MPI.ICATI0N and
A<:MS/SI'OP MPLICATION commands cause the exe- cution controller for the application to be created and deleted.
An
operator can control the times when an application is accessible. For example, an application can be controlled to run only on
Fridays or only between certaic hours. Tlie control of access times can also be used to restrict access while changes or repairs are made to the applica- tion. This type of access control is difficult to achieve with only the
VivlS system bccailse the v M S system does not provide these capabilities.
Tlie execution controller does access-control list checking that is specified for each task. This mechanism can restrict user access by function.
For example, a user could have tlie privilege to make a particular ~lpdate
;I database but not have access to read or make changes to any other parts
Vol
. I
t\'o. I
Wir7ter
1991 Digital Tecb~rical
Digital's Transaction Processing Monitors
of that database. The execution controller achieves a much finer level of control than do the mecha- nisms of the
VMS system or the database system.
DECintact Application Management
The DECintact monitor controls access to the whole system and to individual tasks by means of a secu- rity subsystem. The subsystem adds transaction- processing-specific features to basic
VMS security.
User security profiles specify the DE<:intact user name and password (DECintact users are not required to have an entry in the
VMS
SYSUAF file); levels of security entitlement; inclusive and exclusive hours of permissible sign-on; menu entries authorized for the user. Only one user under a given DECintact user name can be signed on to the DECintact system at any one time on any one node.
Dedicated terminal security profiles are used, in conjunction with user security profiles, to pro- vide geographic entitlement.
CAPTIVE and INITIAL_MENU user attributes restrict users to a specific menu level of func- tions and prevent the user from accessing outer levels.
User-specific menus are menu entries for which an explicit authorization has been granted in the user profile and are the only menu items visible on the menu presented to terminal users. The
DECintact monitor does include an exception for users w h o have an auditor privilege. Auditors can see all menu hlnctions but must be specifi- cally authorized to execute any single fi~nction.
The subsystem provides the ability to dynami- cally enable or disable specific menu functions.
Password revalidation is an attribute that can be associated with a menu function. If set, the user must reenter the DECintact user name and pass- word before being allowed to access the function.
The DECintact monitor supports both controlled or dedicated terminals and terminals assigned
LAT terminal server application ports, as does the
ACMS monitor. These terminals are owned by, and allo- cated to, the DECintact system. When a user types any character at these terminals, a DECintact sign- on screen is displayed, and the user is prevented from logging in to the
VMS system.
Geographic entitlement limits certain DECintact terminal-based functions to certain terminals or even to certain users on certain terminals. The three elements in geographic entitlement are as follows:
The user security profile enables a fiunction to be accessed by a certain user.
The terminal security profile enables a function to be accessed at a certain terminal.
A GEOG attribute is associated with a menu entry in the terminal manager/dispatcher's menu database. This attribute, when associated with a function, demands that there be an appli- cable terminal security profile before the func- tion can be accessed.
Normally, if a function is enabled in a user profile, the user can access the function without further checks. If the GEOG attribute is associated with the function, however, that function must be enabled in the user profile and in the terminal profile before it can be accessed.
Geographic entitlement is frequently a require- ment in financial environments which have specific and rigid security protocols. For example, a bank officer may be authorized to execute certain sensi- tive functions available only at dedicated terminals when the officer is signed-in at the home office.
The same officer may be authorized to execute only a subset of less sensitive functions when signed-in from a branch office. Such sensitive func- tions can be protected by requiring that the user profile and the dedicated terminal profile enable the function.
Applications and resources are controlled within the context of a DECintact copy's run-time and management environment. Multiple copies can be established on the same VMS system.
Different groups of users can maintain a certain level of autonomy (e.g., separate applications and data files), but all users can also share some or all sion. A typical example of this concept, that is, the ability to create multiple DECintact copies for isola- tion and partitioning, is the common practice of establishing development, acceptance testing, and production DECintact environments. Managing applications and resources within a development environment, for example, can differ from manag- ing applications and resources within a production environment with a different system manager.
Access to menu functions is controlled by the
INTACT MANAGE DISABLE/ENABLE command. This command removes or restores specified functions
Digital Technical Jourtral Vol.
.7
1%~.
l
Winter 1991
Transaction Processing, Databases, and Fault-tolerant Systems
tlynamic;tlly from all menus i n t h e DECintact copy ant1 disables o r enables their selection by subse- quent users. (Current accessors of t h e specified function are allowed t o complete t h e function.)
The execution of single- and multitlireadetl appli- cations or 1)ECint;lct system c o m p o n e n t s can be s h u t clown by t h e INTACT
&MUAGE
SI-IlrTllOWN command. This conlmand issues a mailbox request to the ;ipplication o r component, which then initi- ates an orclerly shutdown. Access t o t h e system by inclusi\ie ant1 exclusive time of day is controlled o n
;I per-user basis through t h e DECintact security subsystem. In addition t o these commands and functions, t h e clueuing subsystem is managed by nie;lns of
;I queue management utility. This ~ ~ t i l i t y creates and deletes queues ancl clileue sets, modi- fies queue ;lnd queue set attributes, and performs
;]I1 o t h e r functions necessary for managing t h e
1)K:intact queuing subsystem.
In general, the DECintact monitor's security and application control focuses o n t h e front end by concentrating access checking at t h e p o i n t of sys- tem sign-in ant1 menu generation. The ACMS system concentrates m o r e o n t h e back-end parts of t h e system by means of VMS access control lists (A<:l.) o n specified tasks. The
ACMS approach is built o n
VMS security and system access (the
SYSLJAF file) and reflects an environment i n which t h e
VMS sys- tem antl t h e transaction processing security hlnc- tions arc typically performed by t h e same system management agency. The DECintact monitor's sys- tem access is handled more independently of t h e
IS system and reflects an environment in which shared by both rnonitors has been growing w i t h t h e latest releases of t h e
ACMS and D1:Cintact monitors. This external convergence has been fos- tered and made possible by an internal conver- gence, which is based o n sharing t h e unclerlying code that s u p p o r t s t h e c o m m o n features of each monitor. As more coninion features are introduced and enhanced in t h e DECtp system, t h e investment in applications built o n e i t h e r m o n i t o r can b e protected and t h e distinctive programming styles of both can be preserved.
Reference
1.
I?
A .
Bernstein, W T. Emberton, and
V
Trehan,
"DE<:dta
- vol.
3, no.
1
(Winter 1991, this issue): 10-
17. may be performecl by a different department from those of the general VMS security system.
Conclusio?~
monitors provide a unified set of transaction-pro- cessing-specific services t o t h e application envi- t h e services c.;~ch monitor provicles. Where t h e functions provided by each monitor are identical o r similar (e.g., client/server database access ant1 s u p p o r t for l>E<:forms), th e factors that clistinguish o n e from the o t h e r are primarily a result of t h e use of 4G1, and 3<;lr application programming styles e n c e s remain (as in each product's respective cli~euing security systems), t h e clifferences are primarily o n e s of emphasis rather than func- tional inconlpatibility. The set of c o m m o n fe;~turcs
I/ol
.3
i\'o.
I
Winrer
I991
Digilnl Technical Jourtral
डाउनलोड
विज्ञापन