Clever Geek Handbook
📜 ⬆️ ⬇️

Tarantool

Tarantool is an open database management system with a non-blocking application server on Lua .

Tarantool
Logo-tarantool-black-font.svg
Type ofNoSQL
AuthorMail.ru Group
DeveloperMail.ru Group
Written onSi
operating systemLinux , FreeBSD , OS X
First edition2008
Latest version2.1.2 (April 5, 2019)
LicenseSimplified BSD
Websitetarantool.io

The database has a high speed compared to traditional DBMSs, possessing the same properties: persistence , ACID transactional , master-slave replication , master-master.

Content

  • 1 Review
    • 1.1 DBMS
    • 1.2 Application Server
  • 2 History
  • 3 Notes
  • 4 References

Overview

DBMS

Query Language:

  • SQL
  • document-oriented queries in Lua

Data Storage Technologies:

  • memtx - storage of all data in RAM, with disk data snapshots and transaction log
  • vinyl - data storage on the hard disk, with optimization for quick data insertion

The storage unit is a tuple (tuple or string). A tuple consists of one or more fields.

Fields can be one of the following types:

Scalar / Compoundtype msgpacktype luaExample
scalarnil"Nil"msgpack.NULL
scalarboolean"Boolean"true
scalarstring"String""ABC"
scalarinteger"Number"12345
scalardouble precision floating point"Number"1.2345
compositeassociative array"Table" with string keys{"A": 5, "b": 6}
compositean array"Table" with numeric keys[1, 2, 3, 4, 5]
compositebyte array"Cdata"


Tuples are organized into spaces (space or tables). For each space storage technology (memtx or vinyl) is indicated.

The space must be indexed with the primary key. An unlimited number of secondary keys are also supported.

A key can consist of one or more fields.

Supported Indexes:

  • TREE (tree) - for a quick search of values ​​and the possibility of iteration.
  • HASH (hash table, only for memtx) - for an even faster search of values.
  • BITSET (bit mask, memtx only) - the ability to search by bit masks.
  • RTREE (multidimensional R * -tree, only for memtx) - for quick search of nearest neighbors (KNN) and points in given multidimensional parallelepipeds with given distance functions between two points.

MessagePack is used as a storage format and data transfer protocol.

The database supports asynchronous replication. Replication can be done as a master.

To share access, the traditional ACL model is used. Each object has an owner with unlimited access. The owner can grant access to the object to other users or roles. A role is in turn a group of users.

The list of delimited actions:

  • read
  • write
  • execute
  • create
  • alter
  • drop

The database supports stored procedures triggers written in Lua .

Global trigger

  • box_once - first launch of the database (bootstrap)

Triggers for spaces (tables):

  • on_replace - read-only trigger on insert, update, delete data events
  • before_replace - trigger with the ability to modify insert, update, delete data events

Application Server

To write business logic, the Lua language and its LuaJIT compiler are used.

The application server contains a high-level API for access to the database, file system, network.

The user can dynamically add, delete, modify functions. For simultaneous code execution, cooperative multitasking is used .

To expand the application server, Lua libraries are available both from the tarantool / rocks repository and collected from the source.

List of standard tarantool modules:

  • box - access to the DBMS
  • clock - system time
  • crypto - cryptographic functions
  • csv - work with CSV data format
  • digest - string hashing
  • errno - access to the system error variable * nix
  • fiber - multithreading and synchronization tools
  • fio - work with the file system, input / output
  • fun - functional programming
  • iconv - work with text in different encodings
  • json - working with JSON data format
  • log - event logging
  • msgpack - work with MsgPack data format
  • net.box - tarantool communication module between each other
  • os - a small part of the basic commands of the operating system
  • pickle - serialize / deserialize Lua structures
  • socket - work with the network
  • string - utilities for working with strings
  • tap - unit testing framework
  • uuid - work with UUID
  • uri - work with uri format
  • yaml - work with YAML data format

Modules available from the tarantool / rocks repository:

  • vshard - sharding and data replication for horizontal scaling of a service
  • avro-schema - validation and transformation of complex data structures
  • date - date and time manipulation
  • ldecnumber - decimal floating point arithmetic (e.g. monetary)

History

Mail.ru , a large Internet company in Russia, started the project in 2008 with an investment and a search for programmers. A former technical director from MySQL was hired as a project manager .

Tarantool has become part of the Mail.ru portal itself and is now used for dynamic content: user sessions, instant messaging, and more, and is also used as a caching layer for traditional relational databases such as MySQL or PostgreSQL . [one]

In 2014, Tarantool was also hosted by the Badoo and Odnoklassniki social networks. [2]

In June 2014, researchers from the Polytechnic Institute of Coimbra and the University of Coimbra (Portugal) conducted the first official independent test of the performance of NoSQL systems, which included Tarantool as well. The tests used the standard YCSB test , and Tarantool competed with other NoSQL systems: Cassandra , HBase , Oracle NoSQL ( English ), Redis , Voldemort ( English ), Scalaris , Elasticsearch , MongoDB and OrientDB . [3]

In 2018, the developer and founder of the Tarantool project, Konstantin Osipov, became the winner of the HighLoad ++ Awards . [4] In September 2019, he left the project team at Mail.ru, creating his own development branch. [5]

Notes

  1. ↑ NoSQL matters Cologne 2013 Day2 Track3 05 Konstantin Osipov
  2. ↑ Tarantool in Badoo: Keeping your browsing history. Report by Anton Povarov at Tarantool Meetup
  3. ↑ http://airccse.org/journal/ijdms/papers/6314ijdms01.pdf
  4. ↑ HighLoad ++ Awards: an award that was deployed, deployed, and finally deployed (Russian) . habr.com. Date of treatment December 10, 2018.
  5. ↑ Tarantool fork

Links

  • Official site
  • List of Existing Customers for Tarantool
  • Tarantool on Github
  • What makes Tarantool so optimal
Source - https://ru.wikipedia.org/w/index.php?title=Tarantool&oldid=102719445


More articles:

  • Geigan, Simon
  • Phoenix (cruising ship)
  • Banaitis, Salyamonas
  • Persistent personality change after a mental illness
  • Akperov, Rovshan Telman oglu
  • Banaitis, Casimeras Victoras
  • Bulun Bazhy
  • Mokhovoe (Kromsk district)
  • PSR B1257 + 12 A
  • Mayma

All articles

Clever Geek | 2019