Messaging done in wrong way - can that be possible?
What we shall expose to client (and it is really a case)?
My last blog entry (click) was about messaging and the way we can start refactoring our app by splitting activities internally, now let's have a look from other side when a decision need to be made to expose messaging wisely.
Let's have a look at real life story that occured in one of the places where I was working.
A team was working on a monolith to split it up to smaller services (ach we want to say micro services). So they integrated messaging using one of the cloud providers (out of the box solution).
As the team was successful in their job - a member from other product suggested to use the message bus to speed up integration process and all agreed and were happy.
The time goes on and a client got access to the bus just to speed up some things...
So what do you think happened there?
As the team was progressing with their job they realized that they can't:
- guys had to constantly maintain access to the bus and all configuration was on them (a pretty junk work believe me - as that not started as a public accessible solution)
- change messages shape and payload as the other teams were hestiating to do so...
- and the nicer part: one of the systems had to be deployed for a big and valuable customer that has only a government permission to use other cloud provider
As that started to look good in beginning turned out as a nightmare.
So what could we learn from this situation?
Single responsibility principle could give use a small hint, like don't mix stuff together. If we have a bus for internal services, then (if u need provide a bus to others) create a separate bus, a couple of $$ monthly will still be less than time spent to untangle this problem, moreover if you are obligated to use same bus - still - expose an api that will be putting those messages on YOUR bus, so you can handle all aspects internally and don't need to beg an external entity with 6 months notice for any communication schema changes.
Comments
Post a Comment