Developing a realtime full stack app with .NET, Angular, and MongoDB
In this tutorial, we create a simple retrospective app using .NET 5 and Ably's pub/sub service. The application is divided into three services: Facade, Topic, and Notification. Each service has its own responsibilities, such as showing information to clients (Facade), saving retrospective topics to a database (Topic), and collecting notifications from other services (Notification). The code for each service is written in .NET 5 (C# or F#) and uses Ably's pub/sub service for communication between the services. We also use MongoDB as a data store, OpenAPI documentation, and health checks for each service. The frontend part of the app is written in Angular 8. The architecture diagram shows how the three services communicate with each other via Ably's pub/sub channels. We use an out-of-the-box pub/sub service like Ably to simplify the communication between services and clients. Ably provides several services, including pub/sub, message persistence history, push notifications for mobile apps, and more. It also has a .NET library ready to use. The main terms used in Ably are Channels and Message Types. The code examples provided show how the Facade service receives requests from clients and directs them to other services. We also see how the Topic service saves retrospective topics to MongoDB and notifies clients about handled topics, as well as how the Notification service handles messages and forwards them to all interested clients/services. Finally, we run the whole app using docker-compose up since the docker-compose file is in place. This tutorial demonstrates how to build a realtime full stack app with .NET, Angular, MongoDB, and Ably.
Company
Ably
Date published
July 29, 2021
Author(s)
MichaĆ Niegrzybowski
Word count
3047
Language
English
Hacker News points
None found.