Exploring the options of sharing APIs in p2p environments

Imagine an API that doesn’t live on a server, that you don’t need an internet connection for, and that can be duplicated, modified and improved on by anyone. Say hello to my latest brainfart: peer-to-peer APIs! Or better yet: the pAPI, a system which lets people share their own API with other people.

Although building a peer-to-peer API is certainly not a trivial task, peer-to-peer APIs can open up a world of user-hosted systems. These systems can share information and functionality without the need of a centralised server or cloud hosting service. Besides this, leveraging a peer-to-peer system means that we get additional benefits, like resilience against censorship and failure, content persistence and high availability, for free. Let’s dive in!

Hold on, hold on. What is this peer-to-peer thing?

Through the years we have become accustomed to centralised services like Facebook or Google. Trusting these 3rd parties leads to several issues that are inherent to centralised systems. Contrarily, peer-to-peer networks and systems allow users to host and manage their own content, removing the need to trust a 3rd party.

You think your data is safe on the servers of these big companies? You might be wrong. While these servers are protected very well against malicious users that want to steal your data, when it comes down to paying users that want your data, anything goes — as Facebook proved last month in the Cambridge Analytica debacle.

Vice versa, when the Spanish government blocked pages that informed voters about voting booths locations for the Catalan independence referendum of 2017, the Catalan government used IPFS so that peers could host the content on their own machine. This way, voting booths information was still available to the Catalan citizens.

Besides protecting users against censorship, peer-to-peer systems offer several other benefits. Users host their own content, meaning they don’t need to trust any 3rd parties with their private information. Another advantage of managing your own content is that malicious attackers don’t have a centralised point of attack anymore. Since content is distributed, breaching a single node doesn’t expose content of any other users.

#apis #peer-to-peer apis

Exploring Peer-to-Peer APIs
1.25 GEEK