Você está na página 1de 6

Transactional middleware,

which includes TP monitors


and application servers, pro-
vides benefits to distributed
computing and Enterprise
Application Integration (EAI)
that cannot be found in tradi- By David S. Linthicum
tional development tools.
A
pplication servers are a good fit can accomplish within most EAI problem
with EAI because the architecture domains. None of the TP monitors or
Scalability, fault tolerance, provides for a centralized server application servers that exist today sup-
and an architecture that cen- that’s able to process information from port either “out-of-the-box” content
many different resources, such as databas- transformation or message trans-
tralizes application process- es and applications. Moreover, they formation services, at least not without a
ing are hallmarks of transac- ensure delivery of information from one lot of programming. What’s more, they
application to the next and support a dis- generally don’t support event-driven
tional middleware. In addi- tributed architecture. However, despite information processing.
their many advantages, the cost of imple- What application servers excel at is
tion, transactional middle- menting application servers may preclude method-level EAI or, at least, the shar-
ware has the ability to pro- their use with EAI. Implementing applica- ing of common business logic to pro-
tion servers is an invasive process because mote EAI. However, if that is the only
vide virtual systems and sin- applications must be altered to use it. benefit, then much better options are
gle log-on capabilities and Despite the fact that many application available to the EAI architect or devel-
server vendors are promoting their prod- oper. Message brokers or traditional,
can, in many cases, reduce ucts as the “ultimate EAI engine,” there Message-Oriented Middleware (MOM)
are limitations to what application servers are much better tools for the simple
the overall cost of a system.
eAI Journal • July/August 2000
sharing of information at the data level
or the application interface level. This is The ACID Test
not to suggest that application servers
are not a good fit for some EAI projects, Before digging too deeply into appli- transaction, once committed and com-
only that they are of greater advantage cation servers, it might be a good idea plete, can survive system failures.
at the method level. As in all aspects of to have an understanding of the concept Although the ACID test might over-
EAI, architects and developers need to of transactions. A transaction has ACID simplify the concept of a transaction, it
understand the relative advantages and properties — Atomic, Consistent, represents an easy way to remember the
disadvantages of the options, if the cor- Isolated, and Durable. features and functions of application
rect choices are to be made. Atomic refers to the “all or nothing” servers. Developers can count on a high
In this article, we will examine appli- quality of transactions. The transaction degree of application integrity with
cation servers from both a functional either completes or it does not. There is application servers — even in heteroge-
perspective and a developer’s point of no middle ground. Consistency refers to neous environments comprised of very
view. We will seek to establish those sit- the fact that the system is always in a con- different operating systems and databas-
uations for which application servers sistent state, regardless of whether or not es. More importantly, a transaction is
make a good fit, and how to develop it completes the transaction. Isolation secure. Even when other things go
EAI around application servers. refers to the transaction’s ability to work wrong, application servers won’t allow
independently of other transactions that those problems to affect any other trans-
Notion of a Transaction may be running in the same TP monitor action, application, or data.
Application servers require that com- environment. Durability means that the — D. S. L.
plex applications be divided into bite-
sized units called transactions. Applica- be shared among applications. Ap- dle, other processes start automatically.
tion servers control transactions from their plication servers can be used to enforce This is the concept of load balancing.
beginning to their end, from the client to business rules and maintain data integri- Some application servers can distribute
the resource server, and then back again. ty or to create entire applications by the process load over several servers at
In these scenarios, transactions are building many transaction services and the same time dynamically or distribute
either all or nothing. They either work invoking them from the client. the processing over several processors
or they do not. A transaction is never in multi-processing environments.
left incomplete. As a result, application Database Multiplexing The load-balancing features of appli-
servers always leaves the system in a The real benefit to application cation servers also enable application
stable state (see sidebar on the notion of servers is the ability to multiplex and servers to prioritize. As a result, devel-
ACID). This provides the developer manage transactions that result in the opers are able to assure that VIP clients
with a consistent and reliable program- reduction of the number of connections get top notch service. Application
ming model. It makes application and processing loads that larger systems servers are able to handle priorities by
servers a natural choice for distributed place on a database. With application defining “classes.” High-priority classes
applications, which must deal with servers in the architecture, it is possible kick up the process priorities. As a rule,
many different databases, queues, and to increase the number of clients with- developers use high-priority server
batch interfaces running on heteroge- out increasing the size of a database classes to encapsulate short-running,
neous platforms. server. For example, by using an appli- high-priority functions. Low-priority
Application servers process transac- cation server requiring only about 50 processes (such as batch processes) run
tions on behalf of the client or node and connections, more than 1,000 clients inside low-priority server classes.
can route transactions through many can access the database server. Moreover, developers can assign priori-
diversified systems, depending on the By “funneling” the clients’ requests, ties by application type, the resource
requirements of the EAI problem application servers remove the “process- managers required by a transaction, high
domain. It’s not unusual for an applica- per-client” requirement. In this scenario and low response times, and the fault-
tion server to tie together a mainframe, (also known as “database connection tolerance of a transaction. Developers
an NT server, a multiprocessing UNIX pooling”), a client simply invokes the can also control the number of processes
server, and a file server. Application transaction services that reside on the TP or threads available for each transaction
servers also provide load balancing, monitor, and those services can share the by defining any number of parameters.
thread pooling, object recycling, and the same database server connections
ability to automatically recover from (threads and processes). If a connection Fault-Tolerance
typical system problems. overloads, the TP monitor simply starts a Application servers were built from
Although application servers are cor- new connection to the database server. the ground up to provide a robust appli-
rectly — though only technically — This ability is the foundation of three-tier cation deployment environment with the
referred to as middleware, they are architecture, and the reason three-tier ability to recover from any number of
much more than a simple middleware architecture can scale to high user loads. system-related problems. Application
connection layer. They provide a loca- servers provide high availability by
tion for the application code to run and, Load Balancing employing redundant systems. For
as a result, a location for business pro- When the number of incoming client example, application servers use
cessing and application objects to run, requests surpasses the number of shared dynamic switching to reroute transac-
as well as a location where methods can processes that the system is able to han- tions around server and network prob-

