The Ultimate Guide to Federated Architecture & Decentralized Social Networks
Hello there, everyone
How is it going?
Welcome to 8bitmen.com
This article is a comprehensive write-up on Federated architecture, decentralized social networks & how federated architecture is important to decentralized social networks.
Before I get started, it’s kind of beneficial to have an understanding of decentralized, centralized architectures & the differences between them in order to get a better grasp on the topic.
If you are kinda oblivious to it. I have written an article on the centralized, decentralized, distributed architectures & the differences between them all. Do check it out.
Alright, first thing… the federated architecture. Let’s begin.
1. What is a Federated Architecture?
Federated architecture is an extension to the decentralized architecture. And by decentralized architecture, I mean the underlying architecture of peer to peer networks. & yeah, the Bitcoin too.
So, the decentralized acts like an umbrella term. The design is tweaked into a custom architecture ideally implemented by decentralized social networks.
The Federated architecture is an architecture of the decentralized social networks such as Diaspora.
1.1 What is the meaning of Federated?
The term federated in general sense means a group of semi-autonomous entities exchanging information with each other. A real-world example of this would be looking at different states of a country which are managed by the state governments. They are partially self-governing & exercise power to keep things running smoothly.
And then, those states government share information with each other & a central government making a complete autonomous government.
This is just an example. The federated model from a technical standpoint is under continual research, development & evolution. There are no standard rules. Developers, architects can have their own designs in place. After all, it’s all decentralized. No control of any single entity.
1.2 How is Federated Architecture Implemented in Decentralized Social Networks?
As you can see in the diagram below. A federated network has entities called servers or pods. Multiple, or I can say a large number of nodes are subscribed to the pods.
And then several pods exist in the network. These pods are linked to & share information with each other.
The pods can be hosted by individuals as it’s ideally achieved in a decentralized network. As new pods are hosted & introduced to the network, the network keeps growing.
In case if the link between a few pods breaks temporarily. The network is still up. Nodes can still communicate with each other via the pods they are subscribed to.
1.3 What is the need for Pods? Can’t just the nodes be linked to each other like a regular peer to peer network?
Pods facilitate node discovery. In a peer to peer network, there is no way of discovering other nodes & we would just sit in the dark if it weren’t for a centralized node registry or something. The other way is to
run a scan through the network trying to discover other nodes. That’s a really time-consuming & a tedious task. Why not just have a pod ?
Decentralized networks were architected with the sole purpose of being resilient to nuke or zombie attacks. Primarily nuke ? & that’s what pods help us achieve, even in case of broken links they keep parts of the network up.
2. Decentralized Social Networks
2.1 What are Decentralized Social Networks?
Simply put, decentralized social networks have servers, spread out across the globe, hosted by individuals like you & me. Nobody has an autonomous control over the network like that in centralized networks, for instance, Facebook, Twitter etc.
Also, decentralized networks have no issues with scalability. The scalability of a decentralized network is directly proportional to the number of users joining & active on the network.
We host our own data from our systems instead of sending it to a third-party server. Nobody eavesdrops on our conversations or holds the rights to modify our data at their whim.
You might have heard of BYOD, I assume? Bring Your Own Device.
Decentralized social networks ask you to Bring Your Own Data.
What do I mean by that?
In these networks, the user data layer is separate & they run on standardized protocols, specifically designed for the decentralized web. The data formats & protocols are consistent across the networks & apps.
So, if you want to get out of a particular social network. You don’t lose your data; your data doesn’t die. Just carry your data with you & get it fed into the app you are signing up next.
Cool isn’t it? ?
If you are interested in how p2p web apps are created, hosted & their underlying architecture. Check out this article.
2.2 Features of Decentralized Social Networks
This section lists some of the really cool, out of the box, features made available by the decentralized social networks like Diaspora, Friendica, Sola etc.
1. Bring Your Own Data
As stated in the above section, carry your data with you across the myriad of applications. And this is a really unique feature which the blockchain economy offers especially in video games.
The in-game currency or content bought by the players, such as swords or powers etc. can be carried forward & used in other games based on the decentralized protocol.
So, the money doesn’t go waste if the game studio takes the game offline anytime in future. The purchased stuff in real sense stays with you.
2. Ensuring the Safety of Our Data
No more eavesdropping of private organizations on our data. We decide with whom we want to share our data with. The data is encrypted in the real sense, like encrypted for everyone including the technical team of the network. No selling of our data for personal profits.
3. Economic Compensation to the parties involved in the network
Networks like Diaspora, Sola, Friendica have come out with features which would financially compensate all the parties involved in the network.
Users get compensated for the awesome stuff they share online.
People sharing their computing power to host the network get their compensation in form of tokens or equity or whatever as per the economic policy of the network.
The teams involved in moderating the network, developers writing new features, get compensated by enabling content-relevant ads on the network or by the token-based economy of the platform.
A win-win for all.
4. Cut down on heavy infrastructure costs. No issues with scalability. The network is always up. No fear of data loss.
A single entity does not have to bear the entire cost of the infrastructure since it is decentralized. The possibility of the network going down is almost zero.
An individual developer can build cool stuff without worrying about the server costs. Get your app hosted by the end user.
The data just like a blockchain ledger is replicated across the nodes. So, even if a few nodes go down our data is not lost.
The most important of them, in case of a zombie invasion, when big corporate servers are on fire. This network would still be up. We would still be connected with each other without the need of any third-party server.
2.3 Protocols & Software Involved in Decentralized Networks
Decentralized social networks are written on protocols & software which are open source so that the community can keep improving on the code & keep building awesome features.
ActivityPub is one example of this, it’s an open decentralized social networking protocol. It provides an API for modifying & accessing the content on the network. Also, for communicating with other pods in the federation.
2.4 Are Decentralized Social Networks the Future?
Well, it depends on what we want. Surely, decentralization, blockchains are emerging technologies & the future. They are pretty potent in weeding out third-party autonomous control of the infrastructure.
Also, individual developers like me can build stuff without worrying about funds to fuel the servers. When everyone would be renting out his or her idle computing power, cloud hosting would really be much much cheaper. There are networks already out there for that like Golem & Neuroneum etc.
But there is still much work to do. The tech is emerging. A non-tech savvy user doesn’t care about the underlying architecture of the social network. He is more into the features being offered by it.
And the centralized systems really nail that in the present day, the user experience.
To surpass this, and trigger a mass exodus they have to be atleast at par with the user experience the centralized social networks are offering, if not better.
Hmm, well, though I would love to know what you think about this?
More On the Blog
Guys, this was pretty much it.
If you liked the article. Share it with your geek friends.
See you in the next article.
- Distributed Systems & Scalability #1 – Heroku Client Rate Throttling
- Zero to Software/Application Architect – Learning Track
- Java Full Stack Developer – The Complete Roadmap – Part 2 – Let’s Talk
- Java Full Stack Developer – The Complete Roadmap – Part 1 – Let’s Talk
- Best Handpicked Resources To Learn Software Architecture, Distributed Systems & System Design