#Fedify

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

@[email protected]

Hooray, 's GitHub repository just hit 300 stars!

Fedify's GitHub repository, which has over 300 stars.
Fedify's GitHub repository, which has over 300 stars.
洪 民憙 (Hong Minhee)'s avatar
洪 民憙 (Hong Minhee)

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

한 달 앞서 제가 일자리를 찾는다는 글을 올렸었지요? 그런데 갑작스럽게 제가 오픈 소스로 만들고 있던 @fedify 프로젝트가 글로벌 블로깅 플랫폼인 @ghost 로부터 펀딩을 받게 되었습니다. 그래서 일자리 찾는 것은 그만두고, 한동안 일을 하게 될 것 같습니다.

writings.hongminhee.org/2024/0

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

@[email protected]

I jsut wrote a detailed post on my blog about @ghost's for @fedify! (Both English and Korean available.)

writings.hongminhee.org/2024/0

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

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

now has a queue for incoming activities and they are automatically retried when they fail. The default retry strategy is good enough (exponential backoff + decorrelated jitter), and it's even fully customizable. Updated also the docs:

unstable.fedify.dev/manual/inb

You can give it a try by installing 0.12.0-dev.265+cb851932, the latest unstable release:

jsr.io/@fedify/[email protected]
npmjs.com/package/@fedify/fedi

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

@[email protected]

In the next version of , the type is introduced to let you fully customize the retry policy of the task queue for incoming and outgoing activities. Of course, you can also simply adjust the parameters of the built-in exponential backoff + decorrelated jitter policy.

outboxRetryPolicy

This API is available since Fedify 0.12.0.

The retry policy for sending activities to recipients' inboxes.

By default, this uses an exponential backoff strategy with a maximum of 10 attempts and a maximum delay of 12 hours.

You can fully customize the retry policy by providing a custom function that satisfies the RetryPolicy type. Or you can adjust the parameters of the createExponentialBackoffRetryPolicy() function, which is a default implementation of the retry policy.
outboxRetryPolicy This API is available since Fedify 0.12.0. The retry policy for sending activities to recipients' inboxes. By default, this uses an exponential backoff strategy with a maximum of 10 attempts and a maximum delay of 12 hours. You can fully customize the retry policy by providing a custom function that satisfies the RetryPolicy type. Or you can adjust the parameters of the createExponentialBackoffRetryPolicy() function, which is a default implementation of the retry policy.
洪 民憙 (Hong Minhee)'s avatar
洪 民憙 (Hong Minhee)

@[email protected]

Basic implementation of the inbox queue is complete and documentation is being worked on.

hollo.social/@fedify/0190687b-

Making inbox listeners non-blocking

This API is available since Fedify 0.12.0.

Usually, processes inside an inbox listener should be non-blocking because they may involve long-running tasks. Fortunately, you can easily turn inbox listeners into non-blocking by providing a queue option to createFederation() function. If it is not present, incoming activities are processed immediately and block the response to the sender until the processing is done.

While the queue option is not mandatory, it is highly recommended to use it in production environments to prevent the server from being overwhelmed by incoming activities.

Note: Activities with invalid signatures/proofs are silently ignored and not queued.
Making inbox listeners non-blocking This API is available since Fedify 0.12.0. Usually, processes inside an inbox listener should be non-blocking because they may involve long-running tasks. Fortunately, you can easily turn inbox listeners into non-blocking by providing a queue option to createFederation() function. If it is not present, incoming activities are processed immediately and block the response to the sender until the processing is done. While the queue option is not mandatory, it is highly recommended to use it in production environments to prevent the server from being overwhelmed by incoming activities. Note: Activities with invalid signatures/proofs are silently ignored and not queued.
Fedify: an ActivityPub server framework's avatar
Fedify: an ActivityPub server framework

@[email protected]

In the next version of , the Context.hostname, Context.host, and Context.origin properties will be added for better multitenancy/virtual hosting support.

https://github.com/dahlia/fedify/issues/66#issuecomment-2198967566

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

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

When there is no queue, if the process fails, the inbox can just respond with a 500 server error and the sender will resend it.

But with a queue, by the time the inbox responds, it doesn't know if the process will fail because it hasn't run yet. So the sender won't retry whether it fails or not.

So, should it have its own retry logic when there is a queue?

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

@[email protected]

