Home

Awesome

WHIP

WHIP is a high performance web application server based on the excellent https://github.com/dom96/httpbeast and routing provided by https://github.com/kedean/nest with some additonal optimizations.

WHIP is still in development and is not recomended for production use. Much is still missing or untested but for basic api use cases however, the performance numbers look pretty good so far (see below).

Its Simple

import ../whip, sugar, json

let w = initWhip()
w.onGet "/json/{name}", (w:Wreq) => w.send(%*{ "name": w.path("name")})
w.onGet "/text/{name}", (w:Wreq) => w.send("hello " & w.path("name"))
w.start()

Its Fast.

As fast as Httpbeast for simple routes and upto 3x faster than Jester for complex routing.

Compared to Go, it is a little quicker than Gin-gonic but slower than fastrouter.

Very unscientific benchmarks...

FrameworkLang/text/{name}/json/{name}/text
WhipNim66.2k (0.15)56.4k (0.17)70.0k (0.14)
HttpBeastNimN/AN/A68.2k (0.14)
JesterNim16.2k (0.59)15.6k (0.63)56.7k (0.17)
MofuwNim8.71k (1.14)8.13k (1.23)9.13 (1.23)
GinGonicGo58.4k (0.14)57.8k (0.15)57.5k (0.15)
FastRouterGo89.5k (0.09)N/A90.3k (0.09)

Total Reqs/Sec (Mean latencies in ms) taken from the best of 3 wrk runs using 2 threads and 10 connections for 10 secs For latest results see [[results.txt]]

To run ..

./bench.sh -c

Its WIP

Coming soon..