Taking a Look into the NoSQL World (Part 5)

NoSQL Graph Databases

Graph databases are probably the most complex ones to use inside the NoSQL World; first because a graph structure is by nature more difficult to model than table structured ones, second because human mind seems not to be comfortable neither trained enough to organize huge data structure in a non-friendly visual form. It has a complex-modeling phase, which is remunerated by a good performance when retrieving correlational data.

Neo4J defines itself as a graph database capable of modeling nodes and its relations, where both of them can have attached to it a label and a set of properties. Like most of NoSQL databases, it supports ACID, persistence to guarantee crash recovery and cluster configuration, even though the last is only available using the commercial version of the product. Following the Hazelcast strategy, it supports both stand alone server and application embedded configuration.

Since it has no tabular (or hash) data structure, its mechanism to search data is provided through the usage of what they call traversal mechanism, which relies on node’s and relation’s labels allowing an extra usage of properties information. Whereas graph data structures can increase in complexity resulting in a slow performance queries, Neo4J also supports the creation of indexes on labels and properties values.

Following Cassandra interface and nomenclature, Neo4J supports a Cypher Query Language (or CQL), which allows developer perform data manipulation over a REST interface.  This interface language has some peculiarities that will take some time from the developer to achieve a fully understanding on its usage and patterns. However, after couple of writes and reads, everything starts to make more sense and creativity can take place by performing unimagined queries.

It is possible to use a java client API through a JDBC implementation that hides all REST interface provided by the database. In despite of not being official, such API was created by one of the Neo4J employers and have been improved over since by their community.

Its usage is very simple, however the performance let me down; all tests using the REST interface was far from what I have expected. Since I have used a virtual machine on the same host where application was running, the results were far behind when compared to other NoSQL databases configured under the same circunstances. Also, the lack of ready to use algorithms like BFS, DFS, Dijkstra and Spanning Tree causes some disappointment.

In despite of its fit to several applications, I would recommend its usage mainly for intensive-relation modeling, or application that has on its essential a graph model database like networks or peer-to-peer communication. Since I have not bought or downloaded the commercial version, there is still hope all the low performance issues is just a bad configuration or lack of features on the community version. The figure below exemplifies a deployment scenario beyond summarize Neo4J Community Edition main features.


Deixe um comentário

Preencha os seus dados abaixo ou clique em um ícone para log in:

Logotipo do WordPress.com

Você está comentando utilizando sua conta WordPress.com. Sair /  Alterar )

Foto do Google

Você está comentando utilizando sua conta Google. Sair /  Alterar )

Imagem do Twitter

Você está comentando utilizando sua conta Twitter. Sair /  Alterar )

Foto do Facebook

Você está comentando utilizando sua conta Facebook. Sair /  Alterar )

Conectando a %s