Skip to content

Instantly share code, notes, and snippets.

View zachkinstner's full-sized avatar

Zach Kinstner zachkinstner

View GitHub Profile

Results from Fabric Timing tests. I'm trying to establish a performance baseline, and generally, to better understand the available methods for executing Gremlin scripts from outside the JVM.

The tests each execute a simple g Gremlin script (to obtain the graph object) using different methods. My testing scenario uses Titan (+ local Berekely DB) on a separate machine in the same local network. The RexProClient library for these tests was built in Release mode.

Update (2013-06-07): I have improved the tests based on suggestions from Daniel. See updated results below.

Rest API (Gremlin extension)

Wiki Page

RunRestApi:    0.0115ms,    5.5213ms,    5.5248ms,    5.5433ms
@zachkinstner
zachkinstner / 0 TitanIndexing.md
Last active December 17, 2015 15:19
Testing a Titan code change that would allow vertex-centric indexing on IN-unique and OUT-unique edges.

Related discussion about the "Cannot define a primary key on a unique type" exception: https://groups.google.com/forum/#!topic/aureliusgraphs/KFVtfC9Xy94

First step: change this StandardTypeMaker line to use the And operator between isUnique:

if ((isUnique[0] && isUnique[1]) && !primaryKey.isEmpty()) throw new IllegalArgumentException("Cannot define a primary key on a unique type")

This allows an IN-unique or OUT-unique edge to use Titan's vertex-centric indexing. Note the unique(OUT) in the example below:

@zachkinstner
zachkinstner / Trello2Jira.js
Created May 1, 2013 17:02
Trello Card JSON to JIRA Markdown
function buildJiraMarkdown(card) {
var jira =
"{panel}\n"+
"h3. [" + card.name + "|" + card.shortUrl + "]\n" +
card.desc + "\n\n" +
"*Labels:* ";
for (var i = 0; i < card.labels.length; ++i) {
var label = card.labels[i];
var c = label.color;