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

any plans for supporting serverless support ? #258

Open
KMJ-007 opened this issue Apr 26, 2024 · 2 comments
Open

any plans for supporting serverless support ? #258

KMJ-007 opened this issue Apr 26, 2024 · 2 comments

Comments

@KMJ-007
Copy link

KMJ-007 commented Apr 26, 2024

i am trying to deploy my backend API with orchid to cloudflare workers, but i am getting some error, because of some library,

are there any plans for providing serverless support?

if yes, would like to contribute!

error:

image
@romeerez
Copy link
Owner

The plans totally depend on users (and a bit on my enthusiasm for implementing specific things), so since you want to have it, it definitely won't be quick to support this, but I'll look into it and will try to do what's possible.

The warning on your screenshot says "enable the "nodejs_compat" compatibility flag", add this to wrangler.toml (from docs):

node_compat = true

Of course, something else is going to fail then.

@romeerez
Copy link
Owner

I'd suggest Drizzle or Kysely for serverless because Drizzle is specially designed and optimized for serverless, and Kysely is lightweight by nature (not an ORM). For serveless, and for edge computing especially, it's important to use lightweight libraries, or even writing raw SQL, because it's very limited by memory and response ms.

I expect this to take a lot of time to optimize OrchidORM bundle sizes, to make it more modular and to allow loading only those modules that you need. For example, there is a module for full text search, you probably don't need it, and for serverless it's important to load only what you're going to use.

So, definitely, this isn't planned for the near future, I'd say that progress on this can be expected by the end of this year at best.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants