Live data from Hacker News

Netlify Edge Functions: A new serverless runtime powered by Deno

netlify.com

161–166 of 166 posts

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

#162

Earlier quoted context omitted.

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.

Ooh, that is great news. I've been itching to write a "proxy thing" in Rust instead of JS.

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

#163
post #103
post #57

Earlier quoted context omitted.

> There must be a better way? You're experiencing friction trying to use something in a way that it's supposed to not be used. (I.e., click-tracking by junking up URLs.) You could look for an answer, or you could take a step back, evaluate your expectations, and then decide not to do what you're trying to do.

Unfortunately this is an enormous business and asking them to stop all tracking is well outside of my remit.

At the end of the day, though, no matter how big the business is, it is the result of someone agreeing to fulfill their wishes.

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

#164
post #103
post #57

Earlier quoted context omitted.

> There must be a better way? You're experiencing friction trying to use something in a way that it's supposed to not be used. (I.e., click-tracking by junking up URLs.) You could look for an answer, or you could take a step back, evaluate your expectations, and then decide not to do what you're trying to do.

Unfortunately this is an enormous business and asking them to stop all tracking is well outside of my remit.

[deleted]

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

#165
post #13
post #6

Earlier quoted context omitted.

The first link in the article points to this: https://www.netlify.com/products/#netlify-edge-functions How to use them Drop JavaScript or TypeScript functions inside an edge-functions directory in your project. Use cases Custom authentication, personalize ads, localize content, intercept and transform requests, perform split tests, and more.

> 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

> if it has to reach out to literally any other component of the system

Maybe it doesn't have to "reach out to literally any other component" Sometimes code can be self-contained. That's why they're called "Edge Functions" and not "Edge Services"

The advantage is edge functions are physically closer to the customer (lower latency) and can be updated at-will and all at once (unlike client-code, you cannot force a user to update their app).

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

#166
post #36

I would love to jump over to something like Vercel or Netlify Edge, but maddeningly none of these platforms give you control over the cache key. I have pages that are server-side rendered with Cache-Control headers, but because our visitors come with unique tracking params on the end of their URL (e.g. from Mailchimp or Branch), we would essentially have no cache hits. It seems the only way to have control over this…

I'm biased but there is a better way. Give developers a high performance method programmatically manipulating the cache key from JavaScript. That's what we created with EdgeJS: https://docs.layer0.co/guides/caching It's less work to write and higher performance than dealing with edge functions or worker for routine tasks like this.
Post reply on HN