In-memory Graph DB with specific requirements

Viewed 55

We are looking for some in memory graph data kind of solution . Where we can store the graph data like the below

{
  "LiftLobby2": {
    "Intersection2": 156
  },
  "Intersection2": {
    "NDGate": 232,
    "LiftLobby2": 156
  },
  "NDGate": {
    "ND": 24,
    "Intersection2": 232
  },
  "ND": {
    "NDGate": 24
  },
  "LiftLobby1": {
    "Intersection1": 156
  },
  "Intersection1": {
    "BDGate": 232,
    "LiftLobby1": 156
  },
  "BDGate": {
    "BD": 24,
    "Intersection1": 232
  },
  "BD": {
    "BDGate": 24
  }
}

The DB solution should have features like:

  • Find the smallest path between 2 points.
  • Store more than 5000 points and process fast.
  • Add restriction between path based on role.
  • Add tags for some points if possible. For example Washroom , where we can name 2,3 points as Washroom.

Is there anything available like this or is it better to create our own?

1 Answers

Take a look at Memgraph. It is an in-memory graph database. You can use MAGE import_util for importing the data from JSON file. Your JSON file just needs to follow node-relationship style.

For nodes the format is:

{
    "id": 4000,
    "labels": [
        "City"
    ],
    "properties": {
        "id": 0,
        "name": "Amsterdam",
    },
    "type": "node"
}

For relationships the format is:

{
    "end": 4052,
    "id": 7175,
    "label": "CloseTo",
    "properties": {
        "eu_border": true
    },
    "start": 4035,
    "type": "relationship"
}
Related