Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Support DurableObjects #207

Open
2 tasks done
mattboardman opened this issue Dec 27, 2024 · 0 comments
Open
2 tasks done

[FEATURE] Support DurableObjects #207

mattboardman opened this issue Dec 27, 2024 · 0 comments
Labels
enhancement New feature or request triage

Comments

@mattboardman
Copy link

Is your feature request related to a problem?

Currently the documentation suggests using another worker for RPC services and DurableObjects. link

There isn't a documented way to bring the DurableObject into the same worker of a nextjs service.

Describe the solution you'd like

Ideally we can add/import DurableObject classes to an index.ts file in the src/ directory and have those made available in the bundle's worker.js file upon build. This would reduce the need for multiple workers to host a nextjs site with access to DO's. I imagine there would also be performance and latency gains as well (but I don't know enough about the RPC protocol to make that claim for sure).

Describe alternatives you've considered

The alternative right now is to build multiple workers and delegate RPC Services and DurableObject code to those workers.

@opennextjs/cloudflare version

0.3.0

Additional context

No response

Before submitting

  • I have checked that there isn't already a similar feature request
  • This is a single feature (not multiple features in one request)
@mattboardman mattboardman added enhancement New feature or request triage labels Dec 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request triage
Projects
None yet
Development

No branches or pull requests

1 participant