lua-users home
lua-l archive

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


On Tue, Oct 29, 2013 at 1:59 PM, Noah Watkins <jayhawk@cs.ucsc.edu> wrote:
> Yeh, the embedded scripts don't yet have any proper documentation. Here is a
> link to where the environment gets setup:
>
> https://github.com/ceph/ceph/blob/cls-lua/src/cls/lua/cls_lua.cc#L375
> https://github.com/ceph/ceph/blob/cls-lua/src/cls/lua/cls_lua.cc#L406

perfect.


> Currently the scripts are sent along with each request, so the scope is a
> client and there is no persistence. I think this is going to be the focus of
> our next steps, namely to use a single VM instance (rather than
> one-per-request right now), as well as persisting the scripts, although I'm
> not sure what the scoping will look like in that case.

i guess that should be considered in context of the current C/C++
plugin deployment.  maybe the Lua plugin should have some 'startup
script(s)' in a predefined place.

about the VM per-request, remember that setting/destroying a VM can
take a significant time, so it's very convenient to keep it running.
of course, that puts a lot of responsibility on the script author,
since any undesired side-effect would also persist in the VM.

another consideration is about concurrency.  a single VM could
represent a scarce resource, maybe a pool of them would be better.


-- 
Javier