The Crystal Programming Language Forum

Anybody writing forum or bulletin board or social commenting software?

Examples in other languages include

I’m currently toying around with building a Mastodon-compatible app using Crystal, Neo4j, and RabbitMQ as opposed to Mastodon’s Rails, Postgres, and Sidekiq. I’ve successfully gotten it to follow my user on my Mastodon instance (for which I had to implement RSA encryption — that was a week-long yak shave) and I’m beginning to handle federated posts.

To build the API, I’m using a simple mixin I’ve been using for all my Crystal services that lets your apps resemble Roda for Ruby. I really should extract that into a shard, but I don’t know what I’d call it. :-D

I’ll post the GitHub repo soon.

1 Like

Have you considered https://www.arangodb.com/ or https://dgraph.io/ instead of Neo4j?
The community edition is fairly limited - one node, no clustering, no hot backups. Plus it’s not light in resources, being in Java.

I’m not worried about replication. The volume of data a typical federated server handles is well below what a single Neo4j instance can handle even on a $5 DigitalOcean droplet and most Mastodon instances are running Rails, Sidekiq, Redis, and Postgres on the same machine so they’re probably not configuring hot standby or backups, either. :-)

Re: no hot backups, companies like GrapheneDB do support hot backups on the CE, so if it’s important to you, it’s available.

Also, it looks like ArangoDB and DGraph only support JSON data types, which complicates working with things like timestamps. Neo4j used to have this same limitation and every workaround came with some degree of irritation. I’d much rather not go back to that. :-)

Regardless, all DB operations happen via query objects in an isolated section of the codebase, so if someone wants to port it to another data store, it should be easily doable.