Architecture
Titan uses a microservices architecture powered by Microsoft Orleans virtual actors (Grains).
Overview
┌─────────────────┐
│ UE5 Client │
└────────┬────────┘
│ SignalR (WebSockets)
▼
┌─────────────────┐
│ Titan.API │ ◄── SignalR Gateway (Orleans Client)
└────────┬────────┘
│ Orleans RPC
▼
┌────────────────────────────────────────────────────────┐
│ Orleans Cluster │
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
│ │ IdentityHost │ │InventoryHost │ │ TradingHost │ │
│ │ │ │ │ │ │ │
│ │ UserIdentity │ │ Inventory │ │ Trade │ │
│ │ UserProfile │ │ ItemHistory │ │ │ │
│ │ Social │ │ │ │ │ │
│ └──────────────┘ └──────────────┘ └──────────────┘ │
└────────────────────────────────────────────────────────┘
│
▼
┌─────────────────┐
│ YugabyteDB │ ◄── Distributed ACID Storage
│ (Postgres) │
└─────────────────┘
Microservices
IdentityHost
Manages user accounts, authentication, and profiles.
| Grain | Purpose |
|---|---|
UserIdentityGrain | Federated login (Steam/Epic), account linking |
UserProfileGrain | Display name, avatar, settings |
SocialGrain | Friends list, block list |
InventoryHost
Manages player items and history.
| Grain | Purpose |
|---|---|
InventoryGrain | Add, remove, get items |
ItemHistoryGrain | Audit trail for item events |
ItemTypeRegistryGrain | Item definitions and valid types |
TradingHost
Handles trade sessions with 2-phase commit.
| Grain | Purpose |
|---|---|
TradeGrain | Trade lifecycle, validation, execution |
SeasonRegistryGrain | Season lifecycle management |
SeasonMigrationGrain | Character migration between seasons |
Key Technologies
- Microsoft Orleans 9.x - Virtual actors for distributed state
- Microsoft Aspire 13 - Container orchestration and observability
- Redis - Orleans cluster membership
- YugabyteDB (PostgreSQL) - Grain persistence
- SignalR - Real-time full-duplex communication
- Serilog - Structured logging and auditing