Skip to main content

High-Performance Traffic Shadowing & Experimentation Platform

Project description

UniverseOS

High-Performance Traffic Shadowing & Experimentation Platform

UniverseOS is a specialized infrastructure layer designed for safe, real-time experimentation with production traffic. While currently optimized for Large Language Models (LLMs), its core architecture provides a generic, high-concurrency shadowing gateway that enables "Parallel Universe" testing—allowing engineers to validate new models, prompts, or configurations against live production data with zero impact on end-user latency or reliability.

Core Architecture

UniverseOS is built on a split-plane architecture designed for scale and resilience:

  • Data Plane (C++ Gateway): A high-performance, non-blocking reverse proxy written in C++. It utilizes asynchronous I/O to handle high throughput with minimal overhead. The Gateway intercepts incoming requests and mirrors them to shadow backends asynchronously, ensuring the primary response path remains unaffected.
  • Control Plane (Registry & Policy): A dynamic service discovery and routing engine. It allows for hot-swapping of shadow models and granular traffic routing policies (e.g., "shadow 10% of traffic to Model B") without restarting the gateway.
  • Observability Plane: A dedicated metrics ingestion pipeline that captures latency, throughput, and model-specific telemetry (e.g., token usage) for side-by-side performance comparison.

Key Features

  • Zero-Latency Shadowing: The shadowing mechanism is completely decoupled from the primary request path. Shadow responses are processed out-of-band, guaranteeing no latency penalty for the end user.
  • Language Agnostic Integration: Designed as a network-level infrastructure component. While a Python SDK is provided for convenience, the system works with any client capable of making HTTP requests.
  • Production Safety: Failures in shadow models are isolated. If a shadow model crashes or times out, the primary request completes successfully, and the error is logged for analysis.
  • Live A/B Testing & Evaluation: Facilitates "dark launching" of new models. Compare the quality and cost of a new model against the production baseline using real-world inputs before exposing it to users.

Quickstart

1. Deploy the Control Plane

The core infrastructure runs as a set of containerized services.

docker-compose up -d

2. Install the Python SDK

For Python applications, the SDK provides a seamless integration point.

pip install universeos

3. Integration

Wrap your existing API calls to enable automatic shadowing. The SDK handles the communication with the Gateway.

from universeos import universe_shadow, init_universe

# Initialize connection to the sidecar/gateway
init_universe()

@universe_shadow
def generate_response(prompt):
    # Your existing production logic (e.g., OpenAI, Anthropic, or local LLM)
    return production_client.chat.completions.create(
        model="gpt-4",
        messages=[{"role": "user", "content": prompt}]
    )

Technical Specifications

  • Gateway: C++17, Asynchronous Socket I/O (poll/epoll)
  • Protocol: HTTP/1.1 (Streaming Support)
  • Configuration: Dynamic YAML-based policy loading
  • SDK: Python 3.7+ (Thread-safe, minimal dependencies)

Building from Source

To build the high-performance Gateway and Control Plane services from source:

mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make -j4

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

universeos-0.1.2.tar.gz (2.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

universeos-0.1.2-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

Details for the file universeos-0.1.2.tar.gz.

File metadata

  • Download URL: universeos-0.1.2.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for universeos-0.1.2.tar.gz
Algorithm Hash digest
SHA256 b390b2e65b000ea2362839ecbb1cd108153f120fb0e3be89b89607c2588b5412
MD5 b7ed98aa6c51d0212c1f4c3bfdc2912a
BLAKE2b-256 adc623a1b27f64217ad1072fdac99a8111ff8461aa5ed836923b97e3c88457aa

See more details on using hashes here.

File details

Details for the file universeos-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: universeos-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 3.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for universeos-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 52ee6c867e6d1ce0ba2cef07ade97eb8164898bacc7f1f6422f22ca41bb5eef0
MD5 6688ae95e44392987fa786ef23ec238a
BLAKE2b-256 50035fe287cc4fd3cf50aee2501ca6175c9198be091132c8658018ec046e29a6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page