Understand how your system looks from a height

Microservices are great. They’ve enabled us to break apart those legacy monolithic industrial applications and replace them with a fleet of zippy services. I don’t need to tell you why that’s great for a modern organisation — there are plenty of materials out there that will tell you the benefits of microservices, and just as important, the downsides. I’m assuming you’ve done your homework and are happily migrating to microservices (or are planning to) or have done so and are living with the outcome.

My microservices experience comes from working with customer-facing web and mobile applications. I’ve seen two distinct patterns emerge when companies migrate web/online applications to microservices — one I’m calling Pinball Architecture and the other Fast-Food Architecture.

Pinball Architecture?

As a child of the ’70s and ’80s, I remember pinball machines fondly. You put your money in the slot, and it unlocked a metal ball into a chute which you launched into the game table using a plunger. You racked up your score by hitting features and completing sets or simply repeating circuits. The slope of the table and various kickers all conspired to send your ball to the gutter at the bottom of the table, and your only defence was to hit the ball with flippers controlled by buttons on the side of the table.

man playing a pinball machine

Photo by Stefan Sidén on Unsplash

Nice trip down memory lane, but what’s that got to do with microservices? Imagine that launched ball is an HTTP request into your system. In it comes at the top, where it hits a feature (service) and is then bounced off in another direction to hit another feature (service) and so on.

This is not an uncommon microservices architecture. It’s one you see often as a result of breaking existing monoliths into microservices, often combined with cloud migration. It’s not unnatural to maintain that request-servicing mindset when designing and building out your solution. But what you end up with is a service/handler that does all the legwork of running around collecting all the data it needs to perform the required action and return the required response.

#web-development #software-engineering #programming #microservices

Is Your Microservices Architecture More Pinball or More McDonald’s?
1.30 GEEK