I am still learning Meteor and my first project I want to tackle are microservices (as in multiple meteor apps) communicating with each other. I want to adopt the following approach:
- A client in the Frontend-App submits a request
- Request is processed by different microservices as needed
- Finally the resulting data is sent to the “UI Microservice App” which is basically a directory of React components which are injected with the resulting data.
- Finally that UI Microservice should provide the appropriate React-Component to render to the Frontend App which would complete the Request/Response circle.
Now I struggle with #4 conceptual-wise. I use meteorhacks/cluster to connect all apps via DDP. This works for handling a client request on another meteor app. But then what?
How would I send the react component from the UI Microservice to the Frontend App? Is there an obvious way? Does the FrontApp simply need to subscribe to the UI Microservice until something to render is available? Can I send React components through subscriptions?
Thanks for your thoughts.