Questions tagged [tarantool]

Tarantool is a Lua application server with a built-in database. It's best to think of as a Redis or Memcached with high level of customization. Alternatively, it's Node.JS with object persistency and master-master replication.

Tarantool is a Lua application server with a built-in database.

The key idea is in a new way of building Web applications - a data grid approach, when the database serves as the application backend as well, and there are many database instances running in parallel, to scale up and out.

Tarantool 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
  • document data model with secondary keys
  • two data engines: 100% in-memory with optional persistence and a 2-level disk-based B-tree, to use with large data sets
  • iteration over data in forward and reverse order
  • asynchronous master-master replication
  • authentication and access control
218 questions
4
votes
2 answers

Select from Tarantool by secondary index with sort by another field and limit/offset

I have some space top with fields: -id, -status, -rating I have two indexes for space top: --primary box.space.top:create_index('primary', { type = 'TREE', unique = true, parts = { 1, 'NUM' } }) --status box.space.top:create_index('status', {…
3
votes
2 answers

Tarantool Java Connector

Do you know a way to connect Java and the Tarantool key/value storage? On the Tarantool web-site I can see connectors for C, Ruby, PHP, etc., but no connector for Java. I know that Tarantool supports the Memcached protocol (with a lot of Java…
3
votes
1 answer

Running SQL queries in Tarantool from Go are silent (no errors)

I try to run SQL queries from a Golang application using the official Tarantool client. The only way I know how to do it is by using conn.Eval like below. But I don't receive any errors. I can drop non existing tables, insert rows with duplicate…
mosceo
  • 1,222
  • 11
  • 26
3
votes
1 answer

How to minimize HDD usage in tarantool

I have installed tarantool on a Raspberry Pi 7inch and would like to minimize its interaction with the HDD (sd card). Are there any simple ways to do this. What will be the real usage of hdd?
3
votes
1 answer

What is more efficient (Tarantool) - many spaces or one big space?

I am implementing microservice on Tarantool vinyl database and need to make basic architecture decision - should I use one big space for all the data, or use many spaces with same tuple format. The space will be used as some kind of state storage of…
chernetsky
  • 81
  • 4
3
votes
1 answer

How to add new field to Tarantool space

I have a following space schema in Tarantool box.schema.space.create('customer') format = { {name = 'id', type = 'string'}, {name = 'last_name', type = 'string'}, } box.space.customer:format(format) box.space.customer:create_index('id',…
Oleg Babin
  • 409
  • 3
  • 9
3
votes
1 answer

How can I perform hot reload code in tarantool cartridge?

How can I perform hot reload code in tarantool cartridge without restarting application ?
3
votes
1 answer

Querying case-insensitive columns by SQL in Tarantool

We know that string Tarantool indices can be made case-insensitive by specifying the collation option: collation = "unicode_ci". E.g.: t = box.schema.create_space("test") t:format({{name = "id", type = "number"}, {name = "col1", type =…
Mike Siomkin
  • 667
  • 8
  • 15
3
votes
2 answers

How to change format of sql table in Tarantool

I want to add nullable column to sql table, but changing table format leads to an error: box.execute([[ CREATE TABLE test( "id" INTEGER PRIMARY KEY AUTOINCREMENT, "name" TEXT NOT NULL ) ]]) f =…
Andrey
  • 185
  • 8
3
votes
1 answer

Performance: get+[delete if exists] vs delete

I have a case with two options: check a tuple existense and delete if it exists unconditional delete The majority of operations are trying to delete a tuple which is not exist in space (get without delete or uncoditional delete). I wonder what is…
Guram Savinov
  • 594
  • 5
  • 10
3
votes
1 answer

How can I get last tuple in space?

How can I get last tuple in space? Last tuple here is tuple with max primary key value local a = box.space.SPACE:len() box.space.SPACE:get{a} This variant is not suitable because the number of tuples is not equal to the number of created indexes
AlexZhur
  • 41
  • 5
3
votes
1 answer

How to use auto increment index in Tarantool?

I made auto increment index: box.space.metric:create_index('primary', { parts = {{'id', 'unsigned'}}, sequence = true, }) Then I try to pass nil in id field: metric.id = nil When I try insert this values, I catch error: Tuple field…
vk26
  • 345
  • 3
  • 9
3
votes
1 answer

Can I connect to Tarantool with mysql or psql console?

I found that I can do SQL requests but only inside Tarantool. Can I somehow connect to Tarantool like in MySQL shell or Postgres shell? mysql -u admin -h localhost -P 3301 # or psql ... Or how to configure other programs that understand only…
Sergey
  • 19,487
  • 13
  • 44
  • 68
3
votes
1 answer

Does Tarantool have connector for PHP 7?

I'd like to use Tarantool with new PHP 7. I have found a driver here https://github.com/tarantool/tarantool-php, but it is only suitable for PHP 5.
Alex Z
  • 63
  • 4
2
votes
1 answer

How to rename fields in array in .lua

I'm new in .lua. I read the documentation, but didn't find the answer to my question. There is a space "company". Inside it's an "information" map. Inside this map is a "job" object and an array of "users" objects. The "users" array consists of 2…
Kirill Sereda
  • 469
  • 1
  • 10
  • 25
1
2
3
14 15