On 8/19/2011 4:19 AM, Jim Webber wrote:
> Hi Gautam,
>
> If you're writing a Java application, then use the Java APIs. If you need 
> several instances of the application to see the same data then use Neo4j HA. 
> That way your application exposes your API (your service interface).

OK, i have read the wiki pages for neo4j-HA,
http://wiki.neo4j.org/content/High_Availability_Cluster,  it seems
moderately complicated. My need is simple enough (hopefully) where I can
try your 2nd suggestion, that is to expose some "service interface" from
my application. I don't have (at this point) a strong FT and load
balancing need.

So I will do the following, but please correct me if what I am saying is
non-sense.

machine 1: run a java process that runs an "embedded"  db instance,
                    design all my application level java classes of interest
                           (person, building, city,  knows, lives-in,
located-in...)
                    create JAVA RMI (or similar, thrift, CORBA)
interfaces that
                           expose all methods of interest to my
application such as
                           create_person(), create_building,
createRelationship().
                          
machine 2:  run a java process that will be user of the rmi/thrift/corba
service
                     that has been set up and expose by my neo4J process on
                     machine 1. A this point application on machine 2
will interact
                     with my service and all neo4j DB stuff will be done
by java code
                     I have written on machine 1.

machines 3...n: run additional Java apps that interact  the machine_1's DB
                           server in the same way as machine 2.

So, as long as my overall distributed application is not  completely DB
operations bound (meaning that amount of computational work done in
machines 2..n  per each DB operation is such that I don't bog down and
serialize on just the DB server, I should be fine. And I would be able
to get by without using neo4j HA stuff.

Above structure is how I might write a application if I were using
Postgres, but the difference being that with postgres I would not have
to write any rmi/thrift/corba style service interface, I can just use
JDBC and point to the postgres server on machine 1. (I am not a DB guru,
unsure about my ideas overall.)

If above is correct, seems like a bit of extra work to write my own
service API, no?

Gautam

> The Neo4j server does the same thing but it exposes *our* API (that is our 
> REST interface).
>
> At this point there are no other protocols supported by the server. But since 
> you're in Java already, the native APIs are a better choice.
>
> JIm
> _______________________________________________
> 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