FerriteDocs

How a Ferrite app works

How Ferrite compiles admitted source, routes HTTP traffic through queues, guards atomic writes against retries, enforces platform limits, and isolates running apps.

Deploy the yoga studio from Build a booking app with Alloy and several deliberate design choices become visible right away. Sending the same booking request twice returns the original booking and leaves the seat count untouched. The application never binds a TCP port; it pulls HTTP requests off a queue and publishes replies back. And ferrite check refuses Rust code that rustc compiles without complaint.

Each of those behaviors comes from the same premise: the platform controls the boundary around every application so the code inside stays small, auditable, and safe under retries and concurrency. The eight lessons use the yoga studio you already built as a working reference and trace the full path from source submission to runtime isolation:

LessonTopic
1Source deployment, the single-dependency rule, and services injected at startup
2Gateway routing, queue-backed request envelopes, and header forwarding
3Guarded atomic writes that stay accurate across retries and concurrent races
4Storage, ingress, timeout, expiry, concurrency, and account bounds that shape design
5What happens across each stage of a deployment
6What the admission gate rejects and where local checks differ from remote checks
7Isolation between applications, secrets held by the runtime, and the authorization rules that remain in your code
8Reference to the services a Ferrite app can bind

Nothing new needs to be installed. Keep your local studio directory open, because several lessons have you inspect a function in it or run CLI commands against it. The first command is ferrite test in lesson 3. Once you have finished all eight lessons, the customer-identity project at the end of Let a customer’s assistant book a class is a direct next step: it puts lesson 7’s application authorization boundary to work on the same codebase.

Prerequisites

  • The yoga studio from Build a booking app with Alloy, or another app created with ferrite new
  • Rust basics
  • The Ferrite CLI, logged in to a Ferrite account, for commands that query the platform such as ferrite check --remote
  • Your local copy of that project. Several lessons inspect and test it locally, and lesson 5 walks through deploying it again if you want a running copy.

Syllabus

  1. 1What runs when you deployWhy Ferrite compiles applications from admitted source with a single SDK dependency, and how declared services and secrets enter AppContext at startup.
  2. 2How a request reaches your codeHow Ferrite's gateway turns public HTTP traffic into queue messages, filters headers, enforces ingress bounds, and dispatches five route kinds.
  3. 3Writes that survive retriesWhy requests arrive more than once on a queue-backed platform, and how the studio commits a seat count, booking record, and request marker in one guarded atomic write.
  4. 4Limits that change your designThe storage, queue, ingress, timeout, expiry, concurrency, and account bounds that shape how you architect a Ferrite application from the first version.
  5. 5What happens during a deployHow ferrite deploy validates source, records a local deploy journal, compiles on the platform, handles interruptions, and preserves application state.
  6. 6What the gate refusesThe source rules every Ferrite application obeys, the error codes the admission gate reports, and where local checks differ from platform checks.
  7. 7What an app can reachHow ferrite.json bounds every service, route, header, and outbound destination an application can touch, and how the host enforces containment at runtime.
  8. 8Optional: services referenceEvery service binding available on AppContext, its async client contract, binding-free context methods, and re-exported SDK crates.

Begin with the first lesson to start this course.

1What runs when you deploy

Start course

Ferrite counts page views on this site. Privacy · Terms