You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Deno Deploy claims to be compatible with other serverless platforms. Specifically, the homepage advertises "API compatible with Cloudflare Workers" and "No vendor lock-in".
This already isn't true since you can run TypeScript. Also the great idea to use Deno's native HTTP server API to allow to use Deno CLI locally 12 broke compatibility.
just feels kinda weird if some of the goals are "no vendor lock in" and "API compatible with Cloudflare Workers" but to test locally you are locked into the Deno apis - source
But more so, trying to be compatible isn't the right thing in the first place. By trying to be compatible, you're shooting yourself in the foot. By staying compatible you sign up to be a copy of the other platform. At best this cripples your platform and at worst makes it useless.
You can't provide distinguishing features that would make your platform valuable over others. You can't evolve and must stay a copy of other platforms in order to stay compatible. The only distinguishing feature can be price which is hard to compete.
Even if you do nothing you can break compatibility because other platforms can change themselves without asking you. You constantly need to change and copy them to stay compatible. For example, Cloudflare Workers is transitioning away from the Service Worker syntax 3 towards using an exported class with a fetch method 4. A polyfill 5 here isn't that simple anymore.
You require yourself to follow unfortunate decisions of others. This might not seem obvious right now since serverless is largely a single product (multi-instance public FaaS, "Worker") for which it just so happens that most platforms have used the same Service Worker syntax until now. But if you decide to offer more products in the future then staying compatible can become more painful, for example Durable Objects aka Coordinators #88.
Compatibility comes from the desire to make it easy for people to come to Deno Deploy and copying existing code over is easy. But you don't need compatibility. You need conversion. For example, you can offer documentation how to convert code from other platforms to Deno Deploy, you can provide a script that people can run to do this automatically, or you can even integrate that script into your UI to allow people to directly create a new project from an existing one on another platform, e.g. "Create project from Cloudflare Worker". This is what so many other platforms do, e.g. Google Docs opening Microsoft Office files, Apples "Move to iOS" Android app, etc. It's all about conversion, not compatibility.
Note, all of this doesn't mean you have to deliberately design your platform to be incompatible. You just don't put in any effort to do the opposite.
@mathiasrw Thank you for telling me my argument wasn't clear enough. I rewrote it to hopefully make it clearer now. Notice, the argument is independent of any specific customer, so it remains true just the same "for large organisations to start embarking on new tech". I'm happy to correct any mistake if you're able to point out a logical flaw in the argument.
vwkd
changed the title
Remove "No vendor lock-in" and "API compatible with Cloudflare Workers"
Don't try to be compatible with Cloudflare Workers
Nov 10, 2021
Deno Deploy claims to be compatible with other serverless platforms. Specifically, the homepage advertises "API compatible with Cloudflare Workers" and "No vendor lock-in".
This already isn't true since you can run TypeScript. Also the great idea to use Deno's native HTTP server API to allow to use Deno CLI locally 1 2 broke compatibility.
But more so, trying to be compatible isn't the right thing in the first place. By trying to be compatible, you're shooting yourself in the foot. By staying compatible you sign up to be a copy of the other platform. At best this cripples your platform and at worst makes it useless.
You can't provide distinguishing features that would make your platform valuable over others. You can't evolve and must stay a copy of other platforms in order to stay compatible. The only distinguishing feature can be price which is hard to compete.
Even if you do nothing you can break compatibility because other platforms can change themselves without asking you. You constantly need to change and copy them to stay compatible. For example, Cloudflare Workers is transitioning away from the Service Worker syntax 3 towards using an exported class with a
fetch
method 4. A polyfill 5 here isn't that simple anymore.You require yourself to follow unfortunate decisions of others. This might not seem obvious right now since serverless is largely a single product (multi-instance public FaaS, "Worker") for which it just so happens that most platforms have used the same Service Worker syntax until now. But if you decide to offer more products in the future then staying compatible can become more painful, for example Durable Objects aka Coordinators #88.
Compatibility comes from the desire to make it easy for people to come to Deno Deploy and copying existing code over is easy. But you don't need compatibility. You need conversion. For example, you can offer documentation how to convert code from other platforms to Deno Deploy, you can provide a script that people can run to do this automatically, or you can even integrate that script into your UI to allow people to directly create a new project from an existing one on another platform, e.g. "Create project from Cloudflare Worker". This is what so many other platforms do, e.g. Google Docs opening Microsoft Office files, Apples "Move to iOS" Android app, etc. It's all about conversion, not compatibility.
Note, all of this doesn't mean you have to deliberately design your platform to be incompatible. You just don't put in any effort to do the opposite.
Footnotes
"We're in the process of phasing out
addEventListener("fetch", ...)
in favor ofDeno.listen() + Deno.serveHttp()
". Source: https://github.com/denoland/deploy_feedback/issues/71#issuecomment-889760772 ↩"no more fetch event listener". Source: https://discord.com/channels/684898665143206084/826085979344470037/892154021165563924 ↩
addEventHandler("fetch", event => { ... })
↩export default { async fetch(request, env) { … } }
in a.mjs
file. Source: https://blog.cloudflare.com/workers-javascript-modules/ and https://developers.cloudflare.com/workers/learning/using-durable-objects#instantiating-and-communicating-with-a-durable-object ↩"We will provide something you can import to polyfill fetch event locally". Source: https://discord.com/channels/684898665143206084/826085979344470037/892187811673948211 ↩
The text was updated successfully, but these errors were encountered: