Has anyone used SurrealDB with Elixir/Phoenix?

Has anyone attempted to use SurrealDB https://surrealdb.com GitHub - surrealdb/surrealdb: A scalable, distributed, collaborative, document-graph database, for the realtime web form Elixir/Phoenix? :thought_balloon:
If so, please share your experience! Thanks! :pray:

Quick summary video for the uninitiated:

9 Likes

It’s on my plans once I get a break from the overload of work I got now. A native client would be sweet tho.

3 Likes

@greven sweet! :ok_hand:
I’m very curious to know what it would take to make a drop-in replacement for Postgres in Phoenix …
it’s probably still a bit “early” to use in production as they are still actively developing it.
But the combination of Graph, Document and SQL-like queries could be epic.

3 Likes

Yeah! It would be cool to have a bit more innovation on the data storage side.

3 Likes

In case of any interest, I played a bit with SurrealDB and wrote it down here thanks to the package SurrealEx.
Not talking of ETS, if you are looking for an embedded DB, SQLite performs much better. I didn’t put Redis in front either. However, SurrealDB promises easy sync and WebSockets and Live queries, not been documented yet. I didn’t either try a serverless version, to compare SurrealDB with say a headless Postgres, such as ElephantQL

2 Likes

Oh nice!

Yours is the third SurrealDB library I’m aware of. The full list:

The three of you authors should compare notes. :smile:

6 Likes

Did anyone use it in production?

I quickly looked through the mentioned libraries, SurrelaDB docs and concluded that the way forward would be replicating Redix with the difference of connecting through websockets.
That’s the only way forward to the production-grade library that I see.

1 Like

Another option might be leveraging DBConnection. I played with it a little bit and was able to complete a handshake GitHub - lessless/surrealisme: SurrealDB client playground