I'm strugling with finding the right setup for my problem.
I have a react based frontend that needs to display alarms, that are stored on multiple servers. The client should also be able to show async if an alarm is added to any server.
What i'm strugling with, is if either of there two solutions is best, or if another solution is better.
A) The client (frontend) communicates with the api of each server, and makes a socket connection with each server.
B) The client only communicates with the api + socket of the server that hosts the client, and the server gets the data from the other servers.
Any input would be appreciated. Thanks :)
the best way would be to implement a message broker service such as Kafka or ActiveMQ, this process is referred to as pub and subscribe.
A good explanation has been given in the following article. https://dev.to/victorgil/using-apache-kafka-to-implement-event-driven-microservices-af2