this post was submitted on 10 Sep 2023
166 points (100.0% liked)
Programmer Humor
421 readers
23 users here now
Welcome to Programmer Humor!
This is a place where you can post jokes, memes, humor, etc. related to programming!
For sharing awful code theres also Programming Horror.
Rules
- Keep content in english
- No advertisements
- Posts must be related to programming or programmer topics
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
To add, edge functions (powered by deno) are one of the bigger pain points of supabase. At least that's my own practical experience and the experience of quite a few others on their github (discussions and issues).
In my current project, I started of optimistically ("Should be doable, they say you feel right at home coming from nodejs!"), tried rewriting some existing nodejs code and use edge functions just like your average nodejs powered serverless functions.
But in the end, things just didn't work out:
crypto
module just wasn't up to scratch yet re nodejs compatibility (for my rather humble needs)--no-npm
flag re its use of "deno deploy runtime", which meansnode:
specifiers for imports aren't supportedIn the end I changed my architecture yet again, moved most of the code to an expressjs backend and only use edge functions as a kind of "tender" proxy layer with minimal dependencies (mostly just deno and some
esm.sh
imports; e.g.supabase-js
).Don't get me wrong, supabase overall is a great thing and they do many things well! I'm still using them going forward. But edge functions just have the potential for being such a pain point in a project and many have already wished for also having the option for "classic" serverless functions.
Yeah, I really wish they’d gone a different way, it’s rough. I think they went the way they did because of the control they have over the run time environment, the ability to disable so much like writing to disk through flags makes it really easy for them to “trust” the edge functions, but man deno is rough.