axelson

axelson

Scenic Core Team

24) ElixirConf 2017 - Elixir + Neo4j - Regina Imhoff

Posting a little bit late today but here you go:

ElixirConf 2017 - Elixir + Neo4j - Regina Imhoff

Neo4j is a non-relational graph database with its own query language, Cypher, which means it doesn’t work with Ecto. However, graph databases are great at modeling social networks. You will be learning how to combine Elixir Phoenix with Neo4j to make a clone of a popular social networking site with real time updates to the social graph.

Audience: Intermediate

All talks are available in the Elixir Conf 2017 Talks List or via the elixirconf2017 tag

Most Liked

vic

vic

Asdf Core Team

A year ago I started working at a mobility startup (pretty much works like an airline) that uses Elixir/OTP as it’s main backend technology - Yay! -.

Having worked on some reservation systems in the past (a java legacy system we inherited about 5 years ago which had a huge relational-table mess with lots of views to represent hotel room availability) this time we decided not to go with a relational model and use instead a graph database. It turns out modeling the whole availability thing (routes and geo-located stations, etas, trips, reservations, people and vehicles) using graphs was much easier for our minds than thinking on lots of joins or views. Actually we spent a few weeks just modeling graphs on a board before actually coding anything, and trying to answer some of the questions we know the API would have to answer. Of course, graph dbs excel at problems where you have lots of relationships, and I wouldn’t recommend them for storing all of your business data, for example we still use Postgres for most of the business stuff like users, payments, reservations, but keep nodes on the GraphDB with the same UUIDs that Ecto generates, and we just store enough data on them as we need for solving the availability search.

One nice thing IMHO is that using Neo4J from Elixir moved me to contribute to both bolt_sips and the underlying boltex driver. Actually many Elixir libs I share on my github have come to life because we use them in a way at work (besides those that are just for fun). And that is nice, I guess, solving real problems cause more libraries to be born and those already existing to become more mature, and the Elixir community benefits from that.

So far using Neo4J has been a nice experience for us. Also OTP has been a very nice choice for us, we basically have a process per vehicle which is basically driving the vehicle with live data (via websockets and graphql subscriptions) to the next station that has either people getting on/off, and we skip those places that no one reserved at. And that in Mexico City can save a lot of time in traffic and a much better experience for our customers.

josevalim

josevalim

Creator of Elixir

I have always kept an eye on graph databases and it is really exciting to see some work in using them directly from Elixir!

Florin

Florin

I am hearing, not directly, Regina is working on an Ecto version, for Neo4j. I contemplated the same at the beginning of my experience with neo4j in Elixir, but realized soon I would just limit the access to Neo4j, and hence went for giving the users a more transparent access to the Neo4j’s own query language; Cypher. And I don’t regret that decision. In fairness, at that time the Model was still a thing, in Ecto, and I didn’t like it very much. Now Ecto is probably much more suitable for trying again, but I let Regina drive this journey, and focus on the lower level Neo4j bindings instead.

Where Next?

Popular in Talks Top

axelson
ElixirConf 2017 - Perhap: Applying Domain Driven Design and Reactive Architectures to Functional Programming - by @Version2beta ...
New
axelson
ElixirConf 2017 - Keep an Eye on the Sky with Nerves and Phoenix - @electricshaman As part of the next gener...
New
axelson
ElixirConf 2018 – Day 2 Opening Keynote – Justin Schneck (@mobileoverlord) All talks thread:
New
Lawrence_elixir
@keathley - Senior Engineer Bleacher Report and Elixir Outlaws presenter Talk: Building Resilient Systems with Stacking Talk in three w...
New
blatyo
Looks like videos have started to go up for ElixirConf US 2018. Here’s the playlist of ones available so far. I expect it’ll get updated ...
New
axelson
ElixirConf 2017 - Embedded Elixir for Monitoring the Built Environment - Christopher Coté At CRT Labs (Natio...
New
axelson
ElixirConf 2017 - Well Behaved Native Implemented Functions for Elixir - @potatosalad Native Implemented Fun...
New
AstonJ
#Day 1 ElixirConf 2017 - Day 1 Keynote - Justin Schneck (Discussion thread) ElixirConf 2017 - My Journey from Go to Elixir - Veronica L...
New
axelson
ElixirConf 2017 - Cajoling the Bird: How we squeezed more out of Phoenix PubSub- Simon Zelazny Grindr is a m...
New
axelson
ElixirConf 2017 - Elixir The Toyota Way - Powell Kinney Toyota has a century-long legacy of innovation in ma...
New

Other popular topics Top

Fl4m3Ph03n1x
About me? ( if you have nothing better to do than reading about some random guy in the internet :stuck_out_tongue: ) Hello all, this is ...
New
Lily
In templates/appointment/index.html.eex: <%= for appointment <- @appointments do %> <tr> <td><%= appoi...
New
dokuzbir
I want to highlight html closing tags when i click a html tag. That works in .html files but doesnt work for html.eex templates. How can...
New
freewebwithme
Using vs code and installed ElixirLS: support and debugger. And I got an error popped up on start up says Failed to run ‘elixir’ comma...
New
RisingFromAshes
I’ve read in another post that it may be possible with a router helper - but I couldn’t find an appropriate one, and tbh, I’m still just ...
New
AstonJ
Please see the new poll here: Which code editor or IDE do you use? (Poll) (2022 Edition) It’s been a while since we first asked this, I...
208 31142 143
New
KronicDeth
Elixir plugin for JetBrain’s IntelliJ Platform (including Rubymine) This is a plugin that adds support for Elixir to JetBrains IntelliJ...
289 36128 110
New
dblack
I’ve got an issue with an app and I’ve no idea of how to troubleshoot it. I’m hoping someone here might have seen something similar. I p...
New
romenigld
I am trying to run a deploy with docker and I successfully runned with this command: docker build -t romenigld/blog-prod . but when I t...
New
AstonJ
Seen any cool LiveView demos, sample apps or examples? Please post them here! :003:
New

We're in Beta

About us Mission Statement