Python stable · Mojo preview
CoAkka Runtime configuration · Python + Mojo
Python projects the shared contract through a stable wheel. Mojo is a separate source preview over its packaged C shim; it neither uses the Python API nor inherits Python support scope.
Package and lifecyclecoakka-runtime-python==3.3.2
- Interpreter
- GIL-enabled CPython 3.11+. Use an application virtual environment.
RuntimeHost.start(start_spec=...)- The preferred new entry point.
ConnectorOrchestratoris the compatibility name. - One host/process
- One active runtime host per Python process; the context manager retires readers, workers and the native owner.
- Bytes handler
- Runs synchronously on the request-reader turn and must return promptly. Typed handlers use a bounded Python worker queue.
take_background_error()- Transfers an unclaimed worker error; it is a Python diagnostic, not a Core delivery outcome.
Startup intentConnectorStartSpec
system_name- Logical system/app-host name.
node_id- Unique runtime-owner identity in the system.
routes- Initial route generation; local-first uses
local_route. queue_capacity=None- Preserves omission; Core selects and reports the bound.
strict_no_drop=True- Explicit safe intent in the frozen base ABI, not a Python-invented default.
generation- Control-snapshot generation; stale updates are refused.
enable_monitor=None- Omitted selects Core default OFF;
Falseis explicit off andTrueallows collection before startup. network=None- Lets Core select Embedded while preserving
explicitPolicy=false.
Network, route and endpointRuntimeNetworkConfig · RouteSpec
embedded()- Local only, no listener.
outbound_only()- Permits remote routes without a listener.
network_node(bind_host, bind_port, advertise_host, advertise_port)- Bind and advertise are different facts; do not advertise loopback to another host.
RouteSpec.target- Business address that stays stable when a handler moves process.
endpoints- Candidates with host, port, weight and flags.
SINGLE_OWNER- One owner;
WEIGHTED_ROUND_ROBINuses weight;RENDEZVOUS_HASHuses a stable route key. weight- Relative selection weight, not retry count, priority or a percentage.
Connections and securityRuntimeTcpConnectionStrategySpec · RuntimeTcpSecuritySpec
connection_strategy=None- Omit the group for Core AUTO/current MULTIPLEXING.
mode- A supplied object/tuning needs an explicit mode; enum zero is PER_EXCHANGE, not AUTO.
max_connections- Connection bound where mode/capability applies.
max_requests_per_connection- Request bound before retirement.
idle_timeout_ms- Idle-retention bound.
security.mode- PLAINTEXT/TLS/MUTUAL_TLS; bundled Core 3.3 does not expose public TCP TLS/mTLS.
credential_generation- Positive and increasing for same-mode reload.
credential_id- Non-secret diagnostic ID.
- CA/cert/key paths
- The app owns files, permissions and rotation; snapshots never return secret paths/material.
File Lane and Stream LaneIndependent owners
FileLane.open_owned- The exact receiver owner issues a
FileReceiveGrant. FileLane.sha256- Computes exact size/digest through Core before prepare.
wait_transfer- Continue from update sequence; success requires terminal + COMPLETED + OK on both peers.
StreamLane.open_owned- The publisher issues a single-admission grant.
max_frame_bytes- Per-frame bound; current public maximum is 4 MiB.
initial_window_bytes- Initial receive credit, large enough for one max frame.
memoryview- Borrowed only during the callback; copy before retaining.
close()- Call from the external owner after callbacks/waits, never reentrantly from a worker callback.
Read accepted/effective Core statestartup · config · network · capabilities
Create configuration.py, paste the source and run it in the virtual environment.
configuration.py
from coakka_v2_connector import ConnectorStartSpec, RuntimeHost, local_route
target = "orders.quote"
start_spec = ConnectorStartSpec(
system_name="orders",
node_id="config-python-1",
routes=[local_route(target)],
enable_monitor=True,
)
with RuntimeHost.start(start_spec=start_spec) as runtime:
startup = runtime.runtime_startup_config()
config = runtime.runtime_config()
network = runtime.runtime_network_config()
print(
f"generation={config['appliedGeneration']} "
f"queue_capacity={startup['queueCapacity']} "
f"strict_no_drop={str(startup['strictNoDrop']).lower()} "
f"monitor={str(startup['monitor']['enabled']).lower()} "
f"network_mode={network['mode']}"
)
Terminal
python configuration.pyVerified result
generation=1 queue_capacity=4096 strict_no_drop=true monitor=true network_mode=1
runtime_startup_config()- Default groups, queue, execution, connection, I/O, Monitor and delivery facts.
runtime_config()- Applied generation, route count, state and overload facts.
runtime_network_config()- Mode, explicit policy, bind and advertise.
runtime_capabilities()- Compiled/entitled/effective features before advanced transport.
Mojo previewsource 3.3.1 · pinned toolchain
- Toolchain
1.0.0b2.dev2026052115; another compiler is outside current evidence.- Application API
- Not stable. The Mojo executable calls a C shim; the shim owns lifecycle and the Core ask owner.
- Archive
- SHA-256
a9b1a9cc78086d92d81294f7c1efa7e42c510f81df115d3830545bf5f143e5c1. - Qualified execution
- macOS ARM64 and Raspberry Pi 5 Linux ARM64. TLS was not exercised.