moleculerjs / moleculer

:rocket: Progressive microservices framework for Node.js
https://moleculer.services/
MIT License
6.13k stars 580 forks source link

The client can be separated from the service side #249

Closed openainext closed 6 years ago

openainext commented 6 years ago

The client can be separated from the service side

icebob commented 6 years ago

What do you mean?

zllovesuki commented 6 years ago

I think he meant that if a microservice is strictly a "consumer" (as in they only do broker.call) instead of providing services.

quex46 commented 6 years ago

Would be useful, for example, for transparent migration from monolit app to microservices.

But does it worth? If I understand correctly, you can just create ServiceBroker instance with no services attached to it and use it as client (after calling .start() method on it to ensure transporter is connected).

zllovesuki commented 6 years ago

@quex46 it adds overhead. For example, other nodes can care less if the client dies. However, with current architecture, heartbeats and etc will still be sent from the client, which adds overhead.