Cloudflare Worker Adapter - Durable Objects
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 20.8k
- Forks
- 2.3k
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 156
Description
Is your feature request related to a problem? Please describe.
Cloudflare recently introduced the ability to maintain websocket connections with workers, in addition to a stateful storage solution called 'Durable Objects'. For workers, these objects are accessible through a env argument passed in during the fetch invocation. More information about durable objects and their utilization can be found here.
https://developers.cloudflare.com/workers/learning/using-durable-objects
Describe the solution you'd like
In my opinion, the cloudflare worker adapter should expose a way to mutate and interact with this env object passed in by cloudflare during a function invocation.
Describe alternatives you've considered
I have not found any alternate ways of using durable objects without modifying the adapter.
How important is this feature to you?
This feature is fairly important to me personally, since it would dramatically simplify my stack if my state coordination can be done in the same worker.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Cloudflare Worker adapter and the fetch invocation described in the issue, then read the linked Durable Objects documentation. Determine how the adapter can expose the invocation's env object, and consider the issue complete when callers can mutate and interact with Durable Objects through that exposed object.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- cloud
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100