Fedify: an ActivityPub server framework's avatar

Fedify: an ActivityPub server framework

@[email protected] · 7 following · 373 followers

Fedify is a TypeScript library for building federated server apps powered by ActivityPub and other standards, so-called fediverse. It aims to eliminate the complexity and redundant boilerplate code when building a federated server app, so that you can focus on your business logic and user experience.

WebsiteGitHubJSRnpm

https://fedify.dev/

https://github.com/dahlia/fedify

https://jsr.io/@fedify/fedify

https://www.npmjs.com/package/@fedify/fedify

洪 民憙(ホン・ミンヒ)'s avatar
洪 民憙(ホン・ミンヒ)

@[email protected] · Reply to 洪 民憙(ホン・ミンヒ)'s post

印刷所に注文した『自分だけのフェディバースのマイクロブログを作ろう!』の紙の本、到着した‼️

Thibault Molleman🇧🇪 🌈🐝's avatar
Thibault Molleman🇧🇪 🌈🐝

@[email protected] · Reply to Fedify: an ActivityPub server framework's post

@fedify good to mention: there is also a Matrix space for those who are like "why discord?!"

matrix.to/#/#fedify:matrix.org

Fedify: an ActivityPub server framework's avatar
Fedify: an ActivityPub server framework

@[email protected]

We now have and 's official server! Join us now!

https://discord.gg/bhtwpzURwd

Fedify: an ActivityPub server framework's avatar
Fedify: an ActivityPub server framework

@[email protected]

now has an driver! This means you can use as Fedify's message queue. To use it, first install the @fedify/amqp package, then set it up like below:

import { createFederation } from "@fedify/fedify";
import { AmqpMessageQueue } from "@fedify/amqp";
import { connect } from "amqplib";

const federation = createFederation({
  queue: new AmqpMessageQueue(await connect("amqp://localhost")),
  // ... other configurations
});

Oh, and we've also added results from AmqpMessageQueue to our benchmarks.

The results of the benchmarks for Fedify's outbox queue.
The results of the benchmarks for Fedify's outbox queue.
洪 民憙 (Hong Minhee)'s avatar
洪 民憙 (Hong Minhee)

@[email protected]

takes 20 minutes for GitHub Actions to finish. What do you think?

OptionVoters
That's too slow. Optimize it now.0 (0%)
Not fast, but tolerable.0 (0%)
Fedify: an ActivityPub server framework's avatar
Fedify: an ActivityPub server framework

@[email protected]

Fedify is an server framework in & . It aims to eliminate the complexity and redundant boilerplate code when building a federated server app, so that you can focus on your business logic and user experience.

The key features it provides currently are:

If you're curious, take a look at the website! There's comprehensive docs, a demo, a tutorial, example code, and more:

https://fedify.dev/

Fedify: an ActivityPub server framework's avatar
Fedify: an ActivityPub server framework

@[email protected]

If you're on the fence about which driver to choose for 's message queue, here's a benchmark that just came out. In addition to no queue, we compare 5 drivers, for a total of 11 setups:

Curious to see the results? Check out the GitHub repository!

https://github.com/dahlia/fedify-queue-benchmarks

https://fosstodon.org/@hongminhee/113247723368865290

洪 民憙 (Hong Minhee)'s avatar
洪 民憙 (Hong Minhee)

@[email protected] · Reply to 洪 民憙 (Hong Minhee)'s post

@thisismissem Here's the benchmark, and while it contains some questionable results, the overall conclusion is as following:

• Response times are much faster with queues than without.
• Overall throughput is better without queues.
• However, some queue setups can achieve throughput close to that of no queue.

This benchmark assumes communication within a single node, so the effect of queues may be greater in real-world networks.

github.com/dahlia/fedify-queue

Fedify: an ActivityPub server framework's avatar
Fedify: an ActivityPub server framework

@[email protected]

now has an driver! This means you can use as Fedify's message queue. To use it, first install the @fedify/amqp package, then set it up like below:

