Git Product home page Git Product logo

balder's Introduction

Blueprints.NET logo

Balder is the generic property [graph](http://en.wikipedia.org/wiki/Graph_(data_structure\)) model of the Vanaheimr research project. In contrast to other graph libraries and graph databases Balder focus is to provide a versatile and expressive graph interface to model your domain specific knowledge easily, to keep the quality of your data as high as possible and to achieve high-speed speed calculations in a distributed enviroment not by hoping for an optimization oracle, but by letting you choose and tweak the right optimizations.

Balder provides a property graph model with some currently unique features:

  • Like any other graph model Balder provides vertices and edges which can hold any kind of properties (key/value pairs). Multiedges and hyperedges are a natural extention to this model and define graph elementes which connect multiple edges (multiedge) or multiple vertices (hyperedge). This allows Balder to be a fully self-contained graph model without the need of external indices for practical usage of graphs.
  • A Balder graph provides 20 generic parameters for type-safety and to allow Balder to adapt to your domain model more easily. These parameters control the type of the unique identification, of the revision identification, of the label, of the property keys and of the property values of every graph element.
  • Balder does not belief in OOP types, as it is nothing compared to the flexibility of e.g. RDF schema. Therefore Balder uses a light-weight approach of labels for every graph element to describe the intended nature of this graph element.
  • Balder uses the Vanaheimr Styx project not only to provide a user-friendly way to query the graph, but also to provide a reactive graph. This allows you not only to review and control graph modifications, but also communicate between different graph instances and to use your graph both as an event source and an event filter.
  • Balder uses its reactivity to feed dependent graphs. Such graphs are graphs not controlled by the user or application directly, but by another graph. This can be usefull if you need a better, faster or more memory efficient representation of graph data without loosing the flexibility of a Balder property graph.
  • Schema graphs are an application of dependent graphs. A schema graph connected to your Balder graph can learn and/or control the schema of your graph and thus help to explore and to improve the overall quality of your data.
  • Balder is read-only on default to improve the safety of your data and to provide a foundation for future multi-threading optimizations.

An usage example for property graphs

var _TinkerGraph = new PropertyGraph();

_TinkerGraph.OnVertexAdding += (graph, vertex, vote) => {
    Console.WriteLine("I like all vertices!");
};

_TinkerGraph.OnVertexAdding += (graph, vertex, vote) =>
{
    if (vertex.Id == 5) {
        Console.WriteLine("I'm a Jedi!");
        vote.Veto();
    }
};

var marko  = _TinkerGraph.AddVertex(1, v => v.SetProperty("name", "marko"). SetProperty("age",   29));
var vadas  = _TinkerGraph.AddVertex(2, v => v.SetProperty("name", "vadas"). SetProperty("age",   27));
var lop    = _TinkerGraph.AddVertex(3, v => v.SetProperty("name", "lop").   SetProperty("lang", "java"));
var josh   = _TinkerGraph.AddVertex(4, v => v.SetProperty("name", "josh").  SetProperty("age",   32));
var vader  = _TinkerGraph.AddVertex(5, v => v.SetProperty("name", "darth vader"));
var ripple = _TinkerGraph.AddVertex(6, v => v.SetProperty("name", "ripple").SetProperty("lang", "java"));
var peter  = _TinkerGraph.AddVertex(7, v => v.SetProperty("name", "peter"). SetProperty("age",   35));

Console.WriteLine("Number of vertices added: " + _TinkerGraph.Vertices().Count());

marko.OnPropertyChanging += (sender, Key, oldValue, newValue, vote) =>
    Console.WriteLine("'" + Key + "' property changing: '" + oldValue + "' -> '" + newValue + "'");

marko.OnPropertyChanged  += (sender, Key, oldValue, newValue)       =>
    Console.WriteLine("'" + Key + "' property changed: '"  + oldValue + "' -> '" + newValue + "'");


var _DynamicMarko = marko.AsDynamic();
_DynamicMarko.age  += 100;
_DynamicMarko.doIt  = (Action<String>) ((text) => Console.WriteLine("Some infos: " + text + "!"));
_DynamicMarko.doIt(_DynamicMarko.name + "/" + marko.GetProperty("age") + "/");


var e7  = _TinkerGraph.AddEdge(marko, vadas,  7,  "knows",   e => e.SetProperty("weight", 0.5));
var e8  = _TinkerGraph.AddEdge(marko, josh,   8,  "knows",   e => e.SetProperty("weight", 1.0));
var e9  = _TinkerGraph.AddEdge(marko, lop,    9,  "created", e => e.SetProperty("weight", 0.4));

var e10 = _TinkerGraph.AddEdge(josh,  ripple, 10, "created", e => e.SetProperty("weight", 1.0));
var e11 = _TinkerGraph.AddEdge(josh,  lop,    11, "created", e => e.SetProperty("weight", 0.4));

var e12 = _TinkerGraph.AddEdge(peter, lop,    12, "created", e => e.SetProperty("weight", 0.2));

return _TinkerGraph;

Help and Documentation

Additional help and background information can be found in the Wiki. For more examples and tutorials please look at the Bragi project if you are interessted in simple but interactive graph visualizations consult the Loki project or look at Aegir for mapping applications.
News and updates can also be found on twitter by following: @ahzf or @graphdbs.

Installation

The installation of Blueprints.NET is very straightforward.
Just check out or download its sources and all its dependencies:

if you want to clone the entire Vanaheimr graph processing stack just run the following commands:

git clone git://github.com/Vanaheimr/Aegir
git clone git://github.com/Vanaheimr/Balder
git clone git://github.com/Vanaheimr/Blueprints.NET
git clone git://github.com/Vanaheimr/Bragi
git clone git://github.com/Vanaheimr/Eunomia
git clone git://github.com/Vanaheimr/Glyphe
git clone git://github.com/Vanaheimr/Hermod
git clone git://github.com/Vanaheimr/Illias
git clone git://github.com/Vanaheimr/Loki
git clone git://github.com/Vanaheimr/Styx
git clone git://github.com/Vanaheimr/Vanir
git clone git://github.com/Vanaheimr/Walkyr
git clone git://github.com/Vanaheimr/libs
    
mkdir srclibs
cd srclibs
git clone git://github.com/ahzf/MonoCompilerAsAService.git
git clone git://github.com/Alxandr/Jurassic.git

License and your contribution

Blueprints.NET is released under the Apache License 2.0. For details see the LICENSE file.
To suggest a feature, report a bug or general discussion: http://github.com/Vanaheimr/Blueprints.NET/issues
If you want to help or contribute source code to this project, please use the same license.
The coding standards can be found by reading the code ;)