I'm adding a queue for incoming activities in , and I have a concern. If an error occurs while processing an activity, should it retry?

hollo.social/@fedify/0190687b-

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

@[email protected]

has always been queuing outgoing activities, but not incoming activities. Thanks to @ghost's sponsorship, we are now implementing queues for incoming activities!

https://github.com/dahlia/fedify/issues/70

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

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

It was trivial than I expected; now supports type!

blaine's avatar
blaine

@[email protected]

I'm not sure if it's new or if I'm just really bad at paying attention, but I just learned about it and I'm so excited about : unstable.fedify.dev/

I think systems that are shaped like fedify are one of the key things needed to really open experimentation and exploration of the possibilities that the fediverse affords.

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

@[email protected]

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:

• Type-safe objects for Activity Vocabulary (including some vendor-specific extensions)
client and server
• HTTP Signatures
• Middleware for handling webhooks
protocol
.js, , and support
• CLI toolchain for testing and debugging

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

fedify.dev/

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

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

If you want a message queue backend for as well, please upvote this issue!

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

@[email protected]

has supported optional queuing for outgoing activities, with two built-in message queue backends: InProcessMessageQueue, which is suitable for development, and DenoKvMessageQueue, which is only available in Deno.

Fedify has also had two built-in cache backends, MemoryKvStore, which is suitable for development, and DenoKvStore, which is only available in Deno.

Now, however, by installing the @fedify/redis package, you can use as both a message queue backend and a cache backend! Unlike DenoKvMessageQueue and DenoKvStore, it's also available for .js and .

This feature was made possible with the support of @ghost.

https://github.com/dahlia/fedify-redis

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/

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

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

As it turns out, the issue was neither on 's end nor 's end. It was a issue that I discovered during Hollo development, and anyway it's now fixed!

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

@[email protected]

now has the official account! Please follow @fedify!

hollo.social/@fedify/01905d6a-

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

@[email protected]

Hello, ! It's the official fedi account of the Fedify, an server framework!

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

@[email protected]

Found a memory leak (on ) in recent commits of —be careful when using the unstable versions.

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

@[email protected]

We have a space on for the community, so if you have any questions, feel free to join us and ask!

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

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

@[email protected]

I'm happy to announce that the project has been funded by @ghost!

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

@[email protected]

development is often motivation to add features to , for example, most of the commits I added to Fedify today were for Hollo.

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

@[email protected]

If you'd like to support the development of or , you can sponsor me on GitHub!

github.com/sponsors/dahlia

Hollo's avatar
Hollo

@[email protected]

Introducing . Hollo is an -enabled single-user microblogging software. Although it's for a single user, it also supports creating and running multiple accounts for different topics.

It's headless, meaning you can use existing client apps instead, with its Mastodon-compatible APIs. It has most feature parity with Mastodon. One big difference with Mastodon is that you can use in the content of your posts.

Oh, and Hollo is built using and .

https://github.com/dahlia/hollo

Tiago F's avatar
Tiago F

@[email protected]

Fedify é uma biblioteca TypeScript para construir aplicativos de servidor federado desenvolvidos com ActivityPub e outros padrões, chamados fediverse . 1 Seu objetivo é eliminar a complexidade e o código padrão redundante ao construir um aplicativo de servidor federado, para que você possa se concentrar na lógica de negócios e na experiência do usuário.

github.com/dahlia/fedify

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

@[email protected]

Version 0.10.0 of , an server framework, has been released! Starting with this release, Fedify, previously distributed under AGPL 3.0, is now distributed under the MIT License to encourage wider adoption. Here are the major changes:

• In addition to RSA-PKCS#1-v1.5, Fedify now supports Ed25519 for signing and verifying the activities.
• FEP-521a: Multiple key pairs can now be registered for an actor.
• FEP-8b32: Implemented Object Integrity Proofs.
• Added Arrive and Question classes.

github.com/dahlia/fedify/relea

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

@[email protected]

Starting with the next release, , previously distributed under AGPL 3.0, will be distributed under the MIT License to encourage wider adoption!

Elena Rossini ✏️✨📸's avatar
Elena Rossini ✏️✨📸

@[email protected]

🌈 Happy Monday everyone! 🌞

Two news items that make me hopeful about the future of the open web – especially for creators:

is testing a new OpenGraph tag to highlight writers & creators on Mastodon -> github.com/mastodon/mastodon/p

