Live data from Hacker News

Python Cloudflare Workers

blog.cloudflare.com

81–90 of 101 posts

Re: Python Cloudflare Workers

#81
post #79
post #70

Earlier quoted context omitted.

I understand what you said. I did not expect full node runtime workers with all the other benefits that you listed that current workers have (global distribution, no cold starts, cost..). But it would be great to have a choice. I feel it would benefit both users and Cloudflare to support both (with different tradeoffs). For example, selecting "I want node runtime for this app workers," I would need to select the regi…

Yeah, in theory we could build a parallel service that's more Lambda-like and hosts apps in a more centralized way. It's certainly something we've thought about. The challenge is, can we actually build that in a way that is significantly better than the existing competition? It's a crowded space. If we just build the same thing everyone else is doing, will it attract enough use to be worth the investment? It sounds l…

Even if it replicates the same capability for example Vercel has for lambdas/server functions I would still use it because I could remove one vendor for my apps and stay with Cloudflare for everything. I've noticed the same sentiment in random internet conversations. Obviously it will not work in every case and for everybody but for me it is not very hard to imagine having such functionality even if it just on par with current offering being enticing to a lot of people taking into account the complete Cloudflare offer and having it on the same platform. Most of those apps would need images, storage, firewall.. all the things cloudflare offers

Re: Python Cloudflare Workers

#82

More development and users for Pyodide is great news. Especially that better serverless story for Python server frameworks. I wonder if Jupyter can work in this stack? It is essentially JavaScript, but built for browser environment. Just the Python kernel might be worker compatible. It essentially has to do code evaluation which might a limitation as well. Should it work you could offload compute from browser or othe…

Python notebooks can definitely work in WASM: - https://jupyterlite.readthedocs.io/en/stable/ - https://docs.marimo.io/guides/wasm.html Running just the kernel in a Cloudflare Worker is an interesting idea ...

Yes, Jupyter could work. I just fear there is things that except browser’s JavaScript APIs. Some I think aren’t even available for web workers. V8 workers are a different thing (I believe) and not at all familiar to me. But, it should be easy enough to test…

https://github.com/jupyterlite/jupyterlite?tab=readme-ov-fil... <- Currently kernel supports at least web workers.

Re: Python Cloudflare Workers

#83
post #25

I with they added Azure Functions style workers using C# too, or AWS style lambdas using NativeAOT. Way lower runtime overhead and time to first response latency. But C# is an underdog language in those lands, so it's understandable.

At the moment, it seems like they're concentrating on using V8 isolates. In the article, there's a good diagram of why: an isolate is able to share so much between different applications. Even with NativeAOT, you're still launching an entire program that has to load everything into memory and execute. In some ways, they're using V8 isolates the way that mod_php was used back in the day. One reason PHP became so domin…

Indeed, isolates are similar to mod_php in that a small pool of shared processes can handle thousands of different applications simultaneously. PHP is truly great in that way!

But just to clarify, mod_php isn't thread safe so parallel requests do not share memory, they each have their own process (prefork mpm). And for untrusted tenants you also need to combine with mod_setuid or mod_suexec for proper isolation, as PHP doesn't do any isolation of its own (they tried for a while but gave up, remember open_basedir?).

In other words a server with 16GB of RAM could handle maybe 250-350 simultaneous PHP requests using mod_php, whereas I'm sure they can fit thousands of isolates in that footprint.

Re: Python Cloudflare Workers

#84
post #9

Clouflare has a lot of great stuff for hosting and databases but I think they haven't done a great job marketing themselves as developer platform which has lead to platforms like Vercel, Netlify taking significant mindshare. Tangential: does Cloudflare provide container hosting service agnostic of language -- something like Google Cloud Run?

I think Vercel and Netlify aren't aimed at developers, because if you are a developer and are using Vercel and Netlify you are literally getting robbed.

Bandwidth costs are 40x-50x more expensive on Vercel and Netlify that the vast majority of cloud providers. Cloudflare bandwidth is barely a cost.

Edge function calls are 6x more expensive on Vercel and Netlify than Cloudflare. Not including compute time costs which is free on Cloudflare.

I think the only reason Vercel is even popular is because it's by far the best place to host NextJS and that might be why they make it hard to deploy NextJS else where.

Re: Python Cloudflare Workers

#85

"This is about more than just making bindings to resources on Cloudflare more Pythonic though — it’s about compatibility with the ecosystem." Someone might be getting editorial help from GPT-4. // Or a human might be getting fine-tuned interacting with LLMs, which I've noticed happening to me.

[dead]

Re: Python Cloudflare Workers

#88
post #32

Earlier quoted context omitted.

The unique architecture of our runtime is what enables most of our competitive advantages. It's what lets us run your application in hundreds of locations around the world while also charging less than competing serverless platforms. If we used a full Node runtime, we would need to charge a lot more money, or only run your app in a couple central locations, or both. So, no, we can't just offer full Node. However, we…

Your comment would have been great without: > So, no, we can't just offer full Node. (Sounds a bit snotty)

How else would you write that? Would this be better?

"Thus, no, we can't just offer full Node."

Is it the use of "so" that is off limits?

Or is simply providing a concise conclusion inappropriate?

I don't see what part of that quote is "snotty".

Re: Python Cloudflare Workers

#89

"This is about more than just making bindings to resources on Cloudflare more Pythonic though — it’s about compatibility with the ecosystem." Someone might be getting editorial help from GPT-4. // Or a human might be getting fine-tuned interacting with LLMs, which I've noticed happening to me.

To the dead comment beside me, asking why...

GPT-4 has a variety of tells. One of them is:

"This is not just about good thing, it's about another good thing." That "it's not just A, it's also B", or "it's more than A, it's B too" show up most any time you ask it for "persuasive" copy, like marketing, sales, or a rewrite of anything to make the reader a buyer.

It's disproportionately common in GPT-4 copywriting or copy-editing, relative to human copy.

Similar to seeing the word "Overall, ..." for a concluding paragraph, another tell.

Re: Python Cloudflare Workers

#90

"This is about more than just making bindings to resources on Cloudflare more Pythonic though — it’s about compatibility with the ecosystem." Someone might be getting editorial help from GPT-4. // Or a human might be getting fine-tuned interacting with LLMs, which I've noticed happening to me.

To the dead comment beside me, asking why... GPT-4 has a variety of tells. One of them is: "This is not just about good thing, it's about another good thing." That "it's not just A, it's also B", or "it's more than A, it's B too" show up most any time you ask it for "persuasive" copy, like marketing, sales, or a rewrite of anything to make the reader a buyer. It's disproportionately common in GPT-4 copywriting or cop…

My personal favorite is, "It's important to note..." I asked it to stop using that phrase or variations and that lasted one prompt. I'm tempted to put the phrase on a T-shirt.
Post reply on HN