eAI Journal • July/August 2000


lems. The transactions work through a (albeit, in different ways) as they move features such as an Integrated Develop-
two-phase-commit process to assure toward the new world of Enterprise ment Environment (IDE).
that the transactions complete and to JavaBeans (EJB, which is described in The benefit of application servers is
guard against transactions becoming the section “Enterprise JavaBeans,” clear. By placing some, or most, of the
lost electrons when hardware, operating later in this article). application logic on a middle tier, the
systems, or networks fail. Two-phase- Although application servers were cre- developer can exert increased control
commit also makes sure that reliable ated for Web-based transactions and appli- over the application logic through cen-
transactions can be performed on two or cation development, their usefulness to tralization. Such a placement increases
more heterogeneous resources. EAI is obvious, with their back-end inte- the ability to scale the application
In the event of a power failure, for gration capabilities (their ability to bind through a set of tricks, such as database
example, application servers alert all together several source and target applica- multiplexing and load balancing,
participants of that particular transaction tions through a series of connectors pro- described previously.
(server, queues, clients, and so on) of the vided by the application server vendors — The end result is a traditional three-
problem. Any and all work accom- for example, SAP, PeopleSoft, Baan, rela- tier client/server computing model, con-
plished up to that point in the transaction tional databases, and middleware). sisting of a presentation layer (the part
is rolled back, and the system returns to Application servers provide an up-to- that presents the information to the
its “pretransaction” state, cleaning up date approach to sharing methods, as user), the application layer (the middle-
any mess it may have left. Developers tier application logic), and the data layer
sometimes build transactions that auto- (where the data resides).
matically resubmit after a failure. This If this represents traditional, three-tier
ability to create an automatic resubmit client/server computing, what has
feature is highly desirable within the changed? To a large extent, the “change”
context of an EAI problem domain, is nothing more than the rediscovery of
because application servers ensure the value of this type of application
delivery of the information being shared architecture. Also, the change is being
by the source and target applications. driven by a set of aggressive products —
However, message brokers also under- such as Netscape Application Server
stand the benefit of this feature. Many (now a part of the iPlanet initiative from
are moving to provide transactional Sun), WebLogic, Microsoft Transaction
integrity within their products. Application servers Server (now rolled into AppCenter), and
NetDynamics — which are new prod-
Communications provide a good example ucts that are much easier to use than tra-
Application servers provide a good ditional transaction-oriented products
example of middleware that uses mid- of middleware that uses (e.g., TP monitors). The notion of lever-
dleware, which includes message bro- aging reusable components within these
kers. Application servers communicate middleware. environments and thus moving away
in a variety of ways, including Remote from traditional procedural code also
Procedure Calls (RPCs) (specialized for contributed to this change, as did the
application servers and called “transac- well as a mechanism for integration. need to bind advanced application devel-
tional RPCs” or TRPCs), distributed However, each application server has its opment tools with transactions.
Dynamic Program Links (DPLs), inter- own approach to how this happens. The two standards that dominate here
process communications, and MOM. Therefore, making wise decisions are Java, with its EJBs initiative (also
Because application servers are simply regarding the selection of an application closely tied to CORBA) and ActiveX,
an Application Programming Integration server — or application servers — for integrating with products such as
(API) within an application, developers an EAI project requires an understand- Microsoft Transaction Server (MTS).
have the flexibility to mix and match all ing of the category of features, as well These technologies are more than a way
sorts of middleware layers and resource as the problem at hand. to integrate components with transac-
servers to meet the requirements of an Application servers have been used tions. They are providing the foundation
application or EAI problem domain. extensively over the years, along with for the next generation of applications,
enabling mechanisms such as distrib- as well as an opportunity to integrate the
Application Server Features uted objects. However, new demands enterprise.
Application servers not only provide have resulted in a reexamination of this
a location for application logic, they paradigm, adding more up-to-date prod- Enterprise JavaBeans
also coordinate many resource connec- ucts, such as those built around the Application servers are different from
tions. Typically Web-enabled, they notion of processing components with traditional transactional middleware
bring transaction processing to the Web transactionality. Therein lies the evolu- (such as TP monitors) in that they are
through any number of mechanisms. tion of the technology. However, appli- able to function around the notion of
The new application servers tend to cation servers have yet to catch up with transactional components. Almost all
support Java as both the native lan- TP monitors in performance and relia- application servers using this transac-
guage and the development model bility, but do provide more advanced tional component type architecture are

