The Neo4j team is proud to announce the availability of a REST wrapper that can be installed both on Windows, Linux and Mac OS X as a standalone server. Please follow the Getting Started guide on the Neo4j wiki where you’ll find download links, the Matrix-REST example is available over here.

This makes the interaction with the Neo4j graph database from PHP, .NET and other languages like Perl a lot easier. Let us know how things work out via the Neo4j mailing list!




Want to learn more about graph databases? Click below to get your free copy of O’Reilly’s Graph Databases ebook and discover how to use graph technologies for your application today.

Download My Ebook

 

Keywords:  


11 Comments

Anonymous says:

wrapper | The Neo4j REST Server service was launched, but failed to start.

STATUS | wrapper | 2010/04/17 23:50:39 | Launching a JVM…
INFO | wrapper | 2010/04/17 23:50:39 | Waiting to start…
INFO | jvm 2 | 2010/04/17 23:50:39 | Error: no `server’ JVM at `C:Program FilesJavajre6binserverjvm.dll’.
ERROR | wrapper | 2010/04/17 23:50:39 | JVM exited while loading the application.

what to do?

Mattias says:

I removed the -server flag from the standalone server as a temporary fix for this… could you try again with the latest SNAPSHOT? (deployed just now)

Anonymous says:

It’s working! :)

Solution:
(1)
cp “c:Program FilesJavajdk1.6.0_20jre” to “c:Program FilesJavajre6”
(2)
disable Firewall

