- https://jamesthornton.com#EXIWlRrkjKE
- https://twitter.com/Rangers/status/1641554510605611011
- https://twitter.com/astros/status/1641996751618940936
- https://www.youtube.com/watch?v=S7c3lzpDkvQ#7SlILk2WMTI
- https://gist.github.com/espeed/dd3026536ec3d38afea1072941670f52#3ch6eXkQWU8-C5TDc46E1G4-trIjpVH8h88-UcW056B9jeQ-LvG_M_fAkXU
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
# Jython FluentPipeline Example | |
# by James Thornton, http://jamesthornton.com | |
from com.tinkerpop.pipes.util import FluentPipeline | |
from com.tinkerpop.blueprints.pgm.impls.tg import TinkerGraphFactory | |
g = TinkerGraphFactory.createTinkerGraph() | |
pipe = FluentPipeline() | |
results = pipe.start(g.getVertex(1)).out("knows").property("name") |
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
# Jython AbstractPipeClosure Example | |
# by James Thornton, http://jamesthornton.com | |
from com.tinkerpop.pipes.util import FluentPipeline | |
from com.tinkerpop.pipes import AbstractPipeClosure | |
from com.tinkerpop.blueprints.pgm.impls.tg import TinkerGraphFactory | |
class StartsWithJ(AbstractPipeClosure): | |
def compute(self,objects): |
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
// Gremlin user-defined defined tree steps | |
// inTree() and outTree() | |
// by James Thornton, http://jamesthornton.com | |
// see https://groups.google.com/d/topic/gremlin-users/iCPUifiU_wk/discussion | |
// closure can't have the same name as the defined step | |
tree = { vertices -> | |
def results = [] |
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
$ mvn compile | |
/usr/lib/jvm/java-openjdk | |
[INFO] Scanning for projects... | |
Downloading: http://repo1.maven.org/maven2/org/neo4j/parent-pom/6/parent-pom-6.pom | |
[INFO] Unable to find resource 'org.neo4j:parent-pom:pom:6' in repository central (http://repo1.maven.org/maven2) | |
[WARNING] Skipping jpp repository file:///usr/share/maven2/repository in vanilla mode | |
[INFO] ------------------------------------------------------------------------ | |
[ERROR] FATAL ERROR | |
[INFO] ------------------------------------------------------------------------ | |
[INFO] Error building POM (may not be this project's POM). |
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
<graph> | |
<graph-enabled>true</graph-enabled> | |
<graph-name>wordgraph</graph-name> | |
<graph-type>neo4jgraph</graph-type> | |
<graph-file>/tmp/wordgraph</graph-file> | |
<properties> | |
<!-- Memory mapped I/O settings --> | |
<!-- For high traversal speed it is important to have the nodestore.db and relationshipstore.db files. --> | |
<neostore.nodestore.db.mapped_memory>285M</neostore.nodestore.db.mapped_memory> | |
<neostore.relationshipstore.db.mapped_memory>285M</neostore.relationshipstore.db.mapped_memory> |
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
POSTs... | |
$ httperf --server localhost --port 8182 --uri "/graphs/wordgraph/vertices?element_type=word&name=testing" --method POST --num-conns=1000 --num-calls=1 | |
httperf --client=0/1 --server=localhost --port=8182 --uri=/graphs/wordgraph/vertices?element_type=word&name=testing --send-buffer=4096 --recv-buffer=16384 --method=POST --num-conns=1000 --num-calls=1 | |
httperf: warning: open file limit > FD_SETSIZE; limiting max. # of open files to FD_SETSIZE | |
Maximum connect burst length: 1 | |
Total: connections 1000 requests 1000 replies 1000 test-duration 7.910 s | |
Connection rate: 126.4 conn/s (7.9 ms/conn, <=1 concurrent connections) |
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
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.765 sec | |
Running org.neo4j.kernel.impl.index.TestIndexCommand | |
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.208 sec | |
Running org.neo4j.kernel.impl.transaction.TestJtaCompliance | |
Tests run: 10, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.79 sec | |
Running org.neo4j.kernel.impl.traversal.TreeGraphTest | |
Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.7 sec | |
Running org.neo4j.kernel.impl.core.TestJumpingIdGenerator | |
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.024 sec | |
Running org.neo4j.kernel.impl.core.TestShortStringProperties |
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
>>> from com.tinkerpop.blueprints.pgm.impls.neo4j import Neo4jGraph | |
>>> from com.tinkerpop.rexster import AbstractSubResource | |
>>> from com.tinkerpop.rexster import RexsterApplicationProvider | |
>>> class BatchResource(AbstractSubResource): | |
... pass | |
... | |
>>> class BatchRap(RexsterApplicationProvider): | |
... pass | |
... | |
>>> batch_resource = BatchResource(BatchRap()) |
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
# SOLVED, thanks to Chuck Remes -- I was using zmq.QUEUE instead of zmq.STREAMER | |
pd = ProcessDevice(zmq.STREAMER, zmq.PUSH, zmq.PULL) | |
pd.bind_in("tcp://127.0.0.1:6000") | |
pd.bind_out("tcp://127.0.0.1:6001") | |
pd.start() | |
def client(): | |
context = zmq.Context() | |
socket = context.socket(zmq.PUSH) |
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
import time | |
import zmq | |
from zmq.devices.basedevice import ProcessDevice | |
from multiprocessing import Process, Pool | |
def create_socket(socket_type,uri): | |
context = zmq.Context() | |
socket = context.socket(socket_type) | |
socket.connect(uri) |