✨ publishing platform @ghost just announced they will use to implement -> activitypub.ghost.org/day-4/ (their ActivityPub newsletter is brilliant and hilarious and I could not recommend it more)

a screenshot of a potentially new feature of Mastodon currently in beta testing showing an author tag/link below a blog post... the screenshot is in the foreground and in the background you see a starry sky
a screenshot of a potentially new feature of Mastodon currently in beta testing showing an author tag/link below a blog post... the screenshot is in the foreground and in the background you see a starry sky
洪 民憙 (Hong Minhee) 🤏🏼's avatar
洪 民憙 (Hong Minhee) 🤏🏼

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

I had three candidates for the name: Fedilib, Libfedi, and , and when I put it to a poll, Fedify was the most popular choice, so it became the current name.

todon.eu/@hongminhee/111976124

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

@[email protected]

A little backstory about 's name: I originally wanted to name Fedify FediKit, but I realized that another project was already taking the name, so I had to change it in a hurry before release.

todon.eu/@hongminhee/111976051

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

@[email protected]

@hollo is a testbed for the bleeding edge of . 😂

Darnell Clayton :verified:'s avatar
Darnell Clayton :verified:

@[email protected]

In The Machine: Making Adoption Easier Again 🔛 @[email protected] (Seize The Day) 📰 darnell.day/ghost-in-the-fedif

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

@[email protected]

I'm very excited that the team has chosen to implement . I've been working closely with the Ghost team, and it's been a lot of fun, and I can't wait to see the ActivityPub implementation at Ghost.

activitypub.ghost.org/day-4/

Jeff Sikes's avatar
Jeff Sikes

@[email protected]

Ghost will be using the open source Fedify server framework to manage the activitypub bits and pieces of their service.

activitypub.ghost.org/day-4/?r

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

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

Thanks to @silverpill, is finally FEP-8b32 compliant! Though it's not ready for general release yet, it's passing tests in the latest main branch. I'll test it with Mitra and other FEP-8b32-compliant implementations, and if it works well, it'll be included in 0.10.0.

You can try it out in version 0.10.0-dev.205+0cbca257.

jsr.io/@fedify/[email protected]

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

@[email protected]

I just released 0.9.1, which fixed one small bug.

github.com/dahlia/fedify/relea

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

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

Implementing Object Integrity Proofs (FEP-8b32) and my implementation is not passing the test vectors. I haven't found the reason for 24 hours… 😫

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

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

FEP-521a has been implemented in .

Actors now have the property, and the class has been added. For example, if you look at the the actor from the Fedify Example Blog (fedify-blog.deno.dev/users/fed), you can see that it has the assertionMethods property in addition to the publicKey property.

You can try it out in version 0.10.0-dev.196+55cc34d1.

jsr.io/@fedify/[email protected]

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

@[email protected]

As a first step towards adding Object Integrity Proofs (FEP-8b32) to , I've made it support keys. I've also enabled multiple keys to be associated with an actor. For example, if you look at the actor from the Fedify Example Blog (fedify-blog.deno.dev/users/fed), you'll see that it has two public keys, one for RSA and one for Ed25519.

You can try it out in version 0.10.0-dev.190+4dffb89a.

jsr.io/@fedify/[email protected]

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

@[email protected]

Did you know? offers the markdown-it plugins for parsing -style mentions and hashtags syntax.

• @fedify/markdown-it-mention: github.com/dahlia/markdown-it-
• @fedify/markdown-it-hashtag: github.com/dahlia/markdown-it-

Check it out!

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

@[email protected]

Version 0.9.0 of , an server framework, has been released! Here are the main changes:

• Added Tombstone, Hashtag, and Emoji classes.
• Added normalizeActorHandle() function to normalize an actor handle. This is needed when the domain of the actor handle is an IDN, or when the domain contains capital letters.
• Added an option to the sendActivity() function, excludeBaseUris, to exclude specified servers from sending activities. This can be used when you don't want to send activities to your own server.
• Added Context.parseUri(), a method to parse actor, object, inbox, and collection URIs.
• The time window for HTTP Signatures verification is now configurable.
• The @fedify/fedify/httpsig module has been renamed to . This is in preparation for implementing additional object integrity proofs other than HTTP Signatures.
• Improved interoperability with .

github.com/dahlia/fedify/relea

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

@[email protected]

Just set up a Misskey instance for debugging