Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update PDS vs BGS distinction, add updated federation details, fix typos #53

Merged
merged 13 commits into from
May 8, 2023
11 changes: 1 addition & 10 deletions components/cta.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,17 @@ export default function CTA() {
<div className="bg-blue-700">
<div className="mx-auto max-w-2xl py-16 px-4 text-center sm:py-20 sm:px-6 lg:px-8">
<h2 className="text-3xl font-bold tracking-tight text-white sm:text-4xl">
<span className="block">See what&#39;s next.</span>
<span className="block">Join the private beta.</span>
<span className="block">Join the Bluesky private beta.</span>
</h2>
<p className="mt-4 text-lg leading-6 text-blue-200">
The AT Protocol will launch soon.
<br />
Join the waitlist to try the beta before it&#39;s publicly available.
</p>
<Link href="https://bsky.app">
<a className="mt-8 inline-flex w-full items-center justify-center rounded-md border border-transparent bg-white px-5 py-3 text-base font-medium text-blue-600 hover:bg-blue-50 sm:w-auto">
Join the waitlist
</a>
</Link>
{
undefined /*<Link href="/guides/overview">
<a className="mt-8 inline-flex w-full items-center justify-center rounded-md px-5 py-3 text-base font-medium text-blue-100 hover:bg-blue-600 sm:w-auto sm:ml-4">
Learn more
</a>
</Link>*/
}
</div>
</div>
)
Expand Down
26 changes: 14 additions & 12 deletions components/footer.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import Link from 'next/link'
import { BuildingOfficeIcon } from '@heroicons/react/24/solid'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { faTwitter, faGithub } from '@fortawesome/free-brands-svg-icons'
import { faSquare } from '@fortawesome/free-solid-svg-icons'

const navigation = {
main: [
Expand All @@ -17,23 +20,22 @@ const navigation = {
{
name: 'Twitter',
href: 'https://twitter.com/bluesky',
icon: (props) => (
<svg fill="currentColor" viewBox="0 0 24 24" {...props}>
<path d="M8.29 20.251c7.547 0 11.675-6.253 11.675-11.675 0-.178 0-.355-.012-.53A8.348 8.348 0 0022 5.92a8.19 8.19 0 01-2.357.646 4.118 4.118 0 001.804-2.27 8.224 8.224 0 01-2.605.996 4.107 4.107 0 00-6.993 3.743 11.65 11.65 0 01-8.457-4.287 4.106 4.106 0 001.27 5.477A4.072 4.072 0 012.8 9.713v.052a4.105 4.105 0 003.292 4.022 4.095 4.095 0 01-1.853.07 4.108 4.108 0 003.834 2.85A8.233 8.233 0 012 18.407a11.616 11.616 0 006.29 1.84" />
</svg>
icon: ({ className }) => (
<FontAwesomeIcon icon={faTwitter} className={className} />
),
},
{
name: 'GitHub',
href: 'https://github.com/bluesky-social',
icon: (props) => (
<svg fill="currentColor" viewBox="0 0 24 24" {...props}>
<path
fillRule="evenodd"
d="M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0022 12.017C22 6.484 17.522 2 12 2z"
clipRule="evenodd"
/>
</svg>
icon: ({ className }) => (
<FontAwesomeIcon icon={faGithub} className={className} />
),
},
{
name: 'Bluesky',
href: 'https://bsky.app/profile/bsky.app',
icon: ({ className }) => (
<FontAwesomeIcon icon={faSquare} className={className} />
),
},
],
Expand Down
9 changes: 9 additions & 0 deletions components/header.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import {
} from '@heroicons/react/24/outline'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { faGithub, faTwitter } from '@fortawesome/free-brands-svg-icons'
import { faSquare } from '@fortawesome/free-solid-svg-icons'


const SiteSections = [
{
Expand All @@ -32,6 +34,13 @@ const ExternalLinks = [
<FontAwesomeIcon icon={faGithub} className={className} />
),
},
{
name: 'Bluesky',
href: 'https://bsky.app/profile/bsky.app',
icon: ({ className }) => (
<FontAwesomeIcon icon={faSquare} className={className} />
),
},
]

function classNames(...classes) {
Expand Down
4 changes: 2 additions & 2 deletions content/guides/data-repos.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
title: Personal Data Repositories
summary: A guide to the AT Protocol repo structure.
tldr:
- A "Data Repository” is a collection of signed data
- A data repository is a collection of signed data
- They're like Git repos but for database records
- Users put their public activity in these repos
---

# Data Repositories

A "Data Repository” is a collection of data published by a single user. Repositories are self-authenticating data structures, meaning each update is signed and can be verified by anyone.
A data repository is a collection of data published by a single user. Repositories are self-authenticating data structures, meaning each update is signed and can be verified by anyone.

## Data Layout

Expand Down
12 changes: 6 additions & 6 deletions content/guides/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ summary: Frequently Asked Questions about ATP

# FAQ

Frequently Asked Questions about the Authenticated Transfer Protocol (ATP).
Frequently Asked Questions about the Authenticated Transfer Protocol (ATP). For FAQ about Bluesky, visit [here](https://blueskyweb.xyz/faq).

## Is ATP a blockchain?
## Is the AT Protocol a blockchain?

No. ATP is a [federated protocol](https://en.wikipedia.org/wiki/Federation_(information_technology)). It's not a blockchain nor does it use a blockchain.
No. The AT Protocol is a [federated protocol](https://en.wikipedia.org/wiki/Federation_(information_technology)). It's not a blockchain nor does it use a blockchain.

## Why not use ActivityPub?

Expand All @@ -21,13 +21,13 @@ Other smaller differences include: a different viewpoint about how schemas shoul

## Why create Lexicon instead of using JSON-LD or RDF?

ATP exchanges data and RPC commands across organizations. For the data and RPC to be useful, the software needs to correctly handle schemas created by separate teams. This is the purpose of [Lexicon](/guides/lexicon).
Atproto exchanges data and RPC commands across organizations. For the data and RPC to be useful, the software needs to correctly handle schemas created by separate teams. This is the purpose of [Lexicon](/guides/lexicon).

We want engineers to feel comfortable using and creating new schemas, and we want developers to enjoy the DX of the system. Lexicon helps us produce strongly typed APIs which are extremely familiar to developers and which provides a variety of runtime correctness checks (which are vital in distributed systems).
emilyliu7321 marked this conversation as resolved.
Show resolved Hide resolved

[RDF](https://en.wikipedia.org/wiki/Resource_Description_Framework) is intended for extremely general cases in which the systems share very little infrastructure. It’s conceptually elegant but difficult to use, often adding a lot of syntax which devs don't understand. JSON-LD simplifies the task of consuming RDF vocabularies, but it does so by hiding the underlying concepts, not by making RDF more legible.

We looked very closely at using RDF but just didn't love the DX or the tooling it offered.
We looked very closely at using RDF but just didn't love the developer experience (DX) or the tooling it offered.

## What is “XRPC,” and why not use ___?

Expand All @@ -42,7 +42,7 @@ await api.com.atproto.repo.listRecords({
})
```

Maps to
...maps to:

```text
GET /xrpc/com.atproto.repo.listRecords
Expand Down
14 changes: 7 additions & 7 deletions content/guides/identity.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ tldr:

# Identity

The ATP identity system has a number of requirements:
The atproto identity system has a number of requirements:

* **ID provision.** Users should be able to create global IDs which are stable across services. These IDs should rarely change to ensure that links to their content are stable.
* **Public key distribution.** Distributed systems rely on cryptography to prove the authenticity of data and provide end-to-end privacy. The identity system must publish their public keys with strong security.
Expand Down Expand Up @@ -88,15 +88,15 @@ The [DID standard](https://www.w3.org/TR/did-core/) supports custom "methods" of
- **Key rotation**. Users must be able to rotate keypairs without losing their identity.
- **Decentralized governance**. The network should not be governed by a single stakeholder; it must be an open network or a consortium of providers.

At present, none of the DID methods meet our standards fully. **Therefore we have chosen to support [did-web](https://w3c-ccg.github.io/did-method-web/) and a temporary method we've created called [did-placeholder](/specs/did-plc).** We expect this situation to evolve as new solutions emerge.
At present, none of the DID methods meet our standards fully. **Therefore, we have chosen to support [did-web](https://w3c-ccg.github.io/did-method-web/) and a temporary method we've created called [did-placeholder](/specs/did-plc).** We expect this situation to evolve as new solutions emerge.

## Handle Resolution

Handles in ATP are domain names which resolve to a DID, which in turn resolves to a DID Document containing the user's signing pubkey and hosting service.
Handles in atproto are domain names which resolve to a DID, which in turn resolves to a DID Document containing the user's signing pubkey and hosting service.

Handle resolution uses the [`com.atproto.identity.resolveHandle`](/lexicons/com-atproto-identity) XRPC method. The method call should be sent to the server identified by the handle, and the handle should be passed as a parameter.

Here is the algorithm in pseudo-typescript:
Here is the algorithm in pseudo-TypeScript:

```typescript
async function resolveHandle(handle: string) {
Expand Down Expand Up @@ -134,7 +134,7 @@ await didPlc.resolve('did:plc:12345') /* => {

We can now communicate with `https://pds.com` to access Alice's data.

### Example: Hosting service w/separate domain name
### Example: Hosting service with separate domain name

Suppose we have the same scenario as before, except the user has supplied their own domain name:

Expand All @@ -159,11 +159,11 @@ await didPlc.resolve('did:plc:12345') /* => {
}*/
```

We can now communicate with `https://pds.com` to access Alice's data. The `https://alice.com` endpoint only serves to handle the `com.atproto.identity.resolveHandle()` call. The actual userdata lives on `pds.com`.
We can now communicate with `https://pds.com` to access Alice's data. The `https://alice.com` endpoint only serves to handle the `com.atproto.identity.resolveHandle()` call. The actual user data lives on `pds.com`.

### Example: Self-hosted

Let's consider a self-hosting scenario. If using did:plc, it would look something like:
Let's consider a self-hosting scenario. If it's using did:plc, it would look something like:

- The handle: `alice.com`
- The DID: `did:plc:12345`
Expand Down
8 changes: 5 additions & 3 deletions content/guides/lexicon.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ app.bsky.graph.follow

## Why is Lexicon needed?

Interoperability. An open network like ATP needs a way to agree on behaviors and semantics. Lexicon solves this while making it relatively simple for developers to introduce new schemas.
**Interoperability.** An open network like atproto needs a way to agree on behaviors and semantics. Lexicon solves this while making it relatively simple for developers to introduce new schemas.

Lexicon is not RDF. While RDF is effective at describing data, it is not ideal for enforcing schemas. Lexicon is easier to use because it doesn't need the generality that RDF provides. In fact, Lexicon's schemas enable code-generation with types and validation, which makes life much easier!
**Lexicon is not RDF.** While RDF is effective at describing data, it is not ideal for enforcing schemas. Lexicon is easier to use because it doesn't need the generality that RDF provides. In fact, Lexicon's schemas enable code-generation with types and validation, which makes life much easier!

## Schema format

Expand Down Expand Up @@ -72,7 +72,9 @@ Notice the structure differs depending on the `type`. The meanings of the type a

## RPC methods

AT Protocol's RPC system, [XRPC](/specs/xrpc), is essentially a thin wrapper around HTTPS. Its purpose is to apply the Lexicon to HTTPS. A call to:
The AT Protocol's RPC system, [XRPC](/specs/xrpc), is essentially a thin wrapper around HTTPS. Its purpose is to apply the Lexicon to HTTPS.

For example, a call to:

```typescript
com.example.getProfile()
Expand Down
39 changes: 20 additions & 19 deletions content/guides/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ summary: An introduction to the AT Protocol.

# Protocol Overview

The **Authenticated Transfer Protocol**, aka **ATP**, is a protocol for large-scale distributed social applications. This document will introduce you to the ideas behind the AT Protocol.
The **Authenticated Transfer Protocol**, aka **atproto**, is a federated protocol for large-scale distributed social applications. This document will introduce you to the ideas behind the AT Protocol.

## Identity

Users are identified by domain names in AT Protocol. These domains map to cryptographic URLs which secure the user's account and its data.
Users are identified by domain names on the AT Protocol. These domains map to cryptographic URLs which secure the user's account and its data.

![Identities](/img/identities.jpg)

Expand All @@ -21,7 +21,11 @@ User data is exchanged in [signed data repositories](/guides/data-repos). These

## Federation

ATP syncs the repositories in a federated networking model. Federation was chosen to ensure the network is convenient to use and reliably available. Commands are sent between servers using [HTTPS + XRPC](/specs/xrpc).
The AT Protocol syncs the repositories in a federated networking model. Federation was chosen to ensure the network is convenient to use and reliably available. Commands are sent between servers using [HTTPS + XRPC](/specs/xrpc).

The three main services of our first federation are personal data servers (PDS), big graph services (BGS), and App Views. We're also working on feed generators and labelers.

The lower-level primitives that can get stacked together differently are the repositories, lexicons, and DIDs. We published an overview of our technical decisions around federation architecture [on our blog](https://blueskyweb.xyz/blog/5-5-2023-federation-architecture).

![Federation](/img/federation.jpg)

Expand All @@ -31,20 +35,17 @@ A global schemas network called [Lexicon](/specs/lexicon) is used to unify the n

![Interop](/img/interop.jpg)

While the Web exchanges documents, the AT Protocol exchanges schematic and semantic information, enabling the software from different orgs to understand each others' data. This gives ATP clients freedom to produce user interfaces independently of the servers, and removes the need to exchange rendering code (HTML/JS/CSS) while browsing content.
While the Web exchanges documents, the AT Protocol exchanges schematic and semantic information, enabling the software from different orgs to understand each others' data. This gives atproto clients freedom to produce user interfaces independently of the servers, and removes the need to exchange rendering code (HTML/JS/CSS) while browsing content.

## Achieving scale

ATP distinguishes between "small-world" vs "big-world" networking. *Small-world* networking encompasses inter-personal activity while *big-world* networking aggregates activity outside of the user's personal interactions.

* **Small-world**: delivery of events targeted at specific users such as mentions, replies, and DMs, and sync of datasets according to follow graphs.
* **Big-world**: large-scale metrics (likes, reposts, followers), content discovery (algorithms), and user search.
Personal data servers are your home in the cloud. They host your data, distribute it, manage your identity, and orchestrate requests to other services to give you your views.

Personal Data Servers (PDS) are responsible for small-world networking while indexing services separately crawl the network to provide big-world networking.
Big Graph Services (BGS) handle all of your events, like retrieving large-scale metrics (likes, reposts, followers), content discovery (algorithms), and user search.

![Small world, Big world](/img/small-big-world.jpg)
![PDS and BGS](/img/small-big-world.jpg)

The small-world/big-world distinction is intended to achieve scale as well as a high degree of user-choice.
This distinction is intended to achieve scale as well as a high degree of user-choice.

## Algorithmic choice

Expand All @@ -54,13 +55,13 @@ As with Web search engines, users are free to select their indexers. Each feed,

## Account portability

We assume that a Personal Data Server may fail at any time, either by going offline in its entirety, or by ceasing service for specific users. ATP's goal is to ensure that a user can migrate their account to a new PDS without the server's involvement.
We assume that a Personal Data Server may fail at any time, either by going offline in its entirety, or by ceasing service for specific users. The goal of the AT Protocol is to ensure that a user can migrate their account to a new PDS without the server's involvement.

User data is stored in [signed data repositories](/guides/data-repos) and verified by [DIDs](/guides/identity). DIDs are essentially registries of user certificates, similar in some ways to the TLS certificate system. They are expected to be secure, reliable, and independent of the users' PDS.
User data is stored in [signed data repositories](/guides/data-repos) and verified by [DIDs](/guides/identity). Signed data repositories are like Git repos but for database records, and DIDs are essentially registries of user certificates, similar in some ways to the TLS certificate system. They are expected to be secure, reliable, and independent of the user's PDS.

![DID Documents](/img/did-doc.jpg)

Each DID Document publishes two public keys: a signing key and a recovery key.
Each DID document publishes two public keys: a signing key and a recovery key.

* **Signing key**: Asserts changes to the DID Document *and* to the user's data repository.
* **Recovery key**: Asserts changes to the DID Document; may override the signing key within a 72-hour window.
Expand All @@ -73,24 +74,24 @@ A backup of the user’s data is persistently synced to their client as a backup

## Speech, reach, and moderation

ATP's model is that _speech_ and _reach_ should be two separate layers, built to work with each other. The “speech” layer should remain neutral, distributing authority and designed to ensure everyone has a voice. The “reach” layer lives on top, built for flexibility and designed to scale.
Atproto's model is that _speech_ and _reach_ should be two separate layers, built to work with each other. The “speech” layer should remain neutral, distributing authority and designed to ensure everyone has a voice. The “reach” layer lives on top, built for flexibility and designed to scale.

![Speech vs Reach](/img/speech-vs-reach.jpg)

The base layer of ATP (Personal Data Repositories and Federated Networking) creates a common space for speech where everyone is free to participate, analogous to the Web where anyone can put up a website. The Indexing services then enable reach by aggregating content from the network, analogous to a search engine.
The base layer of atproto (personal data repositories and federated networking) creates a common space for speech where everyone is free to participate, analogous to the Web where anyone can put up a website. The indexing services then enable reach by aggregating content from the network, analogous to a search engine.

## Specifications

Five primary specs comprise the v1 of the @-protocol. These specs are:
Five primary specs comprise the v1 of the AT Protocol. These specs are:

- [Authenticated Transfer Protocol](/specs/atp)
- [Cross-system RPC (XRPC)](/specs/xrpc)
- [Lexicon Schemas](/specs/lexicon)
- [NameSpaced IDs (NSIDs)](/specs/nsid)
- [Namespaced IDs (NSIDs)](/specs/nsid)
- [DID:Placeholder (did:plc)](/specs/did-plc)

These specs can be organized into three layers of dependency:

![Spec diagram](/img/spec-diagram.jpg)

From here you can continue reading the [guides and specs](/docs).
From here, you can continue reading the [guides and specs](/docs).
Loading