Profile picture
Steve Smith @ardalis
, 7 tweets, 3 min read Read on Twitter
When you have two systems that need to communicate, the default for 90+% of companies is to use a shared database. (thread) #dev #programming #architecture #softwarearchitecture
Most never move off of this model, but it has disadvantages that go along with the ease of sharing data. Applications lack encapsulation and cannot adapt their data designs to suit their unique requirements.
Usually the next approach is to treat applications just like components, with exposed public APIs. However, this can result in increased down time since direct API communication between applications means if any is down, the whole thing is down.
So the next approach is to use message queues. This allows decoupling of commands/messages from their execution, which also allows for absorption of some downtime by downstream services/apps. With 2 apps, it looks like this:
However, as additional applications are deployed, each one needs to have its own queue, and each existing application must be updated to also write to the new app's queue (as required, if it needs the updates, etc.). With 3 apps, you can see the problem growing:
It's at this point that a message bus solution starts to make sense. Commands and events can be sent to a common message bus, and other applications can subscribe to whichever messages they care about. Existing apps do not need updated as new ones are deployed.
You can use a cloud-based tool, such as Amazon SQS or Azure Service Bus for this purpose, as well as many other non-cloud options. While not a panacea, it does offer substantial benefits over API-based and simple Queue-based systems of more than 2 nodes. /end
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 Steve Smith
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!

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 and get exclusive features!

Premium member ($30.00/year)

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!