Implement InMemory Transport Layer for StellaOps Router
- Added InMemoryTransportOptions class for configuration settings including timeouts and latency. - Developed InMemoryTransportServer class to handle connections, frame processing, and event management. - Created ServiceCollectionExtensions for easy registration of InMemory transport services. - Established project structure and dependencies for InMemory transport library. - Implemented comprehensive unit tests for endpoint discovery, connection management, request/response flow, and streaming capabilities. - Ensured proper handling of cancellation, heartbeat, and hello frames within the transport layer.
This commit is contained in:
62
docs/router/README.md
Normal file
62
docs/router/README.md
Normal file
@@ -0,0 +1,62 @@
|
||||
# StellaOps Router
|
||||
|
||||
The StellaOps Router is the internal communication infrastructure that enables microservices to communicate through a central gateway.
|
||||
|
||||
## Overview
|
||||
|
||||
The router provides:
|
||||
|
||||
- **Gateway WebService** (`StellaOps.Gateway.WebService`): HTTP ingress service that routes requests to microservices
|
||||
- **Microservice SDK** (`StellaOps.Microservice`): SDK for building microservices that connect to the router
|
||||
- **Transport Plugins**: Multiple transport options (TCP, TLS, UDP, RabbitMQ, InMemory for testing)
|
||||
- **Claims-based Authorization**: Using `RequiringClaims` instead of role-based access
|
||||
|
||||
## Key Documents
|
||||
|
||||
| Document | Purpose |
|
||||
|----------|---------|
|
||||
| [specs.md](./specs.md) | **Canonical specification** - READ FIRST |
|
||||
| [implplan.md](./implplan.md) | High-level implementation plan |
|
||||
| [SPRINT_INDEX.md](./SPRINT_INDEX.md) | Sprint overview and dependency graph |
|
||||
|
||||
## Solution Structure
|
||||
|
||||
```
|
||||
StellaOps.Router.slnx
|
||||
├── src/__Libraries/
|
||||
│ ├── StellaOps.Router.Common/ # Shared types, enums, interfaces
|
||||
│ ├── StellaOps.Router.Config/ # Router configuration models
|
||||
│ ├── StellaOps.Microservice/ # Microservice SDK
|
||||
│ └── StellaOps.Microservice.SourceGen/ # Build-time endpoint discovery
|
||||
├── src/Gateway/
|
||||
│ └── StellaOps.Gateway.WebService/ # HTTP gateway service
|
||||
└── tests/
|
||||
├── StellaOps.Router.Common.Tests/
|
||||
├── StellaOps.Gateway.WebService.Tests/
|
||||
└── StellaOps.Microservice.Tests/
|
||||
```
|
||||
|
||||
## Building
|
||||
|
||||
```bash
|
||||
# Build the router solution
|
||||
dotnet build StellaOps.Router.slnx
|
||||
|
||||
# Run tests
|
||||
dotnet test StellaOps.Router.slnx
|
||||
```
|
||||
|
||||
## Invariants (Non-Negotiable)
|
||||
|
||||
From the specification, these are non-negotiable:
|
||||
|
||||
- **Method + Path** is the endpoint identity
|
||||
- **Strict semver** for version matching
|
||||
- **Region from GatewayNodeConfig.Region** (never from headers/host)
|
||||
- **No HTTP transport** between gateway and microservices
|
||||
- **RequiringClaims** (not AllowedRoles) for authorization
|
||||
- **Opaque body handling** (router doesn't interpret payloads)
|
||||
|
||||
## Status
|
||||
|
||||
Currently in development. See [SPRINT_INDEX.md](./SPRINT_INDEX.md) for implementation progress.
|
||||
Reference in New Issue
Block a user