Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Available Services

KV (Key-Value Store)

Key-value storage for simple data persistence.

Status: TBA

Planned API

# Store a value
Uzumibi::KV.put("user:123", "John Doe")

# Retrieve a value
name = Uzumibi::KV.get("user:123")  # => "John Doe"

# Delete a value
Uzumibi::KV.delete("user:123")

# Check if key exists
exists = Uzumibi::KV.exists?("user:123")  # => true/false

# List keys with prefix
keys = Uzumibi::KV.list(prefix: "user:")  # => ["user:123", "user:456"]

Platform Mapping

PlatformImplementation
Cloudflare WorkersWorkers KV
Fastly ComputeFastly KV Store
SpinSpin KV Store
Cloud RunTBA

Cache

HTTP caching layer for response caching.

Status: TBA

Planned API

# Store in cache
Uzumibi::Cache.put(
  "cache-key", 
  response_body,
  ttl: 3600  # seconds
)

# Retrieve from cache
cached = Uzumibi::Cache.get("cache-key")

# Delete from cache
Uzumibi::Cache.delete("cache-key")

# Clear all cache
Uzumibi::Cache.clear

Platform Mapping

PlatformImplementation
Cloudflare WorkersCache API
Fastly ComputeEdge Cache
SpinTBA
Cloud RunTBA

Secret

Secure storage for API keys, tokens, and sensitive configuration.

Status: TBA

Planned API

# Access secrets
api_key = Uzumibi::Secret.get("API_KEY")
db_password = Uzumibi::Secret.get("DB_PASSWORD")

Platform Mapping

PlatformImplementation
Cloudflare WorkersEnvironment Variables / Secrets
Fastly ComputeSecret Store
SpinSpin Variables
Cloud RunSecret Manager

ObjectStore

Object storage for files and binary data.

Status: TBA

Planned API

# Upload object
Uzumibi::ObjectStore.put(
  "images/photo.jpg",
  image_data,
  content_type: "image/jpeg"
)

# Download object
image_data = Uzumibi::ObjectStore.get("images/photo.jpg")

# Delete object
Uzumibi::ObjectStore.delete("images/photo.jpg")

# List objects
objects = Uzumibi::ObjectStore.list(prefix: "images/")

Platform Mapping

PlatformImplementation
Cloudflare WorkersR2
Fastly ComputeTBA
SpinTBA
Cloud RunCloud Storage

Queue

Message queue for asynchronous task processing.

Status: TBA

Planned API

# Send message to queue
Uzumibi::Queue.send(
  "notifications",
  { user_id: 123, message: "Hello" }
)

# Consume messages (in queue consumer handler)
Uzumibi::Queue.on_message do |message|
  # Process message
  user_id = message[:user_id]
  # ...
end

Platform Mapping

PlatformImplementation
Cloudflare WorkersQueue (Workers for Platforms)
Fastly ComputeTBA
SpinTBA
Cloud RunCloud Tasks / Pub/Sub

SQL

SQL database access.

Status: TBA

Planned API

# Execute query
results = Uzumibi::SQL.query(
  "SELECT * FROM users WHERE id = ?",
  [123]
)

# Execute update
affected = Uzumibi::SQL.execute(
  "UPDATE users SET name = ? WHERE id = ?",
  ["New Name", 123]
)

# Transaction support
Uzumibi::SQL.transaction do |tx|
  tx.execute("INSERT INTO users (name) VALUES (?)", ["Alice"])
  tx.execute("INSERT INTO logs (action) VALUES (?)", ["user_created"])
end

Platform Mapping

PlatformImplementation
Cloudflare WorkersD1
Fastly ComputeTBA
SpinSQLite
Cloud RunCloud SQL

Fetch

HTTP client for making requests to external APIs.

Status: TBA

Planned API

# GET request
response = Uzumibi::Fetch.get("https://api.example.com/data")
data = JSON.parse(response.body)

# POST request
response = Uzumibi::Fetch.post(
  "https://api.example.com/users",
  body: JSON.generate({ name: "Alice" }),
  headers: {
    "Content-Type" => "application/json",
    "Authorization" => "Bearer #{token}"
  }
)

# Full request
response = Uzumibi::Fetch.request(
  method: "PUT",
  url: "https://api.example.com/resource",
  headers: { "Content-Type" => "application/json" },
  body: JSON.generate({ data: "value" })
)

Platform Mapping

PlatformImplementation
Cloudflare Workersfetch() API
Fastly ComputeBackend requests
SpinOutbound HTTP
Cloud RunHTTP client

Others

Additional services being considered:

  • Analytics: Request analytics and metrics
  • Logging: Structured logging
  • Tracing: Distributed tracing
  • Email: Email sending
  • Websockets: WebSocket connections (platform-dependent)