, 12 tweets, 2 min read
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/
en.wikipedia.org/wiki/Fallacies…
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 😀)
Missing some Tweet in this thread?
You can try to force a refresh.

Like this thread? Get email updates or save it to PDF!

Subscribe to Scott Wlaschin
Profile picture

Get real-time email alerts when new unrolls are available from this author!

This content may be removed anytime!

Twitter may remove this content at anytime, convert it as a PDF, save and print for later use!

Try unrolling a thread yourself!

how to unroll video

1) Follow Thread Reader App on Twitter so you can easily mention us!

2) Go to a Twitter thread (series of Tweets by the same owner) and mention us with a keyword "unroll" @threadreaderapp unroll

You can practice here first or read more on our help page!

Follow Us on Twitter!

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just three indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3.00/month or $30.00/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!