artimath
I think I’ve tried 5 different graph database libraries in the last two days and not a single one has been able to connect to a remote/local db. All sorts of wonderful errors, db connection genservers crashing on MatchErrors, library only supports version 4.2 of db and the only ones offered now are 5+, etc.
Perhaps it’s because I’m using 1.14.5/otp26, but it seems more that many of these libraries are just no longer actively maintained.
Perhaps it’s a sign from the Ecto gods that I shouldn’t use a graph db in my project.
Anyway, is anyone actively using elixir with graph databases? If so, what’s your stack?
Side note: attempting to debug and troubleshoot said errors has taught me a significant amount of valuable insights into how elixir, mix, libraries, config all work together… so that is a big plus! Also, why it’s important for a library to include tests ![]()
Trending in Discussions
Other Trending Topics
Chat & Discussions>Discussions
Latest on Elixir Forum
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #blog-post
- #phoenix_html
- #iex
- #graphql
- #genstage
- #ai
- #elixirconf-us
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #hex
- #performance










First 10 of 22 Posts
bdarla
I guess you refer at least to Neo4J. In the past, I did some experiments using bolt_sips, but as you say, it seems not to have been updated for Neo4J version 5.*.
It is indeed a pity that this is happening.
Did you try the other options provided in Exploring Graphs with Elixir?
krstfk
I’m currently working on a new driver for neo4j that will support v 5+. I’m still ironing out a few things but I hope I’ll be able to release it by the end of June or so.
In the mean time neo4j v 3 and v 4 can still be downloaded. If you don’t use the commercial version, the feature set is rather stable.
imkleats
In case it’s helpful, here’s some documentation crosswalking Neo4j database version with Bolt protocol version compatability: Bolt Protocol and Neo4j compatibility - Bolt Protocol
Bolt_sips seems to currently top out its support at Bolt v3, and it sounds like @krstfk has maybe stepped up to backfill maintenance & support for more recent protocol versions.
The dream I have is that, since so much has already been done by the Elixir community in terms of Postgres, Apache AGE (https://age.apache.org/) could be the impetus for more robust Cypher/graph support in Ecto, which could have spillover to Neo4j usage. But that’s just a dream I’m not sure will ever materialize.
krstfk
The thing is that there’s an impedance mismatch between Ecto and graph databases. I believe Dominique Vassard has done some work to provide an ecto like interface on top of bolt_sips but I’m not convinced it may work as is. I believe he also has done some work taking inspiration from ecto.
That being said, one of the things that needs ironing out on my side is providing a repo construct (which is harder than initially thought because clustering is very much a necessity for a driver for neo4j).
By the way Florin Patrescu has stated a while back that he was not able to maintain bolt_sips anymore. And I would like to make it very clear that I have not started a new project because of any issues I had with bolt_sips or any of its maintainers. The thing is when bolt_sips started (and even a couple of years ago), the bolt protocol was poorly documented and now the situation is much different which may lead to radically different design decisions and incompatibilities, which is why I have opted to work on a new driver (hopefully released by the end of June) that will definitely owe a lot to Florin Patrescu and all of the bolt_sips contributors.
imkleats
Thanks for the update and for sharing your thought process! When i was sleuthing, my trail turned up cold after a January comment in a GH Issue for bolt_sips, and everything you’ve stated makes perfect sense about starting from scratch-ish.
I’m well aware of Dominique’s work and the challenges inherent to it (but I’m glad you mentioned them so others can benefit from learning about them too). While I appreciate and do not discount the journey that led him to evolve his efforts from
ecto_neo4jtoseraph, I also believe that having more eyes and minds on the problem would allow for finding the surface area for tractable integration solutions for Ecto, even if it isn’t 100% coverage of the problem space available to a graph database engine because of any mismatch. That’s why I feel there could be potential coming out of Ecto adapters for Apache AGE, which actually would require context-switching between SQL and Cypher. But i hear you: it’s not necessarily a simple thing, which is why i temper my hopes.krstfk
Sorry about that, the whole thing turned out to be way more difficult than I initially anticipated.
But I’m kind of hopeful now. While I’m still not sure the api is sound/good, I guess I’ll find out when people start using it.
While I’d love a rich ecosystem, right now my goals are speed and flexibility. One of the thing I really want is the ability for the user to provide their own encoding/decoding functions for so called bolt structs (meaning the ability to translate a node with label x into eliixir sruct y). That would avoid having to traverse and convert a list of results. Another goal is to have support for back pressure. I’ve actually split the concerns into two libs, one -inspired by mint- handles a single connection and the encoding/decoding, the other one closer to bolt_sips will handle pooling, routing and all of that.
The first lib is close to completion but needs a bit more tests, the second one needs a bit more work.
artimath
If possible, I would like to help.
I foresee myself using elixir long into the future. I also plan to utilize graph databases increasingly.
I even considered attempting to forge my own new library that can utilize neo v5.
But I’m a bit green to tackle that solo.
However, I believe I can be of great value helping someone more senior.
TomGrozev
The Arango database is really good and I’d recommend you check it out. Shameless plug I made the ArangoDB adapter for Ecto: GitHub - TomGrozev/arangox_ecto: An ArangoDB Ecto adapter using ArangoX · GitHub
It has full graphing support and works really well with Ecto. In the next release ArangoSearch functions will also be available.
krstfk
Hi everybody,
This is a quick update to let you know that I’m still very much working on the project. However I got side tracked and working on libs for general consumption turned out to be harder than expected.
As a result, I’ll release a couple of libs on github before any hex release. My hope is to get feedback from the community before the hex releases.
I’m mainly working on two libraries (names subject to change):
m_bolt : a very thin implementation of the bolt protocol supporting versions 1 to 5.3 (currently). I’m now working on a third (and last) iteration. The m in the name is an hommage to mint because it’s a process less library (and the transport code was stolen from mint). The goals here are efficient decoding and maintainability (bolt is a moving target). A side effect of the redesign is that it’ll be possible to translate bolt structs into elixir struct at the decoding stage. m_bolt will not provide any pooling nor routing support (apart from allowing to setup server side routing).
neo4_ex : built on top of m_bolt and db_connection, which aims to be close to what bolt_sips provided.
Status :
match (n) return nwhere n is small. I haven’t been able to find a solution to this issue.I’m very sorry for the delays.
mayel
Re. the question of this thread, I’ve started using Memgraph (via the bolt_sips lib, which is intended for neo4j but works perfectly well so far thanks to the compatible query language / API) and enjoying it so far, the built-in algorithms are handy, plus the catalogue of extra ones you can pull in (even though they’re in python, wonder if this is somewhere where Nx could come into play at some point?)