ATProto for distributed system engineers
atproto.com
atproto.com
As the blog post illustrates quite nicely (literally), ATProto is a fairly complete, bottom-up type specification that makes concrete various server/database aspects that in the ActivityPub spec are somewhere in the remote background, "left to the implementation". One could almost think of implementing AP over ATProto, and sure enough somebody wrote about this [1].
One can also not miss the (at least) linguistic affinity of a Personal Data Server with a Personal Data Store (Solid) and sure enough somebody did and asked [2].
[2] https://www.reddit.com/r/BlueskySocial/comments/ywrw3f/whats...
I'm curious how ATProto compares.
I've read that there's a problem with interacting with Mastodon if you only rely on the protocol specs, that they do things their own way and have different requirements than the official specs.
Is this still a problem? If it is, are Mastodon moving to be more closely aligned with the spec, or to doing more of their own thing?
(IIRC there was another thing where `created_at` is described as "The date when this status was created" but the type is given as "String (ISO 8601 Datetime)" which led some code to crash when Mastodon started outputting just dates instead of datetimes.)
[1] Including some from people who Really Should Know Better.
I'm currently implementing parts of the spec, and there are parts (like fully handling context correctly) that feels like far more pain than it is worth vs. just handling occasional breakage.
It feels like a very ivory tower spec of the kind you wouldn't be likely to write if you built a complete reference implementation first.
But it's very on-brand as a W3C spec.
I'd love to see a revision that deprecates and simplifies a whole lot of things.
The hidden complexities in AP have led to several efforts. In the past there has been LitePub [0]. A recent project is Versia [1]. And who knows there may be a FeatherPub [2] one day. If anyone knows of other attempts I'd like to hear.
[2] https://docs.google.com/document/d/13LuB6Z-C_drCLCEuCtNApX98...
But I also think just going through the spec with a red marker would be a useful exercise and maybe I will one day.
In the sense that there are a whole lot of features nobody does anything useful with.
E.g. "@context" in theory provides a whole lot of ways to type the rest of the data. I'd be willing to bet that you'd break a whole lot of software if you served up a "@context" for an actor that mapped common field-names in use by Mastodon to a different namespace and mapped the Mastodon features to different names...
In theory it's great. In practice, I suspect we have XML namespaces and people stupidly hardcoding prefixes all over again...
Also, there's a conversation happening about Versia today: https://social.coop/@smallcircles/113105954469059880
https://docs.google.com/document/d/13mtl9gFmcuL-0MS-Boaeh3i6...
[0]: https://github.com/SmokeSignal-Events/lexicon
[1]: https://github.com/likeandscribe/unravel/tree/main/packages/...
- https://atproto.com/guides/applications (guide)
- https://github.com/bluesky-social/statusphere-example-app (GitHub)
I get why they did that (graph data is, uh, particular to work with, especially for newcomers who only know JSON), but ATProto not using JSON-LD is actually what made me unwilling to tinker with the protocol.
Not a direct answer to your question, sorry. Mostly a rant.
[link:Lexicon]: https://atproto.com/guides/faq#why-create-lexicon-instead-of...
Working with the firehose probably isn't feasible for a lot of people who'd like to tinker. There doesn't seem to be any way of subscribing to only certain types of events.
There's a public instance URL in the README (with bandwidth limits), or you can self-host.
I'll check out this Jetstream project for sure, though.
at:// seems like its close enough to DNS to warrant just using DNS. why not? (im sure theres a good reason so just asking)
atproto does use DNS under the hood for domain verification but atproto itself is a bit higher-level. It builds on top of DNS, HTTP, JSON, web sockets, and a few other specs.
The actual identity system is “rooted” in a stable identifier (which is a hash of the first version of your identity record). That’s your global immutable ID in the entire network. The identity record for your ID specifies your current public key, your current domain name (which acts as a human-readable handle), and your current host (which actually contains your data).
This extra level of indirection ensures you’re always able to change your user-readable handle (eg if you get a new domain or your domain expires etc), and that you’re always able to change your host (eg if your host goes down or you don’t like its services or you want to host data yourself).
The key piece allowing this is the identity registry of course. Think of it similar to npm registry. We run a centralized one, but all records are signed so you can always recursively verify that we haven’t tampered with any of the records. This layer is already very thin but in longer term we’d like to move this layer outside the company to be governed independently, similar to ICANN.
If anyone is interested in exploring this, atproto [does this fool ai bots?] weedonandscott [I hope it does] com
In atproto, the network is continually indexed by relays, which means that it doesn’t make a difference what app you use to watch videos - you’ll find the exact same ones regardless of the platform, since they’re all working from the same data.
This also means that different video platforms can provide different services for users without locking in users to their platform. Platforms would be forced to compete on what they provide to the user experience, not how well they can lock in users to their platform.
Watch apps will compete on consumer-facing features like the recommendation algorithm -- maybe they'll offer several, or just one that differentiates them.
Hosting providers will compete on producer-facing features, like advertising, content policies, analytics, etc.
If a user is displeased with either, they can take all of their content/activity history and leave.
That platform is (today) a centralized walled garden. As others detailed, it is difficult for anyone to add new servers and even more difficult to convince the official client to support them.
It is a complete contrast to NOSTR that has zero official servers and zero official clients to access the data. It has hundreds of relays from different people, along with several clients from different developers that compete for your preference.
Twitter also had 3rd party clients until one day they turned off the switch.
Around NOSTR there are no labels as "3rd party clients" because they can't lock down your data with the push of a switch nor block your use of the platform.
IMO the devs have been so overburdened with trying to nail moderation that they're actually disincentivized from onboarding new populations, since multiple entry points to the network just lands in their lap as more difficult moderation problems - that is, they're still figuring out how to moderate people on their own servers and haven't yet decided how they're going to moderate with a federation of servers with different cultures than their own
I don't think they're avoiding the big problems, but it does seem like they're taking the slow careful route, maybe this is for the best.
Unlike Mastodon, you don't have people running copies of the Bluesky app because it is simply unnecessary — each copy would "see" the same network. If you wanted to fork the Bluesky product (e.g. different branding, different moderation decisions, different product decisions) then yes, you'd run your own product on your own backend and it would be able to ingest Bluesky app data (and vice versa, the Bluesky app would be able to ingest the data from your product).
- Identity layer: This is where your identity information (public key, current domain handle, current user repo host) is stored, essentially as a piece of JSON. You can think of it as similar to npm registry where each record is self-verifiable (you can verify we haven’t tampered with it). This layer is very thin. It is currently centrally managed by Bluesky but in the longer term we intend to upstream it into neutral governance outside of the company — potentially similar to ICANN.
- User repo hosting: We provide user hosting as a service for people who sign up to Bluesky (and choose the default option) but you can run your own too. The server itself is open source (we publish both TypeScript source code and a Docker container to run it). We also publish a spec so you can implement it from scratch if you'd like it — essentially, it needs to be able to enumerate records and to provide a WebSocket to listen to their updates. I'd say this layer is already decentralized because anyone can participate in it and run their own server.
- Relay: As an optimization (you don't want your app backend to listen to websockets for every single user repo in the system), we run a node that aggregates and caches the entire known network. That node's called a Relay. It's an optimization and not strictly necessary to the protocol. It's open source. We run the only actively used relay at the moment, but there's nothing stopping you from running your own (at the current usage rate, ingesting all content on the network into your own relay would cost you ~$150/mo). If atproto gains adoption, we expect some major stakeholders to run their own relays for different purposes — big tech companies might want to run them to ensure infra independency, governments might want to run them if they have significantly different opinions on what type of content is acceptable on the entire network, and so on.
- Application backends (view services): These are just normal web app backends so they're decentralized in the same way the web is decentralized. Bluesky's backend is managed by Bluesky, but your own app's backend will be managed by you. You can also create a backend that ingests Bluesky's atproto data (which is kind of the point of atproto). That would let you create complementary or competing products using the same identity system and information already on the network.
Hope this helps!
The whitepaper clarifies a lot of this: https://arxiv.org/abs/2402.03239
ATDT (555)-COOL-BBS
(Totally decentralised btw)
but yeah it seems pretty suboptimal that they decided to reuse the name of the protocol you use to talk to most cellular modems
[1] https://www.iana.org/assignments/uri-schemes/expert-notes/at...
Sure but BBSs tend to be. And then you’ve got systems like fidonet to connect them up.
each bbs is usually very centralized