I& #39;m developing a new alternative to microservices that addresses many of the problems that people run into. I call it "SPMSA". Bear with me -- I& #39;ll explain the acronym in a later tweet. 1/
First, design your microservices in the usual way. No more than 500 lines each, say, and with well-defined interfaces. But here& #39;s the first trick: you put them all in the same repo. This means that you have a single commit that encompasses all services at once. 2/
That means when you commit or refactor, you can build and test the services as a whole system and be sure that they *always* all work together! Awesome! 3/
The next trick is that when you deploy, you deploy *all* the services for a given commit at the same time! If that means redeploying a unchanged service, no worries -- you should have a fast CI/CD pipeline, yes? 4/
Here& #39;s the cool part: you deploy all the services in such a way that they access some shared memory. This means that they can communicate super-fast, without having to do all that JSON serialization (up to 50% of servicing time). This can make your system twice as fast! 5/
And of course, there are none of the issues associated with distributed systems. No network latency or availability issues, etc.
https://abs.twimg.com/emoji/v2/... draggable="false" alt="đ" title="Daumen hoch" aria-label="Emoji: Daumen hoch"> 6/ https://en.wikipedia.org/wiki/Fallacies_of_distributed_computing">https://en.wikipedia.org/wiki/Fall...
So basically, all the benefits of a modular system composed of small single-responsibility services, yet with none of the issues associated with traditional microservice architecture. 7/
Now, one of the advantages of traditional microservices is that you can use different languages. This is harder with shared memory. Luckily, some SPMSA-friendly platforms let you use different languages easily: Java/Scala/Kotlin/Clojure on JVM and C#/F#/VB on .NET. 8/
What about scaling? If you need scaling but you& #39;re not Google, see if your platform supports something called "threads" or "forking" (of course if you are Google, please ignore this whole thread) 9/
Anyway, I call this approach "Single Process Microservices Architecture" or SPMSA. When microservices drops down the hype curve, I& #39;m predicting that this will become the new hotness. 10/
(A big /s for this whole thread, in case anyone missed the point
https://abs.twimg.com/emoji/v2/... draggable="false" alt="đ" title="Grinsendes Gesicht" aria-label="Emoji: Grinsendes Gesicht">)