cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Using Neo4j to model Erlang / Elixir projects?

I've been a fan of graph DBs and Neo4j for a number of years (even edited a Cypher manual), but I've never used either in anger. However, I'm currently playing around with the idea of using Neo4j to model Erlang / Elixir projects. So, I'm here to ask some (all too naive) questions...

By way of background, Elixir is a dynamically typed functional programming language that runs on the Erlang VM. Elixir has a number of modularization primitives, including applications, behaviours, callbacks, functions, macros, modules, NIFs, ports, structs, etc.

A running system will typically involve large numbers of lightweight processes, running on any number of nodes. These processes communicate via asynchronous messages and (less often) synchronous signals. To support fail-soft operation, trees of supervisor processes clean up and restart things whenever a process crashes.

As you might gather, getting even a rough idea of the system architecture can be a challenge. So, I'm looking into harvesting both static and dynamic information, pouring this into Neo4j, and querying the result. Problem is, I'm not familiar enough with the modeling idioms to know what entities and relationships I should define. For example:

Q: Should I model a supervisor process as a process with a supervisor attribute? Alternatively, should I define it as a specialized entity which is related to :Process via some sort of :IS_A relationship?

Q: Should I model messages as entities or as attributes to a relationship? More generally, how should I handle transitive verbs using Neo4j relationships?

Q: Should I model run-time actions (e.g., :SPAWNS) at the :Function or :Process level?

Any constructive advice, comments, and clues would be most appreciated. (ducks)

-r

0 REPLIES 0
Nodes 2022
Nodes
NODES 2022, Neo4j Online Education Summit

All the sessions of the conference are now available online