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

open-runtimes preset #2449

Open
1 task done
Sandros94 opened this issue May 17, 2024 · 4 comments
Open
1 task done

open-runtimes preset #2449

Sandros94 opened this issue May 17, 2024 · 4 comments

Comments

@Sandros94
Copy link

Sandros94 commented May 17, 2024

Describe the feature

Recently I've discovered open-runtimes, used under the hood by Appwrite:

Runtime environments for serverless cloud computing for multiple coding languages, aiming to create a consistent and predictable open standard for writing cloud functions in containerized systems.

I was looking for building a custom nitro worker-preset, but I have no idea where to start. The runtime accepts a context argument (Bun's one for reference) and I imagine that it is about mapping the request information to what nitro accepts and then the nitro return to the response one? But then how could I catch server logs?

I'm farily new to this topic, so I hope I'm not mixing up things. My endgoal was to experiment with Nuxt on open-runtimes

Additional information

  • Would you be willing to help implement this feature?
@pi0
Copy link
Member

pi0 commented May 17, 2024

As i undrestand correctly, they essentially provide docker image for Node? What would be benefit of supporting this project as a preset?

(update, i see this example it is docker+node+micro still wondering the benefit of doing this over simple docker+node)

@Sandros94
Copy link
Author

As i undrestand correctly, they essentially provide docker image for Node?

More or less yes. Basically that project started for the need of Appwrite to handle the full Continuous Delivery of serverless functions. Basically Appwrite provides a self-hostable one-stop shop for having a DB, Storage, Users and Serverless execution.

While that is great, I'm currently only interested in studying the use cases for the latter one. One of which is based on the concept of a self-hosted NuxtHub version, where I could have it deployed on a personal docker/k8s instance (like a homelab) alongside open-runtimes that handles both deployment and execution.
Bootstrapping a project would only require adding its repo to your instance of NuxtHub (via GitHub App), pushing a commit and watching the logs go.

There are a number of proprietary projects that already do this, but I much enjoy the goal of open runtimes being an open standard in handling serverless functions both in deployments and execution. In particular for personal projects and non-business critical work.

P.S.: I hope I didn't sound too confusing. As I said, I'm still experimenting in this topic. But while I'm loving NuxtHub+Cloudflare, I find myself thinking too many times about not wasting precious client's quota when deploying a non-optimized personal test. Something I just don't care when I'm on my old core duo quad server just to show something to my mom (IMHO developer's best reviewer)

@pi0
Copy link
Member

pi0 commented May 17, 2024

Okay thanks for the context. BTW i plan to open source a similar solution for js servers but it is way lighter than what seems they do and better tailored for nitro.

I'm not against adding this preset but if your purpose is mainly to study possibilities, i would suggest using a custom preset in your project.

@Sandros94
Copy link
Author

Okay thanks for the context. BTW i plan to open source a similar solution for js servers but it is way lighter than what seems they do and better tailored for nitro.

I'll be happy to check it out once you do!

I'm not against adding this preset but if your purpose is mainly to study possibilities, i would suggest using a custom preset in your project.

Indeed, or at least until I have both a clear view of its capabilities and their status in the road map (in particular k8s support and auto scaling). Currently I see it more like a community preset, may I ask you if you could point me into the direction on how I should build the custom preset? Should I simply extend the node preset and map the context requests to nitro?

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

No branches or pull requests

2 participants