🚀gRPC

gRPC is a high-performance Remote Procedure Call (RPC) framework and it's being used for internal microservice communication. More specifically:

  • Harmony.Api exposes gRPC to other services in order to access the harmony database

  • Harmony.Automations exposes gRPC to Harmony.Api in order to access the MongoDB automations database.

Configurations

Each application that consumes a gRPC service needs to know the endpoint of the application that exposes the service.

Harmony.Api

Harmony.Api consumes the gRPC service exposed by the Harmony.Automations. Set the AppEndpointConfiguration in the appsettings.json.

"AppEndpointConfiguration": {
    "AutomationEndpoint": "https://localhost:7277/",
    "FrontendUrl": "https://localhost:7096"
  },

The AutomationEndpoint is the actuall Harmony.Automations endpoint used when the app is started.

Harmony.Automations & Harmony.Notifications

Both of Harmony.Automations & Harmony.Notifications services consume the gRPC service exposed by the Harmony.Api. Set the AppEndpointConfiguration in their appsettings.json file.

  "AppEndpointConfiguration": {
    "HarmonyApiEndpoint": "https://localhost:7097/"
  },

Production

In case you deploy Harmony on a production environment don't forget to set the corresponding AppEndpointConfiguration configurations in all the appsettings.Production.json files

Last updated