It'd be great to see a performance breakdown comparing a standard node app (like you started with), a Deno-based app hosted on edge functions, and a node app converted to deno hosted on edge functions. I couldn't help but notice the vanilla, non-edge function responded in under 200ms locally, while the Deno-converted, edge function-hosted updated version had about 3x the response time. I know localhost response times don't necessarily have much bearing on production numbers, but I can't help but wonder... the difference between an API that responds in 200ms vs 600ms is huge.
That's not a Supabase thing; as you already said: one is just a local runtime, while the other is a full remote platform (deno runtime + edge wrapper + api-gateway + the internet + your connection). You want to compare locally "node yourscript.js" VS "deno yourscript.js"; that's the only thing that would make sense to benchmark (I suppose Deno will win hands down here). If you really want to (imho, unfairly) compare local with serverless you should first ensure that you are comparing against hot-start and not cold-start; because probably the 3x reasons time is mostly network latency. Also, ask yourself if your apps performance really matter the comparison and if there are other bottlenecks that are showing you down rather than the runtime (like DB or filesystem requests).
pretty sure nextjs does not work with Deno because it depends on certain Node.js APIs or packages that are not supported (yet). They are working on supporting them though.
@@Pictor13 the functions that make up Node's API are separate and distinct from Node itself. "Node" refers to the runtime, not the API. "Running Node in Deno" is a nonsense phrase at best..at worst it indicates a lack of understanding in the author which would indicate a lack of due diligence on Deno's part in vetting their social media manager
Isn't the support for npm packages coming from Deno, and more precisely newer Deno version. It's not your achievement. Your achievement is finally updating the Deno version. Now about that Deno version. What is actually the version of Deno. Where we can check that and please don't point me to logs and discord. How do I know what version I have to put for std and supabase-js.
Keep up with everything we are launching here: supabase.com/launch-week?
So I don't need to host my node app? Just deploy it to edge functions?
NPM support on Supabase Edge functions has been the most requested feature! So excited that it has landed!
Great video, I'd gladly watch a full Deno one ! Thanks !
Glad you enjoyed it! Will add it to the list! 🚀
I love this. Don’t even need to run npm install and still get the full power. Incredible work!
How the web has grown. Running Node in Deno, running Apache in Ngnix, running IIS in TomCat or even Supabase in Firebase. So cool so easy.
It's all turtles, all the way down! 🐢
Deno is awesome!
So easy now! And 10 minutes early. 🎉
Yeah, the Node compatibility is huge! 🚀
It'd be great to see a performance breakdown comparing a standard node app (like you started with), a Deno-based app hosted on edge functions, and a node app converted to deno hosted on edge functions.
I couldn't help but notice the vanilla, non-edge function responded in under 200ms locally, while the Deno-converted, edge function-hosted updated version had about 3x the response time.
I know localhost response times don't necessarily have much bearing on production numbers, but I can't help but wonder... the difference between an API that responds in 200ms vs 600ms is huge.
That's not a Supabase thing; as you already said: one is just a local runtime, while the other is a full remote platform (deno runtime + edge wrapper + api-gateway + the internet + your connection).
You want to compare locally "node yourscript.js" VS "deno yourscript.js"; that's the only thing that would make sense to benchmark (I suppose Deno will win hands down here). If you really want to (imho, unfairly) compare local with serverless you should first ensure that you are comparing against hot-start and not cold-start; because probably the 3x reasons time is mostly network latency.
Also, ask yourself if your apps performance really matter the comparison and if there are other bottlenecks that are showing you down rather than the runtime (like DB or filesystem requests).
I really like how you pointed out edge cases and then handled them. Solid thinking ahead for this video, and a great lesson as always. Thank you!
This is very useful 💪🏽🙏🏽
And the vid is supa well done 🆇
Thanks! Glad you enjoyed it! 🙌
Wonderful update, makes developing for Supabase way more powerful. Kudos!
Does this still need to be done like this or are there simpler options to use npm packages in deno now?
Looking forward to using npm packages with my next application 🐉💻
So I don't need to host my node app? Just deploy it to edge functions?
can we use Prisma with Supabase Edge function ?
So I have to manually update import_map.json if I want to use npm package? Or is there a better way?
this is crazy good! well done guys
How would this work with private npm repos?
I think that's a question for the guys from Deno, not from Supabase.
how would one do this with a vercel/nextjs setup with supabase
pretty sure nextjs does not work with Deno because it depends on certain Node.js APIs or packages that are not supported (yet). They are working on supporting them though.
How does one run Node, a JavaScript runtime, in Deno, also a JavaScript runtime?
Probably a wrapper to map Node calls to Deno core. Or they simply rewrote (copy paste & adapt) the Node core to link to Deno functionality.
@@Pictor13 the functions that make up Node's API are separate and distinct from Node itself. "Node" refers to the runtime, not the API. "Running Node in Deno" is a nonsense phrase at best..at worst it indicates a lack of understanding in the author which would indicate a lack of due diligence on Deno's part in vetting their social media manager
@@andrueanderson8637 "Write code that could be executed by a Node runtime in a Deno runtime" did not fit in the thumbnail or title 😆
@@JonMeyers That would actually be funny if there weren't any obvious alternatives. "Support for the Node API in Deno just got a whole lot better!"
this was the missing piece of the puzzle!
Isn't the support for npm packages coming from Deno, and more precisely newer Deno version. It's not your achievement. Your achievement is finally updating the Deno version. Now about that Deno version. What is actually the version of Deno. Where we can check that and please don't point me to logs and discord. How do I know what version I have to put for std and supabase-js.
🔥🎆