Levee
Levee is a tool to succinctly and quickly create high performance network appliances with Lua.
local levee = require("levee")
local h = levee.Hub()
local err, serve = h.stream:listen(9000)
for conn in serve do
h:spawn(function()
while true do
local err = conn:write("Hello World\n")
if err then break end
h:sleep(1000)
end
conn:close()
end)
endStraight Forward Concurrency
Levee leverages Lua's native coroutines to allow you to create Event-based Asynchronous services with straight forward, linear code; instead of nested callbacks.
Performance
Levee is based on LuaJIT which provides a stellar JIT for Lua code and an excellent FFI for binding to C libraries. For example Levee comes bundled with Siphon, a library of highly optimized parsers for common protocol and data formats.
Build Standalone Static Binaries
Once your service is ready to deploy, Levee provides tooling to compile your project to a standalone, static binary.