Bi-Directional Data Transfer Architecture

bi-directional-data-tarnsfer
Proposed Architecture for the Implementation of bi-directional data Transfer
CRM Service:
CRM will have an endpoint for webhooks from different external systems to notify the change in their system. https://crm-3tmvxtxoxq-ez.a.run.app/tenants/{tenantId}/adapters/{adapterId}/events
- CRM will authorize the tenant.
- will get the adapter type from the configuration and attach it to the event as an attribute and push it to the pub/sub.
- publishes the message to the respective adapter based on the attribute in the message body.
Adapter Services:
- respective adapter creates the event based on the entity type, and action type, adds context, and pushes the event to Google task.
- Google task will deliver the events to the event handler in configuration.
Event Handler Service (Configuration):
- gets which internal products are interested in the particular event and the action from the database.
- creates a message for each product that is interested and attaches the attribute of the product type to the message.
- pushes the messages to the pub/sub (or event arc)
- pub/sub delivers the message to the internal product based on the attribute attached to the message.
Internal Products:
- Internal products will consume the event at their phase and priority from the queue.
Link to Excalidraw: Bi-Directional Data Transfer Excalidraw