How juanpfrancos/events-architecture works
Main Components
• API Gateway: Acts as the central entry point, exposing a GraphQL interface (with queries and mutations for events and notifications). It aggregates data from the underlying microservices.
• Authentication Service: Handles user registration and authentication operations. Contains its own DB (and migrations via Alembic) to manage credentials and session data.
• Event Management Service: Manages the CRUD operations for events. It interfaces with a relational database for storing event details and also synchronizes data to Elasticsearch for search operations.
• Notification Service: Responsible for sending message notifications. This service likely interacts with messaging endpoints (using REST endpoints) and is exposed via API documentation like Swagger/Redoc.
• Databases and Search Infrastructure:
• SQL Databases (PostgreSQL) backing the Auth and Event services.
• Elasticsearch (with optional Kibana) used to provide full-text search and filtering over event data.
• Docker Environment: The entire architecture is containerized with Docker and coordinated via docker-compose.
Depicting Relationships and Interactions
• The API Gateway directs incoming GraphQL queries to the respective microservice (Auth, Events, Notifications).
• The Auth Service processes login/registration requests.
• The Events Service handles event creation, updates, and queries, and synchronizes event data to Elasticsearch.
• The Notification Service sends alerts or messages as requested via the API.
• External actors if desired, such as clients (browsers/Postman or Swagger/Redoc-based API exploration).
Architectural Patterns and Design Principles
• Microservices Pattern: Each service is self-contained with its own codebase, database configurations (including Alembic migrations for auth and events), and Docker container definitions.
• API Gateway Pattern: Centralized routing for GraphQL operations, serving as the liaison between clients and back-end services.
• Containerization & Orchestration: Emphasize Docker Compose’s role in bootstrapping the entire ecosystem.
• Integration with External Search Engine: Highlight the role of Elasticsearch (and optionally Kibana) for search capabilities.
Final Assembly
• Inside the microservices group, illustrate their specific interconnections:
• Auth and Event Services can point to their respective SQL databases.
• Notification Service may simply call out to external messaging systems.