manyfold3d / manyfold

A self-hosted digital asset manager for 3d print files.
https://manyfold.app
MIT License
742 stars 47 forks source link

ActivityPub architectural design #1389

Closed Floppy closed 7 months ago

Floppy commented 1 year ago

This is a long way off, but this issue is a place to start thinking about it. VanDAM could be adapted to become a federated system using ActivityPub, a bit like a decentralised Thingiverse.

Various other bits of work would be needed first:

There's also the possibility that VanDAM as it stands, designed for local collection management, isn't the right app for this - should it be a sister project with a bunch of shared code?

NLNet Milestone 3.1

Floppy commented 1 year ago

Another step is to write a FEP and submit to https://codeberg.org/fediverse/fep to define how the actual federation would work.

andypiper commented 1 year ago

This could be very cool. I guess it might be analogous to something like Bookwyrm (managing collections of items / books, with comments; and follower relationships between users). That may be an existing federated model to investigate.

Floppy commented 1 year ago

BookWyrm is a really good analogy actually, thanks - I was thinking of PeerTube as a model, but BookWyrm is closer. I'd better make an account.

stockholmux commented 1 year ago

I really like this idea and I've had a similar thought in the past.

Here is my brain dump.

Mapping of a model site to mastodon It feels like most of the interactions are almost already in place in the existing ActivityPub model.

Printables(as an example) compared to mastotdon: Printables User Profile => Mastodon User Profile Printables Model Page => Mastodon Toot Printables stl/obj/3mf/etc. OR photos of the model => Mastodon Media/Attachment Printables Comment or Make => Mastodon Toot Reply

Federated models A tricky thing would be how a model would show up in a federated instance that isn't a model site. So, say a model site post needs to show up in mastodon. Inside mastodon you'd just see the 2D render of the STL. This would likely require some sort of rendering from source file to jpg. I'm not sure if the existing JSON data model would accommodate 3D model files, but you could just represent everything as jpegs but the model site would know to swap the extension or further query.

UX of getting a model Say a person sees a model on Mastodon and they want to download the 3D file. How do they get to it? They'd need to use the "Open original page" feature and view it from the model site instance. Perhaps not a super elegant approach, but definitely do-able.

Model types I'm interested in being able to share static models but also OpenSCAD models and have a browser-based customizer. I'm working on the OpenSCAD playground and I think this would be a good fit. There was also a request in a thread on mastodon to support other model-as-code engines, which seems reasonable.

Front end It might be wise to have a clean seperation from the front end and the back end. Maybe even separate projects. Something like how elk.zone can be used on any mastodon instance.

Relation to Git My original conception was to build something similar to a static site generator that would build the activitypub JSON and only have to supply minimal client/server components. I think van_dam has different goals and ways to get there, but there is enough commonality for me to be excited.

Unknowns

Floppy commented 1 year ago

That's some great thinking, thanks for sharing! A few thoughts - more will follow...

A tricky thing would be how a model would show up in a federated instance that isn't a model site.

I think this is something that's being looked into for other media types, like Lemmy posts, or audio. I think there must be some work on this somewhere in one of the FEPs... will have to investigate.

Say a person sees a model on Mastodon and they want to download the 3D file. How do they get to it? They'd need to use the "Open original page" feature and view it from the model site instance. Perhaps not a super elegant approach, but definitely do-able.

Or the ActivityPub post could include the original link itself. We'll have to try some things, see what works best across fediverse sub-verses (is there a word for that?)

static site generator that would build the activitypub JSON

This is also relevant to my interests, I wanted to get my Jekyll-powered site to play in ActivityPub, but I've not spent any time on it.

How would you represent the license of the model? This is a critical part that probably needs to be in the data model.

I've got an issue for that, and got some fairly well-formed plans in my head which I should write into it! #461

Searching the fediverse is a complicated issue, but it's probably a core feature of a model site.

For MVP I'd be happy to leave that to something like Yeggi, but yeah, it needs to be there at some point.

Floppy commented 10 months ago

Really useful info in this thread by @dclements on how the various services use the various features of ActivityPub: https://hachyderm.io/@hrefna/111599918296273721

Floppy commented 7 months ago

Bookwryrm's ActivityPub documentation page is an excellent description of how it performs its federation. If I can write something like that and circulate it for comment, that should satisfy this issue, I think.

Floppy commented 7 months ago

Pixelfed have just done one as well: https://docs.pixelfed.org/spec/ActivityPub.html

Floppy commented 7 months ago

Initial draft design at now online at https://manyfold.app/technology/activitypub.html

Floppy commented 7 months ago

Closing this issue as the rest of the thinking in it has percolated out to other issues now, and I'm happy that the web page describing the federation approach satisfied the "architectural design" part of this.

Floppy commented 7 months ago

Funkwhale docs at https://docs.funkwhale.audio/developer/federation/index.html too

andypiper commented 7 months ago

FWIW / ICYMI Funkwhale is in the process of rewriting / reconsidering their federation support.

Floppy commented 7 months ago

Turns out I did write a FEP after all - not for the extensions themselves, but a discovery mechanism for them. https://codeberg.org/fediverse/fep/pulls/278