An open API service indexing awesome lists of open source software.

https://github.com/mons/protocol-tarantool

Protocol implementation for Tatantool
https://github.com/mons/protocol-tarantool

Last synced: 10 months ago
JSON representation

Protocol implementation for Tatantool

Awesome Lists containing this project

README

          

NAME
Protocol::Tarantool - Binary protocol of Tarantool/Box database

SYNOPSIS
use Protocol::Tarantool;

my $key1 = [ 'value1','value2' ];
my $key2 = [ 'value3','value4' ];
my $tuple = [ 1,2'data',3,'moredata'];

# Pack request packets
my $packet = Protocol::Tarantool::select( $req_id, $sp_no, $idx_no, $offset, $limit, [ $key1, $key2 ]);
my $packet = Protocol::Tarantool::insert( $req_id, $sm_no, $flags, $tuple);
my $packet = Protocol::Tarantool::delete( $req_id, $sm_no, $flags, $tuple);
my $packet = Protocol::Tarantool::lua( $req_id, $flags, $function_name, [ $arg1, $arg2, $arg3 ]);

# Unpack response packet
# detect total size of packet by first bytes of header (need first 8 bytes). Return -1 if not enough data
my $size_of_packet = Protocol::Tarantool::peek_size( \$packet );

my $response = Protocol::Tarantool::response( $packet );

EXPORT
None by default.

SEE ALSO
AnyEvent::Tarantool - AnyEvent client that uses this protocol
DR::Tarantool - Another sync and async implementation
MR::Tarantool::Box - First client by Mail.Ru

AUTHOR
Mons Anderson

LICENSE
This program is free software; you can redistribute it and/or modify it
under the terms of either: the GNU General Public License as published
by the Free Software Foundation; or the Artistic License.

COPYRIGHT
Copyright 2012 Mons Anderson, Mail.ru, all rights reserved.