eAI Journal • July/August 2000


looking to employ EJBs as the enabling
standard. However, many are doing so in
their own special way. What’s more, the
standard is still in a state of flux, and Sun Deployment
is in the process of correcting that, as Descriptors
well as building a certification process.
While EJBs are really a Java-enabled Methods EJB Object
Client (client view)
middleware, it is appropriate to discuss
them here, in the context of application
servers. This is due to the fact that EJBs Enterprise Bean
add the most value to application servers.
The EJBs specifications (see EJB Home
Create
www.javasoft.com) define a server-side Find (bean identifier)
component model for JavaBeans. EJB, Remove

simply put, represent specialized Java- Environment


Beans that run on a remote server
(known as the “EJBs container”). EJBs
look very similar to distributed objects
such as COM and CORBA, at least from Figure 1 — The EJBs model supports the notion of implicit transactions. EJBs needn’t specify the
the point of view of architecture. transactional demarcation point in order to participate in distributed transactions.
Using the same architecture as tradi-
tional JavaBeans, EJBs can be clustered
together to create a distributed applica-
tion with a mechanism to coordinate the Presentation Browsers
Presentation Clients
processing that occurs within the
JavaBeans. Thus, they reside on applica-
tion servers, which are able to process IIS/ASP
the beans as transactional components.
The EJBs model supports the notion DCOM
of implicit transactions. EJBs needn’t
specify the transactional demarcation
point in order to participate in distributed Application Update
transactions (see Figure 1). This feature Logic
represents an essential benefit to the Analysis
model. The EJBs execution environment
automatically manages the transaction on Query
behalf of the EJBs with transaction poli-
cies that can be defined with standard Windows NT Server
procedures during the deployment
process. Moreover, transactions may be
controlled by the client-side applications. Data and CICS/ Oracle SQL
MSMQ
The EJBs model defines the rela- Resources IMS UNIX Server