import { createFederation } from "@fedify/fedify";
import { AmqpMessageQueue } from "@fedify/amqp";
import { connect } from "amqplib";

const federation = createFederation({
  queue: new AmqpMessageQueue(await connect("amqp://localhost")),
  // ... other configurations
});

Oh, and we've also added results from AmqpMessageQueue to our benchmarks.

The results of the benchmarks for Fedify's outbox queue.
The results of the benchmarks for Fedify's outbox queue.
Fedify: an ActivityPub server framework's avatar
Fedify: an ActivityPub server framework

@[email protected]

The repository has reached 500 stars! Thank you everyone!

https://github.com/dahlia/fedify

The Fedify repository has reached 500 stars.
The Fedify repository has reached 500 stars.
Fedify: an ActivityPub server framework's avatar
Fedify: an ActivityPub server framework

@[email protected]

10月26日(土)に開催されるOSC 2024 Tokyo/FallにFedify/Hollo合同で出展します!可愛いFedifyのロゴのシールと『自分だけのフェディバースのマイクロブログを作ろう!』日本語版の紙の本を持って行く予定です。よろしくお願いします。

https://event.ospn.jp/osc2024-fall/

洪 民憙(ホン・ミンヒ)'s avatar
洪 民憙(ホン・ミンヒ)

@[email protected]

自作ActivityPubサーバーに興味が有る方は、ActivityPubサーバーフレームワークであるFedifyを一度使ってみてください。ちなみに、公式日本語チュートリアルである『自分だけのフェディバースのマイクロブログを作ろう!』がZennにも掲載されています。

zenn.dev/hongminhee/books/4a38

Fedify: an ActivityPub server framework's avatar
Fedify: an ActivityPub server framework

@[email protected]

What's your biggest wish for Fedify?

OptionVoters
RabbitMQ driver5 (21%)
Kafka driver3 (13%)
AWS SQS driver2 (8%)
Nuxt integration3 (13%)
AdonisJS integration2 (8%)
Fastify integration4 (17%)
NestJS integration3 (13%)
Koa integration2 (8%)
Fedify: an ActivityPub server framework's avatar
Fedify: an ActivityPub server framework

@[email protected]

If you're considering creating your own implementation of , consider .

Implementing ActivityPub from scratch requires more than you might think. WebFinger, HTTP Signatures, Linked Data Signatures, Object Integrity Proofs, NodeInfo, queues for sending and receiving activities, followers collection synchronization, remote object lookups, interoperability with Mastodon, Akkoma, Misskey, Threads, and more…

Just use Fedify and feel free to create your own ActivityPub implementation!

https://fedify.dev/

Fedify: an ActivityPub server framework's avatar
Fedify: an ActivityPub server framework

@[email protected]

Did you know that? The CLI has a command called fedify lookup, which can easily look up ActivityStreams objects on servers with authorized fetch (a.k.a. secure mode) enabled by turning on the -a/--authorized-fetch flag.

Here's demo!

Fedify: an ActivityPub server framework's avatar
Fedify: an ActivityPub server framework

@[email protected] · Reply to Steve Bate's post

@steve Yes, if you specify queue option of createFederation() function, incoming and outgoing activities are queued and processed by the background workers.

See also the following docs:

Fedify: an ActivityPub server framework's avatar
Fedify: an ActivityPub server framework

@[email protected]

If you're on the fence about which driver to choose for 's message queue, here's a benchmark that just came out. In addition to no queue, we compare 5 drivers, for a total of 11 setups:

Curious to see the results? Check out the GitHub repository!

https://github.com/dahlia/fedify-queue-benchmarks

https://fosstodon.org/@hongminhee/113247723368865290

洪 民憙 (Hong Minhee)'s avatar
洪 民憙 (Hong Minhee)

@[email protected] · Reply to 洪 民憙 (Hong Minhee)'s post

@thisismissem Here's the benchmark, and while it contains some questionable results, the overall conclusion is as following:

