Live data from Hacker News

Supabase Edge Runtime: Self-Hosted Deno Functions

supabase.com

91–100 of 105 posts

Re: Supabase Edge Runtime: Self-Hosted Deno Functions

#91
post #90
post #88

Earlier quoted context omitted.

Can you share some examples where the tooling fell short?

https://github.com/orgs/supabase/discussions/8779 That one lol. Are there any solid reasons to not support other runtimes? Appwrite for example supports Nodejs.

This looks like you're complaining that your development environment is not configured to work with Deno and is instead configured to process typescript files for a completely different runtime? Deno's tooling is top notch. The fact that most developers' systems are all setup for Node or some Node-based compilation step is hardly the fault of Deno.

Editors in general are still figuring how to have and manage configuration that is flexible enough for different language servers, linters, formatters, test runner, debuggers, etc. It's not really fair to either Deno or even your editor, though your editor is clearly more "at fault" in this scenario.

Re: Supabase Edge Runtime: Self-Hosted Deno Functions

#92
post #90
post #88

Earlier quoted context omitted.

Can you share some examples where the tooling fell short?

https://github.com/orgs/supabase/discussions/8779 That one lol. Are there any solid reasons to not support other runtimes? Appwrite for example supports Nodejs.

Added a comment in the discussion [1] with a video and a quickstart guide on how you can configure VSCode to work with Deno. Let's continue the discussion there in case those steps don't work for you.

With respect to supporting other runtimes, it mostly comes down to focussing on providing a great experience with one runtime first. And based on your feedback, we still have some work to do there.

[1] https://github.com/orgs/supabase/discussions/8779#discussion...

Re: Supabase Edge Runtime: Self-Hosted Deno Functions

#93

Earlier quoted context omitted.

I'm afraid you're trying to make system administration look much harder than it actually is. As an example, adding good defaults to your nginx config is automated by certbot, or you could use caddy. You could run your apps statelessly by containerizing your applications or by simply writing Ansible playbooks and then not have to worry about upgrades - you simply deploy the application on the new server and spin down…

> simply writing Ansible playbooks As someone who has been doing this for some years now, it is not simple. To be fair, you can write a simple Ansible playbook if Ansible isn't doing much for you. But if you're using Ansible to manage things which are themselves not simple (like "just install a Node runtime please") you are at the mercy of whatever shell script Ansible eventually ends up calling. I've been through Ub…

If you stick to shipping containers it gets rid of 99% of these problems at the cost of some extra storage for the N copies of runtimes. Then your base infrastructure is reduced to “something that runs containers” which can be anything from vanilla docker, to docker-compose, to one of the many diy-PaaS platforms, to a full blown k8s cluster.

Re: Supabase Edge Runtime: Self-Hosted Deno Functions

#94
post #63
post #35

Earlier quoted context omitted.

Great work! I've been dabbling with deno for a couple years now, one of the most powerful features I'm excited about is BroadcastChannel[1] support, which works with --unstable in Deno Deploy. One of the challenges I've run into is debugging timeouts in deno deploy, so I'm curious-- 1. is BroadcastChannel supported in supabase self-hosted edge functions? 2. is there more tooling available to supabase edge functions t…

[Supabase engineer & author of the blog post here.] Thanks! Good Questions 1. We haven't enabled BroadcastChannel in the Edge Runtime. Mainly because we haven't found good use cases for it within Edge Functions (it does make sense as a way to subscribe within a browser client, but not sure how it fits with async/short-lived nature of Edge Functions). Curious about how you plan to use BroadcastChannel in Edge Function…

Thanks Lakshan!

I don't think my use-case is necessarily a good fit for edge functions. I am trying to achieve what Supabase realtime/multiplayer accomplishes, but generically. I participate informally with the https://braid.org IETF working group, which to over-simplify is CRDTs over HTTP with subscriptions.

I'm interested in web standards and that's what's drawn me to deno, so I'm super excited the more and more I see it being adopted. BroadcastChannel piques my interest because it is perfectly in that gray area of standardization-- it makes total sense on the client and we're on the cusp of discovering what that could look like for servers.

In deno deploy, all the instances of my service are able to be linked together by BroadcastChannel, which I'm viewing as a p2p-style architecture. Ultimately, I'm curious about how this works under the hood and if it would be possible to interoperate a BroadcastChannel between Deno Deploy, Supabase, and say a Raspberry Pi in my house.

I've gone on a bit of a tangent, but I think maybe I should get involved with the WinterCG, since now that I'm putting my thoughts to words-- seems like it fits their charter.

Re: Supabase Edge Runtime: Self-Hosted Deno Functions

#95

Earlier quoted context omitted.

> I keep seeing missing critical features in Postgrest > Example: https://github.com/PostgREST/postgrest/issues/915 > while there isn’t much action on existing issues. That one is planned but it's not high priority because it can be solved already with SQL functions[1][2] in a flexible and secure way(GROUP BY is an expensive operation, it cannot be exposed to the frontend just like that). I do get that some convenien…

Thanks for the response Steve. In general, I unfortunately don’t agree that this is a “convenience” feature or that this alternative you brought up is “flexible”. This way of doing things is just so much more painful in terms of ergonomics we elected to instead escape hatch into raw SQL with a different library (Sequelize) in our case. Black boxing some of our business logic into views or RPC is just not something de…

