#+TITLE: Bluesky Architecture compared to other social media services #+SUBTITLE: [[file:?print-pdf][Printable version]] #+DATE: [2024-05-24 Fri] #+AUTHOR: Éibhear Ó hAnluain #+EMAIL: eibhear.geo@gmail.com #+OPTIONS: ':nil *:t -:t ::t <:t \n:nil ^:{} author:t c:nil creator:nil #+OPTIONS: d:nil date:t e:t email:t f:t inline:t num:nil p:nil pri:nil #+OPTIONS: stat:nil tags:nil tasks:t tex:t timestamp:nil toc:1 todo:nil |:t #+DESCRIPTION: A discussion of Bluesky's architecture as it relates to other social media services #+LANGUAGE: en #+REVEAL_ROOT: ./reveal.js #+REVEAL_INIT_OPTIONS: transition:'none', margin: 0.1, slideNumber:true #+REVEAL_THEME: white #+REVEAL_HLEVEL: 1 #+REVEAL_EXTRA_CSS: ./e-reveal.css #+REVEAL_EXTRA_CSS: ./gridding.css #+REVEAL_DEFAULT_SLIDE_BACKGROUND: ./bCardBackground.png #+REVEAL_TITLE_SLIDE_BACKGROUND: ./bCardBackground.png #+REVEAL_TOC_SLIDE_BACKGROUND: ./bCardBackground.png #+REVEAL_DEFAULT_SLIDE_SIZE: 100% #+REVEAL_TITLE_SLIDE_SIZE: 100% #+REVEAL_TOC_SLIDE_SIZE: 100% * Notes :noexport: * Introduction ** Éibhear Ó hAnluain #+REVEAL_HTML:
#+ATTR_REVEAL: :frag (appear) - IT professional since 1994 - IT Architect since 2009 - Interested in and promoting federated social services since 2013-ish + [[https://www.gibiris.org/eo-blog/gibiris-services.html][Implementations]] + [[https://www.gibiris.org/eo-blog/tags/selfhosting.html][Blog posts]] + [[https://www.gibiris.org/eo-blog/posts/2019/04/15_harmful-content-consultation.html][Representations]] to government organisations - This presentation uses diagrams created using [[https://structurizr.com/][Strucutizr]] + =autolayout= throughout #+REVEAL_HTML:
** What is Bluesky #+REVEAL_HTML:
#+ATTR_REVEAL: :frag (appear) - A new social media service - [[https://twitter.com/jack/status/1204766078468911106][Initiated]] by Jack Dorsey when he was CEO of Twitter + Vision of a decentralised service + Inspired by Mike Masnick's 2019 "[[https://knightcolumbia.org/content/protocols-not-platforms-a-technological-approach-to-free-speech][Protocols, Not Platforms: A Technological Approach to Free Speech]]" paper + Plan was for Twitter to move all its users to the new platform when ready - [[https://en.wikipedia.org/wiki/Bluesky_(social_network)][Company formed in 2021]] + Seed funding from Twitter + Dorsey on the board + Set up as a public benefit company - Privatisation of Twitter in October 2022; Bluesky defunded - 2023, Dorsey deleteds Bluesky account -- not meeting his vision - April 2024, Dorsey resigns from Bluesky board. #+REVEAL_HTML:
* General social media architectures ** Simplistic view 1/2 -- overview #+REVEAL_HTML:
#+ATTR_HTML: :width 90% file:structurizr-1-001-GenericSocial-01.png #+REVEAL_HTML:
** Simplistic view 2/2 -- services #+REVEAL_HTML:
#+REVEAL_HTML:
#+ATTR_HTML: :width 40% file:structurizr-1-002-GenericSocial-02.png #+REVEAL_HTML:
#+REVEAL_HTML:
#+ATTR_REVEAL: :frag (appear) - Social media user access the app - The app interacts with the API - The API is the gateway for the database of posts, responses, likes, etc. #+REVEAL_HTML:
#+REVEAL_HTML:
** More realistic view 1/4 -- overview #+REVEAL_HTML:
#+ATTR_HTML: :width 90% file:structurizr-1-003-RealisticSocial-01.png #+REVEAL_HTML:
** More realistic view 2/4 -- basic services #+REVEAL_HTML:
#+REVEAL_HTML:
#+ATTR_HTML: :width 70% file:structurizr-1-004-RealisticSocial-02.png #+REVEAL_HTML:
#+REVEAL_HTML:
#+ATTR_REVEAL: :frag (appear) - Social media user access the app - The app interacts with the API - The API is the gateway for the database of posts, responses, likes, etc. - The API also captures data for building profiles of users for targeting purposes - The algorithmic feed generator guides the API on what posts to place into the app's feed #+REVEAL_HTML:
#+REVEAL_HTML:
** More realistic view 3/4 -- the algorithm #+REVEAL_HTML:
#+REVEAL_HTML:
#+ATTR_HTML: :width 70% file:structurizr-1-005-RealisticSocial-03.png #+REVEAL_HTML:
#+REVEAL_HTML:
- Social media user access the app - The app interacts with the API - The API is the gateway for the database of posts, responses, likes, etc. - The API also captures data for building profiles of users for targeting purposes - The algorithmic feed generator guides the API on what posts to place into the app's feed - Algorithmic feeds are created by the service administrator, using an app only /they/ have access to #+REVEAL_HTML:
#+REVEAL_HTML:
** More realistic view 4/4 -- content moderation #+REVEAL_HTML:
#+REVEAL_HTML:
#+ATTR_HTML: :width 100% file:structurizr-1-006-RealisticSocial-04.png #+REVEAL_HTML:
#+REVEAL_HTML:
- Social media user access the app - The app interacts with the API - The API is the gateway for the database of posts, responses, likes, etc. - The API also captures data for building profiles of users for targeting purposes - The algorithmic feed generator guides the API on what posts to place into the app's feed - Algorithmic feeds are created by the service administrator, using an app only /they/ have access to - Moderation is also performed by a member of the service's staff, using a dedicate app and services the the user doesn't have access to #+REVEAL_HTML:
#+REVEAL_HTML:
* Federated social media services ** Federated services 1/8 -- overview #+REVEAL_HTML:
#+ATTR_HTML: :width 75% file:structurizr-1-007-FederatedSocial-01.png #+REVEAL_HTML:
** Federated services 2/8 -- internal, administration and content moderation services #+REVEAL_HTML:
#+REVEAL_HTML:
#+ATTR_HTML: :width 70% file:structurizr-1-008-FederatedSocial-02.png #+REVEAL_HTML:
#+REVEAL_HTML:
#+ATTR_REVEAL: :frag (appear) - Same as before, the user access the service through an App that uses an API - As federated services are small, the administrator and the moderator are the one person - No algorithmic feeds, though + not popular in the fediverse community + difficult to implement in a federated environment. #+REVEAL_HTML:
#+REVEAL_HTML:
** Federated services 3/8 -- federation 1 #+REVEAL_HTML:
#+REVEAL_HTML:
#+ATTR_HTML: :width 100% file:structurizr-1-009-FederatedSocial-03.png #+REVEAL_HTML:
#+REVEAL_HTML:
#+ATTR_REVEAL: :frag (none none none appear) - Same as before, the user access the service through an App that uses an API - As federated services are small, the administrator and the moderator are the one person - No algorithmic feeds, though + not popular in the fediverse community + difficult to implement in a federated environment. - Federation service to push activity out to the federated network - Federation API to take in activity from other nodes - A logical database of inbound federated posts - Federation using ActivityPub standard #+REVEAL_HTML:
#+REVEAL_HTML:
** Federated services 4/8 -- federation 2 #+REVEAL_HTML:
#+ATTR_HTML: :width 75% file:structurizr-1-010-FederatedSocial-04.png #+REVEAL_HTML:
** Federated services 5/8 -- federation 3 #+REVEAL_HTML:
#+ATTR_HTML: :width 75% file:structurizr-1-011-FederatedSocial-05.png #+REVEAL_HTML:
** Federated services 6/8 -- federation 4 #+REVEAL_HTML:
#+ATTR_HTML: :width 75% file:structurizr-1-012-FederatedSocial-06.png #+REVEAL_HTML:
** Federated services 7/8 -- federation 5 #+REVEAL_HTML:
#+ATTR_HTML: :width 75% file:structurizr-1-013-FederatedSocial-07.png #+REVEAL_HTML:
** Federated services 8/8 -- federation 6 #+REVEAL_HTML:
#+ATTR_HTML: :width 75% file:structurizr-1-014-FederatedSocial-08.png #+REVEAL_HTML:
* Bluesky ** Basic Bluesky 1/2 #+REVEAL_HTML:
#+ATTR_HTML: :width 100% file:structurizr-1-015-BlueskyBasic-01.png #+REVEAL_HTML:
** Basic Bluesky 2/2 #+REVEAL_HTML:
#+REVEAL_HTML:
#+ATTR_HTML: :width 100% file:structurizr-1-016-BlueskyBasic-02.png #+REVEAL_HTML:
#+REVEAL_HTML:
#+ATTR_REVEAL: :frag (appear) - User interfaces with a client hosted by the /AppView/ - The /AppView/ includes an API (allowing for 3rd-party and bot-like clients) - The /AppView/ stores and reads data from the /Personal Data Server/ (PDS) - Bluesky resolved user identities using "DIDs" (Distributed IDs) - The Bluesky admin uses a separate service for preparing algorithmic feeds - The Bluesky moderator applies labels and actions to posts for trust and safety through a dedicated service - All implemented using a new social protocol call "The AT Protocol", or /@proto/. #+REVEAL_HTML:
#+REVEAL_HTML:
* Bluesky -- Identities ** Bluesky Identities 1/4 #+REVEAL_HTML:
#+REVEAL_HTML:
#+ATTR_HTML: :width 100% file:structurizr-1-017-BlueskyIdentity-01.png #+REVEAL_HTML:
#+REVEAL_HTML:
#+ATTR_REVEAL: :frag (appear) - User's typical Bluesky ID is =@.bsky.social= + e.g. =@theauldsthretch.bsky.social= - Users can set up their own handle, =@.=. E.g. (and these are all real IDs) ... + =@astrokatie.com= -- a cosmologist + =@eibhear.gibiris.org= -- the author + =@wyden.senate.gov= -- a U.S. Senator - User must control the domain or be a legitimate member of the domain's community - Domain-based handle resolves to a DID, either by DNS or =.well-known=: #+BEGIN_SRC shell $ dig _atproto.eibhear.gibiris.org TXT ... ;; ANSWER SECTION: _atproto.eibhear.gibiris.org. 3600 IN TXT "did=did:plc:23mysztmt7dh3l5lzhinzafi" $ curl https://theauldsthretch.bsky.social/.well-known/atproto-did did:plc:avzdf5esd7xpbgsgh7lx4kzq #+END_SRC #+REVEAL_HTML:
#+REVEAL_HTML:
** Bluesky Identities 2/4 #+REVEAL_HTML:
#+ATTR_HTML: :width 100% file:structurizr-1-018-BlueskyIdentity-02.png #+REVEAL_HTML:
** Bluesky Identities 3/4 #+REVEAL_HTML:
#+ATTR_HTML: :width 100% file:structurizr-1-019-BlueskyIdentity-03.png #+REVEAL_HTML:
** Bluesky Identities 4/4 #+REVEAL_HTML:
#+ATTR_HTML: :width 100% file:structurizr-1-020-BlueskyIdentity-04.png #+REVEAL_HTML:
* Bluesky -- Composable Feeds ** Bluesky Composable Feeds 1/3 #+REVEAL_HTML:
#+REVEAL_HTML:
#+ATTR_HTML: :width 100% file:structurizr-1-021-BlueskyFeeds-01.png #+REVEAL_HTML:
#+REVEAL_HTML:
#+ATTR_REVEAL: :frag (appear) - Algorithmic feeds use an API - Allows for independent feeds to be created by 3rd parties - Users' default feed is /Following/: + A chronological feed of posts from those you follow - Users subscribe to other feeds. Examples: + /Discover/ -- posts that you may be interested in + /Astronomy/ -- Posts relating to astronomy + /Quiet Posters/ -- those you follow but who don't post very often - The /AppView/ will read data from the independent feeds - The feeds get relevant posts from the PDS #+REVEAL_HTML:
#+REVEAL_HTML:
** Bluesky Composable Feeds 2/3 -- feeds as a separate application type #+REVEAL_HTML:
#+ATTR_HTML: :width 100% file:structurizr-1-023-BlueskyFeeds-03.png #+REVEAL_HTML:
** Bluesky Composable Feeds 3/3 -- Generic feeds #+REVEAL_HTML:
#+ATTR_HTML: :width 100% file:structurizr-1-024-BlueskyFeeds-04.png #+REVEAL_HTML:
* Bluesky -- The AppView ** Bluesky AppView 1/3 #+REVEAL_HTML:
#+REVEAL_HTML:
#+ATTR_HTML: :width 100% file:structurizr-1-025-BlueskyAppView-01.png #+REVEAL_HTML:
#+REVEAL_HTML:
#+ATTR_REVEAL: :frag (appear) - The main application users interact with the /AppView/. - The /AppView/ consists of the application (web, mobile, etc.) and the API + 3rd-party clients (web, mobile, bots) can be created - The client is only a part of the /AppView/ - The /AppView/ implements the /lexicon/ of the service + Converts the /data/ in the PDS into the social media /information/ - Now implemented by Bluesky as a separate service - /AppView/ reads from the feeds services, the moderation services and the PDS itelf - /AppView/ writes new posts, reposts, likes, replies, etc. to the PDS #+REVEAL_HTML:
#+REVEAL_HTML:
** Bluesky AppView 2/3 -- A 3rd-party independent AppView #+REVEAL_HTML:
#+REVEAL_HTML:
#+ATTR_HTML: :width 100% file:structurizr-1-027-BlueskyAppView-03.png #+REVEAL_HTML:
#+REVEAL_HTML:
#+ATTR_REVEAL: :frag (none none none none none none none appear) - The main application users interact with the /AppView/. - The /AppView/ consists of the application (web, mobile, etc.) and the API + 3rd-party clients (web, mobile, bots) can be created - The client is only a part of the /AppView/ - The /AppView/ implements the /lexicon/ of the service + Converts the /data/ in the PDS into the social media /information/ - Now implemented by Bluesky as a separate service - /AppView/ reads from the feeds services, the moderation services and the PDS itelf - /AppView/ writes new posts, reposts, likes, replies, etc. to the PDS - Third parties can also develop separate /AppViews/ (the client and APIs) ... + Alternatives to Bluesky's own /AppView/ + Implement a new /lexicon/ for, say, video sharing, long-form posts, etc. #+REVEAL_HTML:
#+REVEAL_HTML:
** Bluesky AppView 3/3 -- Generic AppView #+REVEAL_HTML:
#+ATTR_HTML: :width 70% file:structurizr-1-028-BlueskyAppView-04.png #+REVEAL_HTML:
* Bluesky -- The Relay and the PDS ** Bluesky Relay 1/2 -- 1 PDS into many #+REVEAL_HTML:
#+REVEAL_HTML:
#+ATTR_HTML: :width 100% file:structurizr-1-029-BlueskyRelay-01.png #+REVEAL_HTML:
#+REVEAL_HTML:
#+ATTR_REVEAL: :frag (appear) - Initially, Bluesky had just 1 PDS - Separated out into multiple PDSs for performance reasons #+REVEAL_HTML:
#+REVEAL_HTML:
** Bluesky Relay 2/2 -- Relay, as a proxy to the PDSes #+REVEAL_HTML:
#+REVEAL_HTML:
#+ATTR_HTML: :width 100% file:structurizr-1-030-BlueskyRelay-02.png #+REVEAL_HTML:
#+REVEAL_HTML:
#+ATTR_REVEAL: :frag (none none appear) - Initially, Bluesky had just 1 PDS - Separated out into multiple PDSs for performance reasons - Interfaces for reading PDSs now proxied through /the Relay/ - The Relay stores metadata and indexes/indices of posts - All information about posts are read from the Relay + the /AppView/ + algorithmic feeds services + moderation - /AppView/ still writes to the PDS (new posts, etc.) - With /the Relay/, we can now have *independent, self-hosted, PDSs*. #+REVEAL_HTML:
#+REVEAL_HTML:
** Bluesky PDS 1/3 -- An independent PDS: "federation" of a sort #+REVEAL_HTML:
#+ATTR_HTML: :width 90% file:structurizr-1-032-BlueskyPDS-01.png #+REVEAL_HTML:
** Bluesky PDS 2/3 -- An independent PDS: "federation" of a sort #+REVEAL_HTML:
#+ATTR_HTML: :width 90% file:structurizr-1-034-BlueskyPDS-03.png #+REVEAL_HTML:
** Bluesky PDS 3/3 -- PDS: "federation" of a sort #+REVEAL_HTML:
#+ATTR_HTML: :width 80% file:structurizr-1-035-BlueskyPDS-04.png #+REVEAL_HTML:
* Bluesky -- Moderation ** Bluesky Moderation 1/2 #+REVEAL_HTML:
#+REVEAL_HTML:
#+ATTR_HTML: :width 100% file:structurizr-1-036-BlueskyModeration-01.png #+REVEAL_HTML:
#+REVEAL_HTML:
#+ATTR_REVEAL: :frag (appear) - Moderation separated out as a distinct service - Moderation tooling reads from the Relay - Bluesky maintains and operates the top-level moderation + Suppresses the really bad stuff, like illegal and abusive material + and really, really, /really/ bad stuff like copyright infringement[fn::Sarcasm] - But separate moderation services can be implemented by 3rd parties #+REVEAL_HTML:
#+REVEAL_HTML:
** Bluesky Moderation 2/2 -- A 3rd-party independent Moderation service #+REVEAL_HTML:
#+REVEAL_HTML:
#+ATTR_HTML: :width 100% file:structurizr-1-038-BlueskyModeration-03.png #+REVEAL_HTML:
#+REVEAL_HTML:
#+ATTR_REVEAL: :frag (none none none none appear) - Moderation separated out as a distinct service - Moderation tooling reads from the Relay - Bluesky maintains and operates the top-level moderation + Suppresses the really bad stuff, like illegal and abusive material + and really, really, /really/ bad stuff like copyright infringement - But separate moderation services can be implemented by 3rd parties - User subscribes to moderation service - Users' feeds have material removed or elided by the moderation service - User can't unsubscribe from Bluesky's moderation #+REVEAL_HTML:
#+REVEAL_HTML:
* Bluesky ** Bluesky -- Current architecture #+REVEAL_HTML:
#+ATTR_HTML: :width 100% file:structurizr-1-038-BlueskyModeration-03.png #+REVEAL_HTML:
** Bluesky -- Roadmap #+REVEAL_HTML:
Planned for 2024 #+ATTR_REVEAL: :frag (appear) - Private/Direct messages (DMs) + E2E Encrypted + 1:1 initially, but group DMs planned - Video sharing + short clips, 90s or so. - Improved custom feeds - Improved anti-harassment - OAuth -- for allowing 3rd-party clients to authenticate without an application password #+REVEAL_HTML:
* Resources and further reading #+REVEAL_HTML:
- Original [[https://knightcolumbia.org/content/protocols-not-platforms-a-technological-approach-to-free-speech][/Protocols, Not Platforms: A Technological Approach to Free Speech/]] paper - [[https://bsky.social/about][Bluesky main page]] - The [[https://atproto.com/][ATProtocol specification]] - Bluesky [[https://docs.bsky.app/][documentation and blogs]] - Bluesky's [[https://github.com/bluesky-social][github]]: + The [[https://github.com/bluesky-social/atproto][=atproto=]] + [[https://github.com/bluesky-social/ozone][Ozone]], stackable content moderation tooling. + Self-hosting a [[https://github.com/bluesky-social/pds][PDS]]. - [[https://docs.bsky.app/showcase][Community]] (i.e. not governed by the Bluesky company) projects (tools, apps, bots, etc.) - Original [[https://git.gibiris.org/eibhearPublic/blueskyArchitecture][source for this presentation]] - Structurizr [[https://git.gibiris.org/eibhearPublic/blueskyArchitecture/src/branch/main/Bluesky.dsl][DSL file]] #+REVEAL_HTML: