Go to file
jie a6f745a787 initial commit 2021-03-05 15:39:47 +08:00
build initial commit 2021-03-05 15:39:47 +08:00
.gitignore initial commit 2021-03-05 15:39:47 +08:00
CMakeLists.txt initial commit 2021-03-05 15:39:47 +08:00
LICENSE Initial commit 2021-03-05 12:27:30 +08:00
README.md initial commit 2021-03-05 15:39:47 +08:00
bserv.cpp initial commit 2021-03-05 15:39:47 +08:00
common.hpp initial commit 2021-03-05 15:39:47 +08:00
config.hpp initial commit 2021-03-05 15:39:47 +08:00
database.hpp initial commit 2021-03-05 15:39:47 +08:00
db.sql initial commit 2021-03-05 15:39:47 +08:00
handlers.hpp initial commit 2021-03-05 15:39:47 +08:00
logging.hpp initial commit 2021-03-05 15:39:47 +08:00
router.hpp initial commit 2021-03-05 15:39:47 +08:00
routing.hpp initial commit 2021-03-05 15:39:47 +08:00
session.hpp initial commit 2021-03-05 15:39:47 +08:00
utils.hpp initial commit 2021-03-05 15:39:47 +08:00

README.md

bserv

A Boost Based High Performance C++ HTTP JSON Server.

Dependencies

Quick Start

Database

You can import the sample database:

  • Create the database in psql:

    create database bserv;
    
  • Create the table in the shell using a sample script:

    psql bserv < db.sql
    

Routing

Configure routing in routing.hpp.

Handlers

Write the handlers in handlers.hpp

Build

Please refer to this.

Running

Run in shell:

./build/bserv

Performance

This test is performed by Jmeter.

The unit for throughput is Transaction per second.

URL bserv Java Spring Boot
/login 139.55
/find/<user> 958.77

Computer Hardware:

  • Intel Core i9-9900K x 4
  • 16GB RAM