[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] Sierra's coroutine-based, embeddable, portable scheduler
- From: Jorge <xxopxe@...>
- Date: Mon, 23 Jan 2012 17:59:48 -0200
On sáb, 2012-01-21 at 13:05 +0100, Fabien wrote:
> One piece of this framework attracted particular interest: a
> collaborative scheduler, which allows easy coroutine-based
> multitasking (you might have seen references to it e.g. in
> http://lua-users.org/lists/lua-l/2011-09/msg00240.html, http://lua-users.org/lists/lua-l/2012-01/msg00293.html). We've promised to open-source its Linux port, and so do we: a preview has been committed to Github, under MIT public license.
>
> https://github.com/SierraWireless/luasched
>
So, this is what my Lumen is based on! Nice to know... Tough it IS a
humbling experience :)
I do plan to ransack your yummi piece of code... the logging and the
telnet thingy look great. And seems a good example to look up good
practices in general.
This is a great opportunity to re-plug my scheduler:
https://github.com/xopxe/Lumen
Since last announcement the scheduler gained a few functionalities. The
LuaSocket and nixio binding got more complete, and now Lumen sports
support for pipe-like buffering of signals (and pipes can be shared
among readers for primitive load balancing!).
All the previous characteristics remain, like being 100% self-contained
Lua code, and having an incredibly cool name.
-------------------------------------------------------------
Lumen: Lua Multitasking Environment.
====================================
"A nice generic framework to develop complex, portable concurrent applications
in Lua."
Extremely simple environment for coroutine based multitasking. Consists of a
scheduler, and that's it.
The API was inspired by a brief description of Sierra's scheduler:
https://github.com/SierraWireless/luasched.
Lumen has no external dependencies nor C code, and runs on unmodified Lua.
* Tasks can emit signals, and block waiting for them, and that's it.
* A signal can be of any type, and carry any parameters
* A task can wait on several signals, with a timeout.
* Signals can be piped, this is they can be buffered to avoid signals
being lost on slow readers.
* Tasks can register a name, and query for tasks by name.
* Tasks also can wait for a given name to get registered.
* A single Lua file, no C, no external dependencies.
* can have use for a clock (os.time() will do)
* can have use for a idle function (busy waiting or socket.sleep will
do)
* Can interface with LuaSocket and nixio for socket and async file I/O support.
* Only most basic of optimizations done.
* Works with Lua 5.1, 5.2 and LuaJIT.
-------------------------------------------------------------
Greetings,
Jorge