tionship between an EJBs component


Source: Microsoft
and EJBs container system. EJBs do
not require the use of a specific con- Figure 2 — MTS is based on Microsoft’s COM+ and uses that model extensively as both a program-
tainer system. Furthermore, any appli- ming standard and a method of communications. In other words, MTS is COM+, and
COM+ is MTS.
cation execution system, such as an
application server, can be adapted to are analogous to traditional transaction- Transactional ActiveX
support EJBs by adding support for al systems. Thus, an EJBs Server must In a strategy similar to the one
services defined in the EJBs specifica- provide access to a standard distributed employed with EJB, Microsoft is seeking
tion. The services in the specification transaction-management mechanism. to support transactionality through
define relationships between EJBs and An EJBs container implements the ActiveX and MTS. MTS provides an
a container. They also provide a porta- management and control services for a environment to process transactional
bility layer. Thus, EJBs can run in any class of EJBs objects. In addition, this ActiveX components, providing tradition-
execution system (EJBs container) system provides life cycle management, al TP monitor features such as support for
supporting the EJBs standard. transaction control, persistence manage- ACID, database access, and recoverability.
The EJBs execution system is called ment, and security services. The overar- MTS is based on Microsoft’s COM+
the “EJBs Server.” It provides a stan- ching idea is to allow a single vendor to and uses that model extensively as both
dard set of services to support EJBs provide both the EJBs Server and the a programming standard and a method
components. EJBs and the EJBs Server associated EJBs container. of communications. In other words,

eAI Journal • July/August 2000


