What’s middleware and how is it used in integration?

Middleware is clever code that links complicated backend databases and systems and frontends so websites run quickly, efficiently and securely, explains Senior Developer, Mansi Sheth-Parmar.

 

Middleware is a hidden translation layer between software systems

Middleware can mean different things at different tiers of the software stack, but in the broader architectural level, middleware is software that creates links between complicated backend databases and systems, and the frontend that a customer sees in a browser or app. 

I’ve seen middleware described as a hidden translation layer or even as plumbing, providing pipes for information to flow between systems. 

My job in creating middleware is creative while also requiring a great deal of patience and logic. I need to track all the inputs and outputs of a given system and work out ways to handle that information securely and efficiently. 

 

Middleware enables integration between unconnected databases and data sources

Middleware can be used in a range of ways. It plays a key role in creating ways for organisations to collect and use information from different databases or data sources that aren’t connected to each other. 

When previously unrelated data is brought together, including from legacy systems that may store valuable but hard-to-access information, this greatly enhances an organisation’s ability to shape, display and update it.  

In our work on Public Transport Victoria’s myki project we used middleware to consolidate ticketing information, address information, user profiles, and payment mechanisms from various sources, simplify it and deliver it to the website and mobile app so a customer can make decisions and pay for their travel without jumping between multiple systems. 

 

Middleware can verify data input and enable websites to load quickly

If someone types a phone number into a web form, middleware can test whether that number fits the criteria for a mobile phone number. 

It can also check things like usernames as they’re typed into registration forms and verify multifactor authentication codes (MFA) to ensure they’re valid. 

There’s a time-saving aspect to this, with middleware instantly informing the user about an error without the delay involved with querying a backend/upstream system. 

Middleware can also play an important role in making websites load quickly by consolidating multiple pieces of information from different sources at once, or by stripping away unnecessary information. 

By applying some basic criteria to check and accept or reject data that obviously aren’t correct, middleware can save systems from dealing with a lot of unnecessary traffic.  

 

Middleware can act as a type of security gateway

Security checks and basic validation tasks done by middleware can protect the backend/upstream system from malicious data input attacks.

Middleware can also identify and process requests that need certain security. For example, when someone logs in to a website on a browser, their browser sends tokens along with requests when users perform actions like editing their profile. The middleware can check that these tokens are present in the request, and valid for that user, before it’s passed to other systems.

 

When I do a good job of creating middleware, no-one should know it’s there

What I do in my work on middleware is often hidden from the end user. If I do my job well, all of our client websites load quickly and their customers can enter and receive the information they need without any fuss. 

Even though it’s hidden, our development team and our clients appreciate the significant benefits of clever middleware integrations.

 
 
 
 
 
Next
Next

Cost-effective ways to keep your legacy systems working for you