このプロトコルには、受信ボックスと送信ボックスという 2 つの主要コンポーネントがあります。これらは、HTTP プロトコルを通じてアクセスできる 2 つの API エンドポイントです。ユーザーが外部と何かを通信したい場合 (コンテンツの投稿など)、それを送信ボックスに送信します。ここで、システムはそれを適切なリストに追加し、フォロワーは送信トレイを読み取ることでアクセスできます。
ActivityPub のユーザー名は電子メール アドレスに似ています。たとえば、私のマストドンのユーザー名は @[email protected] です。これは、私のユーザー情報が dm.me サーバーに thebojda という名前で保存されていることを意味します。
//me.dm/.well-known/webfinger?resource=acct:thebojda%40me.dm
{ "subject":"acct:[email protected]", "aliases":[ "//me.dm/@thebojda", "//me.dm/users/thebojda" ], "links":[ { "rel":"//webfinger.net/rel/profile-page", "type":"text/html", "href":"//me.dm/@thebojda" }, { "rel":"self", "type":"application/activity+json", "href":"//me.dm/users/thebojda" }, { "rel":"//ostatus.org/schema/1.0/subscribe", "template":"//me.dm/authorize_interaction?uri={uri}" } ] }
{ "@context": [ "//www.w3.org/ns/activitystreams", "//w3id.org/security/v1", { "manuallyApprovesFollowers": "as:manuallyApprovesFollowers", "toot": "//joinmastodon.org/ns#", "featured": { "@id": "toot:featured", "@type": "@id" }, "featuredTags": { "@id": "toot:featuredTags", "@type": "@id" }, "alsoKnownAs": { "@id": "as:alsoKnownAs", "@type": "@id" }, "movedTo": { "@id": "as:movedTo", "@type": "@id" }, "schema": "//schema.org#", "PropertyValue": "schema:PropertyValue", "value": "schema:value", "discoverable": "toot:discoverable", "Device": "toot:Device", "Ed25519Signature": "toot:Ed25519Signature", "Ed25519Key": "toot:Ed25519Key", "Curve25519Key": "toot:Curve25519Key", "EncryptedMessage": "toot:EncryptedMessage", "publicKeyBase64": "toot:publicKeyBase64", "deviceId": "toot:deviceId", "claim": { "@type": "@id", "@id": "toot:claim" }, "fingerprintKey": { "@type": "@id", "@id": "toot:fingerprintKey" }, "identityKey": { "@type": "@id", "@id": "toot:identityKey" }, "devices": { "@type": "@id", "@id": "toot:devices" }, "messageFranking": "toot:messageFranking", "messageType": "toot:messageType", "cipherText": "toot:cipherText", "suspended": "toot:suspended", "focalPoint": { "@container": "@list", "@id": "toot:focalPoint" } } ], "id": "//me.dm/users/thebojda", "type": "Person", "following": "//me.dm/users/thebojda/following", "followers": "//me.dm/users/thebojda/followers", "inbox": "//me.dm/users/thebojda/inbox", "outbox": "//me.dm/users/thebojda/outbox", "featured": "//me.dm/users/thebojda/collections/featured", "featuredTags": "//me.dm/users/thebojda/collections/tags", "preferredUsername": "thebojda", "name": "Laszlo Fazekas", "summary": "<p>Software developer, contributing writer</p>", "url": "//me.dm/@thebojda", "manuallyApprovesFollowers": false, "discoverable": false, "published": "2024-03-02T00:00:00Z", "devices": "//me.dm/users/thebojda/collections/devices", "publicKey": { "id": "//me.dm/users/thebojda#main-key", "owner": "//me.dm/users/thebojda", "publicKeyPem": "-----BEGIN PUBLIC KEY----- MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxlvpgcOxBikiXfm9snZt EB3Y2BSnBW3s8nd1d4Z1wCzaNfa/woB6RDQJoQYEISbMpkEyWhDzI4jRDafpn5/j YiyyGka9U2KZHv1to0Ej9uVwUcQOnsq9iUtJGhOWCP27blKGTLKFEHtPL2Y4hp4Z kYzlh1x0aAyw8YC7/nbS8WDAeZNS7R3ET7Syhp3LKiCMmL1aCLSoOQJ5DdxVikMJ rJ9bzlUjxzCsm1aNBB0i269t4fD1evBO8QDhEAOnAZ6wLEV74j9SCjYMvKRV8z5i PQbhbKntXjn1XhbkIkj1D+yGRYYfnm1XyWTuaM4mDllvuOyqJ8GQVFADLc6KCQYz 7QIDAQAB -----END PUBLIC KEY----- " }, "tag": [], "endpoints": { "sharedInbox": "//me.dm/inbox" }, "icon": { "type": "Image", "mediaType": "image/jpeg", "url": "//media.me.dm/accounts/avatars/109/955/144/019/799/820/original/fe8e930e0f1467ac.jpeg" } }
{ "@context": "//www.w3.org/ns/activitystreams", "id": "//me.dm/users/thebojda/outbox", "type": "OrderedCollection", "totalItems": 1, "first": "//me.dm/users/thebojda/outbox?page=true", "last": "//me.dm/users/thebojda/outbox?min_id=0&page=true" }
{ "@context": [ "//www.w3.org/ns/activitystreams", { "ostatus": "//ostatus.org#", "atomUri": "ostatus:atomUri", "inReplyToAtomUri": "ostatus:inReplyToAtomUri", "conversation": "ostatus:conversation", "sensitive": "as:sensitive", "toot": "//joinmastodon.org/ns#", "votersCount": "toot:votersCount" } ], "id": "//me.dm/users/thebojda/outbox?page=true", "type": "OrderedCollectionPage", "prev": "//me.dm/users/thebojda/outbox?min_id=5562038&page=true", "partOf": "//me.dm/users/thebojda/outbox", "orderedItems": [ { "id": "//me.dm/users/thebojda/statuses/5562038/activity", "type": "Create", "actor": "//me.dm/users/thebojda", "published": "2024-03-02T18:47:47Z", "to": [ "//www.w3.org/ns/activitystreams#Public" ], "cc": [ "//me.dm/users/thebojda/followers" ], "object": { "id": "//me.dm/users/thebojda/statuses/5562038", "type": "Note", "summary": null, "inReplyTo": null, "published": "2024-03-02T18:47:47Z", "url": "//me.dm/@thebojda/5562038", "attributedTo": "//me.dm/users/thebojda", "to": [ "//www.w3.org/ns/activitystreams#Public" ], "cc": [ "//me.dm/users/thebojda/followers" ], "sensitive": false, "atomUri": "//me.dm/users/thebojda/statuses/5562038", "inReplyToAtomUri": null, "conversation": "tag:me.dm,2024-03-02:objectId=1406005:objectType=Conversation", "content": "<p>My "ars poetica": How to Change the World?! Pocket Guide for People With a Messiah Complex <a href=\"//medium.com/geekculture/how-to-change-the-world-pocket-guide-for-people-with-a-messiah-complex-dd2d16bb92a\" target=\"_blank\" rel=\"nofollow noopener noreferrer\"><span class=\"invisible\">//</span><span class=\"ellipsis\">medium.com/geekculture/how-to-</span><span class=\"invisible\">change-the-world-pocket-guide-for-people-with-a-messiah-complex-dd2d16bb92a</span></a></p>", "contentMap": { "en": "<p>My "ars poetica": How to Change the World?! Pocket Guide for People With a Messiah Complex <a href=\"//medium.com/geekculture/how-to-change-the-world-pocket-guide-for-people-with-a-messiah-complex-dd2d16bb92a\" target=\"_blank\" rel=\"nofollow noopener noreferrer\"><span class=\"invisible\">//</span><span class=\"ellipsis\">medium.com/geekculture/how-to-</span><span class=\"invisible\">change-the-world-pocket-guide-for-people-with-a-messiah-complex-dd2d16bb92a</span></a></p>" }, "attachment": [], "tag": [], "replies": { "id": "//me.dm/users/thebojda/statuses/5562038/replies", "type": "Collection", "first": { "type": "CollectionPage", "next": "//me.dm/users/thebojda/statuses/5562038/replies?only_other_accounts=true&page=true", "partOf": "//me.dm/users/thebojda/statuses/5562038/replies", "items": [] } } } } ] }
ご覧のとおり、ActivityPub は理解と実装が簡単な比較的単純な標準です。唯一の弱点は、中央サーバーを必要とする HTTP プロトコルを使用していることです。これにより、ジャック ドーシー (Twitter の創設者) のお気に入りのプロジェクトである Nostr などの代替プロトコルが誕生しました。
記述データとフィードを分散化するための完璧なソリューションの 1 つは、 またはを使用することです (これらのプロトコルに関する完全な記事があります)。 Ethereum Swarm の場合、フィード識別子は Swarm アドレスですが、IPNS の場合、フィード識別子は公開キーです。
これらのいくつかの小さな拡張機能を使用すると、Nostr のような新しいプロトコルを導入する必要なく、ActivityPub を完全に分散化し、「web3 互換」にすることができます。