Random thoughts about LuaJIT FFI bindings reuse from other environments

  • From: Alek Paunov <alex@xxxxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Mon, 07 May 2012 00:42:49 +0300

ZeroRPC [1] is a zeromq/msgpack based RPC protocol developed and used in dotCloud (open-sourced for PyCon 2012 early this year).


As most of the list readers are aware of, ZeroMQ [2] is amazingly fast and flexible communication mechanism (reliable message passing using inproc (between threads via shared memory), ipc (unix sockets), TCP and UDP as base transports) and multiple messaging modes (Request/Replay, Push/Pull, Pub/Sub) with good bindings for all popular environments.

MessagePack [3] is a compact, schema-less binary serialization for the basic scalar types + array and map/dictionary data structures (they have an option for IDL based schemes for use with strongly typed environments like Java) also with good bindings coverage.

Combining his unique FFI and something like ZeroRPC, LuaJIT have a chance to be of great service to all other communities, exposing the full treasure of the modern C libs as ZeroRPC services, as an alternative to the current incomplete or missing bindings for the concrete environment.

(IMO, C bindings are one of the main consumers of the not so unlimited man power in the OSS world, especially now, with the rise of so many new languages/environments)

Additionally I will be surprised if LuaFFI/zeroRPC "bindings" turns out to be slower compared to majority of the current "native" bindings :-)

Currently, Python (and maybe others too?) users are able to get advantage of LuaJIT FFI without need of a RPC layer, loading LuaJIT as python module via lupa [4] (lupa supports seamless objects passing between LuaJIT and Python sides), but there are use-cases when RPC can be preferable anyway (for example simple sqlite service out of the process/machine).

Kind regards,
Alek

[1] https://github.com/dotcloud/zerorpc-python
[2] http://zguide.zeromq.org/page:all
[3] http://wiki.msgpack.org/display/MSGPACK/Format+specification
[4] https://github.com/scoder/lupa

Other related posts:

  • » Random thoughts about LuaJIT FFI bindings reuse from other environments - Alek Paunov