This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#<- "POST /db/data/node/6227/traverse/node HTTP/1.1\r\nContent-Type: application/json\r\nConnection: close\r\nHost: localhost:7474\r\nContent-Length: 567\r\n\r\n" | |
#<- "{\"order\":\"breadth first\",\"uniqueness\":\"node global\",\"relationships\":{\"type\":\"linked\",\"direction\":\"out\"},\"prune evaluator\":{\"language\":\"javascript\",\"body\":\"position.startNode().hasProperty('NODE_LEVEL') && position.startNode().getProperty('NODE_LEVEL')==5 && position.startNode().getId()!=6227;\"},\"return filter\":{\"language\":\"javascript\",\"body\":\"position.endNode().hasProperty('NODE_LEVEL') && position.endNode().getProperty('NODE_LEVEL')==5;\"}}" | |
require 'rubygems' | |
require 'neography' | |
# require 'net-http-spy' | |
# Net::HTTP.http_logger_options = {:verbose => true} # see everything | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source 'http://rubygems.org' | |
gem 'rake' | |
gem 'neography' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'bunny' | |
connection = Bunny.new | |
connection.start | |
channel = connection.create_channel | |
channel.prefetch(3) | |
exchange = channel.direct("moar") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'bunny' | |
require 'timers' | |
TIME_TO_WAIT=3 | |
MAX_BUFFER=3 | |
# Setup Timers | |
timers = Timers.new | |
@three_second_timer = timers.every(3) { puts "***********triggered by timer*********" ; process_messages } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Copyright (c) 2002-2013 "Neo Technology," | |
* Network Engine for Objects in Lund AB [http://neotechnology.com] | |
* | |
* This file is part of Neo4j. | |
* | |
* Neo4j is free software: you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation, either version 3 of the License, or | |
* (at your option) any later version. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Maxs-MacBook-Pro-2:neography maxdemarzi$ ruby transaction_test.rb | |
2014-01-23 16:45:47 -0600 | |
2014-01-23 16:45:47 -0600 start | |
Error deleting: Neography::NotFoundException | |
2014-01-23 16:45:54 -0600 | |
all nodes deleted | |
2014-01-23 16:45:54 -0600 | |
creating nodes | |
2014-01-23 16:45:54 -0600 | |
2014-01-23 16:45:54 -0600 tx start |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'spec_helper' | |
describe Neography::Rest do | |
before(:each) do | |
@neo = Neography::Rest.new | |
end | |
describe "the spatial plugin works" do | |
it "better work" do | |
node = @neo.create_node({:lat => 60.1, :lon => 15.2}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.neo4j.example.unmanagedextension; | |
import org.codehaus.jackson.map.ObjectMapper; | |
import org.neo4j.cypher.javacompat.ExecutionEngine; | |
import org.neo4j.cypher.javacompat.ExecutionResult; | |
import org.neo4j.graphdb.*; | |
import org.neo4j.helpers.collection.IteratorUtil; | |
import javax.ws.rs.GET; | |
import javax.ws.rs.Path; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.neo4j.example.unmanagedextension; | |
import com.google.common.cache.CacheBuilder; | |
import com.google.common.cache.CacheLoader; | |
import com.google.common.cache.LoadingCache; | |
import org.codehaus.jackson.map.ObjectMapper; | |
import org.neo4j.graphdb.*; | |
import org.neo4j.helpers.collection.IteratorUtil; | |
import javax.ws.rs.GET; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'net/http/pipeline' | |
def runit | |
Net::HTTP.start 'localhost', 7474 do |http| | |
http.pipelining = true | |
reqs = [] | |
6000.times do |
OlderNewer