-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Microservice architecture #10
Comments
Decision: use RabbitMQ over NServiceBus so that we have the option of integrating microservices in other languages. See if it's possible to create a layer that uses DI to optionally not use RabbitMQ. Perhaps create separate libraries that contain Mediatr handlers - one that uses RabbitMQ based microservices and another for handling the logic internally (or calls microservices synchronously). |
Use Event Sourcing? https://eventstore.org/? |
Next step: move Requests and RequestHandlers into their own libraries. Maybe Requests can go in Fundraise.Core, and have the existing RequestHandlers go into a new library (perhaps RequestHandlers.InProcess) with the goal of creating another library of request handlers that use RabbitMQ (perhaps RequestHandlers.RabbitMQ). |
MediatR requests and requesthandlers have been moved into their own libraries (Fundraise.Requests and Fundraise.RequestHandlers.InProcess). The "InProcess" handlers (maybe not the best name) are for the non-microservices (monolithic) version of the app. Next step is to add microservice versions of these request handlers. Perhaps the microservice hanlders should be divided into two types: synchronous (HTTP-based) and asynchronous (utilizing RabbitMQ):
So next, create a project for handlers that use microservices (Fundraise.RequestHandlers.Microservices?). Perhaps first implement everything using synchronous communication by creating a WebAPI app. Basically move the logic in the handlers to the WebAPI and then have the handlers call those WebAPI methods. Then I can introduce RabbitMQ for updates/inserts. Queries should, I presume, should continue to use the WebAPI. |
As much as I would like to dive into microservices, I think that it makes sense to build out more of the functionality and look into using notifications with MediatR. But maybe start small with a couple simple async microservices such as one for sending email notifications and one for logging donor events. These could be implemented while leaving the rest of the example app as a 'monolith'. Update: Logging should probably be done within the service and aggregated using something like ELMAH https://elmah.github.io/. Initial microservices should target integration. I think it would be easy to start with Airtable's Individual and Corporate Donations template and then do QuickBooks Online. |
Probably should inherit from something like IntegrationEvent to create an ID and timestamp for each event object. Each microservice should define it's own events though:
|
Perhaps use RabbitMQ? https://www.rabbitmq.com/
Check out https://docs.microsoft.com/en-us/dotnet/standard/microservices-architecture/
The text was updated successfully, but these errors were encountered: