lua-users home
lua-l archive

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


On Tue, Feb 19, 2013 at 11:25 PM, Patrick Donnelly <batrick@batbytes.com> wrote:
On Tue, Feb 19, 2013 at 8:44 AM, Brad Jorsch <bjorsch@wikimedia.org> wrote:
> Part of security in our case is performance and resource usage; we'd need to
> make sure someone can't somehow abuse coroutines to bypass the CPU or memory
> limits in our sandbox.

It looks like to me you are using ulimit for that. I don't see a
problem with keeping coroutines in.

ulimit is used for the "standalone" version, there's also the luasandbox PHP extension[1] (which is what is being used on Wikipedia).

It would *probably* be the same from a resource usage standpoint, but we'd have to check.
 
> If you have a compelling use case for coroutines in the context of MediaWiki
> and Scribunto, let us know.

Advanced iterators alone should be sufficient reason to include
coroutines. I wrote a few brief words on this in the Nmap book's
section on parallelism:

http://nmap.org/book/nse-parallelism.html#nse-parallelism-cm

But does MediaWiki need advanced iterators? Perhaps for something like Example 9.13 in the article you link,[2] although that example could be done without coroutines with only a little added complexity.


 [1]: https://gerrit.wikimedia.org/r/gitweb?p=mediawiki%2Fphp%2Fluasandbox.git
 [2]: http://nmap.org/book/nse-parallelism.html#nse-cm-links

--
Brad Jorsch
Software Engineer
Wikimedia Foundation