I'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'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'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'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. 👍 6/ https://en.wikipedia.org/wiki/Fallacies_of_distributed_computing
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'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'm predicting that this will become the new hotness. 10/
(A big /s for this whole thread, in case anyone missed the point 😀)
You can follow @ScottWlaschin.
Tip: mention @twtextapp on a Twitter thread with the keyword “unroll” to get a link to it.

Latest Threads Unrolled: