内容简介:mongols-1.0.9已经发布。a library for c++
mongols-1.0.9已经发布。
主要更新:
-
更新文件上传机制,for http_server
-
作为leveldb作为nosql,替换redis,for http_server
-
提升多线程机制效能,for tcp_server
-
添加lua_server
-
添加sqlite_server
介绍:
a library for c++
依赖:
-
linux
-
pcre-devel
-
zlib-devel
-
openssl-devel
sudo yum install pcre-devel zlib-devel openssl-devel
or
sudo apt-get install libpcre3-dev zlib1g-dev libssl-dev
主要特性:
epoll or epoll + multi-threading
-
tcp sever
-
http server
-
websocket server
-
web server
-
leveldb server
-
lua server
-
sqlite server
-
utils
安装:
make clean && make -j2 && sudo make install && sudo ldconfig
使用:
pkg-config --libs --cflags mongols
leveldb_server 使用:
-
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 使用:
-
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"}]}
压力测试:
2 core,4 GB,centos 7:
以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网
猜你喜欢:本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
ASP.NET AJAX in Action
Alessandro Gallo、David Barkol、Rama Vavilala / Manning Publications / 2007-9-3 / USD 44.99
Ajax has revolutionized the way users interact with web pages today. Gone are frustrating page refreshes, lost scroll positions and intermittent interaction with a web site. Instead, we have a new gen......一起来看看 《ASP.NET AJAX in Action》 这本书的介绍吧!