Skip to main content
Autonomous AgentsMetaverse395 lines

Metaverse Architecture and Infrastructure

Quick Summary18 lines
This skill covers the system architecture required to build and operate metaverse platforms — persistent, interconnected virtual worlds supporting concurrent users at scale. It addresses server infrastructure, state management, identity systems, interoperability standards, and the technical decisions that determine whether a metaverse platform can scale from hundreds to millions of users.

## Key Points

1. Format check (supported file types, size limits)
2. Automated content scan:
3. Optimization:
4. Human review (optional, for featured/promoted content)
5. Distribution:
1. Pre-load: Essential world assets before entering
2. Priority stream: Visible objects load first
3. Background stream: Non-visible but nearby objects
4. On-demand: Load when user approaches
5. Prefetch: Predict user path, load ahead
- Designing the technical architecture of a metaverse platform
- Planning server infrastructure for persistent virtual worlds
skilldb get metaverse-skills/metaverse-architectureFull skill: 395 lines
Paste into your CLAUDE.md or agent config

Metaverse Architecture and Infrastructure

Purpose

This skill covers the system architecture required to build and operate metaverse platforms — persistent, interconnected virtual worlds supporting concurrent users at scale. It addresses server infrastructure, state management, identity systems, interoperability standards, and the technical decisions that determine whether a metaverse platform can scale from hundreds to millions of users.

Architectural Overview

Core System Components

Metaverse Platform Architecture:
┌──────────────────────────────────────────────────────────┐
│                    Client Layer                           │
│  ├── VR/AR headset apps (native)                        │
│  ├── Desktop clients                                     │
│  ├── Mobile apps                                         │
│  └── Web clients (WebXR/browser)                        │
├──────────────────────────────────────────────────────────┤
│                   Gateway Layer                           │
│  ├── API Gateway (REST/GraphQL)                         │
│  ├── WebSocket Gateway (real-time)                      │
│  ├── Media Gateway (voice/video/streaming)              │
│  └── CDN (assets, static content)                       │
├──────────────────────────────────────────────────────────┤
│                   Service Layer                           │
│  ├── Identity & Auth Service                            │
│  ├── World State Service                                │
│  ├── Physics/Simulation Service                         │
│  ├── Social & Presence Service                          │
│  ├── Economy & Transaction Service                      │
│  ├── Content & Asset Service                            │
│  ├── Moderation & Safety Service                        │
│  ├── Analytics & Telemetry Service                      │
│  └── Matchmaking & Instance Service                     │
├──────────────────────────────────────────────────────────┤
│                   Data Layer                              │
│  ├── Player state database (positions, inventory)       │
│  ├── World state database (persistent changes)          │
│  ├── Asset storage (3D models, textures, audio)         │
│  ├── Message queue (event distribution)                 │
│  ├── Cache layer (hot state, session data)              │
│  └── Analytics data warehouse                           │
└──────────────────────────────────────────────────────────┘

Instance Management

Instance Architecture:
┌─────────────────────────────────────────────────┐
│              Instance Manager                    │
│  ├── Create instances on demand                 │
│  ├── Assign players to instances                │
│  ├── Monitor instance health/capacity           │
│  ├── Migrate players between instances          │
│  └── Destroy empty instances                    │
└────────────────┬────────────────────────────────┘
                 │
    ┌────────────┼────────────┐
    ▼            ▼            ▼
┌────────┐ ┌────────┐ ┌────────┐
│Instance│ │Instance│ │Instance│
│  001   │ │  002   │ │  003   │
│ 45/50  │ │ 12/50  │ │ 50/50  │
│players │ │players │ │players │
└────────┘ └────────┘ └────────┘
    │            │            │
    └────────────┼────────────┘
                 │
    ┌────────────┴────────────┐
    │    Shared World State   │
    │  (persistent changes    │
    │   synced across all     │
    │   instances of a world) │
    └─────────────────────────┘

Instance Types:
├── Public: Anyone can join, auto-balanced
├── Private: Invite-only, specific player list
├── Friends: Friends-of-host prioritized
├── Event: Special capacity/configuration for events
└── Dev/Test: Non-production, debugging enabled

Capacity Planning:
├── Simulation cost per player: ~2-5ms CPU per tick
├── Network cost per player: ~5-10 KB/s outbound per other player
├── 50-player instance:
│   ├── CPU: 1-2 dedicated cores
│   ├── RAM: 2-4 GB
│   ├── Network: 25-50 Mbps outbound
│   └── Tick rate: 20-60 Hz
└── Scale: 100 instances on a 32-core server

State Synchronization

State Sync Architecture:

Authoritative Server Model:
Client → Input → Server → Validate → Broadcast → Clients
                    ↓
              Update world state

