grapheen 0.5.0

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 0

GRAPH Embeddable ENgine with Gremlin API, with no additional dependencies.

See test folder for a lot of examples of usage.

import 'package:grapheen/grapheen.dart';
...
Grapheen g = new Grapheen();
Pipe vIM = g.addVertex({"name":"Iron Maiden"}); // id=1
Pipe vHM = g.addVertex({"name":"Heavy Metal"}); // id=2
Pipe e1 = g.addEdge(vIM,vHM,"PLAYS"); // id=3
List<int> ids;
ids = g.V(1).outE().inV().ids(); // [2]
ids = g.V("name","Iron Maiden").outE("PLAYS").inV().ids(); // [2]
g.V(1).setProperty("name","Iron 'The best' Maiden");
g.E(3).remove();

Functionality

I am implementing the Gremlin API as needed for my projects, so far I have:

Adding to graph: addVertex , addEdge

Changing the graph: setProperty, remove

Traversing the graph: V, E, inE, outE, bothE, inV, outV, bothV

Filtering pipeline: has, hasNot, IN, CONTAINS

Transforming pipeline: dedup, order (just the property based)

Performance

Since the most expected usage is inside the web browser, compiled to javascript. All measurements are in compiled mode in Opera on my MacBook.

  • Sample data is snippet of my dogs database, it has 4.300 vertexes and about 12.000 edges.
  • number is OPERATIONS PER SECONDS, so 500 means, that such workflow, will run 500 times in one second
-----WORKFLOW------------ MEMORY--------WORKFLOW------------- MEMORY---
createVertex          |    87.896 |                       |           |     
load data set         |         5 |                       |           |
query by ID           |   362.894 |                       |           |
query by property     | 1.103.439 |                       |           |
query by two props    |    30.687 |                       |           |
query by edge         |   141.486 |                       |           |
query by named edge   |    76.670 |                       |           |
-----------------------------------------------------------------------

References

0.5.0

  • sorting method: first numbers then strings
  • has operators: <, >, <=, >=
  • has operators and order based on sorting method

0.4.0

  • graph visualisation into HTML5 SVG
  • has operators: =, !=, IN, CONTAINS

0.3.0

  • synchronous version
  • in memory index
  • replication

0.2.0

  • graph text loader
  • CSV loader
  • benchmark testing
  • DEDUP
  • ORDER

0.1.0

  • basic functionality of Gremlin

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  grapheen: ^0.5.0

2. Install it

You can install packages from the command line:

with pub:


$ pub get

Alternatively, your editor might support pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:grapheen/grapheen.dart';
  
Version Uploaded Documentation Archive
0.5.0 Mar 10, 2016 Go to the documentation of grapheen 0.5.0 Download grapheen 0.5.0 archive
0.4.0 Jan 9, 2016 Go to the documentation of grapheen 0.4.0 Download grapheen 0.4.0 archive
0.3.0 Sep 15, 2015 Go to the documentation of grapheen 0.3.0 Download grapheen 0.3.0 archive
0.2.0 Aug 16, 2015 Go to the documentation of grapheen 0.2.0 Download grapheen 0.2.0 archive
0.1.0 Aug 8, 2015 Go to the documentation of grapheen 0.1.0 Download grapheen 0.1.0 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
0
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
0
Overall:
Weighted score of the above. [more]
0
Learn more about scoring.

The package version is not analyzed, because it does not support Dart 2. Until this is resolved, the package will receive a health and maintenance score of 0.

Health issues and suggestions

Fix lib/grapheen.dart. (-82.38 points)

Analysis of lib/grapheen.dart failed with 6 errors, 2 hints, including:

line 75 col 23: The argument type '(String, dynamic) → Null' can't be assigned to the parameter type '(dynamic, dynamic) → void'.

line 85 col 19: The argument type '(int) → Null' can't be assigned to the parameter type '(dynamic) → void'.

line 86 col 18: The argument type '(int) → Null' can't be assigned to the parameter type '(dynamic) → void'.

line 92 col 25: The argument type '(String, dynamic) → Null' can't be assigned to the parameter type '(dynamic, dynamic) → void'.

line 170 col 16: The argument type '(String, Object) → Null' can't be assigned to the parameter type '(dynamic, dynamic) → void'.

Fix lib/src/pipe.dart. (-25.75 points)

Analysis of lib/src/pipe.dart failed with 1 error, 2 hints:

line 86 col 21: The argument type '(String) → Null' can't be assigned to the parameter type '(dynamic) → void'.

line 75 col 8: The value of the local variable 'recs' isn't used.

line 83 col 8: The value of the local variable 'recs' isn't used.

Fix lib/src/vis/edge.dart. (-25.75 points)

Analysis of lib/src/vis/edge.dart failed with 1 error, 2 hints:

line 28 col 37: Undefined name 'PI'.

line 23 col 29: The operator x ~/ y is more efficient than (x / y).toInt().

line 23 col 57: The operator x ~/ y is more efficient than (x / y).toInt().

Fix additional 15 files with analysis or formatting issues. (-125.50 points)

Additional issues in the following files:

  • lib/replication.dart (1 error)
  • lib/replication_with_reserve_ids.dart (1 error)
  • lib/src/indexer.dart (1 error)
  • lib/src/vis/vertex.dart (1 error)
  • lib/visualiser.dart (1 error)
  • bin/test_it.dart (1 hint)
  • lib/element_wrapper.dart (Run dartfmt to format lib/element_wrapper.dart.)
  • lib/loader_csv.dart (Run dartfmt to format lib/loader_csv.dart.)
  • lib/src/pipe_dedup.dart (Run dartfmt to format lib/src/pipe_dedup.dart.)
  • lib/src/pipe_ids.dart (Run dartfmt to format lib/src/pipe_ids.dart.)
  • lib/src/pipe_in_out_e.dart (Run dartfmt to format lib/src/pipe_in_out_e.dart.)
  • lib/src/pipe_in_out_v.dart (Run dartfmt to format lib/src/pipe_in_out_v.dart.)
  • lib/src/pipe_order.dart (Run dartfmt to format lib/src/pipe_order.dart.)
  • lib/src/pipe_q.dart (Run dartfmt to format lib/src/pipe_q.dart.)
  • lib/src/utils.dart (Run dartfmt to format lib/src/utils.dart.)

Maintenance issues and suggestions

Add SDK constraint in pubspec.yaml. (-50 points)

For information about setting SDK constraint, please see https://www.dartlang.org/tools/pub/pubspec#sdk-constraints.

Fix platform conflicts. (-20 points)

Low code quality prevents platform classification.

Package is too old. (-100 points)

The package was released more than two years ago.

The description is too short. (-20 points)

Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package. Common file name patterns include: main.dart, example.dart or you could also use grapheen.dart.

Dependencies

Package Constraint Resolved Available
Dev dependencies
test any