3 ms·
I believe the main point is that it's much, much lighter weight to run than a full Mastodon. And much simpler - most of the behavior is only a handful of lines
by Groxx 3y ago
I believe the main point is that it's much, much lighter weight to run than a full Mastodon. And much simpler - most of the behavior is only a handful of lines of code in each high-level-behavior function.
That said, I'm not sure it's json-ld compatible. Seems to assume the common format, not the infinite other semantically-equivalent ways of structuring data. Though I really don't know if that's normal for mastodon-targeting stuff or if I'm missing a higher level request transformer that frames it into what they seem to assume.
- ckolderup 3y agohey, I'm the one who built this -- it's not actually compliant with most of the AP spec right now. I started the project as a way to learn about the protocol and I've still got a long way to go; so far I've just been in "get things showing up across instances" mode, but will be trying to comply more fully over the coming months.
- Groxx 3y agoI'm far from an ActivityPub or Mastodon expert, to be clear - I've just been lurking at the periphery of json-ld and its more-than-a-little-insane spec. It wouldn't surprise me at all if there were literally zero json-ld-compliant systems in the entire ActivityPub universe, even if you ignore stuff like validating remote schemas. As it stands though: pleasantly readable code! I got curious and explored around a bit and it's all remarkably simple. Maybe it needs more error handling or auth or something and it'll grow before it's "ready", but it's nice to see something simple occasionally. You can probably keep a lot of those simple-structure assumptions if you frame your incoming requests to look like the common structure you're using now, if you can find a library that handles that for you: https://www.w3.org/TR/json-ld11-framing/ https://www.w3.org/TR/json-ld11-framing/ (which is a lot of text to say "it's a templating system")
- ckolderup 3y agoyeah, I'm a professional software developer in my day job and a lot of times the thing that stops me from getting anything done in my side projects is over-engineering or using the kinds of best practices that I have picked up over my years of working on large teams with data that has to be carefully maintained/preserved. So when I started this I tried to just take the approach of "just make it work first". I'm glad you found it pretty readable! The fact that there's so little error-checking and rigor in general has definitely burned me a lot in the run-up to feeling able to share things, though. It's a real double-edged sword, especially in a language as weakly typed as Javascript (which is also not my first choice of language, but targeting Glitch for deploying this was ideal for spinning up test instances, and that's their main platform)