Skip to content

A lightweight, web-free C++ HTTP API framework built on Boost.Beast

Notifications You must be signed in to change notification settings

ISEP-Projects-JH/Graph

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bulgogi logo

Graph Server Project

A high-performance containerized graph computation service in modern C++20, backed by Clang and powered by bulgogi.
Includes Python SDK for easy interaction and automation.


🧠 Features

  • Implemented in C++20 with LLVM/Clang and -march=native optimizations
  • Uses a custom adjacency matrix for SIMD-friendly memory layout
  • Graph algorithms supported:
    • Degree, degree statistics
    • Triangle counting
    • Shortest paths (BFS & Dijkstra)
    • Betweenness centrality
    • Isolated node detection
  • HTTP interface via bulgogi — a lightweight Boost.Beast wrapper
  • Includes Python SDK with automatic cleanup and alias support
  • Containerized with Docker for reproducibility and testing

🚀 Quick Start

1. Build the Docker image

docker build -t graph-server -f docker/Dockerfile .

2. Run the server

docker run -p 8080:8080 graph-server

3. Use the Python client

Requires Python 3.10+. All Python client files are in the python/ directory.

from client import Graph, AliasGraph

g = Graph(size=100, bi=True, weighed=True)
g.add_edge(0, 1, weight=3)
print(g.stats())

4. Load graph from text file with aliases

g = AliasGraph("graph.txt")
print(g.stats())
print(g.centrality())

📑 API

The full HTTP API is documented in docs/api.md. All endpoints support JSON input/output and curl-friendly queries.


📦 Dependencies

Development (C++20 build only)

  • C++20 compiler (Clang ≥ 13 preferred)
  • Boost 1.80+ with JSON module (Docker uses 1.88.0)
  • JH-Toolkit 1.3.x-LTS
  • CMake ≥ 3.27 (Docker builds from source)
  • Docker (for consistent build & deployment)

Runtime (Python client)

  • Python 3.10+
  • requests library (automatically used by the Python SDK)

🛠 Design Highlights

  • SIMD-friendly layout: adjacency matrix avoids pointer chains
  • ColIter enables efficient column traversal for triangle & centrality calc
  • GraphManager supports graph ID registration and locking
  • Python-side cleanup uses atexit + __del__ to reduce memory leaks

📂 Folder Structure

.
├── docker/           # Dockerfile and build config
├── Application/      # C++ GraphManager and core logic
├── Algo/             # C++ Graph algorithms
├── Web/              # bulgogi-based HTTP server
├── python/           # Python SDK (GraphClient, AliasGraph)
└── docs/             # API documentation

📊 Attribution


🧑‍💻 Author

Developed and maintained by JH / JeongHan-Bae

About

A lightweight, web-free C++ HTTP API framework built on Boost.Beast

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 73.6%
  • Python 19.3%
  • CMake 3.7%
  • Dockerfile 3.4%