moxzid overviewalpha
What moxzid is, what it does the same as the Internet Computer, and where it differs.
moxzid is an HTTP server that hosts compiled Motoko actors. It runs the same wasm you'd deploy to the Internet Computer, with the same execution rules, and stores each actor's state on disk. Use it to develop and test actors without a replica, to run actors as a backend service, or to serve a website from an actor.
How it works#
You give moxzid a manifest that lists the actors to host. Each actor gets its own message queue and handles one message at a time. Clients call actors over HTTP, either with JSON or with Candid. Actors can call each other, set timers, make HTTPS requests and create other actors.
Same as the Internet Computer#
| Behaviour | In moxzid |
|---|---|
| One message at a time per actor | Yes. A message runs to completion before the next starts |
| A trap rolls back the message's changes | Yes. The actor keeps running |
| Queries can't change state | Yes. Changes made during a query are discarded |
await commits state | Yes, and re-entrant calls between actors work |
| Upgrades keep stable state | Yes, with the same compatibility checks |
| Cycles | Each message is charged. An actor with no cycles left is refused with HTTP 402 |
| Per-message instruction limit | Yes, --instruction-limit (default 40 billion) |
| Heartbeats and global timers | Yes |
HTTPS outcalls (http_request on the management canister) | Yes, including transform functions |
An actor's http_request method as a website | Yes. See Serving a website |
Different from the Internet Computer#
| moxzid | Internet Computer | |
|---|---|---|
| Protocol | Plain HTTP, with JSON or Candid bodies | The IC's agent protocol (CBOR envelopes) |
| Caller identity | Anonymous, or whatever the x-caller header says. Not authenticated | Signed by the caller's key |
| Certified data | Not available | Available |
| Replication | One process | A subnet of replicas |
| Actor ids | Derived from the server's seed and the actor's name | Assigned by the IC |
Because nothing is signed, msg.caller can't be used for access control in actors hosted by moxzid. Anyone with the server's token can call as any principal. See Authentication.
@dfinity/agent's Actor class doesn't work with moxzid, because it waits for a certificate that a single server can't produce. Use the JSON API, or encode Candid yourself and post it to the /call endpoints.
Limitations#
| Limitation | What to do |
|---|---|
| One process; no clustering or replication | Run several servers, each with its own actors and state directory |
| No TLS | Put a reverse proxy in front. See Operations |
| One shared token, no roles | Keep the token private and the port behind a proxy |
HTTP streaming (streaming_strategy) isn't followed; only the first chunk is served | Return whole responses. There's no response size limit off-chain |
| Updates aren't deduplicated, so a retried update can run twice | Retry an update only if it's safe to run twice |