Blog

What is Middleware?

Understanding how orchestration layers manage software complexity and increase app performance

Middleware is that buzzword you’ve likely heard thrown around. It’s not new, and it’s not going away, so if you’re a non-techy type who finds yourself scratching your head when it’s mentioned in meetings, this article should help you understand what it is and why it matters.

Widely-defined, middleware is software that bridges the gap between different platforms. Most articles on middleware jump straight to pipe analogies. “Middleware is the plumbing between different systems.” “It’s like a really organized translator who helps various countries negotiate with each other.”

Breaking down the world literally, middleware is “middle” in the sense that it sits in the middle of the front end and the backend. It typically lives between an application and the clients that want to interact with it. It’s “ware” in that it’s code that usually lives on a server. Following the pipe analogy, a poorly designed plumbing system would have individual pipes running from every single house all the way to the water source, with all sorts of redundant valves and pressure control systems. That’s why we have water mains that save money, manage complexity, and improve performance. Metaphor aside, that’s essentially what middleware does.

Here are three common examples of how middleware can be used:

  1. Database middleware is the most commonly known type of middleware. Web apps that interface with databases are common, but if you want any advanced data operations, like pagination and advanced filtering and sorting, you can’t rely on your front end app to handle all that data processing. You need middleware to perform those operations and deliver the results to the front end.
  1. Message oriented middleware consolidates the sending and receiving of messages across services and applications. Take, for example, a messaging app whose primary function is to facilitate family-friendly communication between users. When a user sends a message, it can be passed through profanity filters, and then be delivered to the end user. With middleware, you have this code in one centralized location, instead of hardcoding that logic into every end-user app. This type of middleware serves as a message queue, which allows asynchronous communication. In other words, when a message is sent, it’s stored in a queue until the recipient reads it. In layman’s terms, if the recipient doesn’t have their app open, they won’t “miss” the message, because it’s stored in a middleware until they request it.
  1. Embedded middleware can handle the communication between apps and the operating system (OS) to increase interoperability. It’s typically software that has been extracted out of the application to live in a layer of its own. For example, when developing an Android app, you have to account for the fact that there are a significant number of users across five major versions of Android, and middleware can help abstract some of that communication logic so that app developers don’t have to worry about having different protocols for every single version of Android. Embedded middleware is important to note because it illustrates that not all middleware lives on a server.

Why consider middleware?

Developing a solution with middleware in mind will help save money, manage complexity, & improve your app’s performance. The following four examples illustrate help define middleware and illustrate its importance in developing high-quality applications.

Middleware for Financial Services

A client in the financial services vertical came to Punchkick to develop a cross-platform solution (web, iOS, and Android) which needed to interface with a very dated, legacy mainframe. The client wanted a secure admin portal to service clients, and they had a roadmap for new features that they wanted to be released over time. This fintech project was a perfect candidate for a middleware.

It can be very costly for web and native client apps to interface with a system that is that dated.

We found that it’d waste time and money if redundant code got packaged into the client apps, so we extracted that logic from the apps and put it inside a middleware, which became  the orchestration layer between the mainframe system services as well as future 3rd-party integrations.

Ultimately this saved the client a ton of money and overhead when making decisions about swapping features in and out while giving them a lot of flexibility for what they could do with the applications. Building out a new feature became as easy as creating a new endpoint in the middleware, and then updating the frontend to display the results.

Implementing middleware also  saved the client money in another way. One of the services they had to interface with charged them for every system call that was made to the service. By using the middleware to package information before sending it over, we reduced the overall number of individual requests back to the mainframe system, saving the client money each time.

Middleware for Insurance Providers

For one of our clients in the insurance industry, our challenge was to build a web app for an environment that had data in a lot of different places. One source was a large, cumbersome database, another was a legacy insurance platform with a set of records— neither of which were designed to support a web app.

In order to retrieve data from different sources, clean it up, and make it useable by a client-side application, we built a middleware that integrated all of these different parts. It imported data from one system and reconciled it with customer records from another API, before serving it to the user on a web browser who was logged in through a single sign-on (SSO) provider. The only way the app could exist is by harnessing the power of middleware to handle both data transformation and authentication, allowing the client-side app to be lightweight. As a bonus, since all the important business logic was in one place, it allowed us to build the lightweight iOS and Android apps with the same features as the web app. In the long run, should the client alter a feature or add a data provider, they can make a change in one place (the middleware) and have it reflected across all apps.

Middleware for CRMs

One of our clients needed a slick front-end application to help manage client relationships across all their locations. Each branch had its own databases, and like many of our growing clients, they weren’t all on the same technology standards. For this project, we utilized a middleware to grab data from all the various localized databases and put it into one shared intermediary database, which got passed to our frontend application. This saved the client money in the short term by allowing them to keep their legacy systems, and built a strong backbone for the future. When their locations begin move their databases to the cloud, their front-end apps won’t need to change – just the database integrations in the middleware.

Middleware for the hospitality industry

One of our clients in the travel & hospitality industry came to us to with a robust website that needed to translate well into native apps for iOS and Android. The challenge was that they had a legacy reservation system with loyalty rewards systems, user accounts, and payment processors. (It’s worth noting that anytime you’re working with payment processors, you’re going to need middleware.)

We identified the need for an orchestration layer to bring all this logic into a common, shareable place. Native apps of this kind are just not possible without a middleware solution. Our middleware consolidated all the communication, authentication, and data storage amongst their various legacy systems for use by the native apps.

Optimizing UX with Middleware

At Punchkick, we’re always thinking about UX, and creating best-in-class middleware helps our partners have more control over user experience.

Many apps need to interface with a number of different services like push notifications, marketing platforms, databases, and CRMs—which are often full of extraneous data and API calls that can slow down the client. By wrapping these services in a middleware, you create a cohesive, lightweight user experience by exposing only the essentials to the user.

***

If you’re curious about how you can use middleware to build or improve your product, get in touch with us. We’d be excited to help you explore all the possibilities.