STATUS | wrapper | 2010/04/18 00:30:08 | Starting the Neo4j REST Server service…
STATUS | wrapper | 2010/04/18 00:30:08 | –> Wrapper Started as Service
STATUS | wrapper | 2010/04/18 00:30:09 | Launching a JVM…
INFO | jvm 1 | 2010/04/18 00:30:09 | Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
INFO | jvm 1 | 2010/04/18 00:30:09 | Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved.
INFO | jvm 1 | 2010/04/18 00:30:09 |
INFO | jvm 1 | 2010/04/18 00:30:10 | Running server at [http://localhost:9999/]
INFO | jvm 1 | 2010/04/18 00:30:11 | Press Ctrl-C to kill the server
STATUS | wrapper | 2010/04/18 00:30:12 | Neo4j REST Server started.
INFO | jvm 1 | 2010/04/18 00:30:37 | 2010.04.18. 0:30:36 com.sun.jersey.api.core.PackagesResourceConfig init
INFO | jvm 1 | 2010/04/18 00:30:37 | INFO: Scanning for root resource and provider classes in the packages:
INFO | jvm 1 | 2010/04/18 00:30:37 | org.neo4j.rest.web
INFO | jvm 1 | 2010/04/18 00:30:39 | 2010.04.18. 0:30:37 com.sun.jersey.api.core.PackagesResourceConfig init
INFO | jvm 1 | 2010/04/18 00:30:39 | INFO: Root resource classes found:
INFO | jvm 1 | 2010/04/18 00:30:39 | class org.neo4j.rest.web.ResourcesService
INFO | jvm 1 | 2010/04/18 00:30:39 | class org.neo4j.rest.web.JsonAndHtmlWebService
INFO | jvm 1 | 2010/04/18 00:30:39 | 2010.04.18. 0:30:37 com.sun.jersey.api.core.PackagesResourceConfig init
INFO | jvm 1 | 2010/04/18 00:30:39 | INFO: Provider classes found:

Anonymous says:

Mattias: April 18, 2010 12:20 AM

I’ve tried with the latest snapshot and it’s working

Outpost Firewall 2009 Pro must be disabled

INFO | jvm 4 | 2010/04/18 00:44:28 | Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
INFO | jvm 4 | 2010/04/18 00:44:28 | Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved.
INFO | jvm 4 | 2010/04/18 00:44:28 |
INFO | jvm 4 | 2010/04/18 00:44:28 | Running server at [http://localhost:9999/]
INFO | jvm 4 | 2010/04/18 00:44:28 | Press Ctrl-C to kill the server
ERROR | wrapper | 2010/04/18 00:44:31 | The Neo4j REST Server service is already running with status: RUNNING
STATUS | wrapper | 2010/04/18 00:44:44 | Stopping the Neo4j REST Server service…
INFO | jvm 4 | 2010/04/18 00:44:44 | Shutting down the server
STATUS | wrapper | 2010/04/18 00:44:45 | <– Wrapper Stopped
STATUS | wrapper | 2010/04/18 00:44:47 | Neo4j REST Server stopped.
STATUS | wrapper | 2010/04/18 00:45:00 | Starting the Neo4j REST Server service…
STATUS | wrapper | 2010/04/18 00:45:00 | –> Wrapper Started as Service
STATUS | wrapper | 2010/04/18 00:45:00 | Launching a JVM…
INFO | jvm 1 | 2010/04/18 00:45:01 | Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
INFO | jvm 1 | 2010/04/18 00:45:01 | Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved.
INFO | jvm 1 | 2010/04/18 00:45:01 |
INFO | jvm 1 | 2010/04/18 00:45:01 | Running server at [http://localhost:9999/]
INFO | jvm 1 | 2010/04/18 00:45:01 | Press Ctrl-C to kill the server
STATUS | wrapper | 2010/04/18 00:45:03 | Neo4j REST Server started.

Mattias says:

Great, thanks for the feedback

Anonymous says:

Latest snapshot error:

ADDING INDEX:

curl –verbose -H “Accept: application/json” -d ‘http://localhost:9999/n
ode/1′ http://localhost:9999/index/node/foo/bar/

* About to connect() to localhost port 9999 (#0)
* Trying 127.0.0.1… connected
* Connected to localhost (127.0.0.1) port 9999 (#0)
> POST /index/node/foo/bar/ HTTP/1.1
> User-Agent: curl/7.19.5 (i686-pc-mingw32) libcurl/7.19.5 OpenSSL/0.9.8k zlib/1
.2.3
> Host: localhost:9999
> Accept: application/json
> Content-Length: 30
> Content-Type: application/x-www-form-urlencoded
>
< HTTP/1.1 500 Not Found
< server: grizzly/1.8.1
< Content-Type: text/html;charset=ISO-8859-1
< Transfer-Encoding: chunked
< Date: Sun, 18 Apr 2010 02:35:42 GMT
< Connection: close
<
< html >< body >< h1 >Internal Error< /h1>< /body>< /html>* Closing connection #0

Anonymous says:

My fault:
INFO | jvm 1 | 2010/04/18 04:44:40 | java.lang.NumberFormatException: For input string: “1′”

The perfect query for windows is:
curl –verbose -H “Content-Type: application/json” -H “Accept: application/json” -X POST -d http://localhost:9999/node/3 http://localhost:9999/index/node/foo/cool/

Rob O. says:

jvm 1 | Fri Jun 18 21:59:32 PDT 2010: Bad request
jvm 1 | —
jvm 1 | {“user_id”:1,”posts”:{“11″:”f1 Hey There 1″,”21″:”f1 Hey There 2″,”31″:”f1 Hey There 3”}}
jvm 1 | —
jvm 1 | org.neo4j.rest.domain.PropertyValueException: Unsupported value type class java.util.LinkedHashMap

Can someone shine some light? I’m trying to create a node with those attributes. Thanks!

The question from Rob O. was answered on the Neo4j bug tracker.

A different and more graph-oriented approach would be to model the posts as nodes, and create relationships between them and the user nodes.

daves says:

I tested the Neo4j REST server seem like alot slower than MySQL query.

I have 100k nodes and nearly 3 billion relationship (only 1 depth, no transverse) executing with PHP

Daves,
could you provide some details on your testcase? Traversals on depth 1 are not the strongest case for a graph database, anyway it would be interesting to see the code and the numbers …

Take care,

/peter

Leave a Reply

Your email address will not be published. Required fields are marked *

Subscribe

Share your Graph Story?

Email us: content@neotechnology.com


Have a Graph Question?

Stackoverflow
Contact Us

Popular Graph Topics

Archives