How CoAkka Runtime works

Checkout asks billing.quote to price 3 items. The application sets the prices. CoAkka Runtime finds the route to the handler and carries the result back to the caller.

Inside one process

Start in Embedded mode. Checkout, CoAkka Runtime Core, and the pricing handler run in one Node.js process. The route table points billing.quote to the handler registered in that process.

Outgoing path inside Node.js
  1. CheckoutSends the quantity 3 through the Node.js connector.
  2. CoAkka Runtime CoreLooks up billing.quote and delivers it to the handler in this process.
  3. Pricing handlerPrices 3 items at $12.00 each.

Return path · $36.00 flows from the pricing handler through CoAkka Runtime. The reply is matched to Checkout’s pending request.

Run the one-process basket example.

Across two processes

Each application loads CoAkka Runtime Core inside its own process. This path involves only 2 application processes, Node.js and Python. The two cores connect directly over TCP.

Outgoing path across two processes

Node.js application process

  1. CheckoutCalls billing.quote through the Node.js connector.
  2. Core inside Node.jsLooks up the route and selects the Python endpoint.

Direct TCP

Python application process

  1. Core inside PythonAdmits the request and delivers it through the Python connector.
  2. Pricing handlerReads the quantity and returns the quote.

Return path · $36.00 flows from Core inside Python to Core inside Node.js. The sending Core matches the reply to Checkout’s pending request.

Core enforces queue limits, routes and transports requests, and matches replies. The connector links each language’s API to Core. The application sets the pricing rules.

Compare with a path through an Istio sidecar or the NATS broker.

What the caller receives

The example waits for a reply. When the caller gets something other than the quote, identify the step that produced the outcome.

Application reply
The handler returns a quote or a business refusal. Read the reply’s status and data.
Deadletter
CoAkka Runtime reports why an accepted request failed in delivery. A missing target can produce ROUTE_MISS.
Timeout
The caller’s wait ended before it received a result. When the request may have arrived, check the receiver before resending.

Configuration and operations

The application registers its work, supplies configuration, and decides how to handle each outcome. CoAkka Runtime applies configuration, delivers requests, and exposes operational signals.

When starting the application

The connector maps configuration into the form CoAkka Runtime accepts. The application registers the handler where it owns the work. Check the active route table before sending the first request.

When changing routes or investigating a failure

Submit a complete route table with a newer generation. If accepted, new route decisions use the new table. If the update is stale or invalid, the active table stays in effect. For a failed call, compare the target, generation, and delivery outcome.

When the work involves transferring a file or an ongoing data stream, see how to set up File Lane and Stream Lane.

References

Diagrams and sequences in the canonical How It Works guide.