Table of Contents

Service Composition Framework (iii-engine)

The Service Composition Framework, commonly referred to as iii-engine, is a TypeScript and Rust-based infrastructure framework designed to streamline the development and deployment of distributed services without requiring traditional external databases, containerization, or complex orchestration systems. The framework consolidates multiple specialized technologies into a unified primitive-based architecture, replacing conventional stacks built around Express.js, PostgreSQL with pgvector extensions, Server-Sent Events (SSE) and Socket.io implementations, process managers like pm2, and monitoring systems such as Prometheus 1).

Core Architecture and Design Philosophy

The iii-engine framework fundamentally reimagines service composition through the use of iii primitives—a set of foundational building blocks that abstract common service requirements into composable units. Rather than requiring developers to orchestrate separate tools for each concern, the framework integrates function execution, key-value state management, stream processing, and OpenTelemetry (OTEL) distributed tracing into a cohesive system 2).

The architecture eliminates the need for external databases by embedding state management directly into the framework's primitives. This design choice reduces operational complexity and removes the traditional boundary between application logic and infrastructure concerns. Similarly, the framework's approach to tracing and observability is natively integrated through OTEL trace support, allowing developers to instrument services without installing additional monitoring infrastructure 3).

Technology Stack Replacement

The iii-engine consolidates multiple technologies traditionally required in modern service architectures:

* Express.js replacement: The framework provides integrated HTTP handling and routing capabilities without requiring a separate web server framework * Postgres + pgvector elimination: Built-in key-value state management removes the dependency on external relational databases and vector search extensions * SSE/Socket.io integration: Native support for real-time communication patterns without requiring dedicated libraries * Process management: Supersedes pm2 and similar process managers through its native service lifecycle management * Observability: Integrated OTEL trace support replaces Prometheus and other standalone monitoring solutions

This consolidation approach significantly reduces deployment complexity and operational overhead 4).

Core Primitives

The iii-engine operates through four primary categories of primitives:

Function Primitives: Enable definition and execution of service logic with built-in lifecycle management and error handling capabilities.

KV State Primitives: Provide key-value state storage and management without requiring external database systems, supporting state consistency and retrieval patterns necessary for distributed services.

Stream Primitives: Handle asynchronous event streams and data flow, enabling event-driven architectures and real-time data processing within the framework.

OTEL Trace Primitives: Integrate distributed tracing capabilities directly into the framework, allowing services to emit and correlate traces without external instrumentation 5).

Deployment and Operational Advantages

The elimination of Docker dependencies represents a significant operational shift. By removing containerization requirements, the framework reduces deployment complexity and allows services to run directly on host systems or lightweight runtime environments. The absence of external database dependencies further streamlines deployment workflows, as services do not require separate database provisioning, migration management, or schema versioning 6).

This architecture proves particularly valuable for applications requiring tight coupling between application state and service logic, such as agent-based systems, real-time data processing pipelines, and services requiring consistent state management without the latency penalties of external database queries.

Language Integration and Runtime Characteristics

The dual TypeScript and Rust composition provides flexibility in implementation. TypeScript enables rapid development with dynamic typing and JavaScript ecosystem interoperability, while Rust components can be integrated for performance-critical operations requiring memory safety and concurrent execution guarantees. This hybrid approach allows developers to leverage appropriate languages for different service components while maintaining a unified framework abstraction 7).

See Also

References