STATEWAY

One store. Two wire protocols. At the edge.

DynamoDB and Cosmos DB APIs over the same documents — running on Cloudflare Durable Objects, not a home region.

Point a real SDK at the API

Production endpoint https://api.stateway.dev. Same item written with PutItem is readable as a Cosmos document.

import boto3

ddb = boto3.client(
    "dynamodb",
    endpoint_url="https://api.stateway.dev",
    region_name="us-east-1",
    aws_access_key_id=STATEWAY_AKID,
    aws_secret_access_key=STATEWAY_SECRET,
)

ddb.put_item(
    TableName="Orders",
    Item={
        "customerId": {"S": "acme"},
        "orderId": {"S": "o#1"},
        "total": {"N": "42.5"},
    },
)
import { CosmosClient } from "@azure/cosmos";

const client = new CosmosClient({
  endpoint: "https://api.stateway.dev",
  key: process.env.COSMOS_MASTER_KEY,
});

const { database } = await client.databases.createIfNotExists({ id: "shop" });
const { container } = await database.containers.createIfNotExists({
  id: "orders",
  partitionKey: { paths: ["/customerId"] },
});
await container.items.create({
  id: "ord-1",
  customerId: "acme",
  total: 42.5,
});

Access is invite-only today. You receive an access key (Dynamo) and/or a base64 master key (Cosmos). Full walkthrough: Getting started.

Same documents, both façades

Strong consistency inside a partition. Cross-partition writes use two-phase commit. Global indexes are eventually consistent — said plainly, not papered over.