Python stable · Mojo preview

Cheat sheet · Python + Mojo

Tra Python wheel/API stable và Mojo source-preview boundary ở cùng một nơi, nhưng không trộn support claim của hai lane.

Version và package

Terminal
python -m pip install --only-binary=:all: coakka-runtime-python==3.3.2
Connector
3.3.2: Core generation 3.3, connector revision 2.
Interpreter
GIL-enabled CPython 3.11+.
Native wheel targets
macOS ARM64, Linux ARM64/x64, Windows ARM64/x64. Claim support theo exact wheel + OS + CPU evidence.
Tên owner
RuntimeHost cho code mới; ConnectorOrchestrator là compatibility alias.

Embedded request/reply

Python
spec = ConnectorStartSpec(
    system_name="orders",
    node_id="orders-1",
    routes=[local_route("orders.quote")],
)
with RuntimeHost.start(start_spec=spec) as runtime:
    runtime.register_payload_handler("orders.quote", quote)
    reply = runtime.ask_payload(
        source="checkout",
        target="orders.quote",
        payload=b"2",
        timeout_ms=2_000,
    )

Mở file chạy đầu tiên.

Outcome và Deadletter

Reply
ask_payload, ask_typed, ask_json trả terminal response đã correlation.
Deadletter
DeadletterError.deadletter giữ reason, original envelope, generation và delivery failure facts.
Timeout/cancel
Failure boundary riêng; không chứng minh handler chưa chạy.
OneWay
send_one_way_* không chờ business response nhưng vẫn có admission/Monitor evidence.
Async terminal
submit_request_* + terminal_events() là Python API shape trên cùng Core contract.

Peer trực tiếp

Service
network=RuntimeNetworkConfig.network_node(
    bind_host="0.0.0.0",
    bind_port=19_321,
    advertise_host="pricing.internal",
    advertise_port=19_321,
)
Caller
network=RuntimeNetworkConfig.outbound_only(),
routes=[RouteSpec(
    target="orders.quote",
    endpoints=[EndpointSpec(host="pricing.internal", port=19_321)],
    strategy=RouteStrategy.SINGLE_OWNER,
)]

Mở ví dụ hai process.

File Lane và Stream Lane

File sample · Stream sample

Monitor và effective state

enable_monitor=True
Startup intent.
monitor_is_enabled()
Core accepted fact.
await_next_monitor(timeout_ms=...)
Bounded wait; None là no-signal trong cửa sổ.
runtime_startup_config()
Defaults và accepted construction facts.
runtime_config() / runtime_network_config()
Generation, routes, state, network và provenance.

Mojo preview

Package
Source archive 3.3.1, SHA-256 a9b1a9cc78086d92d81294f7c1efa7e42c510f81df115d3830545bf5f143e5c1.
Toolchain
1.0.0b2.dev2026052115.
Boundary
Thin Mojo executable → packaged C shim → CoAkka Runtime Core. Chưa có stable high-level Mojo API.
Hosts
macOS ARM64 và Raspberry Pi 5 Linux ARM64.

Chạy exact source preview.

Checklist tích hợp

Mở reference cấu hình Python + Mojo.