Why I'm writing this
I'm a dumb guy. I'm a UI engineer professionally, but I'm still a pretty dumb guy. I've found a lot of documentation, blog posts, and examples online that explain how the AT Protocol works, but if I'm being honest, it's all Latin to me. That's no dig on the fine folks who've made these resources, I wouldn't be anywhere without them, but I'm here to try and distill this information down to a level that someone like me (so dumb) can understand. Also, I wanted this to be a way for people to correct me where I'm wrong or uncertain, so please let me know if I'm way off base on something! 🙏
Let's start with Bluesky
If you're reading this then you are probably already aware of Bluesky, the Twitter/X social network alternative. The relation between Bluesky and AT Protocol is that Bluesky is built on top of AT Protocol. Not only that, but the same people who built Bluesky also built AT Protocol so that other developers can build on top of the same protocol in hopes of creating a network of apps allowing end users to bring their data (like their account/profile information) from one app to another without needing to start over with setting up a new account and reestablishing a friends list. More on this later in PDSes.
AT Protocol
The Authenticated Transfer Protocol, or AT Protocol for short, or atproto for shorter, is a new protocol with decentralization and social networking at the forefront of its design. A protocol is a 2 dollar word that means a set of rules entities use to communicate. I'm still wrapping my head around all of the finer points of atproto, but here are the basics:
Atproto is broken down into 3 major components; Personal Data Servers (PDSes), Relays, and AppViews. These components communicate with each other to provide a seamless service to the end user while also making it easier for users to create and host any of these three components themselves.
PDSes and Repos
When you create an account on Bluesky, what happens in the background is you're given a unique and permanent decentralized identifier, known as a DID, and a little SQLite database inside of a Personal Data Server, PDS for short, hosted by Bluesky. Any given PDS can contain many SQLite dbs, each owned by someone else. PDSes are in charge of several things, but we'll focus on the SQLite db for now. That database is your personal data repository, commonly referred to as a Repo. Anything you post on atproto goes into your repo rather than it being stored on a centralized server as most social platforms do today. So this blog post you're reading or any of my many (like 20) Bluesky posts you might have read aren't stored in a WhiteWind or Bluesky database somewhere, but rather in my repo and put into separate "social modes" known as lexicons. We won't dive into lexicons for this post, but I'll most likely dig into it in my next.
This personal repo is good for two reasons—probably more than two but these are two reasons that I'm aware of:
- This allows a user to move their data from one location to another easily. For example, most people's PDSes are hosted by Bluesky as of today, but anyone is allowed to spin up and host their own PDS if they choose to (it requires some programming knowledge but folks at Bluesky are hoping to make it easier for anyone in the future); or if Bluesky ever shuts down, anyone else can build a new social network on atproto and everyone who has a PDS can migrate their entire repo from their old Bluesky PDS to the new social network's PDS. What do you think the successor will be called? Brownground?
- This lets apps tap into parts of your repo that are primarily used by other apps. Example, This blog site WhiteWind uses your Bluesky profile information to populate your bio, handle, avatar, and display name! So I didn't have to sign up and create an account for WhiteWind, I just logged in with my handle and my entire profile was set up without me having to do anything more.
Special thanks to @bmann.ca for clarifying some things about PDSes for me.
Relays
I'm still trying to get my head around Relays, so this section is gonna be real short. From what I understand, Relays are servers that crawl everyone's repos to grab as much public data as they can and send all this data up into a stream for AppViews (more on that next) to read. You can kind of think of them as web crawlers sifting through people's repos and collecting data. The stream of data that Relays send their findings to is what's known as a Firehose. This is how Bluesky collects its data for all the various feeds you can connect to. You can host your own Relay if you chose to, but it's a pretty big resource suck to keep one up, say if you were trying to build a relay that collected the same amount of data that Bluesky's Relays collect. You could build a much smaller and only pull a very specific set of values such as the latest Bluesky posts containing the word "science" once daily.
AppViews
AppViews might be the easiest to understand. They are the layer that users communicate with to consume information. They hook up to the Firehose and filter out only the information that is relevant to whatever purpose the AppView was built for. For example, WhiteWind is an AppView and to list out the latest blog posts from the community, it pulls data from the Firehose that matches the WhiteWind lexicon. The Bluesky app I use to post my silly musings is also an Appview.
A truly open social network, for better or for worse
You might have noticed during the bits on Relays that I mentioned web crawlers going through everyone's repos and collecting a bunch of public information. Atproto touts itself as an open and public social network protocol. This means that most anything you post into your repo is public. While services like Bluesky allow for moderation where you can block certain users from seeing your posts or commenting on your content, that is only AppView-specific. Someone can build a Bluesky clone that can access Bluesky posts from anyone without any of the moderation. Similarly, as I'm writing this, I'm saving this post as a draft. On WhiteWind, users can't view any of my drafts, but anyone with the know-how could build a quick AppView that can open up all my records with the unique WhiteWind lexicon, and view any of my drafts if they really wanted to.
The one thing that is truly private from other users is your DMs on Bluesky, and incidentally, it's also currently not built on atproto. It's actually built on a centralized network hosted by Bluesky. This means that even if someone built a Bluesky clone to try and access your chat messages, they wouldn't be able to get to them as they aren't stored in your repos. The reason for going with a centralized approach is explained in one of their blog posts, but the gist is that they wanted to roll it out to please users, but they of course couldn't make it public, so they compromised and built a centralized solution. In that same post, they mention that an end-to-end encrypted solution fully built on top of atproto is still very much on the roadmap.
Take this with an unhealthy amount of salt
I really did my best to write this out given what I understand. I hope this is at least mostly accurate. I'm actively building a small atproto AppView of my own and learning as I go. I'm going to try and continue posting additional content related to my findings and start to dig into some of the technical stuff that I'm learning along the way. I heavily encourage and welcome anyone to correct me on anything as it helps me if no one else! Thanks for reading! I'll work on my brevity next time!