Kacper Noniewicz
← Projects

Private / Go / Active development

Kor

A small TCP message router and service protocol for Anima. Kor gives local services a minimal shared transport for registering handlers, publishing events, and making request/response calls without forcing every service to know about every other service.

What it does

  • Accepts service connections over length-prefixed TCP frames
  • Identifies peers with HELLO and tracks their registered handlers and subscriptions
  • Routes request/response calls by subject and correlates replies by ID
  • Delivers published messages to subscribers and dispatches requests to handlers
  • Exposes a lightweight HTTP debug snapshot at /debug/state

Why I built it

Anima is made of small services that should be able to evolve independently. Kor is the narrow communication layer between them: a focused daemon and client API for local service-to-service communication, without making every service implement its own discovery, routing, or request correlation.

How it works

Service → length-prefixed TCP frame → Kor daemon → handler or subscribers

A client connects and identifies itself, then registers the subjects it handles or subscribes to. Calls carry a subject, request ID, and JSON payload. The daemon selects a registered handler, forwards the request, and routes the response back to the originating client. The wire layer stays deliberately small: HELLO, HANDLE, SUB, PUB, REQ, RES, ERR, PING, and PONG.

Stack

GoTCPJSONPub/SubRequest/response

Direction

The foundation works today as a Go daemon and client with runnable examples. The next layer is keeping the protocol minimal while making services discoverable: descriptors stored alongside handler registrations, built-in kor.capabilities and kor.describe handlers, JSON Schema exposed as metadata, subject patterns and wildcards, and a Node client for Anima's UI.

Status

Private and actively developed. Kor is intended to become the small service protocol underneath Anima.