Cloudflare changelogs | Developer platform
Cloudflare changelogs for Developer platform products
马上订阅 Cloudflare changelogs | Developer platform RSS 更新: https://developers.cloudflare.com/changelog/rss/developer-platform.xml
Durable Objects, Workers - @cloudflare/actors library - SDK for Durable Objects in beta
The new @cloudflare/actors library is now in beta!
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. With beta usage 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.
The name "actors" originates from the actor programming model, which closely ties to how Durable Objects are modelled.
The @cloudflare/actors library includes:
- Storage helpers for querying embeddeded, per-object SQLite storage
- Storage helpers for managing SQL schema migrations
- Alarm helpers for scheduling multiple alarms provided a date, delay in seconds, or cron expression
Actorclass for using Durable Objects with a defined pattern- Durable Objects Workers API is always available for your application as needed
Storage and alarm helper methods can be combined with any Javascript class that defines your Durable Object, i.e, ones that extend DurableObject including the Actor class.
import { Storage } from "@cloudflare/actors/storage";
export class ChatRoom extends DurableObject<Env> { storage: Storage;
constructor(ctx: DurableObjectState, env...剩余内容已隐藏
查看完整文章以阅读更多Cloudflare changelogs | Developer platform
Cloudflare changelogs for Developer platform products
马上订阅 Cloudflare changelogs | Developer platform RSS 更新: https://developers.cloudflare.com/changelog/rss/developer-platform.xml
Durable Objects, Workers - @cloudflare/actors library - SDK for Durable Objects in beta
The new @cloudflare/actors library is now in beta!
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. With beta usage 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.
The name "actors" originates from the actor programming model, which closely ties to how Durable Objects are modelled.
The @cloudflare/actors library includes:
- Storage helpers for querying embeddeded, per-object SQLite storage
- Storage helpers for managing SQL schema migrations
- Alarm helpers for scheduling multiple alarms provided a date, delay in seconds, or cron expression
Actorclass for using Durable Objects with a defined pattern- Durable Objects Workers API is always available for your application as needed
Storage and alarm helper methods can be combined with any Javascript class that defines your Durable Object, i.e, ones that extend DurableObject including the Actor class.
import { Storage } from "@cloudflare/actors/storage";
export class ChatRoom extends DurableObject<Env> { storage: Storage;
constructor(ctx: DurableObjectState, env...剩余内容已隐藏
查看完整文章以阅读更多