https://github.com/nicojuicy/poc-micro-service
PoC - Microservice with a gateway, healthchecks, 2 microservices and a neglictable frontend with IdentityServer in asp.net core
https://github.com/nicojuicy/poc-micro-service
identityserver4 marten microservices ocelot poc postgresql
Last synced: 3 months ago
JSON representation
PoC - Microservice with a gateway, healthchecks, 2 microservices and a neglictable frontend with IdentityServer in asp.net core
- Host: GitHub
- URL: https://github.com/nicojuicy/poc-micro-service
- Owner: NicoJuicy
- Created: 2020-02-14T02:26:21.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-09-06T22:54:44.000Z (almost 5 years ago)
- Last Synced: 2025-02-06T23:18:51.632Z (over 1 year ago)
- Topics: identityserver4, marten, microservices, ocelot, poc, postgresql
- Language: C#
- Size: 3.49 MB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Foreword
This is just a PoC, treat it as one, what is described as working works. It served it's goal :)
# Requirements
- Docker/local with Nats running
- Docker/local with Postgress running
- Change the appsettings on the NoteService.Api/ContactsService.Api ( postgress connstring + Nats IP)
# poc-micro-service
PoC - Microservice with a gateway, healthchecks, 2 microservices and a quick frontend with IdentityServer in asp.net core 3.0
### Tech:
- Nats as message broker ( sending is implemented, but not handling them)
- Postgress as DocumentStore
- Ocelot as gateway
### Notes
This is a quick PoC as i am integrating microservices ( but more complete) in another project of mine.
Some minor remarks:
1. Gateway
- note microservice is ok
- contacts microservice is ok
But the gateway won't redirect to the path to notes ( it will go to contacts).
2. Frontend only gets the list/notes and is dirty :), used it to test RazorPages quickly
3. TagService / SchedulerService / Multitenancy is not implemented. The concepts are here though.
4. Using mediatR, Nats and Postgres. There was a quick PoC for integrating Nats as message broker ( and i think it works). But didn't verify it as IntegrationEvents are not yet handled.
5. **Infrastructure layer should only contain CRUD of the Aggregate ( eg. Contact).**, it contains too much now.
### changes for my other microservices
- Chosen tech is robust, structure is awesome
- using a framework that supports SAGA's ( eg. MassTransit)
- more DDD ( eg. AggregateRoot, value-objects, ...)
- other flow of sending events ( through the AggregateRoot)
- Angular 8 or Vue 3 as admin dashboard, not for customer webapps ( = visitor oriented). Didn't like Razor Pages, but liked the minimalistic implemention. I'm wrapping Services with route-attributes for minimal code + dependencies + quick custumization for webapps connected to bff's.
- removing the api layer and gateway, leaves a robust modular monolith structure and removes a lot of lag ( eg. Gateway alone is 50ms delay ) and simplifies devops complexity
- Implement IdentityServer for user management, it's worth investigating