On Sun, Apr 1, 2012 at 3:06 AM, <firstname.lastname@example.org> wrote:
> fallabs has released the new kyotocabinet-lua-1.26 which no longer causes
> the Lua-crash-problems.
> The remaining issue is: How to have one memory db persistent over all
> requests and over all nginx workers.
I don't think it's possible without using shared memory. You can
always configure nginx to launch a single worker though.
> Maybe you could build a module for openresty as the speed is much higher
> than any other
> socket-based (mysql, redis, memcached) implementation.
I don't see how this module can be done if we'd enable multiple nginx workers :)
Well, you can always write a lua library that uses cosocket to talk to
Kyoto Tycoon which provides a network layer for Kyoto Cabinet.
> And you have features like transactions, jumps, cursors, etc. with Kyoto
> cabinet so a nice
> gap-filler between your own shared-dict implementation which is fast but
> with basic features
> and the full featured socket-based storages like redis, mysql which are some
> orders of magnitude
> slower due to their socket-interface.
Well, you can surely extend the shared dict thing in ngx_lua. I'll
expose APIs of this thing and allow others to write Nginx modules to
customize the shared dict implementation.
P.S. I've cc'd the openresty mailing group so that other people can
see our discussion here.