Architecture
Chronoverse uses a microservices architecture with 5 internal gRPC services that handle different aspects of workflow automation:| Service | Port | Purpose |
|---|---|---|
| Users | 50051 | User authentication and profile management |
| Workflows | 50052 | Workflow creation, updates, and lifecycle management |
| Jobs | 50053 | Job scheduling, execution tracking, and log management |
| Notifications | 50054 | User notification creation and delivery |
| Analytics | 50055 | User and workflow analytics and metrics |
Service Communication
All services communicate via gRPC using Protocol Buffers (proto3). This provides:- Type Safety: Strongly typed messages and services
- Performance: Binary serialization for efficient data transfer
- Code Generation: Auto-generated client/server code for Go
- Streaming: Support for bidirectional streaming (used in job logs)
Authentication
Most gRPC endpoints require authentication via user ID:Internal APIs (marked in documentation) are not exposed to public and are only used for inter-service communication.
TLS Configuration
All services support TLS encryption for secure communication:For local development, services can run without TLS using
grpc.WithInsecure() (deprecated) or grpc.WithTransportCredentials(insecure.NewCredentials()).Internal vs Public APIs
Some RPC methods are marked as internal and should not be exposed publicly:UpdateWorkflowBuildStatus- Internal workflow status updatesGetWorkflowByID- Internal workflow retrieval without user contextUpdateJobStatus- Internal job status updatesGetJobByID- Internal job retrievalCreateNotification- Internal notification creation
Error Handling
gRPC uses status codes for error handling:OK- SuccessNotFound- Resource not foundInvalidArgument- Invalid request parametersPermissionDenied- Authorization failureInternal- Server error
Testing with grpcurl
You can test gRPC services using grpcurl:Next Steps
Explore individual service documentation:- Users Service - Authentication and user management
- Workflows Service - Workflow operations
- Jobs Service - Job scheduling and logs
- Notifications Service - Notifications
- Analytics Service - Metrics and analytics