News for hackers. Stuff that matters.
Re:Pleroma 2.0: a free, federated social networking server b... by kick on Sunday March 08, 2020 @04:03PM (#22520212)
Pleroma is significantly more lightweight than Mastodon, is compatible with both Twitter and Mastodon clients, and is one of the bigger (maybe the biggest that isn't working on Elixir itself?) free software Elixir projects. Worth giving a look if any of that interests you!
Re:Pleroma 2.0: a free, federated social networking server b... by seemslegit on Sunday March 08, 2020 @09:28PM (#22522106)
It still requires the user to install and admin a postgres instance which already makes it a non-starter for 99% of the target audience, this design choice is tragically stupid - the chance that an instance of pleroma will reach a usage volume that can't be handled by sqlite and basic caching is not on the horizon, if they ever reach this problem they could then develop a version that works against an actual rdbms.
Re:Pleroma 2.0: a free, federated social networking server b... by lainsoykaf on Monday March 09, 2020 @06:34AM (#22524304)
We do provide a step-by-step guide, which also involves installing postgres. In general, I think installing Elixir and Erlang is the much scarier part for most people, because few people have ever used them.

Sadly, we can't just use SQLite because we use Postgres-only features like jsonb extensively.

Re:Pleroma 2.0: a free, federated social networking server b... by seemslegit on Monday March 09, 2020 @08:24AM (#22524792)
Not suggesting that sqlite could be dropped-in as replacement but https://sqlite.org/json1.html
Re:Pleroma 2.0: a free, federated social networking server b... by claudiawerner on Sunday March 08, 2020 @11:27PM (#22522737)
Pleroma is built using Elixir + Phoenix (iirc), which has excellent Postgres support with Ecto. That could have been a design decision. Postgres also supports some features SQLite doesn't, such as array types. For certain applications (such as tagged imageboards, boorus), that makes anything but Postgres nearly a non-starter. SQLite data type storage can also be a concern.

Chances are, if you have a server capable of running the Elixir + web framework stack, storage space for cached images, and a proxying web server, Postgres probably isn't much of an overhead on top of that.

Bare in mind that each fedi instance dosen't only host the content generated by users, but also whatever content they repeat/reply to. The fact it needs to be stored (or cached) is one reason why there's so much blocklisting/defederation - because people may not want to host certain content from instances known to commonly host it. It may even store more from the public timeline (I'm not sure about the specifics of Pleroma). Nevertheless, even with five users, you can fill up quite a lot of space in a database and on the filesystem.

Re:Pleroma 2.0: a free, federated social networking server b... by hau on Monday March 09, 2020 @06:26AM (#22524273)
Your strong statement about postgres doesn't sound right to me. You can't use an array values as foreign keys. Array column wouldn't be my first choice even it could do this: you're limited and constricted in usage overall for a little gain if any. Which imageboard/booru engines use array column for tags?
Re:Pleroma 2.0: a free, federated social networking server b... by claudiawerner on Monday March 09, 2020 @08:00AM (#22524681)
Danbooru (and forks like Moebooru) and Philomena use string arrays in the database for tags.

Edit: nevermind, Philomena has a table for the many-to-many relationship and uses Elasticsearch for the heavy lifting.

Re:Pleroma 2.0: a free, federated social networking server b... by hau on Monday March 09, 2020 @09:01AM (#22524995)
Why arrays are preferable over m2m tables? What so special about pg arrays that makes anything but them inferior in "tagging" case? I genuinely don't get it.
Re:Pleroma 2.0: a free, federated social networking server b... by claudiawerner on Monday March 09, 2020 @09:45AM (#22525255)
Accodring to these rough benchmarks, it's faster to use arrays rather than joins:

https://shon.github.io/2015/12/21/postgres_array_performance...

https://gist.github.com/joevandyk/031cf5812bd656887623

To search for a post with multiple tags, you need to do a join for each tag. You don't have that problem with arrays.

Re:Pleroma 2.0: a free, federated social networking server b... by hau on Monday March 09, 2020 @02:50PM (#22528442)
Thanks, that looks cool.
Re:Pleroma 2.0: a free, federated social networking server b... by kick on Sunday March 08, 2020 @09:57PM (#22522243)
It's pretty much fire-and-forget. I know a bunch of non-technical people who are running Pleroma instances: you don't have to worry about it that much.
Re:Pleroma 2.0: a free, federated social networking server b... by mxuribe on Monday March 09, 2020 @09:00AM (#22524988)
I think standing up pretty much ANY type of server might be a non-starter for 99% of the audience...But then proper documentation would resolve that. In the case of pleroma, the database stuff is simpler, while the elixir and erlang stuff is what is dark magic...though that could be because my background is mostly LAMP sort of stuff. Thankfully, there is documentation for setting up/administering a pleroma instance, and as with most things, better versions of the documentation will surface more and more as time goes by.
Re:Pleroma 2.0: a free, federated social networking server b... by sneak on Monday March 09, 2020 @06:56AM (#22524382)
You’re not entirely incorrect, but you’re not being kind, either.

Really all we’re talking about here is whether or not the thing that writes the files is in-process or an adjacent process.

If they can manage to run Pleroma, they can manage to run a Postgres beside it. I think the hurdle you are describing is to self-hosting anything in general. Standing up a self-hosted postgres is actually easier/simpler/better supported than some random weird elixir app.

Re:Pleroma 2.0: a free, federated social networking server b... by seemslegit on Monday March 09, 2020 @08:14AM (#22524735)
Sorry, but it's true for the other steps as well with postgres being a particularly pain because it is a networked service that requires administration, security minding etc. The end result is a high-friction onboarding process and the fact that it is technically justifiable is besides the point for people who just want to use the thing not to hack on it.

The "if they can manage to run Pleroma" is not a very helpful approach to actually get more people to run Pleroma.

Re:Pleroma 2.0: a free, federated social networking server b... by elcritch on Monday March 09, 2020 @10:41AM (#22525721)
Haven't looked into the Plemora code myself, but it'd likely be feasible to patch it to be sqlite compatible. Unless there's a lot of Postgres specific SQL (triggers? mat views? hyperlog data types?) and the older version of Ecto the SQLite adapter uses. Still it would be fun to something like Plemora run on a RPi4 without needing Postgres. Then again, maybe Postgres would run alright... :-)
Re:Pleroma 2.0: a free, federated social networking server b... by lainsoykaf on Monday March 09, 2020 @11:35AM (#22526210)
It's no feasible, we use a lot of postgres specific features. Pleroma with postgres runs fine even on Raspi 2.
Re:Pleroma 2.0: a free, federated social networking server b... by elcritch on Monday March 09, 2020 @06:44PM (#22530720)
Thanks for the info! Well maybe someday I'll see if I can bake a Nerves image with Postgres running on it. If I'm going to install it might as well on an RPI right?
Re:Pleroma 2.0: a free, federated social networking server b... by vorpalhex on Monday March 09, 2020 @09:49AM (#22525284)
It's sort of a "doomed if you do, doomed if you don't issue". SQLite lowers the barrier to start, but if your community grows even modestly then you'll be facing a very scary database migration (or at least scary for small admin teams).

I suspect a soft fork or subversion targeted towards small instances might be more sustainable, but that obviously requires more developers to build and maintain that.