Giter Club home page Giter Club logo

Comments (6)

alindgren avatar alindgren commented on June 5, 2024

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).

from fundraise.

alindgren avatar alindgren commented on June 5, 2024

https://vimeo.com/183448835

Use Event Sourcing? https://eventstore.org/?

from fundraise.

alindgren avatar alindgren commented on June 5, 2024

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).

from fundraise.

alindgren avatar alindgren commented on June 5, 2024

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):

The two commonly used protocols are HTTP request/response with resource APIs (when querying most of all), and lightweight asynchronous messaging when communicating updates across multiple microservices.

from https://docs.microsoft.com/en-us/dotnet/standard/microservices-architecture/architect-microservice-container-applications/communication-in-microservice-architecture

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.

from fundraise.

alindgren avatar alindgren commented on June 5, 2024

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.

from fundraise.

alindgren avatar alindgren commented on June 5, 2024

https://docs.microsoft.com/en-us/dotnet/standard/microservices-architecture/multi-container-microservice-net-applications/integration-event-based-microservice-communications

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:

What is not recommended is sharing a common integration events library across multiple microservices; doing that would be coupling those microservices with a single event definition data library

from fundraise.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.