This Section gonna be separated by two aspects Direct Endpoint Calls and Messaging Calls.
The modules will have two types of communication (APIs), one being by HTTP Protocol which request will be received explicitly by API Project.
All HTTP requests(or commands) will be received and forwarded to it's respective modules command handlers, this forwarding will be made by the external library MediatR that acts as a mediator for the commands.
In the other side, all communication between modules will be made using messaging, the objective is to allow messaging using RabbitMq, even if the project is too simple to need to use it, it will allow a more easy migration to microservices besides it's greater complexity.
To start basic first will be implemented In Memory Messaging with MassTransit Library, later on the project changes gonna be made to allow RabbitMq.
Just to clarify more the messaging communication will be of two types
- Pub/Sub
- Request/Response
the first one will be implemented for notify about events in the system for modules like Audit Module(TODO Add Link for audit service).
for example when a client or collaborator login into the system via User Access Module the authentication service gonna publish a message (notification) for everyone that need the ClientLoginNotification or CollaboratorLoginNotification for example.
This in the context of the Audit Module is useful for tracking access to site and detecting anomalies, since everyone that create a session on the site will have their login sessions stored for analysis.