No description
Find a file
2020-06-11 08:22:23 -07:00
tests sorting empower updates to avoid deadlocks 2018-12-21 22:59:26 -08:00
.gitignore techempower - plaintext, json, queries, and fortunes 2018-12-18 15:40:48 -08:00
bench.sh better tests 2018-12-21 17:53:11 -08:00
bench.txt new results 2018-12-21 18:02:28 -08:00
empower.sh more results 2018-12-21 18:26:57 -08:00
empower.txt more results 2018-12-21 18:26:57 -08:00
nim.cfg dependecies fixed 2020-06-11 07:38:39 -07:00
pipeline.txt pipeline results 2018-12-21 18:05:52 -08:00
README.md critbits 2018-12-13 21:30:30 -08:00
results.txt request caching - even faster 2018-12-13 13:13:21 -08:00
whip.nim Update whip.nim 2020-06-11 07:06:24 -07:00
whip.nimble updated version to 0.2 2020-06-11 08:22:23 -07:00

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...

Framework Lang /text/{name} /json/{name} /text
Whip Nim 66.2k (0.15) 56.4k (0.17) 70.0k (0.14)
HttpBeast Nim N/A N/A 68.2k (0.14)
Jester Nim 16.2k (0.59) 15.6k (0.63) 56.7k (0.17)
Mofuw Nim 8.71k (1.14) 8.13k (1.23) 9.13 (1.23)
GinGonic Go 58.4k (0.14) 57.8k (0.15) 57.5k (0.15)
FastRouter Go 89.5k (0.09) N/A 90.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..

  • middleware api
  • websockets (mqtt)
  • swagger docs
  • smarter headers
  • session storage (redis)
  • sql db adapters (postgrest, graphql)
  • smart caching
  • static html serving
  • html templates (jade)
  • authentication (oauth, jwt)
  • aws lambda interop