Skip to content

Latest commit

 

History

History
218 lines (160 loc) · 6.38 KB

File metadata and controls

218 lines (160 loc) · 6.38 KB

Odin Initial Setup - Summary

Completed Tasks ✅

The initial project structure for the Hugo Durable Orchestrator (Odin) has been successfully established.

1. Solution and Project Structure

Created a complete .NET 10 solution with the following projects:

Source Projects (12):

  • Odin.Contracts - Shared DTOs and contracts
  • Odin.Core - Core utilities and extensions
  • Odin.Persistence - Data access layer
  • Odin.ControlPlane.Api - REST API service (port 8080)
  • Odin.ControlPlane.Grpc - gRPC service (port 7233, Temporal-compatible)
  • Odin.ExecutionEngine.History - History service for workflow state
  • Odin.ExecutionEngine.Matching - Task queue matching service
  • Odin.ExecutionEngine.SystemWorkers - Internal system workers
  • Odin.Sdk - Worker SDK for workflow/activity development
  • Odin.WorkerHost - Managed worker runtime
  • Odin.Visibility - Workflow visibility and search
  • Odin.Cli - Command-line tool

Test Projects (4):

  • Odin.Core.Tests - Unit tests for core
  • Odin.Sdk.Tests - Unit tests for SDK
  • Odin.ExecutionEngine.Tests - Unit tests for execution engine
  • Odin.Integration.Tests - End-to-end integration tests

Sample Projects (1):

  • OrderProcessing.Sample - Example order processing workflow

Build Status: ✅ All projects compile successfully

2. Deployment Infrastructure

Docker:

  • Multi-stage Dockerfile with separate targets for each service
  • Docker Compose configuration with full stack:
    • PostgreSQL 14
    • Elasticsearch 8.x (optional)
    • OpenTelemetry Collector
    • Jaeger for distributed tracing
    • Prometheus for metrics
    • Grafana for visualization
    • All Odin services (gRPC, API, Workers)

Kubernetes/Helm:

  • Helm chart structure (deployment/helm/)
  • Chart.yaml with project metadata
  • values.yaml with configurable deployment options
  • Support for PostgreSQL and Elasticsearch dependencies

Configuration:

  • OpenTelemetry Collector config
  • Prometheus scrape configuration
  • Grafana datasource provisioning
  • Environment variable templates (.env.example)

3. Documentation

Created comprehensive documentation structure:

Root Level:

  • README.md - Main project README with quick start
  • CONTRIBUTING.md - Contribution guidelines
  • LICENSE - MIT License
  • Service Blueprint.md - Original service design document

Documentation Directory (docs/):

  • getting-started.md - Step-by-step setup and first workflow
  • PROJECT_STRUCTURE.md - Detailed project organization guide
  • architecture/README.md - Architecture overview and patterns
  • api/ - API reference (structure created)
  • operations/ - Operations and runbooks (structure created)

4. Development Configuration

Build Configuration:

  • Directory.Build.props - Common MSBuild properties
  • global.json - .NET SDK version pinning
  • .editorconfig - Code style and formatting rules

CI/CD:

  • GitHub Actions workflow (.github/workflows/ci.yml)
  • Automated build, test, and Docker image creation
  • Code coverage collection

Git Configuration:

  • .gitignore - Comprehensive ignore rules
  • .github/copilot-instructions.md - AI assistant guidelines

5. Code Foundations

Created initial code files demonstrating structure:

  • WorkflowContracts.cs - Request/response DTOs
  • Interfaces.cs - IWorkflow and IActivity interfaces
  • OrderProcessingWorkflow.cs - Example workflow
  • Placeholder classes in each project

Project Statistics

  • Total Projects: 17 (12 source + 4 test + 1 sample)
  • Lines of Configuration: ~1000+ (Docker, K8s, CI/CD)
  • Documentation Files: 10+
  • Build Time: ~2.5 seconds
  • Build Status: ✅ Success (4 warnings about duplicate test packages)

Next Steps

Phase 1 Implementation (8-10 weeks)

  1. Persistence Layer (2 weeks)

    • Implement repository interfaces
    • Create SQL schemas for all tables
    • Add migration support (Liquibase/Flyway)
    • Implement connection pooling and sharding logic
  2. Execution Engine (3-4 weeks)

    • History Service: Workflow state management, event persistence
    • Matching Service: Task queue routing, lease management
    • System Workers: Timer, retry, cleanup workflows
    • Integration with Hugo primitives (WaitGroup, ErrGroup, Channels)
  3. Worker SDK (2-3 weeks)

    • Complete IWorkflow/IActivity implementations
    • DeterministicEffectStore integration
    • VersionGate for workflow versioning
    • Result pipeline builders
    • Worker registration and lifecycle
  4. Control Plane APIs (2-3 weeks)

    • gRPC service implementation (Temporal proto)
    • REST API facade
    • Namespace CRUD
    • Workflow lifecycle operations
    • Signal and query APIs
  5. CLI Tool (1 week)

    • Namespace management commands
    • Workflow start/stop/query commands
    • Migration commands
    • Visibility query commands
  6. Testing & Integration (Ongoing)

    • Unit tests for each component
    • Integration tests for workflows
    • Determinism replay tests
    • Load testing

Quick Start Commands

# Clone and build
git clone https://github.com/df49b9cd/Odin.git
cd Odin
dotnet restore
dotnet build

# Run with Docker Compose
docker-compose up -d

# Access services
# - gRPC: localhost:7233
# - REST API: localhost:8080
# - Grafana: http://localhost:3000 (admin/admin)
# - Jaeger: http://localhost:16686
# - Prometheus: http://localhost:9090

# Run tests
dotnet test

Configuration

Key environment variables (see .env.example):

HUGO_ORCHESTRATOR_DB_CONNECTION=Server=localhost;Database=orchestrator;
HUGO_ORCHESTRATOR_ELASTICSEARCH_URL=http://localhost:9200
HUGO_ORCHESTRATOR_OTLP_ENDPOINT=http://localhost:4317
HUGO_ORCHESTRATOR_SHARD_COUNT=512
HUGO_ORCHESTRATOR_HISTORY_RETENTION_DAYS=30

Architecture Highlights

  • Sharded History: 512 default shards for horizontal scalability
  • Hugo Integration: Built on WaitGroup, ErrGroup, Channels, Result
  • Deterministic Workflows: Replay-safe using DeterministicEffectStore
  • Multi-tenancy: Namespace isolation with RBAC
  • Full Observability: OpenTelemetry traces, Prometheus metrics, structured logs
  • Temporal Compatible: gRPC API follows Temporal WorkflowService proto

Resources


Status: Initial structure complete ✅
Ready for: Phase 1 implementation
Last Updated: October 21, 2025