title: Choice between REST API or Java API
body: <p>I have been reading about neo4j last few days. I got very confused about whether I need to use REST API or if can I go with Java APIs.</p>
  
  <ol>
  <li><p>My need is to create millions of nodes which will have some connection among them. I want to add indexes on few of node attributes for searching. Initially I started with embedded mode of GraphDB with Java API but soon reached <code>OutOfMemory</code> with indexing on few nodes so I thought it would be better if my neo4j is running as service and I connect to it through REST API then it will do all memory management by itself by swapping in/out data to underlying files. Is my assumption right? </p></li>
  <li><p>Further, I have plans to scale my solution to billion of nodes which I believe wont be possible with single machine's neo4j installation. I also believe Neo4j has  the capability of running in distributed mode. For this reason also I thought continuing with REST API implementation is best idea.
  Though I couldn't find out any good documentation about how to run Neo4j in distributed environment.</p></li>
  <li><p>Can I do stuff like batch insertion, etc. using REST APIs as well, which I do with Java APIs with Graph DB running in embedded mode?</p></li>
  </ol>