Acknowledgments

Blueprints.NET is a reimplementation of the Blueprints library for Java provided by Tinkerpop. Additional ideas are based on the Boost Graph Library.
Please read the NOTICE file for further credits.

balder's People

Contributors

ahzf avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

balder's Issues

Label on Edge

Hi ahzf,

First of all, thanks for porting Blueprints! We are currently using your code, and we are wondering whether it is possible to eliminate the need of a Label on an Edge, as our edges doesn't have the notion of a Label.

Thnx,

Michel van den Berg

Properties on Graphs?

Why not also assign some properties<TKey, TValue> to a PropertyGraph?
Why not give a PropertyGraph an Id of type TGraphId and a revisionId of type TRevisionIdGraph?

Kindly create a working tar with complete dependency

Hello,
I wanted to test Blueprints.Net with OrientDB. I tried downloading it, it didnt compile as it was missing styx,eunomia and commons project. As per the instructions I downloaded the dependencies u talked on your page (jurasic, jyson and nunit), was unable to compile jurasic with vs2012.
Would it possible to create one complete zip which has all the required projects with all its dependencies. so a end user can use it. Even if you can email me the required dlls, that would be great. My email is [email protected]
regards

Complex

Hi Achim,

I'm trying to use blueprints.net, but I find it rather hard to understand what is going on.
I'd really like to use it, but it seems rather overengineered, and I might think other people would have to agree.
Is there any way to keep it flexible, but easier to use/understand?

Regards,

Michel

PropertyGraph.Vertices(...) returns null values

Hi,
PropertyGraph.Vertices(...) appears to return an enumerable of null values as the cast of each Vertex to IPropertyVertex will always fail. I tracked down the problem to be in the VertexCreatorDelegate being used actually create a Generic PropertyVertex instead of an object inheriting from IPropertyVertex.
I haven't tried to run the tests, but I copied the test code from the PropertyGraph tests and it indeed doesn't work, so I am sure the tests would fail.

Any simple way around that, or a simple fix?

Thanks,

gabriel

Supported Graph Databases ?

Hi,

I'm just investigating the framework/tools at the moment, but am coming at it from the point of view of blueprints (java).
So i'm looking to build a graph solution utilitizing some remote graph database, e.g. Neo4j, OrientDB etc.
Is the intention of Blueprints.NET to support that type of scenario?

Regards
Mick

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.