On 6/12/11 8:19 PM, Dmytrii Nagirniak wrote:
On 07/12/2011, at 2:49 PM, Chris Berkhout wrote:
I tried to stay within MRI, but the REST API just isn't good enough. So I
quit on it.
Not good enough in terms of features?
I guess it's more Java, but extending the API may be an option.
Yes, features.
There are couple of gems that help with it: neology (not maintained, failing
specs), architect4j (ActiveRecord-like, new project, some failing specs).
I even thought to come up with something better. But then I realised it's not
that simple.
Those abstractions are leaky and the best bet is to stay as close to the HTTP
request/response as you can.
While, with native bindings, you can traverse the graph natively from ruby. And
it's is pretty efficient.
With REST you'd have to run traversal queries for that.
It basically means that anything more or less complicated involves a number of
HTTP req/resp and wrapping all that with your models.
Sorry this thread is kind of old but I wanted to weigh in, hope it's not
too late to be relevant.
We started embedding neo4j inside JRuby but quickly switched to the
stand-a-lone server. Massive stability and corruption issues with the
embedded one the moment we sent even a trifling production load at it.
This was on 1.4 and 1.5rc1, so perhaps things are a little better now.
Embedded is useful for once off batch loads to get you started though.
Protip for this: use the java classes directly, don't try to use the
neo4j ruby gem abstraction (use it to give you access to the java
classes though: require it, just don't use any of its ruby classes.)
This way you can copy all the examples from the manual and not have to
worry about Weird Stuff.
If you have complicated traversals and gremlin doesn't work for you,
write a java plugin. (Sorry.)
Neology works fine for us even though it's a little cruft. It's a
trivial wrapper on top of HTTP so not much to go wrong.
In general, develop on MRI, deploy to JRuby, run CI over both and you
won't go too far wrong after some initial teething problems. I gave a
talk at the JRuby meetup here last week, it was recorded so hopefully
will be published soon.
Xav
--
You received this message because you are subscribed to the Google Groups "Ruby or
Rails Oceania" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rails-oceania?hl=en.