State Categories:
├── Ephemeral (not persisted, real-time):
│   ├── Avatar positions and rotations
│   ├── Voice audio streams
│   ├── Animation states
│   └── Particle effects
│
├── Session (persisted within session):
│   ├── Object positions (moved by players)
│   ├── Interaction state (doors open/closed)
│   ├── Score/progress
│   └── Chat history
│
├── Persistent (survives sessions):
│   ├── Player inventory
│   ├── World modifications (player-built content)
│   ├── Social graph (friends, blocks)
│   ├── Economy (currency, marketplace)
│   └── Player progression/achievements
│
└── Global (shared across all instances):
    ├── Player profiles
    ├── Asset catalog
    ├── Moderation actions
    └── System configuration

Sync Strategies:
├── Ephemeral: UDP, unreliable, high frequency (30-60 Hz)
├── Session: TCP or reliable UDP, event-driven
├── Persistent: Database writes, eventually consistent
└── Global: Distributed database, strongly consistent for transactions

Identity and Authentication

Identity System

Identity Architecture:
┌─────────────────────────────────────────┐
│           Identity Provider             │
│  ├── Authentication                     │
│  │   ├── Email/password                 │
│  │   ├── OAuth (Google, Apple, Meta)    │
│  │   ├── Platform SSO (Steam, PlayStation)│
│  │   └── Passkeys/WebAuthn             │
│  ├── Account Management                │
│  │   ├── Profile data                   │
│  │   ├── Privacy settings               │
│  │   ├── Linked platform accounts       │
│  │   └── Data export/deletion (GDPR)   │
│  ├── Avatar Identity                    │
│  │   ├── Display name                   │
│  │   ├── Avatar appearance data         │
│  │   ├── Avatar history/versions        │
│  │   └── Cross-platform avatar (VRM)   │
│  └── Authorization                      │
│      ├── Role-based access (user, mod, admin)│
│      ├── Space permissions (enter, build)│
│      ├── Content permissions (upload, share)│
│      └── Economy permissions (trade, create)│
└─────────────────────────────────────────┘

Cross-Platform Identity:
├── Core identity is platform-agnostic
├── Link device-specific accounts to core identity
├── Avatar and inventory carry across platforms
├── Friends list unified across devices
└── Progression shared (or platform-specific by design)

Content Pipeline

User-Generated Content (UGC)

UGC Pipeline:
┌──────────────┐    ┌──────────────┐    ┌──────────────┐
│ Creator Tool │───→│  Upload &    │───→│  Content     │
│ (in-world or │    │  Validation  │    │  Distribution│
│  external)   │    │              │    │              │
└──────────────┘    └──────────────┘    └──────────────┘

Validation Pipeline:
1. Format check (supported file types, size limits)
2. Automated content scan:
   ├── Malware/exploit detection
   ├── NSFW/inappropriate content detection
   ├── Intellectual property check (perceptual hash)
   ├── Performance profiling (polygon count, texture size)
   └── Physics/scripting safety check
3. Optimization:
   ├── Automatic LOD generation
   ├── Texture compression
   ├── Mesh optimization
   └── Thumbnail generation
4. Human review (optional, for featured/promoted content)
5. Distribution:
   ├── CDN deployment
   ├── Search index update
   └── Creator notification

Content Budget Enforcement:
├── Per-asset: Max polygons, textures, scripts
├── Per-space: Total budget for all content in a world
├── Per-user: Aggregate performance impact of all user content
└── Dynamic: Reduce quality of non-focus content at runtime

Asset Distribution

Asset Delivery Architecture:
┌───────────────────────────────────────────────┐
│                CDN Layer                       │
│  ├── Edge servers worldwide                   │
│  ├── Asset bundles cached near users          │
│  └── Versioned assets (cache-busting)         │
├───────────────────────────────────────────────┤
│              Asset Service                     │
│  ├── Asset catalog (metadata, search)         │
│  ├── Version management                       │
│  ├── Format conversion (per-platform)         │
│  ├── Dependency resolution                    │
│  └── Licensing/permission management          │
├───────────────────────────────────────────────┤
│             Storage Layer                      │
│  ├── Object storage (S3-compatible)           │
│  ├── Source assets (high quality, archive)     │
│  ├── Processed assets (per-platform builds)   │
│  └── Thumbnails and previews                  │
└───────────────────────────────────────────────┘

Loading Strategy:
1. Pre-load: Essential world assets before entering
2. Priority stream: Visible objects load first
3. Background stream: Non-visible but nearby objects
4. On-demand: Load when user approaches
5. Prefetch: Predict user path, load ahead

Typical asset sizes:
├── Simple avatar: 5-15 MB
├── Complex avatar: 15-50 MB
├── Small world: 50-200 MB
├── Large world: 200 MB - 2 GB
├── Texture (compressed): 0.5-4 MB each
└── Audio clip: 0.1-5 MB each

