Skip to content

Fallen-8 is an in-memory graph database implemented in C#.

License

Notifications You must be signed in to change notification settings

cosh/fallen-8-core

Repository files navigation

.NET

Welcome to Fallen-8

Fallen-8 logo.

Fallen-8 is an in-memory graph database implemented in C#. Its focus is to provide raw speed for heavy graph algorithms.

This is the .NET Core version of the original fallen-8. The core of fallen-8 stays unchanged but the webservices have been upgraded with a proper swagger interface.

Key featues

  • Properties on vertices and edges
  • Indexes on vertices and edges
  • Plugins for indexes, algorithms and services
  • Checkpoint persistency

Sweet spots

  • Enterprise Search (Semantic adhoc queries on multi-dimensional graphs)
  • Lawful Interception (Mass analysis)
  • E-Commerce (Bid- and portfolio-management)

Samples

Start the fallen-8-core-apiApp and have fun.

Docs can be found by opening the swagger page.

Swagger docs.

Create a sample graph

HTTP example

PUT /unittest HTTP/1.1
Host: localhost:5001

cURL example

curl -L -X PUT 'https://localhost:5001/unittest'

Scan for Trent and Mallory

HTTP example (Trent)

POST /scan/graph/property/0 HTTP/1.1
Host: localhost:5001
Content-Type: application/json
Content-Length: 148

{
    "operator": 0,
    "literal": {
        "value": "Trent",
        "fullQualifiedTypeName": "System.String"
    },
    "resultType": 0
}

Powershell example (Trent)

$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
$headers.Add("Content-Type", "application/json")

$body = "{
`n    `"operator`": 0,
`n    `"literal`": {
`n        `"value`": `"Trent`",
`n        `"fullQualifiedTypeName`": `"System.String`"
`n    },
`n    `"resultType`": 0
`n}"

$response = Invoke-RestMethod 'https://localhost:5001/scan/graph/property/0' -Method 'POST' -Headers $headers -Body $body
$response | ConvertTo-Json

cURL example (Mallory)

curl -L -X POST 'https://localhost:5001/scan/graph/property/0' -H 'Content-Type: application/json' --data-raw '{
    "operator": 0,
    "literal": {
        "value": "Mallory",
        "fullQualifiedTypeName": "System.String"
    },
    "resultType": 0
}'

Response

[
    4
]

Calculate the paths between Trent and Mallory

Trent = 4

Mallory = 3

HTTP example

POST /path/4/to/3 HTTP/1.1
Host: localhost:5001
Content-Type: application/json
Content-Length: 2

{}

Powershell example

$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
$headers.Add("Content-Type", "application/json")

$body = "{}"

$response = Invoke-RestMethod 'https://localhost:5001/path/4/to/3' -Method 'POST' -Headers $headers -Body $body
$response | ConvertTo-Json

cURL example

curl -L -X POST 'https://localhost:5001/path/4/to/3' -H 'Content-Type: application/json' --data-raw '{}'

Response

[
    {
        "pathElements": [
            {
                "sourceVertexId": 4,
                "targetVertexId": 0,
                "edgeId": 7,
                "edgePropertyId": 11,
                "direction": 0,
                "weight": 0
            },
            {
                "sourceVertexId": 0,
                "targetVertexId": 3,
                "edgeId": 10,
                "edgePropertyId": 12,
                "direction": 0,
                "weight": 0
            }
        ],
        "totalWeight": 0
    },
    {
        "pathElements": [
            {
                "sourceVertexId": 4,
                "targetVertexId": 1,
                "edgeId": 8,
                "edgePropertyId": 11,
                "direction": 0,
                "weight": 0
            },
            {
                "sourceVertexId": 1,
                "targetVertexId": 3,
                "edgeId": 11,
                "edgePropertyId": 12,
                "direction": 0,
                "weight": 0
            }
        ],
        "totalWeight": 0
    }
]

Additional information

Graph databases - Henning Rauch

Graphendatenbanken - Henning Rauch (visiting lecture)

Issues on GitHub

Wiki on GitHub

Google Group

MIT-License

Copyright (c) 2022 Henning Rauch

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,

FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.