|Using an external (standalone) Neo4j server||Reuven M. Lerner||5/3/11 5:07 AM|
Hi, everyone. I'm new to Neo4j, and am using it on a site for a
client. So far, I'm pleased and impressed. Thanks to everyone
working on the Ruby driver, as well as the Rails support.
I'm wondering if it's possible to use Neo4jrb in a Rails application
(under JRuby, of course), but without the integrated Neo4j server.
That is, when I type "rails s", I currently get both a Rails server
and a Neo4j server. I'm expecting that we will eventually want to
have our Rails server running on a separate machine from the Neo4j
server, and for them to communicate over the network. Also, I'd like
to run both my Rails server and my Rails console at the same time,
without having one of them in read-only mode. Setting
config.neo4j.storage_path to a URL, which I had sorta hoped would
I'm sure that there's a relatively easy way to turn off the built-in
Neo4j server and to connect to an external server -- but would someone
please tell me how? (And if there are any serious reasons not to do
this, please let me know.)
|Re: Using an external (standalone) Neo4j server||ronge||5/3/11 10:39 AM|
The options are either you use the embedded neo4j.rb with JRuby or
|Re: Using an external (standalone) Neo4j server||Reuven M. Lerner||5/3/11 10:14 PM|
If I understand you correctly, you're saying that if I want to enjoy
the ActiveModel stuff that comes with neo4j.rb, then I have to use it
with JRuby and the embedded server?
Yeah, this is a really big annoyance for me, and probably the main
reason why I want to have a separate server running. I'm a very heavy
console user, and hate having to bring things up and down just to play
with things in the console. Being able to use 1.9.2 rather than JRuby
is also appealing, especially given that I have a lot of experience
deploying standard Rails apps, and very little deploying JRuby apps.
Over time, I expect that we'll need multiple Web servers running
against a single Neo4J server -- just as you do when scaling a Web app
that uses a relational database.
|Re: Using an external (standalone) Neo4j server||ronge||5/3/11 11:46 PM|
On Wed, May 4, 2011 at 7:14 AM, Reuven M. Lerner <reu...@lerner.co.il> wrote:Yes. In neography you get almost the same syntax as for the
Neo4j::Node and Neo4j::Relationship but no ActiveModel stuff.
>Ok, I will see what I can do.
> Being able to use 1.9.2 rather than JRuby
Yes, using 1.9.2 and deploying on heroku is hard to beat.
>One interesting alternative is deploying several Rails servers bundled
with embedded HA enabled Neo4j instances.
|Re: Using an external (standalone) Neo4j server||Krasimir Angelov||5/4/11 12:53 AM|
So even if you run HA cluster, all these (RoR app and neo4j instances) will run on same machine? is this correct or I'm getting it wrong?
|Re: Using an external (standalone) Neo4j server||ronge||5/4/11 12:58 AM|
No, you would typically run it on different machines and have a load
balancer in front of it like Apache.
|Re: Using an external (standalone) Neo4j server||ronge||5/4/11 1:01 AM|
Sorry I think I misunderstood you. You should run the RoR app and the
embedded neo4j instance in the same process/machine
but you will have several machine running RoR app each with an
embedded HA Neo4j db.
|Re: Using an external (standalone) Neo4j server||Krasimir Angelov||5/4/11 1:49 AM|
So I may have few machines, each one running both Rails app and embedded Neo4j instance, but all these Neo4j instances will be in HA cluster. Correct?
|Re: Using an external (standalone) Neo4j server||ronge||5/4/11 3:12 AM|
Yes, they all will be in a cluster so that the database will be synchronized.
|Re: Using an external (standalone) Neo4j server||ronge||5/4/11 3:22 AM|
>> I agree it is annoying that the rails console only works in read only
I think the best and easiest solution would be to have a console page
Another alternative, which I think is more complicated, is running the
|Re: Using an external (standalone) Neo4j server||Krasimir Angelov||5/4/11 6:57 AM|
Cool. Thanks for the answers.
|Re: Using an external (standalone) Neo4j server||Krasimir Angelov||10/20/11 3:47 AM|
Here's something I saw lately - http://devender.wordpress.com/2011/10/17/neo4j-running-embedded-server-with-webconsole/
Can it help somehow? May be not for rails console but for using the webconsole...