{"id":16953263,"url":"https://github.com/ragedb/ragedb","last_synced_at":"2026-01-27T10:30:17.203Z","repository":{"id":45428337,"uuid":"383927661","full_name":"ragedb/ragedb","owner":"ragedb","description":"In Memory Property Graph Server using a Shared Nothing design","archived":false,"fork":false,"pushed_at":"2023-08-02T03:00:20.000Z","size":4135,"stargazers_count":39,"open_issues_count":21,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2024-10-13T22:06:47.614Z","etag":null,"topics":["database","graph","graphdatabase","graphdb","graphs","seastar"],"latest_commit_sha":null,"homepage":"https://ragedb.com","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ragedb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2021-07-07T21:23:25.000Z","updated_at":"2024-08-21T11:36:35.000Z","dependencies_parsed_at":"2023-02-15T05:31:14.590Z","dependency_job_id":"ed2ac40c-e64c-40f5-a4a5-7164fcfb4a8f","html_url":"https://github.com/ragedb/ragedb","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ragedb%2Fragedb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ragedb%2Fragedb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ragedb%2Fragedb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ragedb%2Fragedb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ragedb","download_url":"https://codeload.github.com/ragedb/ragedb/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239774161,"owners_count":19694697,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["database","graph","graphdatabase","graphdb","graphs","seastar"],"created_at":"2024-10-13T22:06:44.586Z","updated_at":"2026-01-27T10:30:17.124Z","avatar_url":"https://github.com/ragedb.png","language":"C++","readme":"# RageDB\n\n[![Documentation](https://img.shields.io/badge/documentation-black)](https://ragedb.com)\n[![Slack](https://img.shields.io/badge/slack-purple)](https://ragedb.slack.com)\n[![Twitter](https://img.shields.io/twitter/follow/rage_database.svg?style=social\u0026label=Follow)](https://twitter.com/intent/follow?screen_name=rage_database)\n![C++](https://github.com/ragedb/ragedb/workflows/Coverage/badge.svg)\n[![Coverage Status](https://coveralls.io/repos/github/ragedb/ragedb/badge.svg?branch=main)](https://coveralls.io/github/ragedb/ragedb?branch=main)\n[![Technical Debt](https://sonarcloud.io/api/project_badges/measure?project=ragedb_ragedb\u0026metric=sqale_index)](https://sonarcloud.io/summary/new_code?id=ragedb_ragedb)\n[![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=ragedb_ragedb\u0026metric=reliability_rating)](https://sonarcloud.io/summary/new_code?id=ragedb_ragedb)\n[![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=ragedb_ragedb\u0026metric=vulnerabilities)](https://sonarcloud.io/summary/new_code?id=ragedb_ragedb)\n[![Bugs](https://sonarcloud.io/api/project_badges/measure?project=ragedb_ragedb\u0026metric=bugs)](https://sonarcloud.io/summary/new_code?id=ragedb_ragedb)\n[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=ragedb_ragedb\u0026metric=security_rating)](https://sonarcloud.io/summary/new_code?id=ragedb_ragedb)\n[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=ragedb_ragedb\u0026metric=sqale_rating)](https://sonarcloud.io/summary/new_code?id=ragedb_ragedb)\n[![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=ragedb_ragedb\u0026metric=code_smells)](https://sonarcloud.io/summary/new_code?id=ragedb_ragedb)\n\n[\u003cp align=\"center\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/ragedb/ragedb.github.io/main/images/mascot-logo.webp\" alt=\"ragedb mascot\" width=\"660\"/\u003e\u003c/p\u003e](https://ragedb.com)\n\u003cimg referrerpolicy=\"no-referrer-when-downgrade\" src=\"https://static.scarf.sh/a.png?x-pxid=53459147-2981-4e5a-97bd-d40d0faa0954\" /\u003e\n\nIn Memory Property Graph Server using the Shared Nothing design from [Seastar](https://seastar.io).\n\n[RageDB](https://ragedb.com):\n\n- Faster than a speeding bullet train\n- Connect from anywhere via HTTP\n- Use the Lua programming language to query\n- Apache License, version 2.0\n\nBring up the main website and documentation [ragedb.com](https://ragedb.com) while you spin up an instance on docker right now:\n\n\n## Docker\n\n    docker pull dockerhub.ragedb.com/ragedb/ragedb\n    docker run -u 0 -p 127.0.0.1:7243:7243 --name ragedb -t dockerhub.ragedb.com/ragedb/ragedb:latest --cap-add=sys_nice\n\nIf you are running Docker on a Mac or Windows Host, you may see this error message:\n\n    WARNING: unable to mbind shard memory; performance may suffer:\n\nRun Docker on a Linux host for the best performance.\n\n## Terraform\n\n- This is work in progress, if you can make this better please help!\n- Generate an SSH key if you don't already have one with `ssh-keygen -t rsa -b 4096`.\n- [Install Terraform](https://learn.hashicorp.com/tutorials/terraform/install-cli)\n- [Install the AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html).\n- [Configure the AWS CLI with an access key ID and secret access key](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-quickstart.html).\n\n### Variables\n\n#### your_region\n- Which AWS Region. The options are [here](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html#concepts-available-regions).\n- E.g. `eu-west-2`.\n\n#### your_public_key\n- This will be in `~/.ssh/id_rsa.pub` by default.\n\n### Steps\n- Run `terraform init`.\n- Run `terraform apply`.\n- Wait a few minutes for the code to compile and the server to spin up.\n- Copy the IP output by the previous command into your browser http://x.x.x.x:/7243\n- Do Graphy Stuff.\n- Irrecoverably shut everything down with `terraform destroy`.\n\nThis will bring up an [r5.2xlarge](https://aws.amazon.com/ec2/instance-types/r5/) with 4 cores set to 1 thread per core with 100 GB of space. \n\n\n## HTTP API\n\n### Schema\n\n#### Restore Graph\n\n    :POST /db/{graph}/restore\n\n#### Delete Graph\n\n    :DELETE /db/{graph}/schema\n\n#### Get Node Types\n\n    :GET /db/{graph}/schema/nodes\n\n#### Get a Node Type\n\n    :GET /db/{graph}/schema/nodes/{type}\n\n#### Create a Node Type\n\n    :POST /db/{graph}/schema/nodes/{type}\n\n#### Delete a Node Type\n\n    :DELETE /db/{graph}/schema/nodes/{type}\n\n#### Get Relationship Types\n\n    :GET /db/{graph}/schema/relationships\n\n#### Get a Relationship Type\n\n    :GET /db/{graph}/schema/relationships/{type}\n\n#### Create a Relationship Type\n\n    :POST /db/{graph}/schema/relationships/{type}\n\n#### Delete a Relationship Type\n\n    :DELETE /db/{graph}/schema/relationships/{type}\n\nRageDB currently supports booleans, 64-bit integers, 64-bit doubles, strings and lists of the preceding data types:\n\n    boolean, integer, double, string, boolean_list, integer_list, double_list, string_list\n\n#### Get a Node Property Type\n\n    :GET /db/{graph}/schema/nodes/{type}/properties/{property}\n\n#### Create a Node Property Type\n\n    :POST /db/{graph}/schema/nodes/{type}/properties/{property}/{data_type}\n\n#### Delete a Node Property Type\n\n    :DELETE /db/{graph}/schema/nodes/{type}/properties/{property}\n\n#### Get a Relationship Property Type\n\n    :GET /db/{graph}/schema/relationships/{type}/properties/{property}\n\n#### Create a Relationship Property Type\n\n    :POST /db/{graph}/schema/relationships/{type}/properties/{property}/{data_type}\n\n#### Delete a Relationship Property Type\n\n    :DELETE /db/{graph}/schema/relationships/{type}/properties/{property}\n\n### Nodes\n\n#### Get All Nodes\n\n    :GET /db/{graph}/nodes?limit=100\u0026skip=0\n\n#### Get All Nodes of a Type\n\n    :GET /db/{graph}/nodes/{type}?limit=100\u0026skip=0\n\n#### Get A Node By Type and Key\n\n    :GET /db/{graph}/node/{type}/{key}\n\n#### Get A Node By Id\n\n    :GET /db/{graph}/node/{id}\n\n#### Create A Node\n\n    :POST /db/{graph}/node/{type}/{key}\n    JSON formatted Body: {properties}\n\n#### Delete A Node By Type and Key\n\n    :DELETE /db/{graph}/node/{type}/{key}\n\n#### Delete A Node By Id\n\n    :DELETE /db/{graph}/node/{id}\n\n#### Find Nodes\n\n    :POST /db/{graph}/nodes/{type}/{property}/{operation}?limit=100\u0026skip=0 {json value}\n\n### Node Properties\n\n#### Get the Properties of a Node By Type and Key\n\n    :GET /db/{graph}/node/{type}/{key}/properties\n\n#### Get the Properties of a Node By Id\n\n    :GET /db/{graph}/node/{id}/properties\n\n#### Reset the Properties of a Node By Type and Key\n\n    :POST /db/{graph}/node/{type}/{key}/properties\n    JSON formatted Body: {properties}\n\n#### Reset the Properties of a Node By Id\n\n    :POST /db/{graph}/node/{id}/properties\n    JSON formatted Body: {properties}\n\n#### Set some Properties of a Node By Type and Key\n\n    :PUT /db/{graph}/node/{type}/{key}/properties\n    JSON formatted Body: {properties}\n\n#### Set some Properties of a Node By Id\n\n    :PUT /db/{graph}/node/{id}/properties\n    JSON formatted Body: {properties}\n\n#### Delete the Properties of a Node By Type and Key\n\n    :DELETE /db/{graph}/node/{type}/{key}/properties\n\n#### Delete the Properties of a Node By Id\n\n    :DELETE /db/{graph}/node/{id}/properties\n\n#### Get a Property of a Node By Type and Key\n\n    :GET /db/{graph}/node/{type}/{key}/property/{property}\n\n#### Get a Property of a Node By Id\n\n    :GET /db/{graph}/node/{id}/property/{property}\n\n#### Create a Property of a Node By Type and Key\n\n    :PUT /db/{graph}/node/{type}/{key}/property/{property}\n    JSON formatted Body: {property}\n\n#### Create a Property of a Node By Id\n\n    :PUT /db/{graph}/node/{id}/property/{property}\n    JSON formatted Body: {property}\n\n#### Delete a Property of a Node By Type and Key\n\n    :DELETE /db/{graph}/node/{type}/{key}/property/{property}\n\n#### Delete a Property of a Node By Id\n\n    :DELETE /db/{graph}/node/{id}/property/{property}\n\n### Relationships\n\n#### Get All Relationships\n\n    :GET /db/{graph}/relationships?limit=100\u0026skip=0\n\n#### Get All Relationships of a Type\n\n    :GET /db/{graph}/relationships/{type}?limit=100\u0026skip=0\n\n#### Get A Relationship\n\n    :GET /db/{graph}/relationship/{id}\n\n#### Create A Relationship By Node Types\n\n    :POST /db/{graph}/node/{type_1}/{key_1}/relationship/{type_2}/{key_2}/{rel_type}\n    JSON formatted Body: {properties}\n\n#### Create A Relationship By Node Ids\n\n    :POST /db/{graph}/node/{id_1}/relationship/{id_2}/{rel_type}\n    JSON formatted Body: {properties}\n\n#### Delete A Relationship\n\n    :DELETE /db/{graph}/relationship/{id}\n\n#### Find Relationships\n\n    :POST /db/{graph}/relationships/{type}/{property}/{operation}?limit=100\u0026skip=0 {json value}\n\n#### Get the Relationships of a Node By Node Type\n\n    :GET /db/{graph}/node/{type}/{key}/relationships\n    :GET /db/{graph}/node/{type}/{key}/relationships/{direction [all, in, out]} \n    :GET /db/{graph}/node/{type}/{key}/relationships/{direction [all, in, out]}/{type TYPE_ONE}\n    :GET /db/{graph}/node/{type}/{key}/relationships/{direction [all, in, out]}/{type(s) TYPE_ONE\u0026TYPE_TWO}\n\n#### Get the Relationships of a Node By Node Id\n\n    :GET /db/{graph}/node/{id}/relationships\n    :GET /db/{graph}/node/{id}/relationships/{direction [all, in, out]} \n    :GET /db/{graph}/node/{id}/relationships/{direction [all, in, out]}/{type TYPE_ONE}\n    :GET /db/{graph}/node/{id}/relationships/{direction [all, in, out]}/{type(s) TYPE_ONE\u0026TYPE_TWO}\n\n### Relationship Properties\n\n#### Get the Properties of a Relationship\n\n    :GET /db/{graph}/relationship/{id}/properties\n\n#### Reset the Properties of a Relationship\n\n    :POST /db/{graph}/relationship/{id}/properties\n    JSON formatted Body: {properties}\n\n#### Set some Properties of a Relationship\n\n    :PUT /db/{graph}/relationship/{id}/properties\n    JSON formatted Body: {properties}\n\n#### Delete the Properties of a Relationship\n\n    :DELETE /db/{graph}/relationship/{id}/properties\n\n#### Get a Property of a Relationship\n\n    :GET /db/{graph}/relationship/{id}/property/{property}\n\n#### Create a Property of a Relationship\n\n    :PUT /db/{graph}/relationship/{id}/property/{property}\n    JSON formatted Body: {property}\n\n#### Delete a Property of a Relationship\n\n    :DELETE /db/{graph}/relationship/{id}/property/{property}\n\n### Node Degrees\n\n#### Get the Degree of a Node By Node Type\n\n    :GET /db/{graph}/node/{type}/{key}/degree\n    :GET /db/{graph}/node/{type}/{key}/degree/{direction [all, in, out]} \n    :GET /db/{graph}/node/{type}/{key}/degree/{direction [all, in, out]}/{type TYPE_ONE}\n    :GET /db/{graph}/node/{type}/{key}/degree/{direction [all, in, out]}/{type(s) TYPE_ONE\u0026TYPE_TWO}\n\n#### Get the Degree of a Node By Node Id\n\n    :GET /db/{graph}/node/{id}/degree\n    :GET /db/{graph}/node/{id}/degree/{direction [all, in, out]} \n    :GET /db/{graph}/node/{id}/degree/{direction [all, in, out]}/{type TYPE_ONE}\n    :GET /db/{graph}/node/{id}/degree/{direction [all, in, out]}/{type(s) TYPE_ONE\u0026TYPE_TWO}\n\n### Node Neighbors\n\n#### Get the Neighbors of a Node By Node Type\n\n    :GET /db/{graph}/node/{type}/{key}/neighbors\n    :GET /db/{graph}/node/{type}/{key}/neighbors/{direction [all, in, out]} \n    :GET /db/{graph}/node/{type}/{key}/neighbors/{direction [all, in, out]}/{type TYPE_ONE}\n    :GET /db/{graph}/node/{type}/{key}/neighbors/{direction [all, in, out]}/{type(s) TYPE_ONE\u0026TYPE_TWO}\n\n#### Get the Neighbors of a Node By Node Id\n\n    :GET /db/{graph}/node/{id}/neighbors\n    :GET /db/{graph}/node/{id}/neighbors/{direction [all, in, out]} \n    :GET /db/{graph}/node/{id}/neighbors/{direction [all, in, out]}/{type TYPE_ONE}\n    :GET /db/{graph}/node/{id}/neighbors/{direction [all, in, out]}/{type(s) TYPE_ONE\u0026TYPE_TWO}\n\n### Lua\n\n    :POST db/{graph}/lua\n    STRING formatted Body: {script}\n\nThe script must end in one or more values that will be returned in JSON format inside an Array.\nWithin the script the user can access to graph functions. For example:\n\n    -- Get some things about a node\n    a = NodeGetId(\"Node\",\"Max\")\n    b = NodeTypesGetCount()\n    c = NodeTypesGetCount(\"Node\")\n    d = NodeGetProperty(\"Node\", \"Max\", \"name\")\n    e = NodeGetProperty(a, \"name\")\n    a, b, c, d, e\n\nA second example:\n\n    -- get the names of nodes I have relationships with\n    names = {}\n    ids = NodeGetLinks(\"Node\", \"Max\")\n    for k=1,#ids do\n        v = ids[k]\n        table.insert(names, NodeGetProperty(v:getNodeId(), \"name\"))\n    end\n    names\n\n\n\n## Building\n\nRageDB uses Seastar which only runs on *nix servers (no windows or mac) so use your local linux desktop or use EC2.\n\nOn EC2 launch an instance:\n\n    Step 1: Choose an Amazon Machine Image\n    Ubuntu Server 20.04 LTS(HVM), SSD Volume Type - ami-09e67e426f25ce0d7\n\n    Step 2: Choose Instance Type\n    r5.2xlarge\n\n    Step 3: Configure Instance\n    Specify CPU options\n    Threads per core = 1\n\n    Step 4: Add Storage\n    100 GiB\n\n    Launch\n\nOnce the instance is running, connect to it and start a \"screen\" session, then follow these steps:\n\nFirst let's update and upgrade to the latest versions of local software:\n\n    sudo apt-get update \u0026\u0026 sudo apt-get dist-upgrade\n\nInstall Seastar (this will take a while, that's why we are using screen):\n\n    git clone https://github.com/scylladb/seastar.git\n    cd seastar\n    sudo ./install_dependencies.sh\n    ./configure.py --mode=release --prefix=/usr/local\n    sudo ninja -C build/release install\n\nInstall Additional Dependencies\n\n    sudo apt-get install -y ccache python3-pip\n\nInstall conan\n\n    pip install --user conan\n    sudo ln -s ~/.local/bin/conan /usr/bin/conan\n\n\n\nInstall LuaJIT\n\n    sudo apt-get install -y luajit luajit-5.1-dev\n\nInstall RageDB\n\n    git clone https://github.com/ragedb/ragedb.git\n    cd ragedb\n    mkdir build\n    cd build\n    cmake .. -DCMAKE_BUILD_TYPE=Release\n    cmake --build . --target ragedb\n    cd bin\n    sudo ./ragedb\n\n### Troubleshooting\n\nIf you get errors regarding conan locks, run:\n\n    conan remove --locks\n\nIf you get errors like:\n    \n    Creation of perf_event based stall detector failed, falling back to posix timer: std::system_error\n\nThen this should fix it: \n\n    echo 0 \u003e /proc/sys/kernel/perf_event_paranoid\n\nTo make it permanent edit /etc/sysctl.conf by adding:\n\n    kernel.perf_event_paranoid = 0\n\nIf you get errors about aio-max-nr you'll want to increase it:\n\n    sudo echo 88208 \u003e /proc/sys/fs/aio-max-nr\n\nWe allocate 11026 aio slots per shard (10000 + 1024 + 2) so 8 shards = 88208\n\nTo make it permanent edit /etc/sysctl.conf by adding:\n\n    fs.aio-max-nr = 88208\n\n### Todos\n\n    - Command Logging (started)\n    - Recovering (started)\n    - Snapshots\n    - Replication\n    - Metrics\n    - Everthing Else\n    - Take over the world\n\n### Reactor Stalls\n\n    - When running KHop queries on combining the RoaringBitmaps using |=\n    - When importing data on the power of two growth of the tsl sparse_map\n    - In GetToKeysFromRelationshipsInCSV\n    - In PartitionRelationshipsInCSV \n\n\n### Missing Features that can be added \"easily\"\n    - Allow Node and Relationship Type handlers to take a json map defining the property keys and data types\n    - Allow additional data types: 8, 16 and 32 bit integers, 32 bit floats, byte, list of bytes, nested types \n    - NodeTypes and RelationshipTypes should allow type deletion and type id reuse\n    - Allow property type conversions (int to double, string to int, int to int array, etc).\n\n### PVS Commands\n\n    pvs-studio-analyzer trace -- make\n    pvs-studio-analyzer analyze\n    plog-converter -a GA:1,2 -t tasklist  PVS-Studio.log\n","funding_links":[],"categories":["Projects"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fragedb%2Fragedb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fragedb%2Fragedb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fragedb%2Fragedb/lists"}