ArticleslgStudy

computer science

Tarantool

Tarantool is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Tarantool rather than just read about it. In short: Tarantool is an in-memory computing platform with a flexible data schema, best used for creating high-performance applications. Two main parts of it are an in-memory database and a Lua application server.

Key takeaways

  • Tarantool belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Tarantool to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Tarantool from memory before moving on to harder problems.

Reference excerpt

Tarantool is an in-memory computing platform with a flexible data schema, best used for creating high-performance applications. Two main parts of it are an in-memory database and a Lua application server. Tarantool maintains data in memory and ensures crash resistance with write-ahead logging and snapshotting. It includes a Lua interpreter and interactive console, but also accepts connections from programs in several other languages.

History Mail.Ru, one of the largest Internet companies in Russia, started the project in 2008 as part of the development of Moy Mir (My World) social network. In 2010 for a project head it hired a former technical lead from MySQL. Open-source contributors have been active especially in the area of external-language connectors for C, Golang, Perl, PHP, Python, Ruby, and node.js. Tarantool became part of the Mail.Ru backbone, used for dynamic content such as user sessions, unsent instant messages, task queues, and a caching layer for traditional relational databases such as MySQL or PostgreSQL.

By 2014 Tarantool had also been adopted by the social network services Badoo and Odnoklassniki (the latter is affiliated with Mail.Ru since 2010).

Properties All data is maintained in memory (RAM), with data persistence ensured by write-ahead logging and snapshotting, and for those reasons some industry observers have compared Tarantool to Membase. Replication is asynchronous and failover (getting one Tarantool server to take over from another) is possible either from a replica server or from a "hot standby" server. There are no locks. Tarantool uses Lua-style coroutines and asynchronous I/O. The result is that application programs or stored procedures must be written with cooperative multitasking in mind, rather than the more popular preemptive multitasking. For database storage the basic unit is a tuple. Tuples in tuple sets handle the same role as rows in tables for relational databases. Tuples have an arbitrary number of fields, and fields do not need names. Every tuple in a database has one (unique not null) primary key and one or more secondary keys, which are enabled for immediate lookup via indexes. Supported index types are B-tree, hash, bitmap, and R-tree (spatial). Fields in a tuple are type-agnostic or can have specific numeric or string data types. Users may insert, update, delete, or select if they have been granted appropriate privileges. In 2017 Tarantool introduced an optional on-disk storage engine which allows databases larger than memory size. In 2019 Tarantool introduced an optional SQL interface which complies with most of the mandatory features of the official SQL standard.

Distribution Tarantool comes as part of the official distributions for some Linux distros such as Debian, Fedora or Ubuntu. The Tarantool organization also supplies downloads for other Linux distributions, OS X, and FreeBSD. Tarantool can be extended with modules installed using LuaRocks, and it includes its own selection of extension rocks.

References

External links Official website

Worked examples

Example 1 — a first encounter with Tarantool

Start with the simplest possible case. Write down what Tarantool claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Tarantool before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Tarantool ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Tarantool

In research
Tarantool appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Tarantool in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Tarantool is common in secondary-school and first-year university syllabi. It links to neighbouring topics Distributed computing architecture, Free database management systems, Lua (programming language)-scriptable software, so understanding it makes those chapters shorter.
In everyday life
Look for Tarantool outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Tarantool” →

How to study Tarantool in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Tarantool means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Tarantool out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Tarantool in simple terms?

Tarantool is an in-memory computing platform with a flexible data schema, best used for creating high-performance applications. Two main parts of it are an in-memory database and a Lua application server.

Why does Tarantool matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Tarantool?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Tarantool.

Tags

  • Distributed computing architecture
  • Free database management systems
  • Lua (programming language)-scriptable software
  • NoSQL
  • NoSQL products
  • Software using the BSD license

Keep exploring