liveBook · Manning

Key-value bucket

As explained in Server-Side WebAssembly

A key-value bucket is a named storage collection containing values addressed by unique keys.

A key-value bucket is a named storage collection that addresses values with unique keys. In a SmartCMS service, the default bucket stores story content under each story name. section 6.6.1

Persist and retrieve a story

POSTing “MyStory” and its story text to /api/create returns “Stored MyStory”. Posting “MyStory” to /api/retrieve returns the stored text.

How Server-Side WebAssembly covers it

How deep it goes
Demonstrates opening, setting, getting, and missing-value handling, while deferring robust errors and structured JSON parsing.
Examples
Uses a SmartCMS story bucket, curl create and retrieve requests, and Rust set and get operations.
What it assumes
Assumes familiarity with HTTP request bodies and Rust while teaching bucket access and simple line-based request parsing.
What you can do after
Build it from scratch as a Rust HTTP component that stores and retrieves named story content through a linked key-value provider.
How it connects
Connects persistent storage with HTTP routing, Rust, WebAssembly components, and the WASI key-value store and atomics interfaces.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Server-Side WebAssembly. The section links point to the parts of the book it draws on.