Re: [Neo4j] Recommended way to deploy server software
Daniel, On Sun, Oct 9, 2011 at 11:45 PM, doubleagent wrote: > I don't understand. > > I thought that 'neo4j start' "ran the server database" instead of "wrapping > an embedded database", but the gremlin console in the webadmin service shows > that g is bound to an instance of "EmbeddedGraphDatabase". Yes, what you are seeing is the internal database instance the server is exposing over REST. If this was a High Availability installation, you would see a "HighlyAvailableGraphDatabase" instance being injected into the Gremlin scripting environment. > >> REST is right now the best way to interact with the server. Alas, there is >> the Neo4j Shell (not Gremlin, but you can execute Cypher remotely) that >> communicates with RMI instead, see ... > > Actually, the REST api isn't as bad as I thought it was originally, because > it turns out I can still take advantage of Gremlin's laziness (I had missed > "17.14.5. Set script variables" in the docs). I just have to be clever > about it. Exactly, that is what the Gremlin and Cypher plugins are about - pushing more complex chunks of work to the server close to the DB. However, be aware that exposing a Groovy console is a security risk in the Gremlin case. Secure it. > >>"g = new Neo4jGraph('/tmp/neo4j')" is what you would do from Java or an > empty Groovy shell to get hold of a new Neo4j graph database instance. In > the Neo4j server case that is already done for you. > > Right. What if the server is sitting on an internal network at > 192.168.1.14, and I want to connect to it from 192.168.1.12. On .12 I might > say... > > (import '(??)) > (def g (Neo4jGraph. "192.168.1.14:7474/...")) > Well, there is a Java-REST binding that exposes exactly this, see https://github.com/neo4j/neo4j-java-rest-binding if you want to try. We are working on moving this onto Par with the Embedded API so it is usable through e.g. Blueprints. > Or, if it didn't fully support URI's, I might just mount it. Then, > > (def g (Neo4jGraph. "/mnt/db-srv/...")) > > > But either way, I still need to know what to import, and what jar file needs > to be on the classpath. > Yes, as with all scripting langs, that is a bit of trial-error :) If you need more stuff on the classpath, the server is picking up anything under /plugins and exposes it ... /peter ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Recommended way to deploy server software
I don't understand. I thought that 'neo4j start' "ran the server database" instead of "wrapping an embedded database", but the gremlin console in the webadmin service shows that g is bound to an instance of "EmbeddedGraphDatabase". > REST is right now the best way to interact with the server. Alas, there is > the Neo4j Shell (not Gremlin, but you can execute Cypher remotely) that > communicates with RMI instead, see ... Actually, the REST api isn't as bad as I thought it was originally, because it turns out I can still take advantage of Gremlin's laziness (I had missed "17.14.5. Set script variables" in the docs). I just have to be clever about it. >"g = new Neo4jGraph('/tmp/neo4j')" is what you would do from Java or an empty Groovy shell to get hold of a new Neo4j graph database instance. In the Neo4j server case that is already done for you. Right. What if the server is sitting on an internal network at 192.168.1.14, and I want to connect to it from 192.168.1.12. On .12 I might say... (import '(??)) (def g (Neo4jGraph. "192.168.1.14:7474/...")) Or, if it didn't fully support URI's, I might just mount it. Then, (def g (Neo4jGraph. "/mnt/db-srv/...")) But either way, I still need to know what to import, and what jar file needs to be on the classpath. -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Recommended-way-to-deploy-server-software-tp3399621p3408153.html Sent from the Neo4j Community Discussions mailing list archive at Nabble.com. ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Recommended way to deploy server software
Daniel, the console in the webadmin shows you that "g" is bound to the Neo4j Server graph instance, and automatically injected for you, together with the "out" variable to direct possible output from your script to. REST is right now the best way to interact with the server. Alas, there is the Neo4j Shell (not Gremlin, but you can execute Cypher remotely) that communicates with RMI instead, see http://docs.neo4j.org/chunked/snapshot/shell.html "g = new Neo4jGraph('/tmp/neo4j')" is what you would do from Java or an empty Groovy shell to get hold of a new Neo4j graph database instance. In the Neo4j server case that is already done for you. Does that help? Cheers, /peter neubauer GTalk: neubauer.peter Skype peter.neubauer Phone +46 704 106975 LinkedIn http://www.linkedin.com/in/neubauer Twitter http://twitter.com/peterneubauer http://www.neo4j.org - Your high performance graph database. http://startupbootcamp.org/ - Öresund - Innovation happens HERE. http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party. On Sun, Oct 9, 2011 at 10:49 PM, doubleagent wrote: >> Yes, Downloading, untar , adjust config and start via the scripts is the > best way to run the server, this is what the QA tests do, too. > > What does the following mean? > > > ==> > ==> \,,,/ > ==> (o o) > ==> -oOOo-(_)-oOOo- > ==> > ==> Available variables: > ==> g = neo4jgraph[*EmbeddedGraphDatabase > *[/home/doubleagent/Neo4j_Databases/playground/data/graph.db]] > ==> out = java.io.PrintStream@1ee4dbe > ==> > > > Also ... what I've done is put the db on another vm and am communicating > with it from there. I'd like to open a persistent Gremlin connection to the > server instead of using the REST api. Is this possible? > > I'm having difficulty discovering how to do some really simple things too ie > the Gremlin examples keep showing this line of code over and over: > > g = new Neo4jGraph('/tmp/neo4j') > > > But when I search github that class (Neo4jGraph) only shows up in an > outdated gremlin repo. > > -- > View this message in context: > http://neo4j-community-discussions.438527.n3.nabble.com/Recommended-way-to-deploy-server-software-tp3399621p3408077.html > Sent from the Neo4j Community Discussions mailing list archive at Nabble.com. > ___ > Neo4j mailing list > User@lists.neo4j.org > https://lists.neo4j.org/mailman/listinfo/user > ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Recommended way to deploy server software
> Yes, Downloading, untar , adjust config and start via the scripts is the best way to run the server, this is what the QA tests do, too. What does the following mean? ==> ==> \,,,/ ==> (o o) ==> -oOOo-(_)-oOOo- ==> ==> Available variables: ==> g = neo4jgraph[*EmbeddedGraphDatabase *[/home/doubleagent/Neo4j_Databases/playground/data/graph.db]] ==> out = java.io.PrintStream@1ee4dbe ==> Also ... what I've done is put the db on another vm and am communicating with it from there. I'd like to open a persistent Gremlin connection to the server instead of using the REST api. Is this possible? I'm having difficulty discovering how to do some really simple things too ie the Gremlin examples keep showing this line of code over and over: g = new Neo4jGraph('/tmp/neo4j') But when I search github that class (Neo4jGraph) only shows up in an outdated gremlin repo. -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Recommended-way-to-deploy-server-software-tp3399621p3408077.html Sent from the Neo4j Community Discussions mailing list archive at Nabble.com. ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Recommended way to deploy server software
Yes, Downloading, untar , adjust config and start via the scripts is the best way to run the server, this is what the QA tests do, too. On Saturday, October 8, 2011, doubleagent wrote: > When I download the package form the main page and run bin/neo4j start, does > that just wrap an embedded db, or is that intended to be an easy way to get > going with an actual server? > > Would there be any drawback to just writing a script to pull that package, > untar it, change some configuration parameters, and start/stop the server > from there? > > -- > View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Recommended-way-to-deploy-server-software-tp3399621p3405755.html > Sent from the Neo4j Community Discussions mailing list archive at Nabble.com. > ___ > Neo4j mailing list > User@lists.neo4j.org > https://lists.neo4j.org/mailman/listinfo/user > -- Cheers, /peter neubauer GTalk: neubauer.peter Skype peter.neubauer Phone +46 704 106975 LinkedIn http://www.linkedin.com/in/neubauer Twitter http://twitter.com/peterneubauer http://www.neo4j.org - Your high performance graph database. http://startupbootcamp.org/- Öresund - Innovation happens HERE. http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party. ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Recommended way to deploy server software
When I download the package form the main page and run bin/neo4j start, does that just wrap an embedded db, or is that intended to be an easy way to get going with an actual server? Would there be any drawback to just writing a script to pull that package, untar it, change some configuration parameters, and start/stop the server from there? -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Recommended-way-to-deploy-server-software-tp3399621p3405755.html Sent from the Neo4j Community Discussions mailing list archive at Nabble.com. ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Recommended way to deploy server software
Hey, > Am I really being that hyperbolic? The deployment tools we have are superb > and simple to use. I just don't _want_ to do any prep work outside my > project folder in order to test my code. The embedded db made me think it's > possible (first time I'd ever dealt with one). (= Understood. Check out the functional tests from the community edition. There's infrastructure in there that will get you running from within your project - in fact for testing it's probably better than the WrappingBootStrapper. > I couldn't locate Jake's. Do you have a link? Thanks. I then I realise that I saw Jake's measurements on a different, non-public list. But to summarise, he thinks the REST API could be made to have roughly the same throughput as the embedded API, albeit at higher latencies. Jim ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Recommended way to deploy server software
> I'm not sure I follow. What's "one-shot" deployment? Deploying server is pretty trivial with modern automation tools. Am I really being that hyperbolic? The deployment tools we have are superb and simple to use. I just don't _want_ to do any prep work outside my project folder in order to test my code. The embedded db made me think it's possible (first time I'd ever dealt with one). (= ^That's the ideal. I don't mean to imply that I've been able to do that in any project, ever, and I don't want to go down the extraordinarily banal road of admitting a vm or interpreter screws up the whole concept. > There have been some micro benchmarks on this list (Josh and Jake for > example) I couldn't locate Jake's. Do you have a link? Thanks. -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Recommended-way-to-deploy-server-software-tp3399621p3401548.html Sent from the Neo4j Community Discussions mailing list archive at Nabble.com. ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Recommended way to deploy server software
Hi, > So, using an embedded db is the only way to if you want one-shot deployment? > It might be worth it to see how difficult it would be to write that > component as a plugin to the build tool I use (Cake). I'm not sure I follow. What's "one-shot" deployment? Deploying server is pretty trivial with modern automation tools. > I'd love to look at any resources showing performance comparisons between > server & embedded. Do you know of any? There have been some micro benchmarks on this list (Josh and Jake for example). Otherwise the performance of the server is pretty easy to reason about: Sp (q) = Ep (q) + Cn + Ct That is: Sp == server performance q == some query/database activity Ep == embedded performance Cn == cost of network (and serialisation) Ct == cost of transaction (since the server uses one transaction per request) You can approximate this as: Sp (q) = k + Ep (q) This applies to a single thread. Multi-threaded (i.e. multiple client) throughput will likely be lower on the server because it has to do extra work (the term "k" in the above) compared to embedded. You have to work out "k" for your system. It'll depend on file system, available RAM, how you allocate RAM to Neo, operating system... See: http://docs.neo4j.org/chunked/snapshot/configuration.html for information on how to configure your system optimally. Jim ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Recommended way to deploy server software
So, using an embedded db is the only way to if you want one-shot deployment? It might be worth it to see how difficult it would be to write that component as a plugin to the build tool I use (Cake). > If you use it that way, I'd advise you to do a lot of performance testing. I'd love to look at any resources showing performance comparisons between server & embedded. Do you know of any? -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Recommended-way-to-deploy-server-software-tp3399621p3399902.html Sent from the Neo4j Community Discussions mailing list archive at Nabble.com. ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Recommended way to deploy server software
Hi, Firstly if you're going to use the server, then *use the server* rather than wrapping your own. The server is built and tuned for production use cases. The WrappingNeoServerBootstrapper type can be used to wrap an existing instance of a database in server clothing. The use case for this, is that you have an existing datastore and you'd like to use tools like the Webadmin visualisation tool to examine the data. It's not really meant as a replacement for the Neo4j server. If you use it that way, I'd advise you to do a lot of performance testing. If you need an example of how it's used, then see: https://github.com/neo4j/community/blob/master/server/src/functionaltest/java/org/neo4j/server/WrappingNeoServerBootstrapperTest.java I don't believe this class is available as a Maven dependency (although I'd be happy if someone corrected me on that, happier still if I found it in the neo4j server API classes). I think it gets shipped inside neo4j-server-15.M01.jar which means you'll need to download Neo4j from the Web site anyway. The Neo4j server has an opinionated transaction model (1 transaction per HTTP request) but apart from that, it is the same Neo4j database. So if you exclude the network costs, it will tend towards the same performance for a given query. Jim ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
[Neo4j] Recommended way to deploy server software
I would like to be able to specify the server jar in my project file (ie maven dependency), and deploy it with my application, rather than download separately via github and start/stop daemons. I noticed this could be done with the EmbeddedDb, and then then the server infrastructure can be wrapped on top of that. But I was unable to find which deps to require, or find any instructions on bundling the standalone server architecture with my application. If it's possible to just wrap the embedded db with a server architecture, and specify the required deps for doing this from Maven, 1) How would I do it? 2) What are the performance characteristics between the Embedded server and Standalone server? Thanks -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Recommended-way-to-deploy-server-software-tp3399621p3399621.html Sent from the Neo4j Community Discussions mailing list archive at Nabble.com. ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user