Answer the question
In order to leave comments, you need to log in
Is it acceptable to bind two front-end microservices via a message bus to their message api?
There is a wrapper application, and it renders two services A and B, throwing a websocket instance into them. These services are autonomous, working directly with messages from the websocket in pub sub mode. If service A leaves a request to change the value in the database, then service B will know about it, for example.
But now there is a situation with ui logic: for example, when I click a button in service A, some kind of panel should appear in service B. If you turn this through a web socket, it turns out to be very expensive in terms of resources. It turns out that you need to additionally create a message bus at the wrapper application level, pass it to services A and B and come up with an additional message api for similar ui logic. But the services still get that there will be a dependency on this library with a message bus, and a link to this api. Is it all right?
Answer the question
In order to leave comments, you need to log in
But the services still get that there will be a dependency on this library with a message bus, and a link to this api. Is it all right?
I did something similar, the websocket service was catching messages from the ORM. At change of a DB gave messages on the front. If the front is subscribed to entity changes, then during an event from sockets, it turned to the backend API to receive data conditionally. And it's quite normal.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question