|
1 | 1 | --- |
2 | | -title: @cloudflare/actors library: SDK for Durable Objects in alpha |
| 2 | +title: @cloudflare/actors library: SDK for Durable Objects in beta |
3 | 3 | description: @cloudflare/actors library with Durable Objects helpers and patterns. |
4 | 4 | products: |
5 | 5 | - durable-objects |
6 | 6 | - workers |
7 | 7 | date: 2025-06-25T06:00:00Z |
8 | 8 | --- |
| 9 | +The new [@cloudflare/actors](https://www.npmjs.com/package/@cloudflare/actors) library is now in beta! |
9 | 10 |
|
10 | | -[@cloudflare/actors](https://www.npmjs.com/package/@cloudflare/actors) package is in alpha and provides a SDK for Durable Objects, in addition to Durable Objects [Workers API](https://developers.cloudflare.com/durable-objects/api/base/). "Actors" originates from the [actor programming model](/durable-objects/what-are-durable-objects/#actor-programming-model), which is a close analogy for Durable Objects. |
| 11 | +The `@cloudflare/actors` library is a new SDK for Durable Objects, and provides a powerful set of abstractions for building real-time, interactive, and multiplayer applications on top of Durable Objects even easier. With beta uasge and feedback, `@cloudflare/actors` will become the recommended way to build on Durable Objects and draws upon Cloudflare's experience building products/features on Durable Objects. |
11 | 12 |
|
12 | | -For alpha, `/actors` library includes: |
| 13 | +The name "actors" originates from the [actor programming model](/durable-objects/what-are-durable-objects/#actor-programming-model), which closely ties to how Durable Objects are modelled. |
13 | 14 |
|
14 | | -* Storage helpers for using embeddeded, per-object SQLite storage, including SQL schema migrations and query template literals |
| 15 | +The `@cloudflare/actors` library includes: |
| 16 | + |
| 17 | +* Storage helpers for querying embeddeded, per-object SQLite storage |
| 18 | +* Storage helpers for managing SQL schema migrations |
15 | 19 | * Alarm helpers for scheduling multiple alarms provided a date, delay in seconds, or cron expression |
16 | 20 | * `Actor` class for using Durable Objects with a defined pattern |
| 21 | +* Durable Objects [Workers API](https://developers.cloudflare.com/durable-objects/api/base/) is always available for your application as needed |
17 | 22 |
|
18 | 23 | Storage and alarm helper methods can be combined with [any Javascript class](https://github.com/cloudflare/actors?tab=readme-ov-file#storage--alarms-with-durableobject-class) that defines your Durable Object, i.e, ones that extend `DurableObject` including the `Actor` class. |
19 | 24 |
|
@@ -44,7 +49,7 @@ export class ChatRoom extends DurableObject<Env> { |
44 | 49 | } |
45 | 50 | ``` |
46 | 51 |
|
47 | | -`/actors` library introduces the `Actor` class pattern. `Actor` lets you access Durable Objects without writing the Worker that communicates with your Durable Object (the Worker is created for you). By default, requests are routed to a Durable Object named "default". |
| 52 | +`@cloudflare/actors` library introduces the `Actor` class pattern. `Actor` lets you access Durable Objects without writing the Worker that communicates with your Durable Object (the Worker is created for you). By default, requests are routed to a Durable Object named "default". |
48 | 53 |
|
49 | 54 | ```js |
50 | 55 | export class MyActor extends Actor<Env> { |
@@ -73,4 +78,4 @@ export class MyActor extends Actor<Env> { |
73 | 78 | export default handler(MyActor); |
74 | 79 | ``` |
75 | 80 |
|
76 | | -For more examples, check out the library [README](https://github.com/cloudflare/actors?tab=readme-ov-file#getting-started). `/actors` library is a place for more helpers and built-in patterns, e.g. retry handling and websocket helpers, to reduce development overhead for common Durable Objects functionality. Please share feedback and what more you would like to see on our [Discord channel](https://discord.com/channels/595317990191398933/773219443911819284). |
| 81 | +For more examples, check out the library [README](https://github.com/cloudflare/actors?tab=readme-ov-file#getting-started). `@cloudflare/actors` library is a place for more helpers and built-in patterns, like retry handling and Websocket-based applications, to reduce development overhead for common Durable Objects functionality. Please share feedback and what more you would like to see on our [Discord channel](https://discord.com/channels/595317990191398933/773219443911819284). |
0 commit comments