lua-users home
lua-l archive

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


Just a note on another simple solution:

I've been quite happy using msgpack (very fast and lightweight serialization format) with zeroMQ or just posix pipes. The code with pipes expects you to use a scheduler which can react to file descriptors (select):

Simple Msgpack bindings (should be trivial to adapt) :

https://github.com/lubyk/lubyk/blob/master/modules/core/src/msgpack/msgpack.cpp

Fifo template (pipe):

https://github.com/lubyk/lubyk/blob/master/modules/core/include/lk/Fifo.h

Fifo usage example (midi receive) :

https://github.com/lubyk/midi/blob/master/include/midi/In.h

The overhead is really reduced to the bare minimum for a network friendly/no sharing solution.

When using zeroMQ, I simply send msgpack data as chars.


On Wed, Jan 15, 2014 at 7:01 PM, Alek Paunov <alex@declera.com> wrote:
On 15.01.2014 16:43, Andrew Starks wrote:
On Wednesday, January 15, 2014, Alek Paunov wrote:
I recently spotted yet another new serialization work (by former protobuf
engineer). Not sure how relevant with the Andrew's case:

http://kentonv.github.io/capnproto/

Yeah. It's incredibly relevant.  On my todo list was to look at protobuff
bindings, and to look at the overhead of the encode decode process. This
gets rid of that.


BTW, the listed C-bindings (golang ones too) are maintained by James McKaskill (the luaffi primary contributor):

https://github.com/jmckaskill/c-capnproto

So, there are already (at least indirect) Lua related trace :-).





--

                                                               Gaspard