GRPC Connections in Jubilant
Introduction
Separate components or processes in Jubilant communicate with each other using GRPC. This Remote Procedure Call framework communicates over secure HTTPS/2 connections with server and client certificate authentication.
Each component or process must be configured with details of the external process host name / ip address, or where the process must listen for incoming GRPC connections.
Connection Points
Connection Points are defined using JSON configuration blocks. These specify the name of the client or service it is configuring, whether it is a client or service and what IP address and port to use.
In the diagram below you can see how the Logging Runtime Service listens on localhost port 7015 and that the HostScreen Server's Logging Runtime Client connects to this using localhost port 7015. The Logging Runtime Service has a Connection Point defined where the logging runtime listens on 7015 and the HostScreen Server has a Connecting Point definition configuring the logging client to connect to localhost port 7015.
Client / Server Connection Points are configured throughout Jubilant to allow the GRPC connections to be made with the appropriate server or client certificates for authentication.
Processes Shown
This diagram below shows a simplified example of three processes:
- Logging Server.
- A Windows Service that provides a standardised way of logging for all the other Jubilant processes.
- HostScreen Server.
- A Windows Service that provides the core multi-user terminal emulation features.
- Web Terminal Hub.
- A set of modern web services used to connect the Web Terminal Client web app to the HostScreen Server.
Diagram
C4Context
Boundary(LoggingServer, "Logging Server", "Process") {
Component(LoggingServerRuntimeService, "Logging Runtime Service", "ConnectionPoint", "#quot;NameKey#quot;: #quot;LoggingRuntimeService#quot;<br />#quot;Client#quot;: false<br />#quot;#quot;ServiceUri#quot;: #quot;https://localhost:7015#quot;")
}
Boundary(HostScreenServer, "HostScreen Server", "Process") {
Component(HostScreenServerLoggingClient, "Logging Runtime Client", "ConnectionPoint", "#quot;NameKey#quot;: #quot;LoggingRuntimeClient#quot;<br />#quot;Client#quot;: true<br />#quot;ServiceUri#quot;: #quot;https://localhost:7015#quot;")
Component(HostScreenServerRuntimeService, "HostScreen Server Runtime Service", "ConnectionPoint", "#quot;NameKey#quot;: #quot;HostScreenRuntimeService#quot;<br />#quot;Client#quot;: false<br />#quot;ServiceUri#quot;: #quot;https://localhost:7005#quot;")
}
Boundary(WebTerminalHub, "Web Terminal Hub", "Process") {
Component(WebTerminalHubHostScreenRuntimeClient, "HostScreen Runtime Client", "ConnectionPoint", "#quot;NameKey#quot;: #quot;HostScreenRuntimeClient#quot;<br />#quot;Client#quot;: true<br />#quot;ServiceUri#quot;: #quot;https://localhost:7005#quot;")
}
Rel(HostScreenServerLoggingClient, LoggingServerRuntimeService, "Send Log Entry", "HTTPS/2")
Rel(WebTerminalHubHostScreenRuntimeClient, HostScreenServerRuntimeService, "Start New Connection", "HTTPS/2")
UpdateLayoutConfig($c4ShapeInRow="1", $c4BoundaryInRow="1")
GRPC Matrix
Here is the whole Jubilant GRPC connection Matrix.
- Runtime
- Runtime (end-user driven) connection.
- Management
- Management connection.
flowchart
Server[Server]
LoggingServer[Logging Sever] -->|Management|Server
HostScreenServer[HostScreen Server] -->|Management|Server
HostScreenServer -->|Runtime|LoggingServer
WebTerminalHub[Web Terminal Hub] -->|Runtime|HostScreenServer
WebTerminalHub -->|Runtime|LoggingServer
ManagementConsoleHub[Management Console Hub] -->|Management|Server
ManagementConsoleHub -->|Management|HostScreenServer
ManagementConsoleHub -->|Management|LoggingServer
LogViewerHub[Log Viewer Hub] -->|Runtime|LoggingServer