This document describes the organization of the Odin codebase.
Odin/
├── .github/ # GitHub workflows and automation guidance
│ ├── copilot-instructions.md
│ └── workflows/
│ └── ci.yml
├── deployment/ # Deployment configurations and templates
│ ├── grafana/
│ ├── helm/
│ ├── kubernetes/
│ ├── terraform/
│ ├── otel-collector-config.yaml
│ └── prometheus.yml
├── docs/ # Project documentation
│ ├── README.md # Documentation index
│ ├── PACKAGE_MANAGEMENT.md
│ ├── PHASE1_PROGRESS.md
│ ├── PROJECT_STRUCTURE.md
│ ├── TEST_FRAMEWORK_MIGRATION.md
│ ├── architecture/
│ │ └── README.md
│ ├── api/ # Placeholder for detailed API docs
│ ├── operations/ # Placeholder for operational runbooks
│ └── reference/
│ └── hugo-api-reference.md
├── samples/
│ └── OrderProcessing.Sample/
├── src/
│ ├── Odin.Cli/
│ ├── Odin.Contracts/
│ ├── Odin.ControlPlane.Api/
│ ├── Odin.ControlPlane.Grpc/
│ ├── Odin.Core/
│ ├── Odin.ExecutionEngine.History/
│ ├── Odin.ExecutionEngine.Matching/
│ ├── Odin.ExecutionEngine.SystemWorkers/
│ ├── Odin.Persistence/
│ ├── Odin.Sdk/
│ ├── Odin.Visibility/
│ └── Odin.WorkerHost/
├── tests/
│ ├── Odin.Core.Tests/
│ ├── Odin.ExecutionEngine.Tests/
│ ├── Odin.Integration.Tests/
│ └── Odin.Sdk.Tests/
├── .editorconfig
├── .env.example
├── .gitignore
├── CONTRIBUTING.md
├── Directory.Build.props
├── Directory.Packages.props
├── Dockerfile
├── PROJECT_README.md
├── README.md
├── SETUP_SUMMARY.md
├── Service Blueprint.md
├── docker-compose.yml
├── global.json
├── LICENSE
└── Odin.slnx
The responsibilities listed below describe the intended end-state for each project. Unless explicitly marked as available today, the implementation is still evolving during Phase 1.
Type: Class Library
Purpose: Shared data transfer objects, interfaces, and contracts used across services
Key Files:
WorkflowContracts.cs- Workflow-related DTOsActivityContracts.cs- Activity-related DTOs (TBD)NamespaceContracts.cs- Namespace management DTOs (TBD)
Type: Class Library
Purpose: Core utilities, extensions, and shared functionality
Key Components:
- Hugo primitive extensions
- Result extensions
- Common helpers and utilities
- Serialization utilities (TBD)
Type: Class Library
Purpose: Data access layer for SQL databases
Key Components:
- Repository interfaces and implementations
- Database schema definitions
- Migration scripts
- Connection management
- Sharding logic
Tables (TBD):
namespacesworkflow_executionshistory_eventstask_queueshistory_shardsvisibility_records
Type: ASP.NET Core Web API
Purpose: REST API facade for platform integrations
Port: 8080 (HTTP), 8081 (HTTPS)
Key Features:
- REST endpoints mirroring gRPC functionality
- OpenAPI/Swagger documentation
- Health checks
- Metrics endpoint
Type: ASP.NET Core gRPC Service
Purpose: Temporal-compatible gRPC API
Port: 7233
Key Features:
- WorkflowService proto implementation
- Workflow lifecycle management
- Signal and query APIs
- Task queue polling
- Namespace CRUD
Type: Class Library
Purpose: History service for workflow state management
Key Components:
- Sharded state management (512 shards default)
- Event history persistence
- Timer task queue
- Transfer task queue
- Replicator task queue
- Visibility task queue
Type: Class Library
Purpose: Task queue matching and distribution
Key Components:
- Task queue partitioning
- Worker poll handling
- Task lease management
- Heartbeat tracking
- Built on
TaskQueueChannelAdapter<T>
Type: Worker Service
Purpose: Internal system workflow orchestration
Current Focus: Hosting infrastructure and background worker plumbing. Specific timers, retries, and archival workflows will be added during Phase 1 implementation.
Type: Class Library
Purpose: Worker SDK for workflow and activity development
Current Focus: Public interfaces (IWorkflow, IActivity) and integration points for Hugo primitives. Deterministic execution helpers and replay utilities are planned.
Type: Worker Service
Purpose: Managed worker host for executing workflows and activities
Key Features:
- Workflow execution engine
- Activity execution engine
- Task queue polling
- History replay
- Heartbeat management
Type: Class Library
Purpose: Workflow visibility and search
Key Components:
- SQL advanced visibility
- Elasticsearch integration (optional)
- Visibility record persistence
- Query API
- Dual-write support for migrations
Type: Console Application
Purpose: Command-line tool for Odin operations
Current Focus: Project scaffolding and shared command abstractions. Command implementations will arrive alongside the control plane features.
Type: xUnit Test Project
Purpose: Unit tests for core utilities
Type: xUnit Test Project
Purpose: Unit tests for SDK components
Type: xUnit Test Project
Purpose: Unit tests for execution engine components
Type: xUnit Test Project
Purpose: End-to-end integration tests
Coverage:
- Full workflow execution
- History replay
- Task queue distribution
- Visibility queries
Type: Console Application
Purpose: Demonstrates order processing workflow
Features:
- Workflow definition
- Activity implementations
- Worker registration
- Client usage
- Hugo (1.0.0) - Concurrency primitives
- Hugo.Diagnostics.OpenTelemetry (1.0.0) - Observability
- Npgsql / MySql.Data - Database drivers
- Grpc.AspNetCore - gRPC support
- Elasticsearch.Net (optional) - Elasticsearch client
- Microsoft.Extensions.* - .NET hosting and DI
Odin.ControlPlane.Api → Odin.Contracts, Odin.Core, Odin.Persistence
Odin.ControlPlane.Grpc → Odin.Contracts, Odin.Core, Odin.ExecutionEngine.*
Odin.ExecutionEngine.* → Odin.Contracts, Odin.Core, Odin.Persistence
Odin.Sdk → Odin.Contracts, Odin.Core
Odin.WorkerHost → Odin.Sdk, Odin.Contracts
Odin.Cli → All
- Target Framework: net10.0
- Nullable reference types enabled
- Implicit usings enabled
- XML documentation generation
- Code analysis enabled
Odin.sln
├── src (Solution Folder)
│ ├── Odin.Contracts
│ ├── Odin.Core
│ ├── Odin.Persistence
│ ├── Odin.ControlPlane.Api
│ ├── Odin.ControlPlane.Grpc
│ ├── Odin.ExecutionEngine.History
│ ├── Odin.ExecutionEngine.Matching
│ ├── Odin.ExecutionEngine.SystemWorkers
│ ├── Odin.Sdk
│ ├── Odin.WorkerHost
│ ├── Odin.Visibility
│ └── Odin.Cli
├── tests (Solution Folder)
│ ├── Odin.Core.Tests
│ ├── Odin.Sdk.Tests
│ ├── Odin.ExecutionEngine.Tests
│ └── Odin.Integration.Tests
└── samples (Solution Folder)
└── OrderProcessing.Sample
-
Clone and Setup
git clone https://github.com/df49b9cd/Odin.git cd Odin dotnet restore -
Build
dotnet build
-
Test
dotnet test -
Run Locally
docker-compose up -d postgres dotnet run --project src/Odin.ControlPlane.Grpc
docker build --target runtime-api -t odin-api:latest .
docker build --target runtime-grpc -t odin-grpc:latest .
docker build --target runtime-workers -t odin-workers:latest .docker-compose up -dhelm install odin deployment/helm