Рейтинг@Mail.ru
Follow on

Tarantool

Get your data in RAM. Get compute close to data. Enjoy the performance

Features

  • A drop-in replacement for Lua 5.1, based on LuaJIT 2.0;
    simply use #!/usr/bin/tarantool instead of #!/usr/bin/lua in your script
  • Lua packages for non-blocking I/O, fibers and HTTP
  • MessagePack data format and MessagePack based client-server protocol
  • a built-in database with two data engines: 100% in-memory with optional persistence and a 2-level disk-based B-tree, to use with large data sets
  • secondary key and index iterators support
  • asynchronous master-master replication
  • authentication and access control

Support

 

Example

#!/usr/bin/env tarantool

box.cfg{}
hosts = box.space.hosts
if not hosts then
    hosts = box.schema.create_space('hosts')
    hosts:create_index('primary',
            {parts = {1, 'STR'}})
end

local function handler(self)
    local host = self.peer.host
    local response = {
        host = host;
        counter = hosts:inc(host);
    }
    return self:render{ json = response }
end

httpd = require('http.server')
server = httpd.new('127.0.0.1', 8080)
server:route({ path = '/' }, handler)
server:start()
 

Our benchmarks (YCSB)

Workload A

Our users