Hi

Sorry for the late reply.
I have done some experiment trying to run neo4j.rb on MRI a while a ago,
check this old branch:
https://github.com/andreasronge/neo4j/tree/rjb

It might be possible to run neo4j.rb on MRI but some parts of the code has
to be rewritten specifically for RJB. I would be really interesting to
compare the performance between using JRuby and the RJB bridge, I have no
clue which one would be faster.
One problem using MRI is that instead of using threads (as JRuby does) you
have to rely on several processes which will not work with neo4j (as you
pointed out). So if you plan to use more then one MRI unix process then it
will not work, unless you set up a Neo4j HA cluster.

/Andreas

On Sun, Jun 19, 2011 at 1:57 PM, Mathias Hensel <[email protected]
> wrote:

>
> Hello,
>
> I plan to use Neo4J for a Ruby on Rails web app. However, I have not the
> possibility to use JRuby.
> Due to doubts of performance issues using the REST API, I'm considering to
> use the embedded graph database with means of
> the Ruby Java Bridge (RJB). The Ruby app then would talk to the JVM as a
> regular Java client.
>
> The problem is: Rails does not have an application scope like Java web
> frameworks or ASP.Net. However, this is (to my understanding) essential
> to hold only one instance of the EmbeddedGraphDatabase class because I've
> read that it's not possible to have multiple instances of this class
> at the same time. I can't use the singleton pattern because when using
> fastcgi or several Mongrel server instances each server would create its own
> singelton instance, resulting in multiple EmbeddedGraphDatabase instances.
>
> My question is: How is this problem solved in the JRuby-Neo4J
> implementation?
> How can several server processes share one instance of the
> EmbeddedGraphDatabase when using JRuby with Rails?
>
> Thanks so much in advance,
> Mathias
> _______________________________________________
> Neo4j mailing list
> [email protected]
> https://lists.neo4j.org/mailman/listinfo/user
>
_______________________________________________
Neo4j mailing list
[email protected]
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to