I’m starting to learn Phoenix / Elixir and I would like to use a graph-theory library on the server. I know Cytoscape.js which I’ve used in node projects. I also know Cytoscape exists in java
Is it possible (and does it make sense) to use such a library?
If not, are there alternatives?
Thanks
Thanks Stefan. I’d like to call js functions from Elixir, yes.
Cytoscape can receive a json object that contains the nodes and edges information of a graph. Then, you can traverse the graph, browse, sort, etc. using very powerful algorithms.
I’m looking for the best technical solution to either use Cytoscape.js from Elixir on the server, or if there is another graph-theory library for elixir (didn’t find anything so far)
Erlang’s standard library has a graph theory module called digraph
. I haven’t gotten the chance to use it yet, but I was excited to learn of its existence.
Calling js from elixir is very simple using that lib. You already have node on the server with phoenix, just put the dep in mix.exs, mix deps.update --all and try a call as documented on github.
Thanks to both of you. I’ll investigate both options!