• Response times are much faster with queues than without.
• Overall throughput is better without queues.
• However, some queue setups can achieve throughput close to that of no queue.

This benchmark assumes communication within a single node, so the effect of queues may be greater in real-world networks.

github.com/dahlia/fedify-queue

Fedify: an ActivityPub server framework's avatar
Fedify: an ActivityPub server framework

@[email protected]

If you're considering creating your own implementation of , consider .

Implementing ActivityPub from scratch requires more than you might think. WebFinger, HTTP Signatures, Linked Data Signatures, Object Integrity Proofs, NodeInfo, queues for sending and receiving activities, followers collection synchronization, remote object lookups, interoperability with Mastodon, Akkoma, Misskey, Threads, and more…

Just use Fedify and feel free to create your own ActivityPub implementation!

https://fedify.dev/

洪 民憙(ホン・ミンヒ)'s avatar
洪 民憙(ホン・ミンヒ)

@[email protected]

独自のActivityPubの実装を作りたい方は、Fedifyを検討してみてください。

ActivityPubをゼロから実装するには、想像以上に多くの物を作る必要が有ります。WebFinger、HTTP Signatures、Linked Data Signatures、Object Integrity Proofs、NodeInfo、アクティビティの送受信のキュー、フォロワーコレクションのシンクロ、リモートオブジェクトの照会、MastodonやMisskey等との相互運用性の為の雑多な処理まで…Fedifyを使えば簡単に自分だけのActivityPubの実装を作る事が出来ます!

fedify.dev/

Fediverse Report's avatar
Fediverse Report

@[email protected]

New: Last Week in - ep 86

This week's news:
- Threads degrades their integration, delaying posts by 15 minutes before they appear in the rest of the fediverse
- Website League is a new ActivityPub-based Island network, outside of the rest of the fediverse
- Ghost discusses their beta plans and pricing.

fediversereport.com/last-week-

洪 民憙 (Hong Minhee)'s avatar
洪 民憙 (Hong Minhee)

@[email protected]

Adding vocabularies for FEP-9091 to .

github.com/dahlia/fedify/issue

Fedify: an ActivityPub server framework's avatar
Fedify: an ActivityPub server framework

@[email protected]

Did you know that? The CLI has a command called fedify lookup, which can easily look up ActivityStreams objects on servers with authorized fetch (a.k.a. secure mode) enabled by turning on the -a/--authorized-fetch flag.

Here's demo!

洪 民憙(ホン・ミンヒ)'s avatar
洪 民憙(ホン・ミンヒ)

@[email protected]

Fedifyを使うのを躊躇う理由が有れば?

OptionVoters
機能不足0 (0%)
抽象化レベルが低い0 (0%)
TypeScriptに慣れていない、または好みではない0 (0%)
日本語の資料の少なさ0 (0%)
GhostとHollo以外の実例がな0 (0%)
その他(リプライで教えてください)0 (0%)
Fedify: an ActivityPub server framework's avatar
Fedify: an ActivityPub server framework

@[email protected]

Introducing Fedify: Build Your Own Fediverse App with Ease! 🚀

Are you excited about the but find implementing daunting? Meet , a framework that simplifies building federated server apps. Whether you're creating the next Mastodon, Pixelfed, or something entirely new, Fedify has you covered.

What Fedify Offers:

Fedify abstracts away the complexities of ActivityPub, letting you focus on your app's unique features. It's designed to work seamlessly with popular web frameworks like Hono, Express, and Fresh.

Get Started Today!

Check out our step-by-step tutorial to create a microblog: https://fedify.dev/tutorial/microblog

Explore the discussions, contribute, or just star us on GitHub: https://github.com/dahlia/fedify

Join the Fedify community! Questions? Ideas? Find us on Matrix: #fedify:matrix.org.

Let's build a more diverse and interoperable fediverse together with Fedify!

洪 民憙 (Hong Minhee)'s avatar
洪 民憙 (Hong Minhee)

