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

@hongminhee@hollo.social

Today @kopper shared a post on the fediverse titled how to not regret c2s, and I found it genuinely interesting to read, even if I'm not sure its proposed architecture actually solves what it sets out to solve.

The author's frustration with naïve implementations is well-founded. Slapping an facade onto an existing Mastodon-like server and calling it C2S doesn't buy you much—you end up with the rigidity of a bespoke API without any of the interoperability C2S is supposed to offer. The “JSON-LD flavored Mastodon API” framing is apt.

The proposed solution is to split responsibility more aggressively: the C2S server should be nearly stateless and dumb, storing ActivityPub objects without interpreting them, while a separate “client” layer handles indexing, timelines, moderation, and exposes its own API to the frontend running on the user's device. It's a clean separation of concerns on paper.

But here's what bothers me. When you map this architecture onto familiar terms, it looks roughly like this:

  • C2S server ≈ a database (PostgreSQL, say)
  • “Client” ≈ an application server (Mastodon, Misskey)
  • “Frontend” ≈ the actual client app on your phone

That's not a new architecture. That's just the current architecture with the labels shifted. The interesting question is which interface gets standardized, and the author's answer is the one between the C2S server and the “client” layer—the bottom boundary.

The problem is that what people actually want from C2S is to connect any frontend to any server. The portability they're after lives at the top boundary, between the frontend and whatever is behind it. But the author explicitly argues against standardizing that layer: “we don't really need a standardized api,” they write, leaving each client free to expose whatever API it likes.

Which means frontends remain locked to specific clients, just as Mastodon apps are locked to the Mastodon API today. The interoperability promise of C2S—log in to any server with any app—isn't actually delivered. It's been pushed one layer down, out of reach of the end user.

There's real value in the post's thinking about data hosting vs. interpretation, and about the security implications of servers that understand too much. But as an answer to the question C2S is supposed to answer, I'm not convinced.

kopper :colon_three:'s avatar
kopper :colon_three:

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

@hongminhee yep, all you said is accurate, though i want to see if i can argue my case a bit clearly here
That's just the current architecture with the labels shifted
sure, underneath everything postgres and mastodon are already separate, but to the user's phone, web browser, or even other instances, they're only present as one unified blob under "Mastodon". my proposal is to make this split more explicit in the protocol level, especially when it comes to extensions (e.g. FEPs which try to add actor-global state for what are client needs, like feature negotiation)
Which means frontends remain locked to specific clients, just as Mastodon apps are locked to the Mastodon API today. The interoperability promise of C2S—log in to any server with any app—isn't actually delivered. It's been pushed one layer down, out of reach of the end user.
i think this is another consequence of the word "client" making everything confused. "mastodon clients" would still be "mastodon clients", they'd interact with the "mastodon c2s client" which understands mastodon specific concepts such as reply trees and timelines. i don't exactly believe, say, a forum frontend would want to interface with those mastodon concepts, especially not all of them. maybe reply trees could be shared somehow? but i don't believe that's something the protocol has to dictate. i certainly don't think a microblogging frontend would be useful with a forum backend

what the interoperability promise really seems to want, at its core, seems to be to reuse the same
account between different interfaces. as it stands you can't really use lemmy from mastodon (you can, but it's hacky and fills your timeline with boosts and your app ends up tagging people which you either have to remove manually or end up looking like a sore thumb in the comments). this is the solution i see c2s aiming to solve, not "mastodon owns the microblogging concepts"

additionally: if the custom client API is built on activitypub concepts such as collections and the objects are hydrated dynamically, as i propose, the pieces would still be the same AP pieces. the as:Note would still be an as:Note. while this would not make it easy to point one app to another backend, it would make it easier to share code relating to features, and may open up to getting individual client behavior (e.g. whatever the equivalent of the Mastodon API would be) standardized as optional FEPs which any client that wants to clone mastodon/microblogging can implement/extend upon
Movim's avatar
Movim

@movim@piaille.fr · Reply to 洪 民憙 (Hong Minhee) :nonbinary:'s post

@hongminhee @kopper You're maybe looking for something like the XMPP architecture in the end, where all the "Frontends" are clients in XMPP and everything else if fully standardized (C2S and S2S) ?

