Because I like the Lua language very much, and work is web development, so I have been concerned about the Web server project of Lua, including Xavante, Alilua, Openresty, tengine, etc.
Xavante was the first I touched, The concept was not blocked at the time, it is now known to be blocked, the use of LUA in a single thread will have performance problems, and there is no file upload, websocket and other functions.
Alilua, openresty are non-blocking, Alilua name with an Ali originally I mistook Ali's project, is actually a private project, the site has been unable to access, support websocket, but does not support file upload. The
Openresty is well known and the community is active, with extensions supporting both file uploads and websockt. But one thing that doesn't satisfy my needs, it's nginx-based, Nginx's multi-process architecture makes it less context-sensitive than traditional Java servers, does not support resident memory data and code, means that a global variable is defined in the LUA code and cannot be used at the next request. Because it is possible to be destroyed, the next request may be processed by another process, which also directly led to the Openresty WebSocket implementation can not actively push the message to the client, only through a message subscription and other unfriendly methods to push the message to the client, although very powerful, but I can only give up.
Tengine is Ali's project, but also based on Nginx, similar to Openresty, not much to understand, nor to meet my requirements.
recently learned some of the HTTP protocol related knowledge, I want to implement file upload and WebSocket message parsing, and finally sharpening, finish it. Because it is a personal project, did not undergo rigorous testing, the bug certainly a lot, this in later use slowly tuning. These features were developed on top of luvit projects, or it would be a waste of time to write your own full HTTP server.
The current Luvit-based two development server already contains all the features I need: cookie parsing and setting, session sessions, client-side caching based on the If-modified-since request header, filter implementations like the Java EE, Multipart/form-data message parsing (for file upload), WebSocket message parsing.
: http://resource.omega.pw/software/lua/luv/luv-http-server.tar.gz
Luvit Project Introduction:
Luvit project is based on the LUV project to achieve a set of similar Nodejs library, basically implemented Nodejs most of the API, but Nodejs is constantly updated, Luvit certainly can't catch up, project address: Https://github.com/luvit/luvit
The LUV project is a LUA binding to the LIBUV library, project address: Https://github.com/luvit/luv
The perfect Web server that belongs to you complete