Giter VIP home page Giter VIP logo

ferma-benchmark's Introduction

Ferma Benchmarks

This is a simple application to act as a benchmark comparing the Ferma Graph-to-Object layer with Totorom, TinkerPop Frames, and TinkerPop Blueprints. It will help us ensure Ferma remains the top-performing option.

For more information see the main Ferma wiki page.

Results

After starting the Ferma project we decided to do a benchmark suite that compares Ferma with TinkerPop Frames, Totorom, and raw Blueprint calls. The purpose of Ferma is to be a high-performance alternative to all of these with the same convince of frames (annotations). As such having these benchmarks will help keep us on track as we develop the Ferma project.

The way I configured the benchmark is simple. I do the same task under each framework for a set number of iterations, recording the time it takes under each framework. I then provide a % comparing each of the alternative solutions to Ferma. A % of 100% means Ferma and the framework it was compared to took the same time to execute. If the percentage is below 100% then Ferma performed slower than the alternative, if the percentage is above 100% then Ferma out-performed the alternative. You will see below that Ferma outperforms every alternative by a significant margin. The only exception is when compared against raw Blueprints, but this is to be expected.

Here is the output I get on my computer (this is a very modern and overpowered computer):

=== testGetFramedVerticesUntyped ===
blueprints comparison: 93.24348944761809%
tinkerpop3 comparison: 1698.9392272131245%
totorom comparison: 423.67469757091635%
frames comparison: Not capable
gremlin comparison: 390.5251428045431%
peapod comparison: Not Capable

=== testGetFramedVerticesTyped ===
blueprints comparison: Not Capable
tinkerpop3 comparison: Not Capable
totorom comparison: 403.4655305796317%
frames comparison: 99.93781089933795%
gremlin comparison: Not Capable
peapod comparison: 2074.05266481737%

=== testGetFramedVerticesAndNextUntyped ===
blueprints comparison: 80.86610293318655%
tinkerpop3 comparison: 1171.5222612963312%
totorom comparison: 493.3926104721222%
frames comparison: Not capable
gremlin comparison: 338.6254392506979%
peapod comparison: Not Capable

=== testGetFramedVerticesAndNextTyped ===
blueprints comparison: Not Capable
tinkerpop3 comparison: Not Capable
totorom comparison: 349.97570532583313%
frames comparison: 187.0806085510584%
gremlin comparison: 315.60038209596655%
peapod comparison: 1670.368656863122%

=== testGetAnnotatedAdjacencies ===
blueprints comparison: Not capable
tinkerpop3 comparison: Not Capable
totorom comparison: Not capable
frames comparison: 209.05528566425681%
gremlin comparison: Not capable
peapod comparison: 265.72131591027147%

Obtaining the Source

The official source repository for Ferma Benchmarks is located on the Syncleus Gerrit instance and can be cloned using the following command.

git clone http://gerrit.syncleus.com/Ferma-benchmark

We also maintain a GitHub clone of the official repository which can be found here. Finally Syncleus also hosts an instance of GitLab which has a clone of the repository which can be found here.

ferma-benchmark's People

Contributors

bryncooke avatar freemo avatar wsalembi avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

ferma-benchmark's Issues

Ferma graph modelling

Hello, can you clarify why you have 7 classes modelling the benchmark example, but only use 2 in your test cases? Is this a requirement?

ConcreteFermaGod
FatherEdge
FatherEdgeExtended
FermaGod
FermaGodAlternative
FermaGodExtended
FermaGodIntermediate

Benchmark Issue

Hi,

I took a look at the benchmark. Unfortunately there seems to be wrong assumption. The Tinkerpop 2.6.0 TinkerGraph implementation is faster compared to the TinkerGraph 3.2.0 implementation. But I think that does not reflect the Tinkerpop 3.2.0 performance. I have not yet determined why the TinkerGraph 3.2.0 is much slower but I believe it may have something to do with the way IDs are handled. (Just a hunch)

I did the same test using OrientDB TP2 and OrientDB TP3 (unofficial implementation) and came up with these figures:

=== testGetFramedVerticesAndNextUntyped ===
blueprints comparison: 99.53026124657256%
tinkerpop3 comparison: 65.92568822882211%
totorom comparison: 103.64681453936765%
frames comparison: Not capable
gremlin comparison: 107.2673447424247%
peapod comparison: Not Capable

=== testGetFramedVerticesUntyped ===
blueprints comparison: 99.51659220831277%
tinkerpop3 comparison: 62.21783215716792%
totorom comparison: 102.49149226551873%
frames comparison: Not capable
gremlin comparison: 101.86015225124282%
peapod comparison: Not Capable

=== testGetFramedVerticesTyped ===
blueprints comparison: Not Capable
tinkerpop3 comparison: Not Capable
totorom comparison: 102.792778909281%
frames comparison: 100.65792462081421%
gremlin comparison: Not Capable
peapod comparison: 65.89351246282055%

=== testGetFramedVerticesAndNextTyped ===
blueprints comparison: Not Capable
tinkerpop3 comparison: Not Capable
totorom comparison: 103.90106388168827%
frames comparison: 100.84983026562409%
gremlin comparison: 99.04836654974989%
peapod comparison: 61.78271340104785%

=== testGetAnnotatedAdjacencies ===
blueprints comparison: Not capable
tinkerpop3 comparison: Not Capable
totorom comparison: Not capable
frames comparison: 97.26275010670106%
gremlin comparison: Not capable
peapod comparison: 97.64909785802675%

This means that at least for the OrientDB the TP3 implementation is around 35% faster. I think it would be best to only compare TP3 implementations with eachother and not mix them with TP2 / TP2 OGM's.

Using ferma OGM with Gremlin Server

Could you tell me - Is it possible to use FERMA over Gremlin Server (TinkerPop 3.2.6) with JanusGraphDB?

For now I use gremlin client for sending queries to G-server in this way:

GryoMapper mapper = GryoMapper.build().addRegistry(JanusGraphIoRegistry.getInstance()).create();
MessageSerializer serializer = new GryoMessageSerializerV1d0(GryoMapper.build().addRegistry(JanusGraphIoRegistry.getInstance()));

/* Create gremlin cluster... */
Cluster cluster = Cluster.build("123.22.22.111").port(8182).serializer(serializer).create();
Client client = cluster.connect();
ResultSet res = client.submit("g.V().label()");

... therefore I have not idea about how could I get graph instance directly (like in the tutorial):

FramedGraph fg = new DelegatingFramedGraph(graph, true, types);

... to use traversal for getting instances of ferma-annotated classes.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.