Database Reference
In-Depth Information
The updated performance metrics log is shown in table 10.5 .
Table 10.5. Performance metrics log after scenario 1, raw REST API
Curl client
Java REST binding
Number of
server calls
made
Scenario
Description
Cold
Warm
Cold
Warm
1
Raw REST API 602
5726 ms
5303 ms
1066 ms
917 ms
2
Cypher call
3
Server plugin
Unmanaged ex-
tension
4
10.5.2. Using Cypher
TheNeo4jRESTAPImakesaprovisionforyoutorunarbitraryCypherstatementsagainst
the server by posting the appropriate query or statement and parameters to the designated
REST endpoint responsible for executing Cypher. Provided you have all the information
you need to construct your query or statement upfront, this should require only one net-
work call.
Using the response returned from requesting the service root URL, described in section
10.3.2 , theURLdefinedagainstthe cypher key(see listing 10.4 ) providestheentrypoint
to use to send Cypher queries and statements to the server. The following snippet shows
the service root response from listing 10.4 :
...
"batch" : "http://localhost:7474/db/data/batch",
"cypher" : "http://localhost:7474/db/data/cypher",
...
Listings 10.11 and 10.12 showthecorrespondingrequestandresponsetoexecuteaCypher
query to satisfy our example scenario.
 
 
Search WWH ::




Custom Search