jointakahe / takahe

An ActivityPub/Fediverse server
BSD 3-Clause "New" or "Revised" License
1.12k stars 86 forks source link

Extend Takahē to share other document types #637

Closed davidbrochart closed 1 year ago

davidbrochart commented 1 year ago

Awesome project! I'm thinking about creating a Fediverse service to share Jupyter Notebooks, comment on them or on specific cells, etc. Observable is probably a good example of what it could look like (but it's not in the Fediverse AFAIK). Notebooks can be rendered as HTML, so I think it's a reasonable document type to share. But could Takahē be extended to handle that, or is it restricted to sharing text/images/videos?

andrewgodwin commented 1 year ago

It's not the server that's the problem here - it's the clients. Clients only render a very limited set of HTML (think links, bold, italic, and paragraphs), so you can't send anything interesting over the wire in a post; the best you can do is provide a link, and at that point I don't think there's a lot of advantage building it into a server!

davidbrochart commented 1 year ago

I see, so we could imagine a specialized client that could render a notebook, the same way GitHub can render this notebook while the raw file would be shown on other clients (.ipynb files are actually JSON).

andrewgodwin commented 1 year ago

Maybe, but the thing about the Fediverse is that everyone brings their own clients - so in reality, there's little hope of traction with anything beyond what is essentially a separate website. Even the written-document types don't have good support yet.

davidbrochart commented 1 year ago

I was thinking about using e.g. a Mastodon account (or Matrix) to implement something Jupyter-specific. For instance, using something like toot to post a notebook on which people can comment or make change suggestions. JupyterLab would have an UI that could interpret these replies and do something useful about them, like accepting a change suggestion to the notebook, while in Mastodon one would only see diffs and things like that. So we would basically use Mastodon as a transport layer for a small protocol, but I'm not sure this kind of use case would be tolerated by instance moderators. Also, GitLab's support for ActivityPub is not too far from what I envision.

andrewgodwin commented 1 year ago

GitLab are definitely doing something interesting, but either way, this is not something it makes sense for Takahē to really support, since it is a microblogging fediverse server. You're welcome to reuse some of our core libraries to do things like JSON-LD and HTTP signatures if you want, but pretty much all the rest of the code would be different and it wouldn't interoperate with Mastodon.

davidbrochart commented 1 year ago

OK, thanks for your time in this discussion 👍