Implement this system:
Parts
Each system part is a project in your .NET solution.
Client
- Simple Blazor Web Application, using Blazor WASM
- Can send REST requests to the API Gateway
- The Path of the request starts either with
/s1(requests for Service 1) or/s2(requests for Service 2)- Display two buttons, one for each request
- Show whether the request was successful after clicking a button
- When the page loads, the client subscribes to a SignalR connection, running on Notification Service.
- It displays every message received from the Notification Service
API Gateway
- Must be implemented using YARP. See the documentation
- When receiving REST requests, they are forwarded, based on the start of the path.
- Forward
/s1/...to Service 1 - Forward
/s2/...to Service 2 - Remove the first part of the path. E.g.
/s1/endpoint1becomes/endpoint1when sent to Service 1
- Forward
Service 1 and Service 2
- Simple REST services, implemented using Minimal APIs
- Each service offers at least one endpoint.
- When a message is received, send a HTTP request to the Notification Service
- The content of the message should contain what endpoint on which server get called.
Notification Service
- Offers one REST endpoint, implemented using Minimal APIs to receive notifications from Service 1 and Service 2.
- Offers SignalR endpoint, so that the Client can subscribe. See the documentation
- Forwards notifications received from Service 1 and Service 2 to the client, using the SignalR Websocket connection.