MTS is COM+, and COM+ is MTS (see
Figure 2). However, as we alluded to Considering Object State
previously, MTS is morphing into a new Management and Application Servers
Windows 2000-based product known as
Most application servers provide scalability, it is burdened by two major
AppCenter. AppCenter provides the
component processing environments disadvantages. The first is that it does
same transactional control as MTS as
using a stateless model, enhancing not support multiple references to an
well as queuing services and clustering/
scalability through the recycling of an object’s properties. As a result, it does
load balancing mechanism, tightly cou-
object in the memory of the application very little to support object reuse
pled to traditional Microsoft develop-
server. Rather than destroying and through the object-oriented program-
ment tools such as Visual Basic and
recreating objects for every connected ming model. The second disadvantage
Visual C++. However, since AppCenter
node, the application server keeps a is that it has to create a new object for
is still scheduled for mid-2000 delivery,
pool of objects ready to hand out to any each database request, resulting in a
we’ll limit our discussion here to MTS.
external process requesting service.) performance hit when object data is
MTS has been shipping since 1996,
While the stateless component loaded from a back-end database.
making it one of the first commercial
model has the advantage of improved — D.S.L.
software systems to combine transac-
tions with components. Unlike EJB,
which is a specification, MTS is a prod- place them inside the MTS environment. ing the progress of EJB, providing ven-
uct. COM is the relative standard here, dors with the ability to adopt this stan-
but it’s really an ORB standard, not a Future of Application Servers dard sooner rather than later. Shortly we
standard of transactionality. While this What is the future of application should be able to create a set of EJBs
might be somewhat confusing, the servers, and how should they be applied within any compliant tool and run those
essential message is that transactional to EAI? Simply put, application servers within any compliant container.
ActiveX with MTS is a product strategy, will continue to dominate those problem MTS/AppCenter and ActiveX, on the
not a standards strategy. domains that require Web-enabled appli- other hand, have a head start on EJB, just
MTS is best described as a container cation development as well as method/ not as much hype and play in the media.
for transactional components like EJB. process level back-end integration. Web- Just as COM and COM+ has crept onto
MTS applications are a collection of enabled selling systems, such as those desktops over the last several years,
ActiveX server components (known as a employed by Amazon.com are clearly in MTS and transactional Java are stealth-
“package”) that are able to work either that space. ily moving there as well. Enterprise soft-
with other ActiveX components on the However, application servers have ware may be created using ActiveX and
client or with other technologies such as some growing to do, including the abil- MTS for no greater reason than the won-
Java, CORBA, or a more traditional ity to scale to larger processing loads derful convenience of it all.
application. and the ability to better manage states. The most compelling concept of
MTS applications must invoke them- We’ve yet to see application servers eas- MTS — that it’s a product, not a stan-
selves as in-process COM servers ily handle traditional transaction fea- dard — could be its downfall as well.
(ActiveX components). For all practical tures, like two-phase commit, as well as Many organizations burned by propri-
purposes, ActiveX components are anal- traditional TP monitors. What’s more, it etary products are cautious about wrap-
ogous to DLLs (Dynamic Link would be nice to see standard access ping enterprise applications around a
Libraries) that load into the MTS en- mechanisms, such as XA, common product rather than a standard.
vironment. They are managed through among all commercial application On the other hand, EJBs is a standard
several subsystems that react to requests servers. But, it’s clearly only a matter of that will cross many different product
made by the loaded ActiveX component. time before the application server ven- lines. However, it’s difficult to tell how
These subsystems provide MTS and the dors have caught up with the user com- much protection will come with that.
transactional ActiveX component with munities’ wish list. Everyone implements standards in dif-
features such as automatic transactions, EJBs are a step in the right direction; ferent ways. In fact, many consider stan-
configurable security, database connec- however, the specification does not give dards to be more about marketing hype
tion pooling, thread support, and compo- detailed definitions of the exact nature than about real technological value.
nent state management. of the technology, such as thread pool- Problems that MTS needs to solve
MTS also has some of the best tool ing, concurrency control, and resource may include scalability and integration
support available, with direct integra- management. While the ambiguity pro- with other environments. We’ve yet to
tion with Visual Basic (which provides vides vendors with an excuse to differ- see how scalable EJBs really are due to
the tightest integration with MTS), entiate their products, it also allows them the immaturity of the standard and the
Visual C++, Visual J++, and others. to stray in different directions, using dif- lack of real life applications. Perhaps
Because MTS uses COM objects, ferent proprietary mechanisms. neither of these technologies will live up
MTS applications support most lan- Fortunately, Sun understands this and is to its promise. At least, not initially. To
guages and tools that support COM, establishing a certification program to do transactions today may mean to con-
including the ones mentioned previous- ensure that all of those promoting their tinue to rely on more traditional technol-
ly. It is possible to create components products as being EJBs compliant, actu- ogy, such as TP monitors.
using these COM-enabled tools and then ally are. What’s more, they are accelerat- The coupling of application servers

eAI Journal • July/August 2000


