New Open Source Runtime for Web Developers Uses P2P
A new open source, client-side runtime aimed at web developers was released on Tuesday. Socket Runtime is designed to deploy in any OS, on both desktop and mobile, while allowing web developers to use their favorite frontend libraries. It also leverages peer-to-peer networking, rather than a central cloud host, to deploy apps.
It also made sense to target web developers because they represent the largest pool of developers today, he added.
Socket Leverages Peer-to-Peer to Avoid Cloud Lock-in
Socket’s offering is different in another key way — the company provides a peer-to-peer technology that allows apps to communicate directly, rather than relying on one hosted cloud provider.
“We think about the opportunity to connect users directly, and this is possible today because of this proliferation of hardware,” Fragomeni said.“There’s this very different time that we’re in, compared to when the cloud was created. It gives us this opportunity to connect everything and do peer-to-peer, and so it reduces the cost and it also reduces the complexity.”
P2P capabilities are a core feature of the runtime, the company said, allowing developers to create apps where users can communicate directly, without the Cloud; it even works when people are offline, said Scott Bloom, chief revenue officer at Socket Supply.
“What is going to be your back end typically — the only option today is the cloud,” Bloom told The New Stack. “We have an alternative built-in and our runtime is able [to] and exposes the ability for you to run your app peer-to-peer. So that is why we had to develop a runtime for desktop and mobile. It allows us to then get to where we want to be, which is running a peer-to-peer backend to replace cloud architecture.”
That means companies can deploy their apps without spinning up a bunch of architecture, Fragomeni added — something that is proving to be of interest in the public sector, he said.
“They’ve been really interested in this idea that you can create something [and] you can go from zero to 60 really quickly. You don’t need to spin up a bunch of architecture. You don’t need to have DevOps SRE experts, you don’t need to vet outside staff,” Fragomeni said.
It also supports better audibility because it’s 100% transparent, added Bloom.
“It comes back to just fundamentally better security. Cloud security is a little bit better, incrementally better. This is fundamentally better,” Blood said. “When we’re talking to the agencies and the government, that’s why their ears perk up, because they understand it when they understand the architecture of it.”
Socket surveyed existing P2P protocols but found most were based on assumptions from the early 2000s — before mobile took off. They didn’t anticipate the kinds of network usage patterns seen today. The company knew P2P could scale well, but it needed a modern protocol that factored-in locality and dramatically higher churn rates.
So it wrote its own specification and crated a single codebase for the P2P protocol that’s decoupled from the runtime. How it works is explained on Socket Supply’s website, but the protocol is a “replicating” message-based (UPD) protocol, which means it casts a wide net and can yield faster response times with higher success rates. The finished P2P protocol allows users to communicate directly without any servers. It works even if people go offline, the company stated.
Socket runtime competes with:
- Electron, which is itself an open source software framework developed and maintained by OpenJS Foundation;
- Tauri, which is used for building applications for desktop computers using a combination of Rust tools and HTML rendered in a Webview;
- Cordova, an open source mobile development framework; and
- Capacitor, an open source runtime for building web native apps.
For comparison, Electron is a runtime for building desktop applications using web technologies. It was used to build collaboration and productivity apps like Microsoft Teams, Slack, Asana, Notion, and Figma, Bloom said. Socket also supports the same real-time multiplayer collaboration on projects, he added, but Socket is about 17,000 lines of new code versus about 150,000 lines of 10-years-old code compared to Electron, Bloom said.