top | item 45472375

(no title)

baliex | 4 months ago

I'm pretty new to the at:// protocol, and I like what I'm reading, thanks for the write-up.

To your "This is not done by hitting an API" point; if I understand correctly, I'd argue that the _endpoints_ that you detail in your post _are_ the API. The whole point is that there's no single _central_ API, but each server that wants to be part of the network participates by hosting an API that meets the standard outlined in the protocol.

In a way it's semantics, but I'd be interested in yours thoughts on that. To either correct or confirm my understanding.

discuss

order

danabramov|4 months ago

No, that’s really not the case. The Leaflet app “knows” about Bluesky posts by reading Leaflet's own database on the Leaflet servers. It doesn’t need Bluesky’s cooperation to use “Bluesky’s” public data. It doesn’t need to hit Bluesky’s API for that. And if Bluesky shut down its API completely, it would still work.

This is because a stream of all public data from all apps is being subscribed to by all apps. Whatever you care about, you save into your app’s database. Each app’s database serves as an app-specific index of the data on the network. If you want to query Bluesky posts later, you just save them as they stream in.

So every app can piggyback on data created by other apps. And anyone can run a "retransmitter" (aka a relay) like this. It's an application-agnostic aggregator over websockets. The one operated by Bluesky-the-company is most popular one, but https://atproto.africa/ is another one, and you can get one running yourself for about $30/mo; the implementations are open source.)

I explain this in more detail in https://overreacted.io/open-social/, Ctrl+F to "to a stream that retransmits events from all known repositories on the network".

baliex|4 months ago

Thanks for the info, that does help me understand what's going on in the protocol.

I suppose I was thinking about the app responsible for getting the data into, say, Leaflet's local database in the first place. For that app, the data structures you describe are the APIs that it consumes, for the sole purpose of populating its own database.

That gets my cogs whirring about how good a use-case this would be for SQLite. I suppose it would be somewhat appropriate for a small, private, PDS? Although, if I understand correctly, I wouldn't need to worry about that anyway if I'm using some off-the shelf PDS software, e.g. https://atproto.com/guides/self-hosting