Architecture

System Overview:

The Notification Service utilizes a combination of Google Cloud Pub/Sub for message queuing and Redis for message distribution. It consists of several key components:

  • Frontend Clients: Web applications that subscribe to receive notifications.

  • Notification Service Backend: The core service responsible for receiving messages from Pub/Sub, processing them, and distributing them to subscribed clients.

  • Worker: A background worker responsible for publishing messages to the redis channel based on specific triggers or events within the system.

  • Redis: A high-performance, in-memory data store used as a message broker for real-time communication between the Notification Service and subscribed clients.

Architectural Components:

  • Google Cloud Pub/Sub:

    • Publishers: Smart contract monitor service within our system that publishes messages to Pub/Sub topic.

    • Subscribers: The Notification Service backend acts as a subscriber to relevant Pub/Sub subscriptions.

  • Redis:

    • Channels: Redis channels represent different notification categories by user wallet address.

    • Subscribers: Frontend clients subscribe to specific Redis channel categories with user wallet addresses to receive relevant notifications.

  • Notification Service Backend:

    • Event Processor: Responsible for receiving messages from Pub/Sub, processing them, and publishing them to the user wallet Redis channel.

    • API Endpoints: Exposes endpoints for frontend clients to subscribe to notifications and receive updates.

Event-Driven Notification Service

Use Case:

Certainly, the callouts in the below diagram describe components and actions related to a one of the use case within the system for the notification service.

  1. Login: The entry point for a user to access the system.

  2. Authentication: The process of verifying the identity of the user.

  3. Take Loan: The action where the user initiates a loan process.

  4. Subscribe events: The client subscribes to events relevant to them.

  5. Supply Asset: An action where assets are supplied, likely by the user.

  6. Execute Transaction: The process of executing a transaction on a blockchain.

  7. OnChain: Indicative of processes that occur on the blockchain (on-chain).

  8. Update the status: An operation to update the status of a process or transaction.

  9. Pubsub: The pub/sub system used for receiving message from sc monitor service.

  10. Server side events: Mechanism for the server to send real-time updates to clients with a persistent connection.

Loan Processing System Architecture with Real-Time Updates and Blockchain Integration

Last updated