Microservices Communication Architecture - Interactive Visualization

This interactive visualization demonstrates how microservices in the Public Health Engagement & Data Portal communicate with each other. Services are organized by concern (Data Management, Field Operations, Communication, and External Systems), and the visualization shows both synchronous REST API calls and asynchronous Kafka message passing.

How It Works

The visualization allows you to explore service communication patterns:

  1. Click on any service to see its connections with other services, including the communication protocol used and the reason for each connection.
  2. Filter by protocol: Use the control buttons to show all connections, only REST API calls, or only Kafka asynchronous messages.
  3. View details: When a service is selected, an info panel displays detailed information about the service and its communication patterns.

Interactive Visualization

Explore the microservices architecture by clicking on services and using the filter buttons to understand communication patterns.

If the visualization doesn't display properly, you can open it in a new tab.

Service Groups by Concern

Data Management

  • User Service: Manages authentication, authorization, and user data
  • Health Data Service: Handles FHIR resources, stores data in DocumentDB and PostgreSQL
  • Analytics Service: Processes and aggregates data for dashboards and reports

Field Operations

  • Event Tracking Service: Tracks community health events and interventions
  • GIS Service: Handles geospatial data and mapping using PostGIS
  • Sync Service: Manages offline queue and synchronization (most complex service)

Communication

  • Notification Service: Sends notifications via email, SMS, and push
  • Messaging Service: Handles team communication and messaging between users

External Systems

  • Integration Service: Adapter layer for DHIS2, EMR systems, and external GIS services

Communication Patterns

REST APIs (Synchronous)

Used when the caller needs an immediate response:

  • User authentication and authorization
  • Data validation and queries that power UI screens
  • Location data enrichment
  • Sync operations that require immediate confirmation

Kafka (Asynchronous)

Used when the operation can happen eventually:

  • Publishing user activity events for analytics
  • Triggering notifications on events
  • Health data updates for external system synchronization
  • Event data for analytics processing

Kafka provides guaranteed delivery with ordering, ensuring that related events (like a patient record being created and then updated) are processed in sequence.

This visualization complements the Public Health Engagement & Data Portal - System Design document and the Sync Flow Simulation, providing an interactive way to understand service communication patterns in the architecture.