@[email protected]

I'm adding the (FEP-c0e0) class to … It will be coming in Fedify 1.1.0.

w3id.org/fep/c0e

In #Flancia we'll meet's avatar
In #Flancia we'll meet

@[email protected]

[[Fedify]] looks cool:

fedify.dev/intro

> Fedify is a TypeScript library for building federated server apps powered by ActivityPub and other standards, so-called fediverse.

h/t @band

Винт Прокс's avatar
Винт Прокс

@[email protected] · Reply to naDne :blobcatmelt2: :debian: 's post

@FiFachik @rf Для тех, кто хочет потестить федерирование для своего бложика с поддержкой , могу только посоветовать . Там есть встроенная команда для подключения к сервису на выбор, который может дать временный домен для тестирования.

洪 民憙 (Hong Minhee)'s avatar
洪 民憙 (Hong Minhee)

@[email protected]

ActivityPub 서버 프레임워크인 Fedify가 드디어 첫 스테이블 버전인 1.0.0을 릴리스했습니다!

velog.io/@hongminhee/fedify-1.

洪 民憙(ホン・ミンヒ)'s avatar
洪 民憙(ホン・ミンヒ)

@[email protected]

ActivityPubのサーバーフレームワークであるFedifyがついに最初の正規バージョンである1.0.0をリリースしました!

zenn.dev/hongminhee/articles/c
QT: hollo.social/@fedify/019229e7-
[参照]

Fedify: an ActivityPub server framework's avatar
Fedify: an ActivityPub server framework

@[email protected]

Fedify, an ActivityPub framework, has finally released its first stable version, 1.0.0! Here are key changes:

Deprecation of the term handle

From this version, the term handle across Fedify will only be used to refer to fediverse handles (e.g., @[email protected]). An actor's internal unique ID (e.g., b379dbdc-3b4f-4ef4-88c2-fc25632d1c22) is referred to as an identifier, and the WebFinger name (e.g., hongminhee) is referred to as a username.

The term handle in the API will be maintained for a while for backward compatibility, but deprecation warnings will be logged, and it is planned to be removed in the future.

For more details, please refer to the related documentation.

Linked Data Signatures

Linked Data Signatures is an outdated standard, but it's still relied upon by major fediverse implementations such as Mastodon.

In addition to HTTP Signatures and Object Integrity Proofs, Fedify now supports Linked Data Signatures from this version, thus supporting all types of signature methods used in the fediverse. This makes Fedify an ActivityPub implementation with the best interoperability.

However, Fedify users don't need to do anything special to use Linked Data Signatures. If an incoming activity has Linked Data Signatures, it automatically verifies the signature, and all outgoing activities will have signatures in three formats: HTTP Signatures, Linked Data Signatures, and Object Integrity Proofs.

For more details, please refer to the related documentation.

Activity forwarding

From this version, you can forward activities received in the inbox to other actors using the InboxContext.forwardActivity() method.

At first glance, you might think that you could just resend an activity received in the inbox using the Context.sendActivity() method. However, if you do this, the original signature is removed before the activity is delivered to the inbox, and when sending it, the signature of the forwarding actor is attached instead, causing the receiving side of the forwarded activity to not trust it.

On the other hand, when using the InboxContext.forwardActivity() method, the activity is forwarded with the original signature preserved, avoiding this problem. (Of course, the original activity itself must be signed with Linked Data Signatures or Object Integrity Proofs.)

For more details, please refer to the related documentation.

Sending Delete(Application) on fedify inbox termination

From this version, fedify inbox will send a Delete(Application) activity to all peer servers it encountered when terminated. This is typically an activity sent when deleting an account, which will help prevent residual data related to temporary actors from remaining on other servers.

PostgreSQL drivers

The @fedify/postgres package, which implements PostgreSQL drivers for the KvStore and MessageQueue interfaces, has been released alongside this version.

The PostgreSQL driver is a backend that can be sufficiently used in production, especially recommended for projects already using PostgreSQL.

Additionally, an option to select the PostgreSQL driver has been added to the fedify init command.

Celebrating Fedify 1.0.0

With the release of version 1.0.0, Fedify will now maintain API backward compatibility as much as possible. (Of course, in the long term, there may be a 2.0.0 that breaks backward compatibility.) This should be good news for those who have been hesitant to use Fedify because there hasn't been a stable version until now!

So, hoping that more services will support ActivityPub in the future, I conclude this post!

Anuj Ahooja's avatar
Anuj Ahooja

@[email protected]

If you're a hands-on learner and want to learn how to build for ActivityPub, I urge you to try out @fedify.

The documentation alone is a great way to understand the underlying mechanics, and you'll be prototyping ideas in no time. I've been using it for the last few months and can't recommend it enough.

They just launched their first stable release: fedify.dev/

s/o to @hongminhee for this fantastic resource.

Fedify: an ActivityPub server framework's avatar
Fedify: an ActivityPub server framework

@[email protected]

Fedify, an ActivityPub framework, has finally released its first stable version, 1.0.0! Here are key changes:

Deprecation of the term handle

From this version, the term handle across Fedify will only be used to refer to fediverse handles (e.g., @[email protected]). An actor's internal unique ID (e.g., b379dbdc-3b4f-4ef4-88c2-fc25632d1c22) is referred to as an identifier, and the WebFinger name (e.g., hongminhee) is referred to as a username.

The term handle in the API will be maintained for a while for backward compatibility, but deprecation warnings will be logged, and it is planned to be removed in the future.

For more details, please refer to the related documentation.

Linked Data Signatures

Linked Data Signatures is an outdated standard, but it's still relied upon by major fediverse implementations such as Mastodon.

In addition to HTTP Signatures and Object Integrity Proofs, Fedify now supports Linked Data Signatures from this version, thus supporting all types of signature methods used in the fediverse. This makes Fedify an ActivityPub implementation with the best interoperability.

However, Fedify users don't need to do anything special to use Linked Data Signatures. If an incoming activity has Linked Data Signatures, it automatically verifies the signature, and all outgoing activities will have signatures in three formats: HTTP Signatures, Linked Data Signatures, and Object Integrity Proofs.

For more details, please refer to the related documentation.

Activity forwarding

From this version, you can forward activities received in the inbox to other actors using the InboxContext.forwardActivity() method.

At first glance, you might think that you could just resend an activity received in the inbox using the Context.sendActivity() method. However, if you do this, the original signature is removed before the activity is delivered to the inbox, and when sending it, the signature of the forwarding actor is attached instead, causing the receiving side of the forwarded activity to not trust it.

On the other hand, when using the InboxContext.forwardActivity() method, the activity is forwarded with the original signature preserved, avoiding this problem. (Of course, the original activity itself must be signed with Linked Data Signatures or Object Integrity Proofs.)

For more details, please refer to the related documentation.

Sending Delete(Application) on fedify inbox termination

From this version, fedify inbox will send a Delete(Application) activity to all peer servers it encountered when terminated. This is typically an activity sent when deleting an account, which will help prevent residual data related to temporary actors from remaining on other servers.

PostgreSQL drivers

The @fedify/postgres package, which implements PostgreSQL drivers for the KvStore and MessageQueue interfaces, has been released alongside this version.

The PostgreSQL driver is a backend that can be sufficiently used in production, especially recommended for projects already using PostgreSQL.

Additionally, an option to select the PostgreSQL driver has been added to the fedify init command.

Celebrating Fedify 1.0.0

With the release of version 1.0.0, Fedify will now maintain API backward compatibility as much as possible. (Of course, in the long term, there may be a 2.0.0 that breaks backward compatibility.) This should be good news for those who have been hesitant to use Fedify because there hasn't been a stable version until now!

So, hoping that more services will support ActivityPub in the future, I conclude this post!

Older →