diff --git a/src/lib/spec-map.ts b/src/lib/spec-map.ts index 7d58e0f..4ba4c28 100644 --- a/src/lib/spec-map.ts +++ b/src/lib/spec-map.ts @@ -31,7 +31,7 @@ export const SECTION_MAP: Record = { tag: 'optional', }, capabilities: { gist: 'Layered host interfaces, deny by default; the guest contract and the read-only caller identity.', tag: 'core + optional' }, - limits: { gist: 'Wall-clock, compute and memory limits per invocation, answered with 504, 429 and 507.', tag: 'core' }, + limits: { gist: 'Wall-clock and memory limits per invocation, and a recommended compute limit, answered with 504, 507 and 429.', tag: 'core' }, composition: { gist: 'One verb calls another through the host, under a declared call graph and a shared budget.', tag: 'optional' }, authz: { gist: 'Authentication mechanisms, policy matchers, the simple profile, fixed ownership and the execution identity.', diff --git a/src/pages/compare.mdx b/src/pages/compare.mdx index 0a3057f..88e0881 100644 --- a/src/pages/compare.mdx +++ b/src/pages/compare.mdx @@ -66,7 +66,7 @@ REST:ACT is a wire protocol for the clients of an API to upload components at ru Extism is a plug-in system built on WebAssembly. The host application defines an interface, and users or customers add logic by writing plug-ins against it. Extism supplies host SDKs for embedding that runtime in an application. -Both share the idea of letting a product's users extend it with their own code. The difference is the layer. Extism is a library that a product's developers embed, and they design the extension points. REST:ACT is a wire protocol, so any client of a compliant server can upload a verb over HTTP, and the server enforces time, compute and memory limits on it, runs it as the caller by default and lists it in its discovery document. +Both share the idea of letting a product's users extend it with their own code. The difference is the layer. Extism is a library that a product's developers embed, and they design the extension points. REST:ACT is a wire protocol, so any client a compliant server allows can upload a verb over HTTP, and the server limits its time and memory, runs it as the caller by default and lists it in its discovery document. ## Cloudflare Workers for Platforms @@ -78,7 +78,7 @@ It shares the multi-tenant goal and the idea that uploaded code is untrusted. In PostgREST serves a Postgres database over HTTP. A function in the exposed schema is callable under `/rpc`. A function that does not modify the database also runs under `GET`, and a request with a valid JWT switches the database session to the role named in the token, so the database decides what the caller may do. Supabase's REST API is PostgREST, and `rpc()` calls its database functions. Supabase recommends `security invoker`, the default, so a function runs with the caller's privileges. -This is the closest relative here. Read-only calls use `GET`, others use `POST`, and the code runs as the caller. PostgREST decides by function volatility: `GET` is always read-only, and `POST` is read-write only for volatile functions. REST:ACT separates a function from an action by declared kind, and a function is a cacheable `GET`. The functions there are SQL or other database code written by whoever administers the database, then exposed. A verb is uploaded at runtime by an API client, is not tied to a database, runs as a WebAssembly component under time, compute and memory limits, and works on the object it is bound to. +This is the closest relative here. Read-only calls use `GET`, others use `POST`, and the code runs as the caller. PostgREST decides by function volatility: `GET` is always read-only, and `POST` is read-write only for volatile functions. REST:ACT separates a function from an action by declared kind, and a function is a cacheable `GET`. The functions there are SQL or other database code written by whoever administers the database, then exposed. A verb is uploaded at runtime by an API client, is not tied to a database, runs as a WebAssembly component under time and memory limits, and works on the object it is bound to. ## Hasura actions diff --git a/src/pages/llms.txt.ts b/src/pages/llms.txt.ts index 8537c1b..87e0ecd 100644 --- a/src/pages/llms.txt.ts +++ b/src/pages/llms.txt.ts @@ -13,7 +13,7 @@ export const GET: APIRoute = ({ site }) => { > REST:ACT is an HTTP protocol that lets the clients of an API add their own code to the server, within the permissions the server grants them. A client uploads a small program, called a verb, to a path in the server's object tree, and anyone the server allows can call it with GET or POST. -A verb is a WebAssembly component. It runs with the caller's permissions, can use only the host interfaces it imports, and stops when it reaches its time, compute or memory limit. The protocol is specified in ${DRAFT.docname}, written as an Internet-Draft and not yet submitted to the IETF; it is not a standard. restactd is the reference server. +A verb is a WebAssembly component. By default it runs with the caller's permissions, can use only the host interfaces it imports, and stops when it reaches its time or memory limit. The protocol is specified in ${DRAFT.docname}, written as an Internet-Draft and not yet submitted to the IETF; it is not a standard. restactd is the reference server. ## Specification diff --git a/src/pages/restactd.astro b/src/pages/restactd.astro index 9370f7b..de233e3 100644 --- a/src/pages/restactd.astro +++ b/src/pages/restactd.astro @@ -24,7 +24,7 @@ const facts: { term: string; html: string }[] = [ }, { term: 'Limits per call', - html: '200,000,000 fuel, 2 s and 32 MiB by default, answered with 429, 408 and 507. An operator sets the ceilings.', + html: '200,000,000 fuel, 2 s and 32 MiB by default, answered with 429, 504 and 507. An operator sets the ceilings.', }, { term: 'Storage', diff --git a/src/pages/security.mdx b/src/pages/security.mdx index 6ad85df..0e19a1b 100644 --- a/src/pages/security.mdx +++ b/src/pages/security.mdx @@ -36,7 +36,7 @@ Four rules apply to every verb, and a server that skips one is not conformant. 1. A verb is a WebAssembly component. Every verb runs as a WASI 0.2 component. A server may compile JavaScript or Python to a component at upload or run it through an interpreter component, under the same confinement and limits either way. [restactd](/restactd/) interprets, so nothing is compiled per upload. 2. A verb reaches only what it imports. The imports of the component are its capability manifest, and there is no ambient authority beyond them. A server answers `403` at upload for an interface it does not grant, and none of the standard interfaces opens a socket or a file. 3. A verb runs as the caller. A call can do what the caller could do directly and the verb declared, within the policy of the target. Its compute is charged to the caller. -4. A verb is metered. Wall-clock, compute and memory limits apply to every call, and a verb that calls other verbs shares one budget with them. +4. A verb is metered. Every call has a wall-clock limit and a memory limit, and the draft recommends a compute limit as well. A verb that calls other verbs shares one deadline with them and, where the server counts compute, one compute budget. ### Capabilities are an import list @@ -81,11 +81,11 @@ A function may not call an action, and may not write: `object.set` and `event.pu ## Resource limits -A server enforces a wall-clock limit and a compute limit separately. Counting instructions does not stop a verb that stalls without computing, and a timer alone is not deterministic. Each breach has its own status code. +The draft requires a wall-clock limit and recommends a separate compute limit. Counting instructions does not stop a verb that stalls without computing, and a timer alone is not deterministic. Each breach has its own status code. | Limit | Status | restactd default | |---|---|---| -| Wall-clock time | `408` | 2 s | +| Wall-clock time | `504` | 2 s | | Compute (fuel) | `429` | 200,000,000 | | Memory | `507` | 32 MiB | diff --git a/src/pages/start.astro b/src/pages/start.astro index 4974728..e720d8a 100644 --- a/src/pages/start.astro +++ b/src/pages/start.astro @@ -204,7 +204,7 @@ const next = [

Watch a limit stop a verb

A verb that never returns is cut off. The default limits are 2 s of wall-clock time, 200,000,000 fuel and 32 MiB - of memory, and a breach returns 408, 429 or 507. + of memory, and a breach returns 504, 429 or 507.