Skip to content

Signals Gateway Microservice

The signals gateway will serve the live and past signals of digital twins to the DTaaS client. The requirements and the choices are in the plan docs/developer/plans/signals-gateway.md, which is kept out of the site.

Skeleton

The microservice is built with the NestJS framework, on the pattern of the logger microservice. Every route is under /signals:

Route Answer
GET /signals/health {"status":"ok"}
POST /signals/stream 501, live samples as server-sent events later
POST /signals/range 501, past samples as JSON later
1
2
3
4
5
6
7
8
9
servers/signals/
├── src/
│   ├── main.ts                    # Entry point
│   ├── app.module.ts              # Root module
│   ├── signals.controller.ts      # The three routes
│   └── config/                    # signals.yaml and SIGNALS_* variables
├── README.md                      # Routes and configuration
├── DEVELOPER.md                   # Commands to build, test and run
└── test/                          # Unit and end-to-end tests

Build and Test

The commands are in servers/signals/DEVELOPER.md. The signals-ms.yml workflow runs the lint, build and tests. It also checks the health route of the built service and of the Docker image. The npm package and the image are not published yet.