Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
12-26-2020 12:42 PM
I have been trying to understand how using networkX is different from performing graph analytics in Neo4j. Need help in understanding this in detail.
12-26-2020 02:38 PM
My knowledge about networkX might be a bit outdated but your question is interesting ! Let's talk about this.
I'll start with the first thing that came to my mind after reading your question : well on one hand you have a db and not on the other hand. The db is designed to use hard disk to store information, I don't think networkX can do this. Whats does it mean ? You can work on bigger graphs with a db because you have more memory, but it's slow... Loading data from disk is slower than working on data in RAM which is what basic programs such as NX do. It also mean than with NX, you can only store your whole graph or load it all. With neo4j you might load in memory only what you want (with the proper indexes).
Ok now let's go forward.
What about the maths ? Well in both case you can define a graph as a set of nodes and a set of edges (the basic).
I believe in both cases you can add various data to the nodes and the edges. Hey what if you want to define new objects like links pointing to links or nodes grouping sets of nodes ? When it comes to this, it's harder to highlight the differences between the two apis because it really depends on what you want to do, but in my opinion with both of them you can build, to a certain extent, this kind of mathematical objects. Network X might have the advantage on this topic since it's more designed for research than neo.
What about the graphics ? Well both offers graphicals functionalities but I believe neo4j is a bit more handy because it allows you to interact with the view. You can clear some nodes of your view and fetch the neighbors of a node. On the other hand, NX comes with python so you may mix it with pythons graphics libraries. An open question and interesting question in my opinion is : what graphs aggregations algorithms can be run and visualized with these two tools ? (because i think aggregation is a cool way to visualize graphs)
What else ? Yes, the algorithms ! I won't talk about which one can help you to implement graphs algorithms more efficiently, if you want efficiency go for C and forget neo or NX.
But the variety ? I think that both have a lot of algorithms already implemented but I like two things with neo, first there is a lot of plugins to perform analytics with fun and cools algorithms. I like what people did there, these algos mixing graph and IA, the NLP etc, this is great.
NX comes with more classic algorithms but fundamentals in many graphs research area. I'm thinking about graphs sampling and graphs aggregations paritcularly.
Another thing I like with neo is that you can implement your own algorithms. You can do it too with NX but it's more impressive to allow such feature in a DB architecture.
So this is not a detailed comparison, but I hope it helps a bit
01-24-2021 01:40 AM
Thank you for the help. So in conclusion I believe if there is a need for the database then neo4j is a good option compared to networkx.
12-26-2020 03:27 PM
I took a quick peek at networkX.
A few things that strike me:
The above is from a brief look. I might be wrong on the details....
01-24-2021 01:43 AM
Thank You for the help. I do agree with the fact about leveraging python features for neo4j.
I came across a python library which integrated neo4j data with networkx style data.
All the sessions of the conference are now available online