Middleware is the software that connects network-based requests generated by a client to the back-end data the client is requesting. It is a general term for software that serves to "glue together" separate, often complex and already existing programs.
Middleware programs come in on-premises software and cloud services, and they can be used independently or together, depending upon the use case. While cloud providers bundle middleware into cloud services suites, such as middleware as a service (MWaaS) or integration PaaS (iPaaS), industry researchers note that many businesses still choose independent middleware products that fit their specific needs.
Why is it called middleware?
With network-based interactions, a client, or requesting program, can make a request. That client is typically an application that resides on the front end, which is where the user interacts with software. Resources such as databases, message queues, NoSQL data stores and file servers are often referred to as being part of the back end.
The name middleware stems from the fact that it is the software that sits between the client-side request on the front end and the back-end resource being requested.
How middleware works
All network-based requests are essentially attempts to interact with back-end data. That data might be something as simple as an image to display or a video to play, or it could be as complex as a history of banking transactions.
The requested data can take on many different forms and may be stored in a variety of ways, such as coming from a file server, fetched from a message queue or persisted in a database. The role of middleware is to enable and ease access to those back-end resources.
Why use middleware?
Middleware serves a variety of functions. First, it manages connectivity to various back-end resources. So, a middleware component might create a connection pool to provide fast and efficient access to a popular back-end database. It might also create connections to message queues and topics. A piece of middleware software might also manage connections to cloud-based resources, like the Amazon Simple Storage Service (S3).
Second, middleware software has the capacity to implement logic based upon the request made from the client. For example, a middleware component might recognize that a client browser making a given request has the language header set to English, and, as a result, the queries it makes to the back end might be tweaked to return nothing but English-based results. Or, perhaps a server could identify the geographical location of the client making the request based on the IP address of the client and return data to the client that prioritizes results that are geographically close. The ability to take a request from the user, perform logic and then customize the results is an important job performed by middleware software.
Third, middleware plays an important role in concurrent processing, load balancing and even transaction management. Middleware software typically has the capacity to scale vertically and horizontally to help distribute incoming client requests over multiple servers, virtual machines or availability zones of the cloud. Middleware software can also deal with concurrency and transaction management issues, such as dealing with problems that may arise when two or more clients attempt to access or update a given back-end resource at the same time.
Finally, middleware plays the important role of securing access to back-end resources. Middleware software has the ability to challenge clients, and it requires both a secure connection using a technology like SSL and an authentication using either a username and password combination, or even a digital certificate. This security information is then used to check if the user making the request has rights to access the data in question. If the rights are affirmed, the data is sent from the middleware server to the client using a secure and encrypted connection.
In general, IT industry analysts -- such as Gartner Inc. and Forrester Research -- put middleware into two categories: enterprise integration middleware and platform middleware.
Businesses can purchase individual middleware products or on-premises or cloud-based application integration suites.
- Platform middleware supports software development and delivery by providing a runtime hosting environment, such as a container, for application program logic. Its primary components are in-memory and enterprise application servers, as well as web servers and content management. Middleware includes web servers, application servers, content management systems and similar tools that support application development and delivery. Generally, embedded or external communications middleware allows different communications tools to work together. These communications tools enable application and service interaction. Resource management services, such as Microsoft Azure Resource Manager, host application program logic at runtime, another key function in platform middleware. Other components include Trusted Platform Modules (TPMs) and in-memory data grids (IMDGs).
Platform middleware products are also available as specific on-premises or cloud service tools, as well as multitool suites. On a cloud suite site, middleware as a service offers an integrated set of platform tools and the runtime environment.
Types of middleware
There are many examples of middleware, each created to fulfill specific functions in connecting applications and web and cloud services together. Here are some of the most widely used types of middleware.
- Messaging middleware facilitates communications between distributed applications and services.
- Object or ORB middleware enables software components or objects to communicate and interact with a programs, such as containers, across distributed systems.
- Remote Procedure Call (RPC) middleware provides a protocol that allows a program to request a service from another program located on another computer or network.
- Data or database middleware enables direct access to, and interaction with, databases; it typically includes SQL database software.
- Transaction or transactional middleware ensures transactions move from one phase to the next via transaction process monitoring.
- Content-centric middleware allows client-side requests for specific content and abstracts and delivers it; it's similar to publish/subscribe middleware like Apache Kafka.
- Embedded middleware facilitates communication and integration between embedded apps and real-time operating systems.
The evolution of middleware
From 2000 and until approximately 2010, middleware software was synonymous with the concept of an application server. However, as cloud computing increases in popularity and microservices replace more monolithic SOA-based systems, middleware is changing.
Rather than deploying complete applications to middleware servers, a trend in the industry is to create smaller, microservice-based applications, package those microservices with all of the knowledge required to connect to the back-end services they need and then deploy the applications within a lightweight, container-based system like Docker. The container is then deployed to a cloud-based service.
In this case, the middleware would be the combination of the microservice hosted within the container and the cloud computing infrastructure running the container. This arrangement is the direction in which middleware is currently trending.