Tarantool is an open database management system with a non-blocking application server on Lua .
| Tarantool | |
|---|---|
| Type of | NoSQL |
| Author | Mail.ru Group |
| Developer | Mail.ru Group |
| Written on | Si |
| operating system | Linux , FreeBSD , OS X |
| First edition | 2008 |
| Latest version | 2.1.2 (April 5, 2019) |
| License | Simplified BSD |
| Website | tarantool.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 / Compound | type msgpack | type lua | Example |
|---|---|---|---|
| scalar | nil | "Nil" | msgpack.NULL |
| scalar | boolean | "Boolean" | true |
| scalar | string | "String" | "ABC" |
| scalar | integer | "Number" | 12345 |
| scalar | double precision floating point | "Number" | 1.2345 |
| composite | associative array | "Table" with string keys | {"A": 5, "b": 6} |
| composite | an array | "Table" with numeric keys | [1, 2, 3, 4, 5] |
| composite | byte 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
- ↑ NoSQL matters Cologne 2013 Day2 Track3 05 Konstantin Osipov
- ↑ Tarantool in Badoo: Keeping your browsing history. Report by Anton Povarov at Tarantool Meetup
- ↑ http://airccse.org/journal/ijdms/papers/6314ijdms01.pdf
- ↑ HighLoad ++ Awards: an award that was deployed, deployed, and finally deployed . habr.com. Date of treatment December 10, 2018.
- ↑ Tarantool fork