Technology

Cloudflare Unveils Durable Objects Facets

Cloudflare's new Durable Objects Facets feature allows AI-generated applications to manage persistent data, bridging the gap between dynamic code execution and stateful storage.

Daniel Singer

By Daniel Singer, Editor, StartupHub.ai

2 min read

Diagram illustrating Cloudflare Durable Objects Facets architecture
Cloudflare's Durable Objects Facets enable dynamic code to manage persistent state.Credit: Cloudflare

Cloudflare is expanding its serverless capabilities with the introduction of Durable Objects Facets, a new feature enabling dynamically loaded code to manage persistent state. This innovation addresses a key challenge for developers building sophisticated applications, particularly those leveraging AI agents.

Previously, Cloudflare's Dynamic Workers offered lightweight, on-demand execution akin to a secure 'eval()'. While ideal for single-use AI agent tasks, they lacked the ability to maintain long-term data. Conversely, Cloudflare's Cloudflare Durable Objects provided robust, globally unique instances with attached SQLite databases for fast, zero-latency storage, but required pre-defined code implementation.

Bridging the State Gap

Durable Objects Facets act as a bridge, allowing code loaded via Dynamic Workers to instantiate and manage its own Durable Object instance. This means an AI can now generate not just executable code, but also the persistent storage logic for an application.

The core concept involves a supervisor Durable Object that dynamically loads and instantiates another Durable Object class. This instantiated object, known as a 'facet,' receives its own isolated SQLite database, separate from the supervisor's storage.

This architecture provides granular control. Developers can implement logic in the supervisor to manage the creation and access of these facets, enabling features like rate limiting, billing, and enhanced observability for AI-generated applications.

The daily brief

Get the free daily brief with the day's AI news, new AI startups and funding rounds every morning.

Join 64,000 other subscribers.

How it Works

In practice, a developer writes a primary Durable Object (the supervisor) that handles requests. This supervisor uses the Dynamic Worker Loader API to load code provided by an AI or user. This loaded code then defines and exports a class that extends DurableObject, which the supervisor instantiates as a facet.

The facet then utilizes its dedicated SQLite database for storage via standard Durable Object APIs. This separation ensures that the dynamically loaded code operates within its own secure, stateful environment while being managed by the platform.

Cloudflare Dynamic Workers are now a more powerful tool for building complex applications.

The beta release of Durable Objects Facets is available now for users on the Workers Paid plan. This feature significantly enhances the potential for AI-driven application development on Cloudflare's platform, moving beyond simple task execution to full-fledged, stateful applications.

Mentioned in this story

Markets

CloudflareNYSE:NET

Sources

Get the free daily brief every morning

Every morning the day's AI news, new AI startups and new funding rounds. Free and takes a few minutes to read, unsubscribe at any time.

Join 64,000 other subscribers.

TopicsCloudflare WorkersDurable ObjectsServerlessAI DevelopmentDatabasesEdge ComputingDynamic WorkersDeveloper Tools

Daniel Singer

Written by

Daniel Singer

Editor, StartupHub.ai

Daniel Singer is the editor of StartupHub.ai, a technology expert and thought leader on AI and its applications across sectors, from fintech and healthcare to developer tooling and consumer software. He writes and tests the tools covered here thoroughly and regularly, and built StartupHub.ai to give founders, operators and buyers a clearer read on what they are actually being sold.

Test your Agent Readiness now

Paste your website. How well ChatGPT, Claude and the other agents can read and use a site, in about a minute, free.

Watch

The videos behind the news, one flip at a time

The feed mixes the videos from our articles with startup demos and you flip through them like TV channels for free with no signup.