Xarango, an Elixir driver for ArangoDB

I have just published my fist stab at an Elixir driver for ArangoDB, the document/graphing db (C++, so no Java!).

It is a fairly straightforward wrapper around Arango’s HTTP API, fully tested and around 95% complete. No documentation yet, so usage must be derived from the tests. Also, not a lot of input parsing, so make sure you provide correct inputs.

I hope you will play around with it for a bit and perhaps give some feedback.


I hope I can have some time to play around with it at the end of the week. ArangoDB looks like it could solve my database needs in the long run.

that’s super great! :smiley:

Haven’t yet played with the lib, but I’ve used ArangoDB for a project at work… if you’re willing to try something new, not afraid of reading documentation and want a kick-ass (multi-paradigm) database, AranagoDB is your thing, baby. :slight_smile:

Thanks a lot, having a blast with it so far.

Just published v 0.4.0, now with transaction support!


This is really awsome! I was planning on implementing something like that myself for some time. Seems like this is not necessary anymore! :slight_smile:
However, I would be happy to contribute - what are next steps/missing features?

I’m currently working on a VelocyPack parser in Elixir. Based on that we could add support for the new VelocyStream (https://www.arangodb.com/2016/11/arangodb-3-1-solid-ground-scale-part-ii/)

1 Like

Hi, thanks, glad you like it. I’d say the main missing features are graph related (neighbours and friends) and support for sync/async. And of course any suggestions are welcome.

1 Like

@beno Michael I am still checking this out. is it possible to use Xarango as a Repo just like Ecto. Is there any work in this regard?
Adding it to supervisor? In my project, I would love to have both Repo & Xarango to manage rdbms and nosql working together esp with arango.

1 Like

Not sure I know what you mean. Could you provide some pseudo code to illustrate your idea?

Do we have scope for developing an Ecto.Adapter for Xarango ?
such that
Xarango.Repo.insert SomeModel

@codecakes: I recently started to work on an Ecto adapter for ArangoDB - https://github.com/Lean5/arangodb_ecto
It is still a work in progress, but I hope to be able to finish the first functional version in the coming weeks.


Thank you for your work @beno.

In your opinion, what is “best practice” for a Xarango.Query with parameters? If I got it right, I have to concatenate the query-string as one piece?

You are welcome, not quite sure what you mean? Have you looked ar the Xarango.Query tests for usage examples?

Maybe I didn’t get the point with your module. Is there the possibility to query own AQL-Statement (and on top this statement with parameters)? I’m not so experienced with Elixir so far at all.

You can certainly pass raw AQL query strings to Xarango.Query.query\1, but there are also functions that allow you to compose these AQL queries (see Xarango.AQL.from\1 and friends), I suppose this would be the best way to incorporate some parameters in there. Hope this helps!

I`m considering learning properly Arango for use in a project, as the requirement I have makes this DB a perfect choice on paper.
How is this performing in real world situations? anyone running this in production ? are there any know issues to worry about ?

I use ArangoDB for data-backup and mining. The productional system is an oracle db and holds data for just a feew months. The biggest collection has now 4.1 Million documents (3 years of data) and is working without problems. Very fast query execution, AQL is a great query language, documentation is also very good and I like the implemented functions (especially in case of date/time).

1 Like


How do you integrate this library using contexts in Phoenix 1.3, and where do you place your AQL queries?
Do you know if this library still in maintenance; also if you have code you`d like to share with someone who is just starting in this Phoneix world ill be thankful

1 Like

For Phoenix. Add it in your dependencies. There are a few ways you can get this working

  1. Setup poolboy which will manage the DB workers and send messages to the poolboy server and delegate the task to workers (This is how we are doing)
  2. If your requirement is minimal then you can place the Xarango code within your Controller but this might leave you with unmanaged open connection with DB
  3. If your phoenix app is inside an umbrella app then migrate your DB acess tasks to a separate app. This separate app can have same setup as 1.

Hope this answers your question.