We have a use case where we have two microservices, Microservice A
pushes a long-running task to Microservice B
.
Microservice B
starts processing the task and keeps updating the status of the task. Now Microservice A
has to constantly poll Microservice B
for an update on the status of the task.
We don't have queues in our current setup.
So, We thought of creating a web socket
between Microservice A
and Microservice B
so that Microservice B can push the status updates to Microservice A
. Would this design violate any of the principles of Web sockets
and also will it be a better approach compared to constant polling?