grapheen 0.5.0

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 26

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

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

with Flutter:


$ flutter packages get

Alternatively, your editor might support pub get or packages 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

Analysis

This feature is new.
We welcome feedback.
More details: scoring.

We analyzed this package, and provided a score, details, and suggestions below.

  • tool failures on Feb 16, 2018
  • Dart: 2.0.0-dev.20.0
  • pana: 0.10.1

Scores

Popularity:
Describes how popular the package is relative to other packages. [more]
0 / 100
Health:
Code health derived from static analysis. [more]
82 / 100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
5 / 100
Overall score:
Weighted score of the above. [more]
26

Platforms

Detected platforms: Flutter, web, other

No platform restriction found in primary library package:grapheen/grapheen.dart.

Suggestions

  • Fix lib/src/indexer.dart.

    Strong-mode analysis of lib/src/indexer.dart failed with the following error:

    line: 52 col: 29
    The argument type '(String, List<dynamic>) → Null' can't be assigned to the parameter type '(Object, List<int>) → void'.

  • Fix lib/replication.dart.

    Strong-mode analysis of lib/replication.dart failed with the following error:

    line: 54 col: 18
    The method 'replaceAll' isn't defined for the class 'Object'.

  • Fix further 2 Dart files.

    Similar analysis of the following files failed:

    • lib/grapheen.dart
    • lib/replication_with_reserve_ids.dart
  • Fix issues reported by dartanalyzer.

    dartanalyzer reported 3 error(s) and 0 warning(s).

  • The description is too short.

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

  • Package is pre-v1 release.

    While there is nothing inherently wrong with versions of 0.*.*, it usually means that the author is still experimenting with the general direction API.

  • Maintain an example.

    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