[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Tyrant Client?
- From: Phoenix Sol <phoenix@...>
- Date: Fri, 3 Jul 2009 09:09:29 -0500
Thanks a lot, Bertrand.
On Jul 3, 2009, at 1:23 AM, Bertrand Mansion <firstname.lastname@example.org> wrote:
On Fri, Jul 3, 2009 at 1:07 AM, Phoenix Sol<email@example.com>
Thank-you, Petite. I will implement Tyrant's binary protocol in Lua.
On Thu, Jul 2, 2009 at 3:07 PM, Petite Abeille <firstname.lastname@example.org
On Jul 2, 2009, at 9:56 PM, Phoenix Sol wrote:
Anybody have a Lua client for Tokyo Tyrant?
"As for the HTTP/1.1 compatible protocol, the server implements the
following commands; "GET" (relevant to `tcrdbget'),
"HEAD" (relevant to
`tcrdbvsiz'), "PUT" (relevant to `tcrdbput'), "POST" (relevant to
`tcrdbext'), and "DELETE" (relevant to `tcrdbout'). The URI of
is treated as the key encoded by the URL encoding. And the entity
treated as the value. However, headers except for "Connection" and
"Content-Length" are ignored. "PUT" can have the header "X-TT-
value is either of 1 (relevant to `tcrdbputkeep'), 2 (relevant to
`tcrdbputcat'), or else (relevant to `tcrdbput'). "POST" should
header "X-TT-XNAME" whose value stands for the function name to be
"POST" can have the header "X-TT-XOPTS" whose value stands for
options of 1 (record locking) and 2 (global locking)."
I think the http interface does not perform as well as the binary one
and does not allow you to do everything that Tokyo Tyrant proposes.
I have written a PHP version of the binary protocol which is complete
and up-to-date. FYI, the Python version is not up-to-date. If you want
a model to get inspiration, either use my PHP implementation or the
Perl or Ruby ones.
You can find my code here: