Live data from Hacker News

Netlify Edge Functions: A new serverless runtime powered by Deno

netlify.com

151–160 of 166 posts

Re: Netlify Edge Functions: A new serverless runtime powered by Deno

#151
post #15

Earlier quoted context omitted.

Thanks! Any useful pros and cons vs Cloudflare Workers?

One of the big reasons for going with Deno is that it's an open runtime closely based on web standards. You can download the open source Deno Cli and all code written for our edge layer will run exactly the same there. As more and more front-end frameworks starts leaning in on running part of their code at the edge, we felt it was important to champion and open, portable runtime for this layer vs a proprietary runtim…

Hm yes, the fact I can't run Cloudflare Workers somewhere else is a worry. Fair point.

Re: Netlify Edge Functions: A new serverless runtime powered by Deno

#152
post #13

Earlier quoted context omitted.

> Use cases > A bunch of server functionality Why is that the use case? I don't see how an edge function can be faster than a centralized server endpoint if it has to reach out to literally any other component of the system involved in auth / persistence

You are replying to a message that very explicitly didn't say "A bunch of server functionality". Specifically, it said: > Custom authentication You can most definitely authenticate requests based on signed tokens and the like, meaning you don't necessarily need to reach any other component in the system. > personalize ads Same here. You can most definitely pick different adds depending on some cookie value or such, n…

> You are replying to a message that very explicitly didn't say "A bunch of server functionality".

Right, let's see...

> You can most definitely authenticate requests based on signed tokens and the like

Sure, you can, you just have to give up the ability ever invalidate tokens

> personalize ads

How can this not just be done on the client?

> localize content

How can this not just be done on the client?

> intercept and transform requests

How can I implement redirections and security headers here? What context does the Edge function have to do something meaningful here that couldn't have been done on the client?

> perform split tests

I would prefer to serve my static content from static content hosts with caching capabilities, not Edge functions

I am saying this: Edge functions and serverless are loss-leaders for cloud vendors to get you to integrate deeply into their systems. Using them for their tiny, imperceptible gains in the face of the massive engineering efforts (complexity) and risk of vendor lock-in is ridiculous. These use-cases do not justify binding yourself to a cloud vendor.

Re: Netlify Edge Functions: A new serverless runtime powered by Deno

#153
post #118

Earlier quoted context omitted.

We're building PolyScale[1] to address this problem. PolyScale is a serverless edge cache for databases so you can easily distribute your reads. We are opening up early access to our connection pooling features in the next couple of weeks which allows FaaS platforms like Netlify, Cloudflare etc to create large numbers of ephemeral connections, without impacting your origin database, as well as reducing connection lat…

I was looking at the polyscale docs and found following PolyScale evaluates each SQL query in real-time and when it detects a DML query i.e. a SQL INSERT, UPDATE or DELETE, it extracts the associated tables for the query. Then, all data for the table(s) in question are purged from the cache, for every region globally. at https://docs.polyscale.ai/how-does-it-work/#smart-invalidati... Isn't clearing cache for entire t…

That’s right. Currently the auto invalidation is somewhat of a blunt instrument in that it will blow away all cache data related to the table(s) as default. That approach favors consistency over performance, but is also a natural fit to some query traffic patterns. You can also switch it off if you so desire. The next iteration that is imminent for release can be much more surgical, invalidating based on more of the query details.

Connection pooling docs are coming soon as part of the feature early access launch. Feel free to drop me an email and I can let you know when its released. Im ben at our domain.

Re: Netlify Edge Functions: A new serverless runtime powered by Deno

#154
post #145

Earlier quoted context omitted.

How would you convince people to go with you over Cloudflare Sites, Vercel, Netlify etc? Is the pitch "we do what they do, but less" compelling?

I’d position it as “we do exactly what needs to be done: push, build, deploy” and talk to the benefits of deploying static websites without all the complexity of edge functions and the complicated pricing that goes with it. I’d also speak to the idea that the service is shooting for longevity and stability by not adding a bunch of whiz bang stuff needed to justify PM salaries or impress VCs that will be sunset later.

FWIW, we've been building this exact thing over at Read the Docs for the past 11 years :)

* https://docs.readthedocs.io/en/latest/about.html * https://docs.readthedocs.io/en/latest/story.html

Historically we've only supported Sphinx & Mkdocs, but we're looking to expand into serving all docs tooling with a versioned URL scheme, and search indexing & backend API's that are docs specific.

Re: Netlify Edge Functions: A new serverless runtime powered by Deno

#155
post #149

Earlier quoted context omitted.

This isn't only for googlebot but Twitterbot, slackbot, facebookbot and [fill-in-blank]bot that fetch your page to generate a url preview in their app when links from your domain are shared.

If that's your concern it probably makes more sense to just be server-rendering at that point

My main concern is cost. Cloudflare workers are free.

Re: Netlify Edge Functions: A new serverless runtime powered by Deno

#156
post #142

Earlier quoted context omitted.

Really, really dumb question. I've seen a lot of node/python/etc serverless offerings. Is there something where you just provide a binary and its executed each time? For example, I write a simple single responsibility piece of code in Go `add_to_cart.go` and build it, deploy it, and somehow map it to some network request. dot slash pass args, and return the result? No need to have containers or runtime?

This is exactly what we are building at TinyFunction.com Just write your function code in Javascript or Python in the browser and click deploy to get a URL. Take a look at https://TinyFunction.com Appreciate any suggestions or feedback.

Site no loading on my phone. Just a white screen with a green comment button. That’s really cool though that you’re going to build something like that, wish you all the best!

Re: Netlify Edge Functions: A new serverless runtime powered by Deno

#157

Earlier quoted context omitted.

Thanks! Any useful pros and cons vs Cloudflare Workers?

Workers can have persistent storage attached to them (as a KV store), I can't see whether this has anything similar.

Yes - that is really good.

Re: Netlify Edge Functions: A new serverless runtime powered by Deno

#158

Earlier quoted context omitted.

Workers can have persistent storage attached to them (as a KV store), I can't see whether this has anything similar.

Also Workers can talk to Durable Objects which is super nice

Yes, and I love the minimal pricing of both. Just paying for real compute time; even calling an API pauses the pricing while it waits for a response.

Re: Netlify Edge Functions: A new serverless runtime powered by Deno

#159
post #5

This is great news. I'm really rooting for a successful trend of Serverless runtimes, mainly as a weapon against rising cloud deployment costs. While the general trend today is to back the serverless environment with Javascript runtimes (Cloudflare runs its edge on top of V8, Netlify uses deno, most other serverless runtimes use nodejs), I'm optimistic that WebAssembly will take over this space eventually, for a bunc…

You can write Cloudflare Workers in WASM today.

As far as I can tell from the outside, that's still "WASM-called-by-Javascript", and many of their JS optimizations don't work the same way. E.g. if a Worker calls JS `fetch` and returns that `Response`, they recognize that and remove the JS from the data path; same is not true for WASM at this time.

Re: Netlify Edge Functions: A new serverless runtime powered by Deno

#160
post #5

This is great news. I'm really rooting for a successful trend of Serverless runtimes, mainly as a weapon against rising cloud deployment costs. While the general trend today is to back the serverless environment with Javascript runtimes (Cloudflare runs its edge on top of V8, Netlify uses deno, most other serverless runtimes use nodejs), I'm optimistic that WebAssembly will take over this space eventually, for a bunc…

You can write Cloudflare Workers in WASM today. As far as I can tell from the outside, that's still "WASM-called-by-Javascript", and many of their JS optimizations don't work the same way. E.g. if a Worker calls JS `fetch` and returns that `Response`, they recognize that and remove the JS from the data path; same is not true for WASM at this time.

I think that optimization should still work when using Wasm, unless the Wasm code does something silly like manually pump the stream (read from one, write to the other), but I think you'd have to go out of your way to do that, and anyway the same is true of pure-JavaScript code.
Post reply on HN