Skip to content

Microservice Client

Michael Rüfenacht edited this page Jun 8, 2018 · 2 revisions

Edit (June 8th): Somehow this functionality seems to be supported by the loopback-connector-remote. I was not able to understand their code and don't see how it is working.

Target of this document is to define a strategy on how to query other services within our microservice cluster.

  1. The client (residing in service A) needs to resolve the information on how to query the remote service B.
  2. Therefore it needs the service name and lookup the service's IP (dns)
  3. It needs to be able to discover the base path of the api
  4. Based on this information the client needs to create a dedicated rest datasource (one for each service)
  5. Via options request on the api it can get a list of available endpoints (request on the api root)
  6. The list of endpoints should probably contain a timestamp (e.g. when the api got started the last time), so the client could poll on changes
  7. Via options request on each of the delivered endpoints, the client can load the raw definitions of the model

Clone this wiki locally