The "Movim API" is just XMPP in the end xmpp.org/extensions/

Social publications are standardized there xmpp.org/extensions/xep-0472.h, and we even have Stories xmpp.org/extensions/xep-0501.h 😸!

Emelia's avatar
Emelia

@thisismissem@activitypub.space · Reply to 洪 民憙 (Hong Minhee) :nonbinary:'s post

@hongminhee@hollo.social said

The proposed solution is to split responsibility more aggressively: the C2S server should be nearly stateless and dumb, storing ActivityPub objects without interpreting them, while a separate “client” layer handles indexing, timelines, moderation, and exposes its own API to the frontend running on the user's device. It's a clean separation of concerns on paper.

This is exactly what I say in the talk that I still need to record, and why I was working on that ActivityPDS concept last september.

Subversivo's avatar
Subversivo

@subversivo@app.wafrn.net · Reply to 洪 民憙 (Hong Minhee) :nonbinary:'s post

Maybe what we need is some sort of universal AP server, handling S2S, with support for all things (Persons, Pages, Groups, Notes, Posts, Events and an ever-growing resource list) where you can add one or more application APIs/Frontends as some sort of plugin. Say you import Mastodon-API module that uses a subset of server capabilities serve to Mastodon apps. Or a Lemmy-API that uses another subset. Even a C2S API that have all the business logic on the client side.
I think a C2S universal protocol is addressing thee wrong problem. C2S have less value than a universal server implementation that can work almost like a black box, not bound to a single client API because APIs are the easier part of the stack.

Emelia's avatar
Emelia

@thisismissem@activitypub.space · Reply to 洪 民憙 (Hong Minhee) :nonbinary:'s post

yes, this should just be a cursor with a pagination direction. However, the Mastodon API is proprietary and specific to their needs so they can do whatever they want and whatever makes sense for their application.

I believe ActivityPub API just gives you URLs to follow for prev/next/first/last.

Steve Bate's avatar
Steve Bate

@steve@social.technoetic.com · Reply to 洪 民憙 (Hong Minhee) :nonbinary:'s post

@hongminhee > Slapping an facade onto an existing Mastodon-like server and calling it C2S doesn't buy you much ...

The benefit of having a C2S adapter for Mastodon is that it provides a large user pool that could motivate developers to create C2S UIs rather than only supporting the Mastodon API. Having more server-independent client implementations may motivate devs to build general C2S servers with advanced features and eventually disrupt the Mastodon dominance in the Fedi.

Dawn Ahukanna's avatar
Dawn Ahukanna

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

@hongminhee @kopper
The mistaken conflating assumption developers keep making is equating engineering 4 human interface & interaction (with data) design is with the same approach as servers interacting with API and response payloads.
APIs don’t need 2D layout geometry simulating 3D, animations optimized for human eyesight variations, content (data) presentation optimized for human cognitive and literacy variations, etc.

Presentation on “APIs as osmotic interfaces”- mastodon.social/@dahukanna/115

:PUA: Shlee messed around &'s avatar
:PUA: Shlee messed around &

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

@hongminhee @kopper I'm too stupid to understand AP specifically (but I have a deep CS background).. I've always wondered why this wasn't the model by default? Using UUIDv7 you could mark every in order of timetime.

I think you could push the separation of intents further. Make a "AP post" hold all of the metadata, but make the actual text an attachment like an image, video, audio etc.. then you could just store all of the text in blobs in storage to be easily replicated/mirrored and deleted on bulk... "even as ciphertext" requiring the original toot to fetch and decrypt.

also. I think the idea of attaching a user to an instance (domain) was always a mistake. A user should be whoever owns the key material on a frontend (endpoint), and it should be able to ask any "client in your meaning" to be it's new primary location (they can be AP broadcast... user with public key X is now defaulting to client Y)...

BUT all of this is fan fiction, nobody has even solved the storage problem. We're still defaulting to 10,000 S3 buckets.

Turning media URIs from dedicated single URLS to magnet:<hashes> that can be pulled down from multiple locations incase the original dies feels like REALLLLLY low hanging fruit that nobody has touched (and It kind of annoys me nobody has).