last day (14 days later) » 

11:07 AM
first thank you for your help
let me clear my requirements first
i have an application in which i want to use neo4j in Embedded mode and using SDN
 
No worries :) I find it helps me develop my own skills too!
 
now i want to cluster
i want to deploy my app on three separate machines
 
I understand, it is the same configuration that I have.
 
and what i want is each instance of application should have its own database in embedeed mode
 
But I have not tested on the same machine.
The only difficulty in using one machine is making sure that all your ports are correctly assigned.
 
11:10 AM
but all databases should be in sync automatically
 
Everything that you say is just fine.
 
Firstly you should understand that Neo4J embedded is the equivalent of a standalone server.
 
now i am not having any neo4j server running
 
So when you use SDN with embedded you do not require a standalone server.
 
11:11 AM
ok fine
now i have deployed my app on three different ports
on same machine
 
But you are able to create a cluster using all standalone, all embedded or a mixture. That is all supported.
Great.
 
i want all embedded
now all apps are same except some changes in neo4j xml
 
Fine, so the starting point (which I think you now have) is the configuration I added in my answer.
So to your most recent comment.
 
here i have different server ids in each app xml
and also different DBPATH
bacuase i want each app should have its own db directory
 
Great
ha.initial_hosts is used to create the cluster
 
11:13 AM
so who will create them?
 
You will, your java application is them :)
localhost:8088, localhost:8089, localhost:8090 are your application servers.
 
means my java app would automatically create clusters
yes
there are my app servers
let me try once again
 
Now if they were running on different machines then you would be able to set your initial hosts value to localhost:5001, yourotherhost:5001, yourthirdhost:5001
 
i am just running my app
 
But they are on the same machine which means that they cannot all use 5001
 
11:16 AM
i have different
 
<util:map id="config">
<entry key="ha.server_id" value="2" />
<entry key="ha.initial_hosts" value="127.0.0.1:5001,127.0.0.1:5002" />
<!-- put in more config parameters here, http://docs.neo4j.org/chunked/stable/ha-configuration.html -->
</util:map>
<util:map id="config">
<entry key="ha.server_id" value="3" />
<entry key="ha.initial_hosts" value="127.0.0.1:5001,127.0.0.1:5002" />
<!-- put in more config parameters here, http://docs.neo4j.org/chunked/stable/ha-configuration.html -->
</util:map>
 
Ah excellent
 
but in the link above ,they are saying to run stand alone servers
 
So to each you will need to add <entry key"ha.cluster_server" value="127.0.0.1:500X" />
 
11:18 AM
ahh it seems working
let me check
 
(You need three entries too, you only have two?)
 
actually right now i am just testing with two
 
I'm not sure Neo will cluster two, I think it needs 3 to be able to perform an election.
 
Which link says to run standalone servers?
 
11:21 AM
great
its working
thank you very much
:)
 
Oh it does work with two, fair enough! :)
 
ya
with two only
 
No worries, that was fairly quick, took me ages!
There are lots of settings listed in the links I gave you. You get much greater stability if you explictly set hosts and ports so that things like DHCP and your hosts files don't make the clustering code bind to the wrong ports. Anyhow, good luck!
 

last day (14 days later) »