

GitHub - webcpp/mongols: A network library for c++
source link: https://github.com/webcpp/mongols
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

README.md
mongols
a library for c++
Libevent, libev and libuv are outdated.
dependency
- linux
- gcc (-std=c11)
- g++ (-std=c++11)
feature
epoll or epoll + multi-threading + multi-process
- tcp sever
- http server
- websocket server
- web server
- leveldb server
- lua server
- sqlite server
- medis_server (like redis but support sqlite and leveldb)
- utils
install
make clean && make -j2 && sudo make install && sudo ldconfig
usage
pkg-config --libs --cflags mongols
leveldb_server usage
-
successful: 200
-
failed: 500
-
POST
curl -d'key=value' http://host/key
-
GET
curl http://host/key
-
DELETE
curl -X DELETE http://host/key
sqlite_server usage
- successful: 200
- failed: 500
- sql_type: cmd,transaction,query
- sql: SQL statement
- result: JSON
POST curl -d 'sql_type=x' -d 'sql=sql_statement' http://127.0.0.1:9090/
example: curl -d'sql_type=query' -d'sql=select * from test limit 3;' http://127.0.0.1:9090/
result: {"error":null,"result":[{"id":1,"name":"a"},{"id":2,"name":"b"},{"id":3,"name":"c"}]}
benchmark
2 core,4 GB,linux mint 18,2 thread:
http
ab -kc 10000 -n 500000 -H 'Connection: keep-alive' http://127.0.0.1:9090/
wrk -t 50 -d 30s -c 10000 -H 'Connection: keep-alive' http://127.0.0.1:9090/
web
multi-process web
medis
example
Recommend
-
73
DNNLibrary Run ONNX models on your Android phone using the new NNAPI ! Android 8.1 introduces Neural Networks API (NNAPI). It's very exciting to run a model in the "native" way supported by Android System. :) DNNLib...
-
129
A scikit-learn compatible neural network library that wraps PyTorch. Resources Examples To see more elaborate examples, look
-
127
Features All features of nginx(latest release) are inherited, i.e., it is 100% compatible with nginx. Web development using python, c++, lua, java Document
-
170
README.md Tinn (Tiny Neural Network) is a 200 line dependency free neural network libra...
-
81
README.md dotray http://dotray.io A modern peer to peer(P2P) network library over TCP written in Go, there is no third party deps in dotray,so it's extre...
-
84
README.md
-
63
README.md Neural Network on Microcontroller (NNoM)
-
7
Files Permalink Latest commit message Commit time
-
14
README.md
-
10
Haiku: Sonnet for JAX Overview |
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK