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

洪 民憙 (Hong Minhee) :nonbinary:

@hongminhee@hollo.social · 1031 following · 1576 followers

An intersectionalist, feminist, and socialist living in Seoul (UTC+09:00). @tokolovesme's spouse. Who's behind @fedify, @hollo, and @botkit. Write some free software in , , , & . They/them.

서울에 사는 交叉女性主義者이자 社會主義者. 金剛兔(@tokolovesme)의 配偶者. @fedify, @hollo, @botkit 메인테이너. , , , 等으로 自由 소프트웨어 만듦.

()

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

@hongminhee@hollo.social

Es bedarf Zeit und Erfahrung, bevor der Arbeiter die Maschinerie von ihrer kapitalistischen Anwendung unterscheiden und daher seine Angriffe vom materiellen Produktionsmittel selbst auf dessen gesellschaftliche Exploitationsform übertragen lernt.

—Karl Marx, Das Kapital, Bd. I, Kap. 13, Abschn. 5

kopper :colon_three:'s avatar
kopper :colon_three:

@kopper@not-brain.d.on-t.work

i was a bit curious about the actual transfer size impact of json-ld, and what would happen if you replaced json-ld with simply explicitly repeating the namespaces. so i threw a few payloads, both compacted and expanded, into lynn.github.io/flateview/ at gzip level 6

my actor, compacted - 1855 bytes gzip'd
my actor, expanded - 1877 bytes gzip'd
my actor, compacted with no context - 1793 bytes gzip'd

quoted post, compacted - 2024 bytes gzip'd
quoted post, expanded - 2033 bytes gzip'd
quoted post, compacted with no context - 1985 bytes gzip'd

mastodon.social instance actor, compacted - 2761 bytes gzip'd
mastodon.social instance actor, compacted, with unused context values removed - 644 bytes gzip'd
mastodon.social instance actor, expanded - 707 bytes gzip'd
mastodon.social instance actor, compacted, with no context - 667 bytes gzip'd

RE:
not-brain.d.on-t.work/notes/aihcsxrs45sw0wbq
kopper :colon_three:'s avatar
kopper :colon_three:

@kopper@not-brain.d.on-t.work · Reply to 洪 民憙 (Hong Minhee) :nonbinary:'s post

@hongminhee from the point of view of someone who is "maintaining" a JSON-LD processing fedi software and has implemented their own JSON-LD processing library (which is, to my knowledge, the fastest in it's programming language), JSON-LD is pure overhead. there is nothing it allows for that can't be done with

1. making fields which take multiple values explicit
2. always using namespaces and letting HTTP compression take care of minimizing the transfer

without JSON-LD, fedi software could use zero-ish-copy deserialization for a majority of their objects (when strings aren't escaped) through tools like serde_json and Cow<str>, or
System.Text.Json.JsonDocument. JSON-LD processing effectively mandates a JSON node DOM (in the algorithms standardized, you may be able to get rid of it with Clever Programming)

additionally, due to JSON-LD 1.1 features like @type:@json, you can not even fetch contexts ahead of time of running JSON DOM transformations, meaning all JSON-LD code has to be async (in the languages which has the concept), potentially losing out on significant optimizations that can't be done in coroutines due to various reasons (e.g. C# async methods can't have ref structs, Rust async functions usually require thread safety due to tokio's prevalence, even if they're ran in a single-threaded runtime)

this is
after context processing introducing network dependency to the deserialization of data, wasting time and data on non-server cases (e.g. activitypub C2S). sure you can cache individual contexts, but then the context can change underneath you, desynchronizing your cached context and, in the worst case, opening you up to security vulnerabilities

json-ld is not my favorite part of this protocol
kopper :colon_three:'s avatar
kopper :colon_three:

@kopper@not-brain.d.on-t.work · Reply to kopper :colon_three:'s post

@hongminhee if i can give one piece of advice to devs who want to process JSON-LD: dont bother compacting. you already know the schema you output (or you're just passing through what the user gives and it doesn't matter to you), serialize directly to the compacted representation, and only run expansion on incoming data

expansion is the cheapest JSON-LD operation (since all other operations depend on it and run it internally anyhow), and this will get you all the compatibility benefits of JSON-LD with little downsides (beyond more annoying deserialization code, as you have to map the expanded representation to your internal structure which will likely be modeled after the compacted one)
kopper :colon_three:'s avatar
kopper :colon_three:

@kopper@not-brain.d.on-t.work · Reply to kopper :colon_three:'s post

@hongminhee take this part with a grain of salt because my benchmarks for it are with dotNetRdf which is the slowest C# implementation i know of (hence my replacement library), but JSON-LD is slower than RSA validation, which is one of the pain points around authorized fetch scalability

wetdry.world/@kopper/114678924693500011
kopper :colon_three:'s avatar
kopper :colon_three:

@kopper@not-brain.d.on-t.work · Reply to 洪 民憙 (Hong Minhee) :nonbinary:'s post

@hongminhee from the point of view of someone who is "maintaining" a JSON-LD processing fedi software and has implemented their own JSON-LD processing library (which is, to my knowledge, the fastest in it's programming language), JSON-LD is pure overhead. there is nothing it allows for that can't be done with

1. making fields which take multiple values explicit
2. always using namespaces and letting HTTP compression take care of minimizing the transfer

without JSON-LD, fedi software could use zero-ish-copy deserialization for a majority of their objects (when strings aren't escaped) through tools like serde_json and Cow<str>, or
System.Text.Json.JsonDocument. JSON-LD processing effectively mandates a JSON node DOM (in the algorithms standardized, you may be able to get rid of it with Clever Programming)

additionally, due to JSON-LD 1.1 features like @type:@json, you can not even fetch contexts ahead of time of running JSON DOM transformations, meaning all JSON-LD code has to be async (in the languages which has the concept), potentially losing out on significant optimizations that can't be done in coroutines due to various reasons (e.g. C# async methods can't have ref structs, Rust async functions usually require thread safety due to tokio's prevalence, even if they're ran in a single-threaded runtime)

this is
after context processing introducing network dependency to the deserialization of data, wasting time and data on non-server cases (e.g. activitypub C2S). sure you can cache individual contexts, but then the context can change underneath you, desynchronizing your cached context and, in the worst case, opening you up to security vulnerabilities

json-ld is not my favorite part of this protocol
Doug Webb's avatar
Doug Webb

@douginamug@mastodon.xyz · Reply to 洪 民憙 (Hong Minhee) :nonbinary:'s post

@hongminhee I'm reading this thread as a relative noob, but what I see again and again: almost no one "properly" implents largely because is hard but also because the spec itself is unclear. Most people who get stuff done have to go off-spec to actually ship.

This seems a fundamental weakness of the - and that disregarding the limitations coming from base architecture. Seems to pose a mid/long-term existential threat.

What can we do to help improve things?

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

@hongminhee@hollo.social · Reply to marius's post

@mariusor It's barely documented, but has worked well so far!

https://github.com/fedify-dev/fedify/tree/main/packages/vocab-tools

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

@hongminhee@hollo.social · Reply to silverpill's post

@silverpill @mariusor But if you omit @context, wouldn't it fail to work correctly in some implementations that rely on a JSON-LD processor? Fedify is actually one of those cases.

Linear's avatar
Linear

@linear@hackers.pub

‘급진적으로 존재하기’에서 시각장애인 천문학자가 음향화 기술을 활용해 다시 연구에 복귀한 이야기를 읽으면서 문득 장애인들에게 최근의 AI 기술은 어떤 영향을 미치고 있을까 궁금해졌다. 삶에 변화가 생겼다고 느낄지. 이조차도 장애인들은 피해 갔다고 느낄지.

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

@hongminhee@hollo.social · Reply to silverpill's post

@silverpill @linos That's good to know! Thanks!

@kodingwarrior You might be interested in this?

silverpill's avatar
silverpill

@silverpill@mitra.social · Reply to 洪 民憙 (Hong Minhee) :nonbinary:'s post

@hongminhee I don't know about Mobilizon but @linos considers adding related features to the Events FEP

https://codeberg.org/linos/fep/issues/18

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

@hongminhee@hollo.social · Reply to near's post

@computersandblues Actually, this question came up when my acquaintance, @kodingwarrior, mentioned wanting to use a fediverse-based event hosting service for an event he's organizing, which is when we started talking about Mobilizon. The main scenario we envisioned was allowing only those who have paid the participation fee to RSVP. And, of course, they would need to be refunded if they cancel.

@kodingwarrior, are there any other requirements besides this?

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

@hongminhee@hollo.social · Reply to 洪 民憙 (Hong Minhee) :nonbinary:'s post

어떤 ()들을 어필할 수 있을까?

  • 聯合宇宙(연합우주)를 이루는 소프트웨어 自體(자체)大部分(대부분) 오픈 소스이다?
  • 海外(해외)의 많은 오픈 소스 소프트웨어 開發者(개발자)들이 聯合宇宙(연합우주)를 쓰고 있다?

또 뭐가 있을까…?

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

@hongminhee@hollo.social

早晩間(조만간) 소프트웨어 엔지니어 커뮤니티로서의 聯合宇宙(연합우주)를 어필하는 韓國語(한국어) 글을 하나 써 봐야겠다.

Jazz de Ville – Jazz's avatar
Jazz de Ville – Jazz

@jdv_jazz@mastodon.nl

Ishmael Ensemble - Search For Peace

Cover: Ishmael Ensemble - Search For Peace
ALT text detailsCover: Ishmael Ensemble - Search For Peace
洪 民憙 (Hong Minhee) :nonbinary:'s avatar
洪 民憙 (Hong Minhee) :nonbinary:

@hongminhee@hollo.social

Does Mobilizon currently support hosting paid events that charge a participation fee? If not, is there a roadmap for a future feature update that will make this possible?

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

@hongminhee@hollo.social · Reply to Evan Prodromou's post

@evan I don't remember exactly, but I think I came across it while doing research before developing Fedify. I probably didn't use it because the TypeScript type definitions were missing. In the end, I ended up making something similar in Fedify anyway.

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

@hongminhee@hollo.social

아무래도 時差(시차) 適應(적응)完全(완전)失敗(실패)한 듯… 이제 일어났다.

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

@hongminhee@hollo.social · Reply to Luke Kanies's post

@lkanies @jalefkowit To be honest, I'm not too sure myself. I just know that JSON-LD was originally planned as a foundation for the Semantic Web. I can only guess that if ontology is useful in a certain area, then JSON-LD would probably be useful there too.

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

@hongminhee@hollo.social

I never thought this little rant of mine would be read by so many people. 😲

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

@hongminhee@hollo.social

I have deeply mixed feelings about 's adoption of JSON-LD, as someone who's spent way too long dealing with it while building .

Part of me wishes it had never happened. A lot of developers jump into ActivityPub development without really understanding JSON-LD, and honestly, can you blame them? The result is a growing number of implementations producing technically invalid JSON-LD. It works, sort of, because everyone's just pattern-matching against what Mastodon does, but it's not correct. And even developers who do take the time to understand JSON-LD often end up hardcoding their documents anyway, because proper JSON-LD processor libraries simply don't exist for many languages. No safety net, no validation, just vibes and hoping you got the @context right. Naturally, mistakes creep in.

But then the other part of me thinks: well, we're stuck with JSON-LD now. There's no going back. So wouldn't it be nice if people actually used it properly? Process the documents, normalize them, do the compaction and expansion dance the way the spec intended. That's what Fedify does.

Here's the part that really gets to me, though. Because Fedify actually processes JSON-LD correctly, it's more likely to break when talking to implementations that produce malformed documents. From the end user's perspective, Fedify looks like the fragile one. “Why can't I follow this person?” Well, because their server is emitting garbage JSON-LD that happens to work with implementations that just treat it as a regular JSON blob. Every time I get one of these bug reports, I feel a certain injustice. Like being the only person in the group project who actually read the assignment.

To be fair, there are real practical reasons why most people don't bother with proper JSON-LD processing. Implementing a full processor is genuinely a lot of work. It leans on the entire Linked Data stack, which is bigger than most people expect going in. And the performance cost isn't trivial either. Fedify uses some tricks to keep things fast, and I'll be honest, that code isn't my proudest work.

Anyway, none of this is going anywhere. Just me grumbling into the void. If you're building an ActivityPub implementation, maybe consider using a JSON-LD processor if one's available for your language. And if you're not going to, at least test your output against implementations that do.

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

@hongminhee@hollo.social · Reply to 초무's post

@chomu.dev JSON-LD를 그냥 JSON으로 다뤄도 괜찮다고 보는 사람이 많은 것 같아요.

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

@hongminhee@hollo.social · Reply to 초무's post

@chomu.dev JavaScript는 이미 JSON-LD 具顯(구현)이 있어서 Fedify는 안 그래도 그걸 가져다 쓰고 있어요 ㅋㅋㅋ

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

@hongminhee@hollo.social · Reply to Doug Webb's post

@douginamug Thank you so much for recognizing my hard work!

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

@hongminhee@hollo.social

I have deeply mixed feelings about 's adoption of JSON-LD, as someone who's spent way too long dealing with it while building .

Part of me wishes it had never happened. A lot of developers jump into ActivityPub development without really understanding JSON-LD, and honestly, can you blame them? The result is a growing number of implementations producing technically invalid JSON-LD. It works, sort of, because everyone's just pattern-matching against what Mastodon does, but it's not correct. And even developers who do take the time to understand JSON-LD often end up hardcoding their documents anyway, because proper JSON-LD processor libraries simply don't exist for many languages. No safety net, no validation, just vibes and hoping you got the @context right. Naturally, mistakes creep in.

But then the other part of me thinks: well, we're stuck with JSON-LD now. There's no going back. So wouldn't it be nice if people actually used it properly? Process the documents, normalize them, do the compaction and expansion dance the way the spec intended. That's what Fedify does.

Here's the part that really gets to me, though. Because Fedify actually processes JSON-LD correctly, it's more likely to break when talking to implementations that produce malformed documents. From the end user's perspective, Fedify looks like the fragile one. “Why can't I follow this person?” Well, because their server is emitting garbage JSON-LD that happens to work with implementations that just treat it as a regular JSON blob. Every time I get one of these bug reports, I feel a certain injustice. Like being the only person in the group project who actually read the assignment.

To be fair, there are real practical reasons why most people don't bother with proper JSON-LD processing. Implementing a full processor is genuinely a lot of work. It leans on the entire Linked Data stack, which is bigger than most people expect going in. And the performance cost isn't trivial either. Fedify uses some tricks to keep things fast, and I'll be honest, that code isn't my proudest work.

Anyway, none of this is going anywhere. Just me grumbling into the void. If you're building an ActivityPub implementation, maybe consider using a JSON-LD processor if one's available for your language. And if you're not going to, at least test your output against implementations that do.

nicole mikołajczyk's avatar
nicole mikołajczyk

@mkljczk@fediverse.pl

apparently Mobilizon 5.2.0 broke JSON-LD stuff for the few AP implementations that care, without any announcement other than ‘bugfix: Replace joinmobilizon.org by mobilizon.org’

A commit that changes the JSON-LD header to include the domain mobilizon. org rather than joinmobilizon.org for the namespace
ALT text detailsA commit that changes the JSON-LD header to include the domain mobilizon. org rather than joinmobilizon.org for the namespace
洪 民憙 (Hong Minhee) :nonbinary:'s avatar
洪 民憙 (Hong Minhee) :nonbinary:

@hongminhee@hollo.social

Thanks @_elena for taking a photo of me!

Elena Rossini ⁂'s avatar
Elena Rossini ⁂

@_elena@mastodon.social · Reply to Elena Rossini ⁂'s post

📸 6: Social Web devroom pics – @hongminhee of @fedify

video: ftp.belnet.be/mirror/FOSDEM/vi

a wide shot of Hong Minhee standing on stage at FOSDEM with the screen reading "Fedify - Building ActivityPub servers without the pain"
ALT text detailsa wide shot of Hong Minhee standing on stage at FOSDEM with the screen reading "Fedify - Building ActivityPub servers without the pain"
marius's avatar
marius

@mariusor@metalhead.club · Reply to 洪 民憙 (Hong Minhee) :nonbinary:'s post

@hongminhee it's no biggie - I doubt there's many projects that accept and thread correctly for this corner case - I just like to use this conversation as a test for threading. :D

Btw, I don't know if it's relevant to but I have the logic for threading (based on JWZ's old email threading algorithm) in the ONI project: git.sr.ht/~mariusor/oni/tree/m

@moreal

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

@hongminhee@hollo.social · Reply to marius's post

@mariusor Oh, yeah, apparently @moreal should fix this!

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

@hongminhee@hollo.social

Recently, @moreal built ap-thread-reader, a tool that displays threaded posts on a single page. Works with any ActivityPub platform, not just Mastodon.

Try it at https://ap-thread-reader.fly.dev/.

Built with Fedify and released as open source: https://github.com/moreal/ap-thread-reader.

More details at https://blog.moreal.dev/2026/02/ap-thread-reader-introduction/index.en.html.

Older →