Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which Ruby REST API client for neo4j?

I wonder what the REST API clients are available for using from Ruby (not JRuby, so native bindings are not an option)?

Ideally, I would want the API similar to the neo4j gem or ActiveRecord (validations, migrations, observers etc).

Currently available (REST) tooling doesn't even come close to what we have, for example, in ActiveRecrod:

  1. neograhy - just plain REST API. Nothing to do with models etc.
  2. neology - is just a wrapper over neography and isn't a full featured ActiveModel.
  3. architect4r - conforms to ActiveModel, but provides only one way to query data (Cypher language), also no indexes support.

I like the code of architect4r a little bit more (primarily because it uses ActiveModel).

But neology seems to be much more pragmatic choice as it already is using neography under the hood.

The choice is pretty small and tough.

Could you please tell when one should be used rather than the other?
Also any recommendations that would help me to decide on the gem are very welcome.

Thanks.

like image 315
Dmytrii Nagirniak Avatar asked Dec 01 '11 00:12

Dmytrii Nagirniak


People also ask

Which endpoint is required when you want to execute a Cypher query using the REST API?

So how do we use the REST API? That's pretty easy, actually. There are two options, and one of them is now deprecated – that is the old CYPHER endpoint. So we use the new http://localhost:7474/db/data/transaction/commit endpoint, which starts a transaction and immediately commits it.


4 Answers

The short answer is that there is no any mature ActiveModel-like gems for RESTful neo4j.

The most common scenario is to just use Neography.

like image 181
Dmytrii Nagirniak Avatar answered Sep 27 '22 01:09

Dmytrii Nagirniak


I haven't worked with neoj yet, but i do work with api's a lot.

I have found the same trouble as you and my solution was to create my own.

Maybe if you have time, you can check it out. ApiClient

It still in development, so let me know of any feature you may need. =)

like image 34
Paulo Henrique Avatar answered Oct 01 '22 01:10

Paulo Henrique


I have only used Neography which does its job very well. Have not heard about architect4r, but it looks really pragmatic and pleasing - need to check it out!

/peter

like image 28
Peter Neubauer Avatar answered Sep 29 '22 01:09

Peter Neubauer


I know this thread is a little old, but there is activity on the neo4j-core gem geared towards using its API for the standalone database server in addition to the embedded database. Thought this might help people who find this thread when searching around.

https://github.com/andreasronge/neo4j-core/tree/3.0

Note: Before anyone yells at me for not making this a comment instead of an answer, I don't have the required reputation for doing so. Sorry.

like image 23
Joey Avatar answered Sep 30 '22 01:09

Joey