How saayam-for-all/request works
File structure
• Top-level:
· .github/workflows/ci_test.yml → automated tests or builds for the service
· docs/Saayam-Request-Service-Flow.drawio → existing sequence/flow for handling a request
· README.md (empty beyond title) → no extra guidance
• No src/ or code directories are present in the tree snippet provided; assume the actual code lives under a src or app folder once implemented.
README for additional insights
· Receives incoming requests (likely over HTTP or messaging)
· Performs validation/business logic
· Persists state or dispatches tasks
· Communicates with downstream systems or databases
a. Main components
1. Client (could be another service, UI, or scheduler)
2. API Gateway or Load Balancer (entry point for HTTP RPC calls)
3. Request Service (core microservice)
• Controller/Handler layer
• Validation layer
• Business logic/service layer
4. Data Storage (e.g., relational DB or NoSQL)
5. Message Broker or Event Bus (if asynchronous tasks are used)
6. External/Internal downstream services or APIs (where requests eventually go)
7. CI/CD Pipeline (as depicted by .github/workflows/ci_test.yml)
b. Relationships and interactions
• Client → API Gateway: HTTP
• API Gateway → Request Service: internal RPC or REST call
• Request Service → Database: read/write operations
• Request Service → Message Broker: publish events for async processing
• Message Broker → Worker Service(s): subscribe and process long‐running jobs
• Request Service → External APIs: HTTP calls for enrichment or forwarding
• CI Pipeline → GitHub → Deploy to staging/production
c. Architectural patterns & principles
• Microservice boundary around “request new” functionality (single responsibility)
• Layered architecture within the service (controller → service → data access)
• Event-driven design for asynchronous workflows
• Externalized configuration (CI workflow suggests 12-factor approach)
• Idempotency in endpoints (especially for retryable requests)
d. Key technologies/frameworks
• HTTP framework (Express, Spring Boot, FastAPI, etc.)
• ORM or database driver (TypeORM, Hibernate, Sequelize, etc.)
• Message broker (RabbitMQ, Kafka, SQS, etc.)
• CI runner (GitHub Actions)
Details to capture
• Service entry point and protocols (HTTP, gRPC, AMQP).
• Internal layering (controllers vs. business logic).
• Sync vs. async boundaries.
• Points of failure and retries (e.g., message broker acknowledgments).
• CI test coverage and deployment steps as part of the overall system lifecycle.