Application Servers and Web-Based Application Development and Integration
In many EAI scenarios, enterprises will want to integrate their ability of Java-enabled standards, such as server-side Java and
applications through a Web browser, thus providing a common EJB, to function as traditional distributed objects.
interface for many different applications and data sources. This is As with our TP monitor example, the Web-server application
also known as creating “portals,” or views, into a broad array of can access methods contained in a distributed object or a group of
information sources. Application servers provide one of the better distributed objects. Once a method — or a series of methods — is
solutions available to accomplish this. invoked, the distributed objects perform application processing on
There are three issues to consider in building Web applica- behalf of the server-side process linked to a Web client. The dis-
tions: the enabling technology (Java, ActiveX, CGI, NSAPI, tributed object can even access a database. Once again, at the con-
ISAPI, and so on); the architecture that works with the existing clusion of the processing, the information returns to the server-
enabling technology; and the Web tools and technology needed to side process that, in turn, returns the results to the Web client.
build the application around the architecture. Because the server-side process can communicate with any num-
A Website, like any distributed application, needs to be con- ber of distributed objects that exist on any number of application
sidered in terms of tiers. A traditional Website has two tiers — servers, this Internet architecture supports n-tier (four or more
the Web browser and the Web server. More complex sites have tiers) and provides a mechanism to offer a divide-and-conquer
three tiers — the browser, the Web server, and a database serv- approach to distributed application development. Visigenic and
er. The database server is connected to the Web server to provide Iona are examples of vendors selling CORBA-based distributed
data for the site. Traditional search engines are good examples objects, while Microsoft is giving DCOM away as part of the
of three-tier Websites. The most complex architecture, four-tier, Windows environments.
requires the presence of a Web browser, Web server, and data- The advent of Web-enabled distributed objects means develop-
base server, with an application server between the database ers can place distributed objects at the client and the Web server.
server and Web server. For example, Netscape supports CORBA within the browser while
The four-tier Website architecture is not in wide use today, but Microsoft supports DCOM. Rather than communicate with the
its popularity is increasing as mechanisms to deploy mission- Web server using traditional HyperText Transfer Protocol (HTTP),
critical e-commerce applications to sites for use inside and out- the Web client runs a distributed object and communicates with the
side the organization are explored. Four-tier architecture pro- Web server using a native object protocol such as CORBA’s IIOP
vides developers with the flexibility to create Web applications (Internet Inter-ORB Protocol) or Microsoft’s DCOM RPC. Unlike
that can scale, recover, and support all the advantages of distrib- HTTP, these protocols are dynamic and can use states. As a result,
uted processing. Although this area is still in flux, there are cur- they make dynamic application development easier for developers.
rently three basic types of technologies: TP monitors, distributed Developers can also mix and match distributed objects at the
objects, and application servers. client, the Web server, the database server, and all points in-
TP monitors add another layer of technology for business between to meet the requirements of the application.
application processing between the Web server and the database. While it is possible to use standard distributed objects, such
In addition, they provide some advanced application-processing as those from Inprise and Iona, or standard TP monitors, such as
capabilities. This architecture works by allowing the Web client to Tuxedo, many site builders opt for easier, more distinct solutions
access the TP monitor services from a CGI, NSAPI, or ISAPI — in other words, application servers built exclusively for use
application using server-side scripting or a traditional program- with the Web. Examples of these application servers include
ming language (e.g., C++). The TP monitors then process the Netscape’s Netscape Application Server and the Inprise
transaction service and communicate with the database server on Application Server.
behalf of the Web server process (if required). The information is There are a number of advantages to using Web-enabled appli-
then returned to the process, which returns the results to the Web cation servers over the more traditional technology. First, they are
client as HyperText Markup Language (HTML). By extending the geared for Web development only. As a result, they provide the
same concept, the server-side process can communicate with developer with many different mechanisms to build Web applica-
other middle-tier technologies, such as standard distributed tions using an application server. Many are enabled for popular
objects, remote program interfaces (e.g., such as SAP APIs), and Web-development and authoring tools. Distributed object and TP
other types of middleware (e.g., messaging middleware). monitors are more general-purpose application servers (although
Common Object request Broker Architecture (CORBA) and all TP monitor and distributed object vendors have done a good
Distributed Component Object Model (DCOM) are the two most job with Web-enabling their products). Second, it’s less costly to
popular distributed object standards in use today. build applications with this technology. The application servers
A movement has been in the works to combine both Java and are less expensive, tools are plentiful, and less time is needed.
CORBA as a single distributed object offering, resulting in the — D. S. L.

About the Author


with EAI is clear. EAI problem ments (both technical and business)
domains that need to support transac- before committing to application David S. Linthicum
tions between applications, share logic servers. In fact most EAI problem is the chief technol-
as well as data, and are willing to incur domains will need a suite of middle- ogy officer of SAGA
the cost of changing all connected ware, transactional and nontransaction- Software and the
applications, are perfect for application al, to meet their ultimate business author of Enterprise
server-type solutions. EAI architects requirements. Unfortunately, the prob- Application Integra-
and developers, however, have to care- lems are too complex to apply one tion. Voice: 703-
fully consider the integration require- generic solution. eAI 391-6714; Email:
david.linthicum@sagasoftware.com.
eAI Journal • July/August 2000

Você também pode gostar