Networking Architecture

Protocol Stack

Protocol Selection by Data Type:
┌─────────────────┬──────────────┬──────────────┐
│ Data Type       │ Protocol     │ Reliability  │
├─────────────────┼──────────────┼──────────────┤
│ Avatar position │ UDP          │ Unreliable   │
│ Voice audio     │ UDP (WebRTC) │ Unreliable   │
│ Chat messages   │ WebSocket    │ Reliable     │
│ State changes   │ WebSocket    │ Reliable     │
│ Transactions    │ HTTPS        │ Reliable     │
│ Asset download  │ HTTPS (CDN)  │ Reliable     │
│ Video stream    │ WebRTC/HLS   │ Adaptive     │
└─────────────────┴──────────────┴──────────────┘

Network Optimization:
├── Delta compression: Only send changed values
├── Quantization: Reduce precision (position to nearest cm)
├── Interest management: Only send relevant data
├── Prediction: Client predicts movement, server corrects
├── Interpolation: Smooth between network updates
└── Jitter buffer: Smooth out network timing variations

Bandwidth Targets:
├── Per-user downstream: 200-500 Kbps (without voice)
├── Per-user upstream: 50-100 Kbps (without voice)
├── Voice per channel: 32-64 Kbps per speaker
└── Total per user: 300-800 Kbps typical

Scalability Patterns

Horizontal Scaling:
├── Stateless services: Scale behind load balancer
├── Stateful instances: Managed by orchestrator
├── Database: Sharded by world/region
├── Cache: Distributed (Redis cluster)
└── Message queue: Partitioned by topic

Geographic Distribution:
┌──────────┐    ┌──────────┐    ┌──────────┐
│ US-East  │    │ EU-West  │    │ Asia-Pac │
│ Region   │←──→│ Region   │←──→│ Region   │
│          │    │          │    │          │
│ Instances│    │ Instances│    │ Instances│
│ Users    │    │ Users    │    │ Users    │
│ Assets   │    │ Assets   │    │ Assets   │
└──────────┘    └──────────┘    └──────────┘
     ↕               ↕               ↕
┌──────────────────────────────────────────┐
│         Global Services                   │
│  Identity, Economy, Social Graph,        │
│  Content Catalog, Analytics              │
└──────────────────────────────────────────┘

Players connect to nearest region.
Cross-region play possible with higher latency.
Global services replicated across regions.

Interoperability

Open Standards

Interoperability Standards:
├── Avatar: VRM (open, humanoid avatar standard)
├── Assets: glTF 2.0 (Khronos 3D asset standard)
├── Scenes: USD (Universal Scene Description, Pixar)
├── Runtime: OpenXR (cross-platform XR API)
├── Identity: DID (Decentralized Identifiers, W3C)
├── Payments: Standard payment APIs
└── Communication: Matrix protocol (federated messaging)

Portable Identity Vision:
User has one identity across metaverse platforms:
├── Same avatar (VRM) works in Platform A, B, C
├── Friends list shared via social graph protocol
├── Digital items transferable (with platform agreement)
├── Reputation/achievements portable
└── Privacy controls travel with identity

Current Reality:
Most platforms are walled gardens.
Interoperability is aspirational.
Build with standards to be future-compatible.

Monitoring and Operations

Operational Dashboards:
├── Real-Time:
│   ├── Concurrent users (global, per region, per world)
│   ├── Instance count and utilization
│   ├── Network latency percentiles (p50, p95, p99)
│   ├── Error rates by service
│   ├── Active moderation incidents
│   └── Server resource utilization
├── Daily:
│   ├── DAU/MAU (Daily/Monthly Active Users)
│   ├── Session duration distribution
│   ├── World popularity rankings
│   ├── Content creation metrics
│   ├── Economy health (transaction volume, inflation)
│   └── Safety metrics (reports, actions taken)
└── Capacity Planning:
    ├── Growth projections
    ├── Peak capacity forecasting
    ├── Infrastructure cost per user
    └── Scaling trigger thresholds

Incident Response:
├── Service degradation → Auto-scale, redirect traffic
├── Instance crash → Migrate users, restore from snapshot
├── Security incident → Isolate, assess, patch, communicate
├── Economy exploit → Freeze transactions, rollback, fix
└── Mass report → Increase moderation, isolate reported users

When to Apply This Skill

Use this skill when:

  • Designing the technical architecture of a metaverse platform
  • Planning server infrastructure for persistent virtual worlds
  • Implementing instance management and player routing
  • Building content pipelines for user-generated virtual worlds
  • Evaluating interoperability standards for cross-platform compatibility
  • Scaling a virtual world platform beyond initial user base

Install this skill directly: skilldb add metaverse-skills

Get CLI access →