Thanks for the honest feedback!

There's definitely a lot to improve upon. Not only on features but in documentation as you mention.

I'll revisit this issue after launch week.

Re: Supabase Edge Runtime: Self-Hosted Deno Functions

#96

hey hn, supabase ceo here This is a webserver for Deno. It is MIT licensed, written in Rust, and based on the latest Deno Runtime (1.32+). It can serve TypeScript, JavaScript, and WASM functions. This one is important for local development and self-hosting. For local development, it ensures there is parity between development and production. For self-hosting, it means you can deploy and manage your Deno Functions on…

One of the biggest annoyances with Deno deploy/functions is that there is no way to store any data. This would be very useful to e.g. cache an auth token, store a key/value pair, etc. See also: https://github.com/denoland/deploy_feedback/issues/110

Is any work being done to fix this? Or is this out of scope currently?

Re: Supabase Edge Runtime: Self-Hosted Deno Functions

#97

hey hn, supabase ceo here This is a webserver for Deno. It is MIT licensed, written in Rust, and based on the latest Deno Runtime (1.32+). It can serve TypeScript, JavaScript, and WASM functions. This one is important for local development and self-hosting. For local development, it ensures there is parity between development and production. For self-hosting, it means you can deploy and manage your Deno Functions on…

One of the biggest annoyances with Deno deploy/functions is that there is no way to store any data. This would be very useful to e.g. cache an auth token, store a key/value pair, etc. See also: https://github.com/denoland/deploy_feedback/issues/110 Is any work being done to fix this? Or is this out of scope currently?

Yes, this is something we are exploring for Edge Runtime. One cool development is AsyncLocalStorage now works on Deno via a polyfill [0]. We may enable a single node store on Edge Runtime using this. Also, there are some interesting development in Supabase platform to enable Edge Databases, which could also be an answer to this.

[0] https://github.com/denoland/deno/issues/7010#issuecomment-14...

Re: Supabase Edge Runtime: Self-Hosted Deno Functions

#98
post #94
post #63

Earlier quoted context omitted.

[Supabase engineer & author of the blog post here.] Thanks! Good Questions 1. We haven't enabled BroadcastChannel in the Edge Runtime. Mainly because we haven't found good use cases for it within Edge Functions (it does make sense as a way to subscribe within a browser client, but not sure how it fits with async/short-lived nature of Edge Functions). Curious about how you plan to use BroadcastChannel in Edge Function…

Thanks Lakshan! I don't think my use-case is necessarily a good fit for edge functions. I am trying to achieve what Supabase realtime/multiplayer accomplishes, but generically. I participate informally with the https://braid.org IETF working group, which to over-simplify is CRDTs over HTTP with subscriptions. I'm interested in web standards and that's what's drawn me to deno, so I'm super excited the more and more I…

Yep, that sounds interesting. Feel free to share with us if you write a formal proposal. Would love to explore the options to provide better worker-to-worker communication options.

Re: Supabase Edge Runtime: Self-Hosted Deno Functions

#99

does any one have good practical experience running Supabase locally? Its against their business model to have this run well so I'm a bit scared of the growing lock-in. (P.S. if Supabase is listening some customers like myself would be willing to pay a significant amount for support in a kubernetes/docker deployment running on our servers. We currently pay $50k - $100k simply for enterprise support contracts for each…

I have run self hosted Supabase for awhile in Kubernetes. One of the main gotchas I will warn against is becoming too attached to the CLI, as it’s currently quite tied to assumptions that you’re using hosted Supabase. Also be prepared to do your own infra work if you want something scalable and production ready. The HA guarantees are kind of “bring your own” eg not really there out of the box and IMO the default dock…

On the Supabase team here as well.

Self-hosting is easier said than done. You can do it, but maintaining the infra, scaling, performance, security, updates, downtime, all of that is a _giant_ overhead. It's not against our business model for self-hosting to not work well. Everything we do is open-source and we don't "supplement" it with features from closed source code.

Re: Supabase Edge Runtime: Self-Hosted Deno Functions

#100

Earlier quoted context omitted.

Hi! Congratulations on the launch. I'm a big fan of what you folks are doing over there and I genuinely love your product. Would love to keep in touch to see when the changes to this will happen. Also speaking as a ceo & founder, my natural inclination is to keep that culture going, small and avoid hiring a PM as long as possible. As I reflect on my operating time, I wonder if it was a mistake not to find the right P…

> wonder if it was a mistake not to find the right Product Manager (sic) early so that they can be inoculated with the culture as we grow. That's an interesting thought. We do have some techies "acting" as PMs across the team, but i can see how we might one a dedicated person at some point. always open to chatting to other founders - feel free to reach out.

Interesting. I've never worked in a completely tech-led company before, but it seems like a good approach. My philosophy on it has changed a little: I used to think PM should be embedded in technical teams writing tickets, à la Scrum Product Owners, but now I think things function better when the team writes its tickets, and the PM works at a more general level: features, direction, marketing, legal, regulatory, etc etc.
Post reply on HN