moxzi
Docs / Server / moxzid overview

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#

BehaviourIn moxzid
One message at a time per actorYes. A message runs to completion before the next starts
A trap rolls back the message's changesYes. The actor keeps running
Queries can't change stateYes. Changes made during a query are discarded
await commits stateYes, and re-entrant calls between actors work
Upgrades keep stable stateYes, with the same compatibility checks
CyclesEach message is charged. An actor with no cycles left is refused with HTTP 402
Per-message instruction limitYes, --instruction-limit (default 40 billion)
Heartbeats and global timersYes
HTTPS outcalls (http_request on the management canister)Yes, including transform functions
An actor's http_request method as a websiteYes. See Serving a website

Different from the Internet Computer#

moxzidInternet Computer
ProtocolPlain HTTP, with JSON or Candid bodiesThe IC's agent protocol (CBOR envelopes)
Caller identityAnonymous, or whatever the x-caller header says. Not authenticatedSigned by the caller's key
Certified dataNot availableAvailable
ReplicationOne processA subnet of replicas
Actor idsDerived from the server's seed and the actor's nameAssigned 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#

LimitationWhat to do
One process; no clustering or replicationRun several servers, each with its own actors and state directory
No TLSPut a reverse proxy in front. See Operations
One shared token, no rolesKeep the token private and the port behind a proxy
HTTP streaming (streaming_strategy) isn't followed; only the first chunk is servedReturn whole responses. There's no response size limit off-chain
Updates aren't deduplicated, so a retried update can run twiceRetry an update only if it's safe to run twice

Next steps#

On this pageHow it worksSame as the Internet ComputerDifferent from the Internet ComputerLimitationsNext steps