Florin

Florin

Hi there,

We’re working on the docs and adding final touches to the Neo4j driver for Elixir: Bolt.Sips, and we need your feedback. The development of the latest version was moved to the public area (on GitHub), for offering you an early preview of what’s coming.

The documentation for the new features, functions and modules, including the new docs/ sections, etc. is work in progress pretty much, however, the code is stable and it can be used for experimenting with the new features introduced by this version:

  • routing
  • role based connections
  • multi-tenancy
  • better support for errors
  • and so much more

If anyone here using Elixir, for connecting to Neo4j, and wanting to test this new version, then we’d love to have your feedback. You can use this new driver for connecting to a single Neo4j server, to a Neo4j causal cluster or to … multiple servers … or to .. multiple clusters, concurrently! w⦿‿⦿t! :slight_smile:

If you’re interested, please join our project at github.com/florinpatrascu/bolt_sips, and we’ll be happy to work with you through examples, while augmenting our docs and code, based on your feedback and suggestions. Any feedback is: good feedback :slight_smile:

Thank you!
:heart:

Showing Posts 1 to 10

chriseyre

chriseyre

Yes I am interested.

I have this project

https://github.com/chriseyre2000/contentful_to_neo4j_ex

This extract data (well all of) the contentful space into a neo4j graph database.

Florin

Florin OP

That’s awesome! Please check the new version if you have time, and share with us your experience. Plus if you spot any bugs or place for improvements then don’t hesitate to contribute with opening issues or PRs. Many thanks!!

chriseyre

chriseyre

I also have:

https://github.com/chriseyre2000/package_compare

This loads the dependencies from package.json in a node project into a neo4j graph database.
I took an unusual approach with starting bolt - it starts a runtime so that you can specify the destination neo4j database from the cli.

chriseyre

chriseyre

Here are my notes on converting package_compare to use the new version.

The github repo says to use v2 but its not yet in hex.pm.
For now you need to use:

{:bolt_sips, git: “GitHub - florinpatrascu/bolt_sips: Neo4j driver for Elixir · GitHub”}

poison is now on version 4 and you are using version 3 so I have had to downgrade.

This is the code that I am trying to translate:

def start(database, username, password) do
    Bolt.Sips.start_link(%{url: database, username: username, password: password})
  end

  def write_to_neo4j(data) do
    conn = Bolt.Sips.begin(Bolt.Sips.conn)
    
    #Nodes need to be reversed as prefixed by delete statements
    entry_data = Enum.reverse(data.nodes)
    Enum.each(entry_data, fn(item) -> 
       Bolt.Sips.query(conn, item.query, item.params)  
    end )

    #Relationships include the properties
    Enum.each(data.relationships, fn(item) -> 
       Bolt.Sips.query(conn, item.query, item.params)  
    end )

    Bolt.Sips.commit(conn)
  end   

I am kind of stuck.

Florin

Florin OP

Thank you for the feedback so far. I didn’t publish the driver yet, since there are functions where I still need to update the docs, but there are only so many hours in a day :slight_smile: I’ll make sure I’ll add a note about that in the main README, ty!

Regarding the way you’re using the transactions; I believe you’re using a very old version of the driver, because the support for non-closure based transactions was dropped since a couple of releases ago. In fact I mentioned this in the CHANGELOG, when that happened: Blaming bolt_sips/CHANGELOG.md at master · florinpatrascu/bolt_sips · GitHub

We are using the awesome DBConnection under the hood, but we had to drop this transaction style when it wasn’t supported by the DBConnection either. There are clarifying discussions on this topic, in the issues tracker of DBConnection.

However, you can easily convert your code to using the new transaction style, An example from the actual tests we’re using:

  test "execute statements in transaction", %{main_conn: main_conn} do
    Bolt.Sips.transaction(main_conn, fn conn ->
      book =
        Bolt.Sips.query!(conn, "CREATE (b:Book {title: \"The Game Of Trolls\"}) return b")
        |> Response.first()

      assert %{"b" => g_o_t} = book
      assert g_o_t.properties["title"] == "The Game Of Trolls"
      Bolt.Sips.rollback(conn, :changed_my_mind)
    end)

    books = Bolt.Sips.query!(main_conn, "MATCH (b:Book {title: \"The Game Of Trolls\"}) return b")
    assert Enum.count(books) == 0
  end

Hope this helps?!

Also, I believe for specific issue like these, discussing them in the project’s own issue tracker would be more appropriate, if you don’t mind?! Will be easier for us to track the issues, plus I am sure the kind viewers here will appreciate lesser traffic on topics not as popular as others as graphdbs are a niche … for now :slight_smile:

Thanks again!

domvas

domvas

Shame on me, I’m discovering this topic only now…
Will keep on eye on it now!

otuv

otuv

Hi,

I’m using this driver and really like it.

I have however run into a tedious issue. Queries that take >1ms when running in the browser takes roughly linearly 50ms for each returned row when running from my project (fetching from localhost).

I would guess it is not an actual performance issue but rather something I have misconfigured but I cannot understand what.

Which channel would be best suitable for this (probably) non-issue question?

Florin

Florin OP

Thank you for feedback. @otuv - you can open an issue here: Issues · florinpatrascu/bolt_sips · GitHub, and we’ll continue the discussion from there. However, can you please check you’re using the newest version? I published v2.0.3 yesterday, and it contains a significant amount of changes, some specifically dedicated to improving the performance. Also when you’re using the browser to see your data on the server, you’re connected directly to the Neo4j server, and that type of connection is expected to sport the response time you see :slight_smile: When you’re using our driver, we do a bit of additional work before shipping the data out, so we might usually lag a bit behind the 1ms you’re reporting

:wink:

Please see: Simple Query taking too much time to process · Issue #73 · florinpatrascu/bolt_sips · GitHub, for brevity.

otuv

otuv

That seems to be a very similar problem. Will definitely try 2.0.x!

otuv

otuv

Ok,

There is no need for an issue. Switching to 2.0.x did it all.

My numbers on three (small) test queries went from
average (max/min)

426  (479/330)  ->  29  (80/3)
16   (18/15)    ->  2   (2/2)
54   (56/53)    ->  3   (6/2)

Thank you for fixing my problem even before I mentioned it :wink:

Where Next? Top

Trending in Discussions Top

cblavier
Hey there, It’s been more than a year since we started using LiveView as our main UI library and building a whole library of UI componen...
New
mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
budgie
A little off-topic, but I feel like people here have a good head on their shoulders. I used to be quite good at making software. Was luc...
New
axelson
Hi there! :wave: @frigidcode and I (but mostly him) have been running an Elixir Book club, we’re almost done with Designing Elixir Syste...
New
achempion
I’ve been using Emacs as my main code editor for more than a two years. It’s a custom build version although I’ve tried doom emacs and sp...
New
budgie
I love Elixir. It’s one of 2 programming languages I’ve ever fallen in love with. But I don’t use it anymore. Serverless was the promis...
New
jtormey
Lately I’ve been thinking about how to organize components as a LiveView application grows. One of the pain points I’ve found (for myself...
New

Other Trending Topics Top

GenericJam
Edit: 2026 May 15 - This post is archived. Mob is alive!! Main docs: mob v0.7.11 — Documentation A bit of explanation for the slightly c...
New
garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
KristerV
Hey. Is there anyone here who creates agents in their apps? Not talking about using agents, but creating them. I’m finding it pretty diff...
New
mcass19
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
webofbits
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself. My main conc...
#ai
New
georgeguimaraes
Just published claude-code-elixir, a plugin marketplace for Claude Code with Elixir support. These are the plugins I’ve been using for my...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews