/T7-GraphoPlex

A distributed graph database engine with a supported query language

Primary LanguageJavaGNU General Public License v3.0GPL-3.0

Contributors Forks Stargazers Issues MIT License LinkedIn


A distributed graph database engine that stores users' graph-like data with a supported query language.


View Demo · Report Bug · Request Feature

Motivation

Nowadays, in our data-driven world, various industries and domains are recognizing the immense value of graph databases. Social Networks, Recommendation Systems, and Bio-informatics are examples of such domains that could benefit from using a graph database to store and process their intricate and interconnected data. Unlike traditional SQL(tabular) databases, graph databases provide flexible semantics that aligns with busi- ness models in addition to eliminating the unnecessary overhead associated with SQL databases when querying complex and interconnected data. In addition, the increasing amount of data needed to be stored requires graph database systems to be distributed across multiple server

Architecture

GraphoPlex consists of a client (an interactive shell in Python) and a cluster (multiple servers that run the same code and were implemented in Java). The client could be connected to any server in the cluster through an HTTP connection to send user queries. Inter-cluster communication is done through gRPC.

System Architecture

Getting Started

Prerequisites

  1. Python 3.6 or higher
  2. Java 17 or higher
  3. Maven 3.6.3 or higher
  4. Docker
  5. Redis

Installation & Setup

  1. Clone the repository
git clone https://github.com/ShimaaBetah/GraphoPlex.git && cd GraphoPlex
  1. Build the Server
cd graph_db && mvn install

Usage

  1. Run the Server (this will only run 1 server on default 8080 port)
mvn spring-boot:run
  1. Run the client
python3 client.py
  1. Start writing commands

    see section 3.2.2 in the thesis for more details about the supported commands.

How to run a cluster

The previous steps will only run 1 server on default 8080 port, to run a cluster of servers, you need to run the following commands.

  1. Setup app properties

    open the file graph_db/src/main/resources/application.properties and change the following properties

    server.numOfServers= ${number of servers you want in the cluster}
    grpc.servers.ports= ${grpc ports of the servers in the cluster separated by comma}
    grpc.servers.hosts= ${ip address of the servers in the cluster separated by comma}
  2. Build the server code

    cd graph_db && mvn install
  3. Build Docker Image

    docker build -t graphdb-server .
  4. Run Docker Container

    docker run --network="host"  -e SERVER_ID=${server_id} -e REDIS_PORT=${redis_port} -e SERVER_PORT=${http_port} -e GRPC_SERVER_PORT=${grpc_port}  graphdb-server
    
    

    this should be done for each server replacing all environment variables by actual values for each server in the cluster. Note that if server.numOfServers in application.properties is n then SERVER_ID should be between 0 and n-1.

    Also GRPC_SERVER_PORT should be the element with index of (SERVER_ID) in the array of grpc.servers.ports in the application.properties file .

  5. Run the client

    python3 client.py

    make sure that the url in client.py is belongs to one of the servers in the cluster

  6. Start writing commands as before

Roadmap

The project is NOT in active development. However, the following ideas are things that would be looked up next:

  • Parallel implementation for Dijkstra and DFS
  • Result Set visualization
  • Partitioning Strategy Enhancement
  • Result Set Visualization
  • Authentication and support for multiple users

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the GNU General Public License v3.0. See LICENSE.txt for more information.

Contact

Elshimaa Betah - shimaabetah1911@gmail.com