lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]




在 2019年5月3日,11:21,Andrew Starks <andrew@starksfam.org> 写道:



On Thu, May 2, 2019 at 10:30 AM 云风 <cloudwu@gmail.com> wrote:


在 2019年5月1日,10:30,Andrew Starks <andrew@starksfam.org> 写道:

Hello All,

At work, we are selecting a Lua environment to run on our embedded ARM 7 device. We have limited memory and we want to keep the footprint small, hence Lua in the first place. Our requirements include:

* Lua 5.3 preferred because of the need to work with INT64
* TCP-IP Sockets
* HTTP/S, HLS/TLS
* WebSockets
* DNS / mDNS
* REST Plumbing
* Nice async / concurrency behavior
* Integrates well with main loops
* Works on Windows a nice plus
* Capitalist friendly licensing

My current interest is in lua-http with cqueues, but we aren't sure about compatible REST frameworks and which one the cool kids are using. Any recommendations?

Luvit would be a great option, except that it only works with LuaJIT. We're wary of the daunting task of compiling LuaJIT on this platform and we will miss native 64Bit integers. Our team is familiar with Node.js, hence the appeal.

Other lightweight suggestions?

-- Andrew



Maybe my project ‘skynet’ is a choice, you can have a look at https://github.com/cloudwu/skynet

It’s similar with cqueues.

It’s widely used in many online game severs, and someone reported that they used it in some embedded environments. I maintains it for eight years, I think it is robust enough, but there is no English documents yet because my English is not good. 


This is very interesting. Your use case is similar to mine, but I don't know Chinese. It's hard to pay for someone to translate when we are only evaluating.

If you could point me to a case study or examples of your framework in use, I would appreciate that very much.

--
Andrew Starks

Building skynet is very simple, just clone it, and type ‘make linux’. 

You can run 

./skynet examples/config

And then run some test or examples script in the console, for example type ‘simpleweb’ to run the script in examples/simpleweb.lua

It’s a simple web server , https://github.com/cloudwu/skynet/blob/master/examples/simpleweb.lua

I think  it’s easy to understand how the skynet works as a web server.

The core of skynet is lightweight , less then 10k lines of C code , it’s only an actor framework like Erlang and with async  tcp/udp support. There are http(s) modules written by pure lua, and some db drivers such as redis/mongo/mysql base on this async tcp api.

Tou can find some test script at https://github.com/cloudwu/skynet/tree/master/test

You can send me a direct email if you need more help.