@mariusor@metalhead.club cover
@mariusor@metalhead.club avatar

mariusor

@mariusor@metalhead.club

Mostly a programmer.

Implementing #ActivityPub in the #Go programming language.

Current projects:

  • #GoActivityPub - a library to use ActivityPub in Go.

  • #FedBOX - a generic ActivityPub service supporting the client to server API.

  • #brutalinks - a link aggregator inspired by (old) reddit, hacker news and lobste.rs built on top of FedBOX.

  • #oni - a single user ActivityPub server with minimal fuss.

My posts are mostly related to ActivityPub and web development.

This profile is from a federated server and may be incomplete. For a complete list of posts, browse on the original instance.

mariusor , to random
@mariusor@metalhead.club avatar

Hey devs, what do you think about my SQL document storage table for ActivityPub objects?

https://github.com/go-ap/storage-sqlite/blob/master/init.go#L46

The dialect is SQLite, but Postgres supports all the features used here: virtual and generated columns, and json_extract.

I don't know about MySQL, but if someone can chime in about it, I'd love to hear from you.

hrefna ,
@hrefna@hachyderm.io avatar

@mariusor I was afraid of that. PSQL has some nice tools that will make your life a little easier for when you need to query on an multivalue fields—you can almost certainly avoid unions with a little magic—but it's going to take some custom logic to get there and I honestly have no idea how easy or hard it would be to replicate that logic in SQLite.

mariusor OP ,
@mariusor@metalhead.club avatar

@hrefna

  1. yes, the items column of the collections table stores an array of iris.

  2. I haven't tested how the content maps would work in this setup yet.

  3. Addressing on actors (like on the other objects) is used as a simple ACL. If the recipients list includes the Public namespace, then it's visible to non-authorized requests. If it does not, it's only visible to requests containing a valid HTTP-signature/OAuth2 Bearer token from one of the recipients.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • test
  • worldmews
  • mews
  • All magazines