Skip to content
Pasta Protocol

Pasta Protocol

Al dente consistency for your distributed systems

“‘A pasta nun aspetta a nisciuno.” — The pasta waits for no one. Neither does your distributed system. Build it right, build it al dente, build it with the wisdom of generations of Neapolitan cooks.

VersionConsensusDOC CertifiedNo Pineapple

Perche Pasta Protocol?

String-based message passing is fragile. You pick topic names by convention, match payloads by position, and maintain separate schemas that drift out of sync with every refactor.

Pasta Protocol takes a different approach. Every data type is a pasta shape — its structure defines its behaviour. Rigatoni for pipelines, ravioli for encapsulation, lasagna for layers. The shape of your data determines the shape of your system. Rename a field and the compiler catches it. No conventions to memorize, no schemas to keep aligned by hand.

The framework handles the rest: Byzantine-fault-tolerant consensus, pub/sub messaging, saga orchestration, and three-tier storage — all with the flavour of Napoli.

Core Features

Pesto Consensus

Distributed agreement, Ligurian-fast. Byzantine-fault tolerant as long as 2/3 of kitchens agree on the basil. Sub-millisecond on local clusters.

Ragu Napoletano

Long-running saga orchestration. Like nonna’s ragu: 6 hours minimum, no shortcuts, and it only gets better with time. Full compensating transaction support.

GarlicBreadcast

Pub/sub messaging that spreads to every node. Topic wildcards, typed generics, backpressure support. Vampires (and stale caches) beware.

Ravioli Encapsulation

Clean module boundaries. Each raviolo contains its own filling. No leaky abstractions, no soggy bottoms. Compile-time interface enforcement.

Mozzarella Cache

In-memory caching with three-tier fallback: hot (tavolo), warm (Redis), cold (PostgreSQL). Consistency guaranteed al dente.

Termometro

Health monitoring with /sono-vivo endpoints. Prometheus metrics, Grafana dashboards, and four-level severity from BRUSCHETTA to TERREMOTO.

DOC Certification

Built-in quality gates for your architecture. Patterns are certified DOC, DOCG, or IGT — just like Italian wines. pasta certifica validates your kitchen.

Florentine Typography

Two typography modes: Architect (Space Grotesk) for technical docs, Florentine (Cormorant Garamond) for literary content. Both coexist on the same site.

Quick Start

  1. Install the package

    Terminal window
    pnpm add pasta-protocol
  2. Write a .ricetta config

    kitchen.ricetta
    kitchen:
    name: "Casa Napoli"
    nodes: 3
    consensus: pesto
    cottura_timeout: 30s
  3. Create your first kitchen

    main.ts
    import { Kitchen } from 'pasta-protocol';
    const kitchen = await Kitchen.create('./kitchen.ricetta');
    kitchen.on('ready', () => console.log('La cucina e aperta!'));
    await kitchen.start();
  4. Publish your first message

    publish.ts
    import { GarlicBreadcast } from 'pasta-protocol';
    const bus = kitchen.breadcast;
    await bus.publish('orders.pizza', {
    type: 'margherita',
    size: 'napoletana',
    });
    // Every subscriber in the cluster receives it — garlic spreads everywhere.

Architecture at a Glance

ComponentPurposeKey Metaphor
KitchenCluster orchestratorThe restaurant kitchen — coordinates everything
FornoIndividual nodeEach oven — independently heated, centrally managed
GarlicBreadcastPub/sub messagingGarlic bread — spreads to everyone at the table
Pesto / Genovese / RaguConsensus protocolsRecipes — each with different cooking times and guarantees
DispensaStorage layerThe pantry — hot, warm, and cold storage tiers
TermometroHealth & monitoringKitchen thermometer — always know your temperature

Explore