Weeknote: 2024-W30-36

09 September 2024

OK, so this isn’t so much a weeknote as an entire-summer-holidays note. Since the last one, the kids have been off school, so “quiet Monday mornings to collect my thoughts” haven’t really been a thing. So, let’s catch up a bit with a quick round of highlights.

Week 30

This week started out with some major performance improvements after a conversation with a user who has a truly massive library (we’re talking terabytes of data, and over 16,000 tags). The tag code was not exactly optimal, and for very large numbers it was doing a lot of unnecessary work. There was one small feature which I couldn’t make work in an efficient way, so I took the decision to drop it. Nobody’s complained, so that’s good.

This week also saw a big milestone for me, with the release of the Linuxserver.io Manyfold image. Being part of that ecosystem is something I’ve wanted since day one of the project, so it was really exciting to get that launched. Thanks a million to the Linuxserver.io team for their work, and for finding a few issues for me to debug along the way!

Weeks 31 and 32

This week (and a half) was all about getting some ActivityPub fundamentals working. AP is the protocol that powers the Fediverse, an interoperating web of social websites like Mastodon, Peertube, and many more. Adding AP support was part of the pitch for our NLNet a year ago, with an aim of allowing people to use Manyfold as a proper Thingiverse/Printables replacement, which they can self-host, but connect to others in a decentralised 3d file hosting system.

So, I got the basics in; I integrated the Federails Rails engine into Manyfold, and built out some basic social features like follow buttons, feed generation, and so on. That’s built on top of the Federails core, so while it’s only single-instance at the moment, it should be easy to federate in future.

Week 33

Summer holiday time! No code for a week. 😅

Week 34

More work on ActivityPub - I added a load of new capabilities to Federails so that I could have multiple actor types (which means you can follow not just people, but models, collections, and creator profiles separately). This included getting Webfinger working properly for Manyfold, amongst many other aspects. That’s all now released in the latest version of the Federails gem - thanks to the Federails creators for letting me make some pretty hefty changes to their design!

Then, right at the end of the week, I hit a big milestone; I set up a follow relationship from my account on my personal instance to a model on the demo instance, then made a change to the model and watched the activity flow back to my personal instance. It’s alive!

I realised one thing though - I had no permission controls, and I only want to federate public content at the moment. I could write the code, no problem, but I don’t have funding for it, so the bank account will take a big hit if I’m effectively doing a couple of weeks unpaid. I applied for another round of funding from NLNet back in June, but that’s taking a while to assess. However, they had mentioned before that extension funding might be available under the current agreement.

So, I took a punt and wrote up a list of “important things that I didn’t think of eight months ago” which I needed more money to spend time on. I gave them a list of what was needed in priority order, with some justification and estimates. I was extremely surprised when two days later I got an email back saying “yep, OK, we’ve added it all on to your milestones”. Just like that, about an extra 30% of funding appeared overnight.

I really cannot recommend NLNet’s open source funding model enough - they’re really amazing, and run it in a way that’s solo-developer-compatible, with minimal paperwork. If you’re working on open source, you owe it to yourself to put an application into one of their regular calls for proposals.

I’ve added a new ‘funded’ tag on GitHub issues so I (and you) can easily see what I’ve actually got the ability to spend time on; here’s the list.

Week 35

So, freshly armed with the ability to spend time on it, I launched into the permission model. I wanted something like Google Docs controls, where you can grant global permissions, but also individual ones. Turns out that’s a system known as Relationship-Based Access Control (ReBAC), which Google turned into a system called Zanzibar.

A bunch of the big auth providers out there provide ReBAC support, and there are complete open source systems like OpenFGA. However, all the ones I could find used a separate server for auth data, which makes sense at a large scale, but was overkill for my needs.

So, I started creating a very simple ReBAC implementation that played nicely with the current Manyfold authorisation stack of Devise, Pundit, and Rolify. I built it from the first line as a separate gem that I could plug in, because I wanted a clean separation of code, but also so that I could release it open source as its own thing for others to use.

That ended up as Caber, a simple ReBAC plugin for Rails apps. It’s got some simple methods to let you graft it onto your existing objects, and though you could use it anywhere, it works very nicely with Devise/Pundit/Rolify. So, if you need a fancier permission system for your Rails apps, give it a try!

Week 36

Caber doesn’t provide any UI, so next I had to build that; but, by mid week, I had a working permission system released and deployed on my own personal instance. And to prove the point, you can now visit it and see my own personal designs. I don’t need Thingiverse any more!

The week ended with a day of random bugfixing and improvements, during which I managed to somehow create a version of Manyfold that crashed severely on my own instance. So, I guess now I’d better work out why on earth that’s happening. I promise not to leave it another six weeks again; the kids went back to school this week, so I should be back to a more normal schedule!