Tutorial on Basic Client/Server Middleware

Definition of Middleware: Middleware is a set of common business-unaware services that enable applications and end users to interact with each other across a network. In essence, middleware is the software that resides above the network and below the business-aware application software and denotes a reusable, expandable set of services and functions that benefit many applications in a networked environment.

According to this definition, the key ingredients of middleware are (see Figure 1):

Figure 1: Middleware Overview

Middleware is business-unaware (i.e., it does not have any business logic) and is available as a common set of routines (see Figure 2). The services provided by these routines are available to the applications through application programming interfaces (APIs) and to the human users through commands and/or graphical user interfaces (GUIs). The commonality implies that these routines are available to multiple applications and users. Ideally, middleware should be transparent to end-users but necessary -- the end-users should be unaware when it is there and aware only when it is not. According to our definition, the following software qualifies as middleware (if you do not know about these, do not worry; the rest of the book is filled with information about many of these software packages):

Here is a list of software that does not qualify as middleware, according to our definition:

Figure 2: Middleware - A Look In Terms of the Open Layered Model

Transaction Processing Middleware for eCommerce

Business transactions are at the core of electronic commerce (EC). Examples of typical EC transactions are purchasing, claim processing, and billing/payment. For business to business activities in EC, the importance of supporting highly reliable and secure business transactions is quite obvious. Basic knowledge of transaction processing is essential for developing “serious” websites that handle billing, payment, credit card processing and other financial services.

Formally, a transaction is a collection of operations on a database which has the so-called ACID properties:

EC is a mixture of decision support and transaction processing activities. Normally, only a portion of the core EC activities are transactional. Two main types of EC transactions are relevant:

Transactional support is implemented differently in different types of systems. For centralized mainframe systems, on-line transaction processing (OLTP), has been built for ACID transactions and has been a backbone of commercial data processing since the early 1970s. Mainframe-based transaction managers (TMs) such as CICS and IMS-DC/IMS-TM have matured over the years to provide high performance and reliable services The situation is dramatically different in distributed environments that characterize EC:

Which one of these approaches works depends on the type of EC activities being considered. It appears that each one of these approaches have certain pluses and minuses for EC. The following questions should be asked before deciding on the approach:

Figure 3: Models of Distributed Transactions

TP-Less works well when you do not need any transaction processing capabilities. TP-Lite solutions with database procedures are much faster, on the surface, than the TP-Heavy solutions that require synchronization between sites. But TP-Heavy solutions provide many sophisticated procedures for dynamic load balancing, priority scheduling, process restarts, and pre-started servers that are especially useful for large scale production environment. These features are the main strength of TP-Heavy products because many of these products have been used over the years to handle thousands of transactions in production OLTP (on-line transaction processing) environments. Figure 3 shows a basic model of a distributed transaction processor that may use TP-Heavy in distributed environments. The protocol used in this case is two phase commit. 

While the debate between the TP-Lite and TP-Heavy proponents continues, most EC projects are completely ignoring this whole issue by focusing primarily on EDI and in some sense re-inventing the wheel. EDI, at best, is a TP Less approach. Some EC applications are being deployed by using TP-Lite while large mission critical EC applications, if any, use TP-Heavy only at back-end mainframe systems. In the meantime, it seems that many small EC applications are quite happy with TP-Less.