Micro Services Model

The concept of micro-services has become extremely popular over the past a few years in the design of modern software architecture where the calls to functional API are now centrally managed under a self-autonomous server. The server solves the problems of request routing, identity verification, load balancing, service discovery and failure handling. GoCollaborate provides a simple daemon Coordinator that acts on the rules of micro-services model to support the communication between Collaborator cluster and their service consumers.

Self Registering Pattern

The basic model of service registering pattern Coordinator uses is built on top of self-registering pattern, the main concepts of which could be summarised as below:

  • Each service provider (e.g. Collaborator) is responsible for registering itself on the central Coordinator.
  • When a service is registered, Coordinator will response with the information of that particular service to the request of querying.
  • It is suggested that consumers register themselves by subscribing the service to consume on the Coordinator daemon; they will then be issued a token each representing their identities. The token could either be non-restricted or restricted by a JWT issued from the service provider depending on needs.
  • When a service is queried, Coordinator will run a load balancing algorithm to decide which endpoint the current service consumer will be pointed to, the default policy of which is Round Robin.
  • When a service is not available, the query from service consumer will fail.
  • The service provider maintains a persistent heartbeat connection with the Coordinator to justify its aliveness; Coordinator also runs a routine that regularly unregisters the invalid services and cleans the expired ones.



results matching ""

    No results matching ""