From 1fc4552531cf4df655a69ccdc31093efcdc97a18 Mon Sep 17 00:00:00 2001 From: Konstantin Osipov <kostja@tarantool.org> Date: Sat, 4 May 2013 18:34:10 +0400 Subject: [PATCH] Update the introduction page. --- doc/user/preface.xml | 107 ++++++++++++--------- doc/www-data.in/intro | 212 ++++++++++++++++++++++++++++++++++-------- 2 files changed, 238 insertions(+), 81 deletions(-) diff --git a/doc/user/preface.xml b/doc/user/preface.xml index a42133d4a9..9df3db6548 100644 --- a/doc/user/preface.xml +++ b/doc/user/preface.xml @@ -8,33 +8,32 @@ <section xml:id="preface"> <title>Tarantool/Box: an overview</title> <para> - <productname>Tarantool/Box</productname>, or simply - <productname>Tarantool</productname>, - is a high performance NoSQL database. The code is - available for free under the terms of <citetitle + <productname>Tarantool/Box</productname> is an in-memory NoSQL + database. The code is available for free under the terms of + <citetitle xlink:href="http://www.gnu.org/licenses/license-list.html#ModifiedBSD">BSD - license</citetitle>. Supported platforms are GNU/Linux, Mac OS and - FreeBSD. + license</citetitle>. Supported platforms are GNU/Linux, Mac OS + and FreeBSD. </para> <para> The server <emphasis role="strong">maintains all its data in - random-access memory</emphasis>, and therefore can handle read - requests blazingly fast. At the same time, a copy of the data + random-access memory</emphasis>, and therefore has very low read + latency. At the same time, a copy of the data is kept on non-volatile storage (a disk drive), and inserts and updates are performed atomically. </para> <para> To ensure atomicity, consistency and crash-safety of the - persistent copy, a write-ahead - log (WAL) is maintained, and each change is recorded - in the WAL before it is considered complete. + persistent copy, a write-ahead log (WAL) is maintained, and + each change is recorded in the WAL before it is considered + complete. The logging subsystem supports group commit. </para> <para> - If the update and delete rate is high, a constantly growing + If update and delete rate is high, a constantly growing write-ahead log file (or files) can pose a disk space problem, and significantly increase time necessary to restart from disk. A simple solution is employed: the server <emphasis @@ -48,55 +47,77 @@ </para> <para> - Tarantool supports replication. Replicas may run locally or - on a remote host. Tarantool replication - is asynchronous and does not block writes to the - master. When or if the master becomes unavailable, the replica - can be switched to assume the role of the master. + <emphasis role="strong">Tarantool is lock-free</emphasis>. + Instead of the operating system's concurrency primitives, such + as threads and mutexes, Tarantool uses a cooperative + multitasking environment to simultaneously operate on + thousands of connections. A fixed number of independent + execution threads within the server do not share state, but + exchange data using low overhead message queues. While this + approach limits server scalability to a few CPU cores, + it removes competition for the memory bus and sets + the scalability limit to the top of memory and network + throughput. CPU utilization of a typical highly-loaded + Tarantool server is under 10%. </para> <para> - <emphasis role="strong">Tarantool is lock-free</emphasis>. - Instead of the underlying operating system's concurrency - primitives, Tarantool uses a cooperative multitasking environment - to simultaneously operate on thousands of connections. While - this approach limits server scalability to a single CPU core, in - practice it removes competition for the memory bus and sets the - scalability limit to the top of memory and network throughput. - CPU utilization of a typical highly-loaded Tarantool server is - under 10%. + Unlike most of NoSQL databases, Tarantool supports primary, + <emphasis role="strong"> secondary keys, multi-part + keys</emphasis>, HASH, TREE and BITSET index types. </para> <para> - The key feature of Tarantool is <emphasis role="strong">support - for stored procedures</emphasis>, which - can access and modify data atomically. With stored procedures, - it's possible to turn Tarantool into a highly - flexible and extremely fast social web application server. + The key feature of Tarantool is <emphasis + role="strong">support for Lua stored procedures</emphasis>, which + can access and modify data atomically. + Procedures can be created, modified and dropped at runtime. + </para> + <para> + Use of Lua as an extension language does not end with stored + procedures: Lua programs can be used during startup, to define + triggers and background tasks, interact with networked peers. + Unlike popular application development frameworks implemented + around "reactor" pattern, networking in server-side Lua is + sequential, yet very efficient, as is built on top of the + cooperating multitasking environment used by the server + itself. + </para> + <para> + Extended with Lua, Tarantool/Box typically replaces + more not one but a few existing components with a single + well-performing system, changing and simplifying complex + multi-tier Web application architectures. + </para> + + <para> + Tarantool supports replication. Replicas may run locally or on + a remote host. Tarantool replication is asynchronous and does + not block writes to the master. When or if the master becomes + unavailable, the replica can be switched to assume the role of + the master without server restart. </para> <para> <emphasis role="strong">The software is production-ready</emphasis>. - Tarantool has been developed and is actively used at + Tarantool has been created and is actively used at <citetitle xlink:href="http://api.mail.ru">Mail.Ru</citetitle>, one of the leading Russian web content providers. At Mail.Ru, the software serves the <quote>hottest</quote> data, such as online users and their sessions, online application properties, mapping between users and their serving shards, and so on. + </para> + <para> + Outside Mail.Ru the software is used by a growing + number of projects in online gaming, digital marketing, social + media industries. While product development is sponsored by Mail.Ru, the + roadmap, bugs database and the development process are fully + open. The software incorporates patches from dozens of + community contributors, and most of the programming language drivers + are written and maintained by the community. </para> - <para> - To conclude, Tarantool/Box is ideal for highly volatile and/or - frequently accessed Web data. With Tarantool, performance overhead - on serving data is minimal: a single server can easily deal with - tens or even hundreds of thousands of requests per second. - Snapshots can be made when Web user activity is at its lowest, - for example at night, and thus add little or no restraint on the - top throughput of the system. If the master becomes - unavailable, a replica can assume the role of the master with - minimal downtime. - </para> </section> <section> <title>Conventions</title> diff --git a/doc/www-data.in/intro b/doc/www-data.in/intro index 5e5d72710c..e555505402 100644 --- a/doc/www-data.in/intro +++ b/doc/www-data.in/intro @@ -2,57 +2,193 @@ ## What is Tarantool? -Tarantool/Box, or simply Tarantool, is a high performance NoSQL database. The code is available for free under the terms of <em><a href="http://www.gnu.org/licenses/license-list.html#ModifiedBSD">BSD license</a></em>. Supported platforms are GNU/Linux, Mac OS and FreeBSD. +Tarantool/Box is an in-memory NoSQL +database. The code is available for free under the terms of +<em class="citetitle"><a class="citetitle" href="http://www.gnu.org/licenses/license-list.html#ModifiedBSD" target="_top">BSD +license</a></em>. Supported platforms are GNU/Linux, Mac OS +and FreeBSD. ## An overview of the architecture -The server <span class="strong"><strong>maintains all data in random-access memory</strong></span>, and therefore can handle read requests blazingly fast. At the same time, a copy of the data is kept on non-volatile storage (a disk drive), and inserts and updates are performed atomically. - -To ensure atomicity, consistency and crash-safety of the persistent copy, a write-ahead log (WAL) is maintained, and each change is recorded in the WAL before it is considered complete. - -If update and delete rate is high, a constantly growing write-ahead log file (or files) can pose a disk space problem, and significantly increase time necessary to restart from disk. A simple solution is employed: the server <span class="strong"><strong>can be requested to save a concise snapshot</strong></span> of its current data. The underlying operating system's <span class="quote">“<span class="quote">copy-on-write</span>”</span> feature is employed to take the snapshot in a quick, resource-savvy and non-blocking manner. The <span class="quote">“<span class="quote">copy-on-write</span>”</span> technique guarantees that snapshotting has minimal impact on server performance. - -<span class="strong"><strong>Tarantool is lock-free</strong></span>. Instead of the underlying operating system's concurrency primitives, Tarantool uses cooperative multitasking environment to simultaneously operate on thousands of connections. While this approach limits server scalability to few CPU cores, in practice it removes competition for the memory bus and sets the scalability limit to the top of memory and network throughput. CPU utilization of a typical highly-loaded Tarantool server is under 10%. - -## Main features - -A key feature of Tarantool is support for stored procedures, which can -access and modify data atomically. Procedures can be created, modified, -dropped at runtime. With stored procedures, it's possible to -turn Tarantool into a highly flexible and extremely fast social web -application server. - -Tarantool supports replication. Replicas may run locally or on a remote host. Tarantool replication is asynchronous and does not block writes to the master. When or if the master becomes unavailable, the replica can be switched to assume the role of the master. +The server <span class="strong"><strong>maintains all its data in +random-access memory</strong></span>, and therefore has very low read +latency. At the same time, a copy of the data +is kept on non-volatile storage (a disk drive), and inserts +and updates are performed atomically. + +To ensure atomicity, consistency and crash-safety of the +persistent copy, a write-ahead log (WAL) is maintained, and +each change is recorded in the WAL before it is considered +complete. The logging subsystem supports group commit. + +If update and delete rate is high, a constantly growing write-ahead log file +(or files) can pose a disk space problem, and significantly increase time +necessary to restart from disk. A simple solution is employed: the server +<span class="strong"><strong>can be requested to save a concise +snapshot</strong></span> of its current data. The underlying operating +system's <span class="quote">“<span +class="quote">copy-on-write</span>”</span> feature is employed to take +the snapshot in a quick, resource-savvy and non-blocking manner. The <span +class="quote">“<span class="quote">copy-on-write</span>”</span> +technique guarantees that snapshotting has minimal impact on server +performance. + +<span class="strong"><strong>Tarantool is lock-free</strong></span>. +Instead of the operating system's concurrency primitives, such +as threads and mutexes, Tarantool uses a cooperative +multitasking environment to simultaneously operate on +thousands of connections. A fixed number of independent +execution threads within the server do not share state, but +exchange data using low overhead message queues. While this +approach limits server scalability to a few CPU cores, +it removes competition for the memory bus and sets +the scalability limit to the top of memory and network +throughput. CPU utilization of a typical highly-loaded +Tarantool server is under 10%. + +## Key features + +Unlike most of NoSQL databases, Tarantool supports primary, <span +class="strong"><strong> secondary keys, multi-part keys</strong></span>, +HASH, TREE and BITSET index types. + +Tarantool supports <span class="strong"><strong>Lua stored +procedures</strong></span>, which can access and modify data atomically. +Procedures can be created, modified and dropped at runtime. + +Use of Lua as an extension language does not end with stored +procedures: Lua programs can be used during startup, to define +triggers and background tasks, interact with networked peers. +Unlike popular application development frameworks implemented +around "reactor" pattern, networking in server-side Lua is +sequential, yet very efficient, as is built on top of the +cooperating multitasking environment used by the server +itself. + +Extended with Lua, Tarantool/Box typically replaces +more not one but a few existing components with a single +well-performing system, changing and simplifying complex +multi-tier Web application architectures. + +Tarantool supports replication. Replicas may run locally or on +a remote host. Tarantool replication is asynchronous and does +not block writes to the master. When or if the master becomes +unavailable, the replica can be switched to assume the role of +the master without server restart. ## How stable is the software? <span class="strong"><strong>The software is -production-ready</strong></span>. Tarantool has been developed and is -actively used at <em><a href="http://api.mail.ru">Mail.Ru</a></em> one of -the leading Russian web content providers, since 2008. At Mail.Ru, the software serves the <span class="quote">“<span class="quote">hottest</span>”</span> data, such as online users and their sessions, online application properties, the map between users and their serving shards. - -To conclude, Tarantool/Box is ideal for highly volatile and/or highly accessed Web data. With Tarantool, performance overhead on serving data is minimal: a single server can easily deal with tens or even hundreds of thousands of requests per second. Snapshots can be made when Web user activity is at its lowest, for example at night, and thus add little or no restraint on the top throughput of the system. If the master becomes unavailable, a replica can assume the role of the master with minimal downtime. +production-ready</strong></span>. Tarantool has been created and is +actively used at <em class="citetitle"><a class="citetitle" +href="http://api.mail.ru" target="_top">Mail.Ru</a></em>, one of the leading +Russian web content providers. At Mail.Ru, the software serves the <span +class="quote">“<span class="quote">hottest</span>”</span> data, +such as online users and their sessions, online application properties, +mapping between users and their serving shards, and so on. + +Outside Mail.Ru +the software is used by a growing number of projects in online gaming, +digital marketing, social media industries. While product development is +sponsored by Mail.Ru, the roadmap, bugs database and the development process +are fully open. The software incorporates patches from dozens of community +contributors, and most of the programming language drivers are written and +supported by the community. {% page intro ru %} -<b>Tarantool</b> — однопоточный TCP Ñервер, реализующий кооперативную многозадачноÑÑ‚ÑŒ. РазрабатываетÑÑ Ñ ÑƒÑ‡ÐµÑ‚Ð¾Ð¼ работы под выÑокими нагрузками (деÑÑтки Ñ‚Ñ‹ÑÑч RPS). Можно выделить две логичеÑкие ÑоÑтавлÑющие: Ñдро и модули. Ð’ наÑтоÑщее Ð²Ñ€ÐµÐ¼Ñ Ð¿Ð¾Ð´ÐºÐ»ÑŽÑ‡ÐµÐ½Ð¸Ðµ модулей производитÑÑ Ð½Ð° Ñтапе компилÑции. Ðа уровне Ñдра реализуетÑÑ Ð±Ð°Ð·Ð¾Ð²Ñ‹Ð¹ функционал (общение по Ñети, работа Ñ Ð±Ð¸Ð½Ð°Ñ€Ð½Ñ‹Ð¼Ð¸ логами, Ñ€ÐµÐ¿Ð»Ð¸ÐºÐ°Ñ†Ð¸Ñ Ð¿Ð¾ Ñети, быÑтрое переключение на резервный Ñервер и Ñ‚.п.). Ð’ модулÑÑ… реализуетÑÑ Ð±Ð¸Ð·Ð½ÐµÑ Ð»Ð¾Ð³Ð¸ÐºÐ° конкретного Ð¿Ñ€Ð¸Ð»Ð¾Ð¶ÐµÐ½Ð¸Ñ Ñ Ð¸Ñпользованием API Ñдра. +## What is Tarantool? -<b>Tarantool/Box</b> — хранилище данных в памÑти, ключ-значение. +Tarantool/Box is an in-memory NoSQL +database. The code is available for free under the terms of +<em class="citetitle"><a class="citetitle" href="http://www.gnu.org/licenses/license-list.html#ModifiedBSD" target="_top">BSD +license</a></em>. Supported platforms are GNU/Linux, Mac OS +and FreeBSD. -Сервер разрабатывалÑÑ Ð´Ð»Ñ Ð²Ð½ÑƒÑ‚Ñ€ÐµÐ½Ð½Ð¸Ñ… целей в компании Mail.Ru. Ð’ процеÑÑе ÑкÑплуатации ÑиÑтема хорошо зарекомендовала ÑÐµÐ±Ñ Ð¸ была внедрена во многих проектах компании. Ð‘Ð»Ð°Ð³Ð¾Ð´Ð°Ñ€Ñ Ð²Ñ‹Ñокой производительноÑти и надежноÑти ÑиÑтемы в уÑловиÑÑ… больших нагрузок, удалоÑÑŒ повыÑить ÑтабильноÑÑ‚ÑŒ предоÑтавлÑемых ÑервиÑов. ÐŸÐµÑ€Ð²Ð°Ñ Ð²ÐµÑ€ÑÐ¸Ñ Ñервера, Ñтавшего оÑновой Ð´Ð»Ñ Ñ†ÐµÐ»Ð¾Ð³Ð¾ ÑемейÑтва хранилищ, поÑвилаÑÑŒ в 2008 году. Tarantool – переработанный и уÑовершенÑтвованный Ñервер, предназначенный Ð´Ð»Ñ Ð¿Ð¾ÑÑ‚Ñ€Ð¾ÐµÐ½Ð¸Ñ Ñпециализированных хранилищ. Код напиÑан на Ñзыке С и иÑпользует раÑÑˆÐ¸Ñ€ÐµÐ½Ð¸Ñ gcc. +## An overview of the architecture -__ХарактериÑтики__ +The server <span class="strong"><strong>maintains all its data in +random-access memory</strong></span>, and therefore has very low read +latency. At the same time, a copy of the data +is kept on non-volatile storage (a disk drive), and inserts +and updates are performed atomically. + +To ensure atomicity, consistency and crash-safety of the +persistent copy, a write-ahead log (WAL) is maintained, and +each change is recorded in the WAL before it is considered +complete. The logging subsystem supports group commit. + +If update and delete rate is high, a constantly growing write-ahead log file +(or files) can pose a disk space problem, and significantly increase time +necessary to restart from disk. A simple solution is employed: the server +<span class="strong"><strong>can be requested to save a concise +snapshot</strong></span> of its current data. The underlying operating +system's <span class="quote">“<span +class="quote">copy-on-write</span>”</span> feature is employed to take +the snapshot in a quick, resource-savvy and non-blocking manner. The <span +class="quote">“<span class="quote">copy-on-write</span>”</span> +technique guarantees that snapshotting has minimal impact on server +performance. + +<span class="strong"><strong>Tarantool is lock-free</strong></span>. +Instead of the operating system's concurrency primitives, such +as threads and mutexes, Tarantool uses a cooperative +multitasking environment to simultaneously operate on +thousands of connections. A fixed number of independent +execution threads within the server do not share state, but +exchange data using low overhead message queues. While this +approach limits server scalability to a few CPU cores, +it removes competition for the memory bus and sets +the scalability limit to the top of memory and network +throughput. CPU utilization of a typical highly-loaded +Tarantool server is under 10%. + +## Key features + +Unlike most of NoSQL databases, Tarantool supports primary, <span +class="strong"><strong> secondary keys, multi-part keys</strong></span>, +HASH, TREE and BITSET index types. + +Tarantool supports <span class="strong"><strong>Lua stored +procedures</strong></span>, which can access and modify data atomically. +Procedures can be created, modified and dropped at runtime. + +Use of Lua as an extension language does not end with stored +procedures: Lua programs can be used during startup, to define +triggers and background tasks, interact with networked peers. +Unlike popular application development frameworks implemented +around "reactor" pattern, networking in server-side Lua is +sequential, yet very efficient, as is built on top of the +cooperating multitasking environment used by the server +itself. + +Extended with Lua, Tarantool/Box typically replaces +more not one but a few existing components with a single +well-performing system, changing and simplifying complex +multi-tier Web application architectures. + +Tarantool supports replication. Replicas may run locally or on +a remote host. Tarantool replication is asynchronous and does +not block writes to the master. When or if the master becomes +unavailable, the replica can be switched to assume the role of +the master without server restart. -* отÑутÑтвие фрагментации оÑновной памÑти и деградации производительноÑти при работе Ñ Ð¼Ð½Ð¾Ð¶ÐµÑтвом маленьких объектов, Ð±Ð»Ð°Ð³Ð¾Ð´Ð°Ñ€Ñ Ð¸cпользованию ÑобÑтвенных аллокаторов; -* возможноÑÑ‚ÑŒ работы Ñ Ð±Ð¾Ð»ÑŒÑˆÐ¸Ð¼Ð¸ объемами данных; -* наличие файла snapshot, в котором ÑохранÑетÑÑ ÑоÑтоÑние вÑех данных базы на момент запиÑи на диÑк; -* ÑпоÑобноÑÑ‚ÑŒ ÑохранÑÑ‚ÑŒ вÑе Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ ÑоÑтоÑÐ½Ð¸Ñ Ð±Ð°Ð·Ñ‹ данных (логирование транзакций в файлах бинарных логов) и автоматичеÑки воÑÑтанавливать информацию поÑле перезапуÑка ÑиÑтемы; -* выÑÐ¾ÐºÐ°Ñ Ð´Ð¾ÑтупноÑÑ‚ÑŒ ÑиÑтемы (в Ñлучае программных или аппаратных Ñбоев проиÑходит автоматичеÑкое переключение на доÑтупную реплику); -* ÑовмеÑтимоÑÑ‚ÑŒ Ñ Ð¿Ñ€Ð¾Ñ‚Ð¾ÐºÐ¾Ð»Ð¾Ð¼ memcached; -* возможноÑÑ‚ÑŒ обновлÑÑ‚ÑŒ ÑиÑтему незаметно от клиентÑких ÑервиÑов Ñ Ð¿Ð¾Ð¼Ð¾Ñ‰ÑŒÑŽ Ð¿Ñ€Ð¸Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ð»Ð¾ÐºÐ°Ð»ÑŒÐ½Ñ‹Ñ… реплик; -* Ñ€ÐµÐ¿Ð»Ð¸ÐºÐ°Ñ†Ð¸Ñ Ð´Ð°Ð½Ð½Ñ‹Ñ… по Ñети; -* проÑтой бинарный протокол Ð´Ð»Ñ Ñ€ÐµÐ°Ð»Ð¸Ð·Ð°Ñ†Ð¸Ð¸ дополнительной логики; -* СобираетÑÑ Ñ‚Ð¾Ð»ÑŒÐºÐ¾ под gcc и clang; -* ТеÑтировалÑÑ Ñ‚Ð¾Ð»ÑŒÐºÐ¾ под Linux. +## How stable is the software? +<span class="strong"><strong>The software is +production-ready</strong></span>. Tarantool has been created and is +actively used at <em class="citetitle"><a class="citetitle" +href="http://api.mail.ru" target="_top">Mail.Ru</a></em>, one of the leading +Russian web content providers. At Mail.Ru, the software serves the <span +class="quote">“<span class="quote">hottest</span>”</span> data, +such as online users and their sessions, online application properties, +mapping between users and their serving shards, and so on. + +Outside Mail.Ru +the software is used by a growing number of projects in online gaming, +digital marketing, social media industries. While product development is +sponsored by Mail.Ru, the roadmap, bugs database and the development process +are fully open. The software incorporates patches from dozens of community +contributors, and most of the programming language drivers are written and +supported by the community. -- GitLab