--
You received this message because you are subscribed to the Google Groups "lua-l" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lua-l+un...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/lua-l/CA%2BbJJbxNdsiB_dK4WZY32fdA1j3JWfXkU4P7f0SApRKTqeCsTA%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "lua-l" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lua-l+un...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/lua-l/db49d783-1871-4b5f-b2fc-1c7c1ddda40en%40googlegroups.com.
thx all for ideas. more context:
I'm developing a web server with Lua scripting support for an embedded environment. I've been considering a few design alternatives for handling Lua execution:
a) Create a new Lua VM instance for each incoming request.
(using a pool, like php-fpm)
b) Set up a pre-configured base Lua VM and clone it for each request.
c) Implement some form of caching mechanism to improve performance.
d) Open to other suggestions — any recommendations?
note: the project is working using model 'A'Thanks for all the help!
Core question: I initially asked if it was possible to clone or duplicate a Lua state to speed up the application. The short answer is: no.
Project overview:
The project is currently up and running, built to run on proprietary hardware with the following specs:
CPU: ARM 400 MHz, single-core
RAM: 64 MB
Compiler: armcc (C99 with partial pthreads support)
The system is inspired by the Node.js architecture, but built using Lua.
Its primary usage is as a personal vault, since the device is a PED (PIN Entry Device).
It's up and running.
Weekend project:
I've been working on a side project called Moonbird. You can check it out here:
Code partial repository: https://gitlab.com/denisdemais/moonbird
Screenshot/preview: https://gitlab.com/denisdemais/moonbird/-/blob/625892fa61d49a54c5bce3751aa4dab796962d31/images/000.jpeg
NOTE: I will study the base code and other projects.
https://github.com/fnuecke/eris
http://lua-users.org/wiki/PlutoLibrary
https://stackoverflow.com/questions/2497482/clone-a-lua-state
https://stackoverflow.com/questions/1383768/cloning-lua-state