Comment by jFriedensreich
6 hours ago
Cloudflare is not a CDN anymore but the workers edge platform, if you can move to bunny.net, you were not really using cloudflare. I don't understand how none of the alternatives really embrace WinterTC
If i see something horrific like:
import * as BunnySDK from "@bunny.net/edgescript-sdk" BunnySDK.net.http.serve(async (request: Request) =>
Thats a proprietary lock-in worse than what it tries to replace!
FWIW, Cloudflare's edge platform is pretty proprietary too.
The platform yes, but the runtime and the APIs are apache 2.0 licensed and uses web standards wherever possible. Thats way more open than most alternatives i am aware of.
Their fetch handler [1] is not a web standard.
[1] https://developers.cloudflare.com/workers/runtime-apis/handl...
Unless the project is controlled by democratic committee where cloudflare doesn't have a majority of seats it's not open source in any meaningful sense of the word, maybe we should stop acting like corporate sourced software is anything but an attempt to get free labor from the commons.
2 replies →
AFAIC, WinterTC doesn't specify how to start an HTTP server. Their minimum common API requires, among other things, that the Request and Response interfaces from the fetch specification are present. Unfortunately, it does not specify any sort of serve function.
Because an edge runtime should not directly start servers in the first place. You provide handlers that fulfil requests from the system. Edge runtimes that pretend to start the servers in the edge worker context are flawed and ugly from the very start. APIs like that leak implementation details and increase vendor lock-in for no added benefit.
> > I don't understand how none of the alternatives really embrace WinterTC
> You provide handlers that fulfil requests from the system.
As I said previously, though I wish they were, such handlers are not part of WinterTC.
And then again, how those handlers are registered is also not part of WinterTC, which I also wish it were.
> APIs like that leak implementation details
How?
Almost all runtimes, like Bunny Edge Scripting, Cloudflare Workers, Deno, Bun, etc. use the same basic signature for the handler:
(request: Request) => Promise<Response>
Only how you register said handler is, unfortunately, different for each runtime.