Ryan Dahl, the creator of Node.js, did not move the Deno team to Cloudflare. Instead, in 2022, Deno, the company behind the Deno runtime, announced a partnership with Cloudflare to make Deno’s open-source deno_fetch and deno_websocket components the foundation of Cloudflare Workers’ HTTP and WebSocket handling. This article explains what actually happened, why it matters, and what it means for developers using either platform.
Background: Ryan Dahl, Node.js, and Deno
Ryan Dahl created Node.js in 2009, bringing JavaScript to the server. Node.js quickly became one of the most popular runtime environments in the world. However, Dahl grew frustrated with several design decisions in Node.js, particularly its use of CommonJS modules, its centralized npm registry, and the complexity of its build system. In 2018, he announced Deno, a new runtime for JavaScript and TypeScript that aimed to fix these issues. Deno is built in Rust, uses V8 (the same JavaScript engine as Chrome and Node.js), and has built-in TypeScript support, secure-by-default permissions, and a modern module system using URLs.
Deno the company was founded to develop and commercialize the Deno runtime. It offers a hosted platform called Deno Deploy for running serverless JavaScript applications. The company’s goal is to make server-side JavaScript simpler, faster, and more secure.
What Actually Happened: The Cloudflare Partnership
In May 2022, Deno and Cloudflare announced a collaboration. The key point: Deno’s open-source deno_fetch and deno_websocket libraries would be used as the basis for Cloudflare Workers’ HTTP and WebSocket handling. This does not mean Deno’s team joined Cloudflare, nor does it mean Cloudflare took over Deno’s projects. Instead, Cloudflare adopted specific open-source components from Deno to improve its own Workers runtime.
Why did Cloudflare do this? Cloudflare Workers is a serverless platform that runs JavaScript at the edge, on Cloudflare’s global network. Before this partnership, Workers used its own implementation of the Fetch API and WebSockets. By adopting Deno’s well-tested, standards-compliant components, Cloudflare could improve performance, compatibility, and maintainability. For Deno, this was a validation of its technology and a way to increase its influence in the serverless ecosystem.
How the Integration Works
Cloudflare Workers runs on a custom runtime built on the V8 engine. The Fetch API and WebSocket API are core parts of any JavaScript runtime, and they need to be implemented efficiently and correctly. Deno’s deno_fetch is a Rust crate that implements the Fetch API standard, handling HTTP requests and responses. deno_websocket does the same for the WebSocket protocol. Cloudflare integrated these crates into its Workers runtime, replacing its previous custom implementations.
For developers, this means that code written for Cloudflare Workers should behave more consistently with code written for Deno, and vice versa. The Fetch API and WebSocket behavior in Workers now matches the standards that Deno follows, which are the WHATWG standards. This reduces the “it works on my machine” problem when moving between the two platforms.
Why This Matters for Developers
If you write JavaScript for the server or for serverless platforms, this partnership has several implications:
- Better standards compliance: Cloudflare Workers now uses a more standards-aligned implementation of Fetch and WebSockets, which means code written against the standard is more likely to work.
- Potential for easier portability: If you write code using standard APIs, you can more easily move between Deno Deploy and Cloudflare Workers, though differences in other APIs (like storage and environment variables) still exist.
- Improved performance: Deno’s components are written in Rust and optimized for performance, so Workers may see faster HTTP and WebSocket handling.
- Open-source collaboration: This is a notable example of two competing platforms sharing open-source code. It shows that even competitors can collaborate on foundational components.
Common Misconceptions
There are several misconceptions about this partnership that are worth clearing up:
- “Ryan Dahl moved to Cloudflare” – False. Ryan Dahl remains the CEO of Deno, and the Deno team continues to work on Deno and Deno Deploy.
- “Deno is now part of Cloudflare” – False. Deno remains an independent company. The partnership is limited to specific open-source components.
- “Cloudflare Workers now runs Deno” – False. Workers still runs on its own runtime, but it uses Deno’s Fetch and WebSocket implementations as building blocks.
- “This means Deno is dying” – False. Deno continues to release new versions and features. The partnership is a sign of strength, not weakness.
How to Choose Between Deno and Cloudflare Workers
If you’re deciding between Deno Deploy and Cloudflare Workers for your next project, consider these factors:
- Ecosystem: Deno has its own module registry and supports npm packages. Cloudflare Workers has its own ecosystem and also supports many npm packages. Check if the libraries you need are compatible.
- Features: Deno Deploy offers a simple, global serverless platform with built-in KV storage and cron triggers. Cloudflare Workers offers a broader suite of edge services, including CDN, DDoS protection, and Cloudflare’s network.
- Lock-in: Both platforms have vendor-specific APIs. Deno Deploy uses Deno’s APIs, while Workers has its own bindings. Consider how portable your code needs to be.
- Performance: Both are fast, but performance can vary based on your workload. Test with your actual use case.
- Cost: Both offer free tiers and usage-based pricing. Compare the pricing models for your expected traffic.
Frequently Asked Questions
Did Ryan Dahl leave Node.js to work on Deno?
Yes, Ryan Dahl created Node.js in 2009, but he left the project around 2012. He later started Deno in 2018 to address what he saw as fundamental flaws in Node.js. He is still actively involved with Deno.
Is Deno a replacement for Node.js?
Deno is an alternative to Node.js, not a drop-in replacement. It has a different module system, security model, and built-in TypeScript support. Many Node.js packages work with Deno via npm compatibility, but not all. It’s a modern alternative, not a direct upgrade.
What is the difference between Deno and Cloudflare Workers?
Deno is a general-purpose JavaScript/TypeScript runtime that can run anywhere, including on your local machine, on a server, or on Deno Deploy. Cloudflare Workers is a serverless platform that runs JavaScript on Cloudflare’s edge network. Workers uses a custom runtime, but now includes Deno’s Fetch and WebSocket components.
Can I use Deno code on Cloudflare Workers?
Not directly. Cloudflare Workers has its own API surface, but since the Fetch and WebSocket APIs are now shared, code that uses those standard APIs will likely work on both with minimal changes. However, other APIs like Deno’s file system or Cloudflare’s KV storage are different.
Is Deno open source?
Yes, Deno is open source under the MIT license. The deno_fetch and deno_websocket components are also open source, which is why Cloudflare could use them.
Will Cloudflare Workers become Deno?
No, Cloudflare Workers will not become Deno. Cloudflare uses its own runtime, but it has adopted specific open-source components from Deno. The two platforms remain separate, though they now share some underlying technology.
Related
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.
More cards in this drawer
- Valheim Server Not Showing in Community List Fixes
- Soundbar vs 2.1 Speaker System: Which Is Better?
- DisplayPort vs HDMI: Which Cable Should You Use?
- Survive Lava for Brainrot Tier List170 points
- MySQL Dump Import: Fix Common Errors
- Mouse Moving on Its Own? Causes & Fixes