Cloudflare Workers: Run JavaScript Service Workers at the Edge
91–100 of 134 posts
Re: Cloudflare Workers: Run JavaScript Service Workers at the Edge
#92offtopic: can cloudflare be used as a CDN for just assets? The cloudflare docs talk only about using it as CDN for an entire site.
Technically, yes, but as I understand it, they frown upon it and could potentially terminate your account. See this section of their ToS ( https://www.cloudflare.com/terms/ ): >SECTION 10: LIMITATION ON NON-HTML CACHING >You acknowledge that Cloudflare’s Service is offered as a platform to cache and serve web pages and websites and is not offered for other purposes, such as remote storage. Accordingly, you understand…
I guess the answer for the OP then is, get an enterprise account and you can do whatever you want.
Re: Cloudflare Workers: Run JavaScript Service Workers at the Edge
#93Earlier quoted context omitted.
PPS - it is probably too late for this, but one of the last things I worked on at Google was Gin: https://chromium.googlesource.com/chromium/src.git/+/lkgr/gi... A bindings layer for v8 that was specifically intended to make implementing web-style APIs outside of Blink easier. At the time at least, refactoring things like SW out of Blink was ~impossible.
Doh, indeed, wish I had seen that earlier. V8's raw API is... tricky.
I was pretty happy about how Gin turned out and always thought it would be nice to put it on Github where it would be easier for people to reuse.
But at the time Chromium still didn't allow all the modern C++ features, so Gin had to depend on base::Callback, which made it hard to extract cleanly.
Re: Cloudflare Workers: Run JavaScript Service Workers at the Edge
#94Could this be used to make Cloudflare respond to HTTP POST requests?
if (request.method == "post") { ... }Re: Cloudflare Workers: Run JavaScript Service Workers at the Edge
#95Is this similar to Amazon's Lambda@Edge?
Re: Cloudflare Workers: Run JavaScript Service Workers at the Edge
#96 - Is it "Cloudflare Workers" or "Cloudflare Service Workers"?
A "Cloudflare Worker" is JavaScript you write that runs on Cloudflare's edge.
A "Cloudflare Service Worker" is specifically a worker which handles
HTTP traffic and is written against the Service Worker API.
Consufing naming convention. Now you have to say 'worker worker' or 'non-service worker' so nobody has to wonder if you meant 'service worker' when you only said 'worker'.Re: Cloudflare Workers: Run JavaScript Service Workers at the Edge
#97- Is it "Cloudflare Workers" or "Cloudflare Service Workers"? A "Cloudflare Worker" is JavaScript you write that runs on Cloudflare's edge. A "Cloudflare Service Worker" is specifically a worker which handles HTTP traffic and is written against the Service Worker API. Consufing naming convention. Now you have to say 'worker worker' or 'non-service worker' so nobody has to wonder if you meant 'service worker' when you…
Also note we didn't invent these terms. "Workers" and "Service Workers" are W3C standards.
Re: Cloudflare Workers: Run JavaScript Service Workers at the Edge
#98Re: Cloudflare Workers: Run JavaScript Service Workers at the Edge
#99This is probably the best annoucement of a new feature I have ever read. It makes an analogy to an existing technology. It provides a clear description of the new feature. It provides clear examples of how to use the new feature with a link to a sandbox so you can run and modify the examples. And it explains the thought process behind the implementation. In additon, I didn't notice a single typo, spelling or grammar…
Sorry, had to :)
Re: Cloudflare Workers: Run JavaScript Service Workers at the Edge
#100I read the article, but I'm not sure what this technology is enabling really. Can it be thought of as a new player in the lambda/serverless category? Does it have any advantages to using other serverless stacks like aws lambda or azure?