diff --git a/doc/user/preface.xml b/doc/user/preface.xml index 29b9f3f26102dd380f63add747911fa2bddc0e7e..a42133d4a95a2b83f70add5981a4e587dd563ad8 100644 --- a/doc/user/preface.xml +++ b/doc/user/preface.xml @@ -10,10 +10,10 @@ <para> <productname>Tarantool/Box</productname>, or simply <productname>Tarantool</productname>, - is a high performance key/value storage server. The code is + is a high performance 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 and + license</citetitle>. Supported platforms are GNU/Linux, Mac OS and FreeBSD. </para> diff --git a/doc/user/tnt-html.xsl b/doc/user/tnt-html.xsl index e1edda21310f5920444787276722d153b1ee8a57..5590edaa559a61279157e1965ad07785a3e8326c 100644 --- a/doc/user/tnt-html.xsl +++ b/doc/user/tnt-html.xsl @@ -28,5 +28,21 @@ })(); </script> + +<!-- Rating@Mail.ru counter --> + + <script type="text/javascript">//<![CDATA[ + (function(w,n,d,r,s){(new Image).src='http://dd.cd.b2.a2.top.mail.ru/counter?id=2284916;js=13'+ + ((r=d.referrer)?';r='+escape(r):'')+((s=w.screen)?';s='+s.width+'*'+s.height:'')+';_='+Math.random();})(window,navigator,document);//]]> + </script> + <noscript> + <img src="http://dd.cd.b2.a2.top.mail.ru/counter?id=2284916;js=na" style="border:0;position:absolute;left:-10000px;" height="1" width="1" alt="" /> + </noscript> + +<!-- //Rating@Mail.ru counter --> + + <div id="header"> + <p class='book'><a id="home_link" href="index.html">Tarantool/Box - Front page</a></p> + </div> </xsl:template> </xsl:stylesheet> diff --git a/doc/user/tnt.css b/doc/user/tnt.css index 8088f9f63954dd4942cd7093504ec8ebd2cf823e..1ec36c0252c91566f20f08e7142a61a31c83a2a6 100644 --- a/doc/user/tnt.css +++ b/doc/user/tnt.css @@ -10,7 +10,6 @@ font-weight: bold; } - .hl-keyword { color: green; font-weight: bold; @@ -20,3 +19,15 @@ color: blue; font-weight: bold; } + +.book { + width: 768px; + margin: 2pt auto; + /*font-family: Verdana, Arial, Helvetica, sans-serif; */ + font-size: 120% +} + +.book h1 { + margin: 80pt auto; + font-size: 150% +} diff --git a/doc/www-data.in/_layout/base b/doc/www-data.in/_layout/base index 567481a9e07b593c60d3af759c9416e58c8b48c4..959681f11f0eb817cfd1848c83c29f5325ee2dbf 100644 --- a/doc/www-data.in/_layout/base +++ b/doc/www-data.in/_layout/base @@ -20,22 +20,15 @@ <div id="content"> {% block content %} <div class="grid"> - <div id="sidebar" class="span_3"> - <div class="clear"></div> - {{ sidebar | langselect }} - </div> - <div id="main" class="span_8"> - {% block prologue %}{% endblock %} - {{ content }} - {% block epilogue %}{% endblock %} - </div> - </div> + {{ content }} + </div> {% endblock content %} </div> <div id="footer"> {% block footer %} - <p>Sponsored by <a href="http://api.mail.ru"><img src="mail-logo.png" alt="Mail.Ru" /></a></p> + <p class='lwrap'>Last modified: {{ date.strftime('%Y-%m-%d') }}</p> + <p class='rwrap'>Sponsored by <a class='imglink' href="http://api.mail.ru"><img src="mail-logo.png" alt="Mail.Ru" /></a></p> {% endblock footer %} </div> diff --git a/doc/www-data.in/_layout/benchmark b/doc/www-data.in/_layout/benchmark index 80cf7ac1510ffcb7b0c24f3d28117d0dcae98337..2e404406bd4ede311ad106d81b08d6c433386427 100644 --- a/doc/www-data.in/_layout/benchmark +++ b/doc/www-data.in/_layout/benchmark @@ -1,2 +1,5 @@ {% extends "base" %} {% set title = "Tarantool/Box: a benchmark" %} +{% block content %} + {{ benchmark | langselect }} +{% endblock content%} diff --git a/doc/www-data.in/_layout/docs b/doc/www-data.in/_layout/docs deleted file mode 100644 index 68623fc1de2b8fd493d94b8098cd1552f0012ae8..0000000000000000000000000000000000000000 --- a/doc/www-data.in/_layout/docs +++ /dev/null @@ -1,2 +0,0 @@ -{% extends "base" %} -{% set title = "Tarantool/Box documentation" %} diff --git a/doc/www-data.in/_layout/faq b/doc/www-data.in/_layout/faq index 7b42d7633d67e701b0f6d81bc844e2a8210f4a67..ab333f25950289a91cfb617b6796f3548ef2b2ba 100644 --- a/doc/www-data.in/_layout/faq +++ b/doc/www-data.in/_layout/faq @@ -1,2 +1,5 @@ {% extends "base" %} {% set title = "Tarantool/Box: Frequently Asked Questions" %} +{% block content %} + {{ faq | langselect }} +{% endblock content%} diff --git a/doc/www-data.in/_layout/home b/doc/www-data.in/_layout/home deleted file mode 100644 index 57cee8c12ec5fe2ebd335c89de6ddcfa9f822a27..0000000000000000000000000000000000000000 --- a/doc/www-data.in/_layout/home +++ /dev/null @@ -1,53 +0,0 @@ -{% extends "base" %} -{% set title = "Tarantool/Box -- an efficient in-memory data store" %} - - {% block content %} - <div id="blurb" class="span_12"> - - <img id="logo" src="logo.png" alt="Tarantool/Box Logo" /> - - {{ blurb | langselect }} - - <div class="clear"></div> - - </div> - - <div class="grid"> - - <div class="lwrap"> - - <div id="blocks"> - - <div id="docs" class="span_4"> - <div class='front_block'> - {{ home_page_learn | langselect }} - </div> - </div> - - <div id="use" class="span_4"> - <div class='front_block'> - {{ home_page_use | langselect }} - </div> - </div> - - <div id="join" class="span_4"> - <div class='front_block'> - {{ home_page_join | langselect }} - </div> - </div> - - <div class="clear"></div> - - </div> - <div class="span_9"> - <div id="news" class='news_block'> - {{ home_page_news | langselect }} - </div> - </div> - - </div> - - <div class="clear"></div> - - </div> <!-- grid --> - {% endblock content%} diff --git a/doc/www-data.in/_layout/index b/doc/www-data.in/_layout/index new file mode 100644 index 0000000000000000000000000000000000000000..9aacf9b2b768ee6892fd64f80aa86d849a6fe269 --- /dev/null +++ b/doc/www-data.in/_layout/index @@ -0,0 +1,26 @@ +{% extends "base" %} +{% set title = "Tarantool/Box -- a transactional NoSQL database" %} + +{% block header %} + <p class='rwrap'><a id="lang_link" href="{{ pagename + lang_ext | langselect | e }}">{{ lang_tag | langselect | e }}</a></p> +{% endblock header %} + +{% block content %} + + <div id="blurb"> + + {{ blurb | langselect }} + + <div class="clear"></div> + + </div> + + {{ tagline | langselect }} + + {{ features | langselect }} + + {{ example | langselect }} + + {{ links | langselect }} + +{% endblock content%} diff --git a/doc/www-data.in/benchmark b/doc/www-data.in/benchmark index 559ec363f4dc3a7e8ddb90de64bbc621be550b13..a75a052cb1c97cfb8e72eedb6b7fa9ff13530de7 100644 --- a/doc/www-data.in/benchmark +++ b/doc/www-data.in/benchmark @@ -1,10 +1,168 @@ {% page benchmark en %} -Coming soon... +{% text benchmark en %} +# Preface -{% page benchmark ru %} +There are lies, then there is statistics, but the first place in +misrepresenting the truth is undoubtedly owned by benchmarks. + +Comparing Tarantool/Box with other systems, apples to apples, is +not strictly correct: the server networking subsystem is fully +asynchronous and it's possible to proxy all clients via a single +socket. In this case, responses to queries are sent as soon they +are ready. Most production application use asynchronous and +batched I/O with Tarantool. + +As long as the overhead of system calls and context switches is +the single largest contributor to the cost of serving a single +request, use of batched and multiplexed I/O produces an order of +magnitude better results, when compared with traditional +multi-threaded workloads. A tool we developed for our own use, +[nosqlbench](http://github.com/mailru/nosqlbench), is utilizing +this approach at full. + +However, to compare with the rest of the world, a standardized +benchmarking kit is more appropriate. This is why Yahoo! Cloud +Serving Benchmark (c) was used to produce the charts +below. A fork of YCSB with Tarantool/Box support is available +[here](https://github.com/bigbes92/YCSB). Since YCSB was developed +to compare cloud key/value servers, it provides a very narrow view +at performance of a tested server. For example, performance of +secondary keys or overhead of locking (which Tarantool/Box doesn't +have) is not tested at all. + +# What is YCSB + +Yahoo! Cloud Serving Benchmark (c) consists of two components: + +- the client, which generates the load according to a workload type +and analyzes latency and throughput, +- workload files, which define a single benchmark by describing +the size of the data set, the total amount of requests, the ratio of +read and write queries. + +There are 6 major workload types in YCSB: + +- workload **A**, 50/50 update/read ratio, size of the data set +is 200 000 key/value pairs, +- workload **B**, 5/95 update/read ratio, the same size of the data set, +- workload **C** is 100% read-only, +- workload **D** 5/95 insert/read ratio, the read load is skewed +towards the end of the key range, +- workload **E**, 5/95 ratio of insert/reads over a range of 10 +records, +- workload **F**, 95% read/modify/write, 5% read. + +For additional information on YCSB and workload types, please visit +[YCSB official page on Github](http://github.com/brianfrankcooper/YCSB). + +All charts below were measured using 1M queries per test, averaged +over 8 consecutive test runs. + +Configuration files for the tested systems can be found +[here](https://github.com/bigbes92/ycsb-expand-db/tree/master/confs) +and [here](https://github.com/bigbes92/ycsb-expand-db/blob/master/lib/mongodb.py). + +## Workload A + +Throughput (more is better): + +<a class="imglink" href="ycsb/A_throughput.svg"> + <img class="ycsb" src="ycsb/A_throughput.svg" alt="Worklod A: throughput"></img> +</a> + +Read latency (less is better): + +<a class="imglink" href="ycsb/A_READ_latency.svg"> + <img class="ycsb" src="ycsb/A_READ_latency.svg" alt="Worklod A: throughput"></img> +</a> + +Update latency (less is better): + +<a class="imglink" href="ycsb/A_UPDATE_latency.svg" > + <img class="ycsb" src="ycsb/A_UPDATE_latency.svg" alt="Worklod A: throughput"></img> +</a> + +## Workload B + +Throughput: + +<a class="imglink" href="ycsb/B_throughput.svg"> + <img class='ycsb' src="ycsb/B_throughput.svg" alt="Worklod B: throughput"></img> +</a> + +Read latency: + +<a class="imglink" href="ycsb/B_READ_latency.svg"> + <img class="ycsb" src="ycsb/B_READ_latency.svg" alt="Worklod B: READ latency"></img> +</a> -Извините, здеÑÑŒ пока ничего нет. +Update latency: +<a class="imglink" href="ycsb/B_UPDATE_latency.svg"> +<img class="ycsb" src="ycsb/B_UPDATE_latency.svg" alt="Worklod B: UPDATE latency"></img> +</a> +## Workload C (read-only) + +Throughput: + +<a class="imglink" href="ycsb/C_throughput.svg" > +<img class="ycsb" src="ycsb/C_throughput.svg" alt="Worklod C: throughput"></img> +</a> + +Read latency: + +<a class="imglink" href="ycsb/C_READ_latency.svg"> + <img class="ycsb" src="ycsb/C_READ_latency.svg" alt="Worklod C: READ latency"></img> +</a> + +## Workload D + +Throughput: + +<a class="imglink" href="ycsb/D_throughput.svg"> + <img class="ycsb" src="ycsb/D_throughput.svg" alt="Worklod D: throughput"></img> +</a> + +INSERT latency: + +<a class="imglink" href="ycsb/D_INSERT_latency.svg"> + <img class="ycsb" src="ycsb/D_INSERT_latency.svg" alt="Worklod D: INSERT latency"></img> +</a> + +READ latency: + +<a class="imglink" href="ycsb/D_READ_latency.svg"> + <img class="ycsb" src="ycsb/D_READ_latency.svg" alt="Worklod D: READ latency"></img> +</a> + +## Workload F + +Throughput: + +<a class="imglink" href="ycsb/F_throughput.svg"> + <img class="ycsb" src="ycsb/F_throughput.svg" alt="Worklod F: throughput"></img> +</a> + +READ latency: + +<a class="imglink" href="ycsb/F_READ_latency.svg"> + <img class="ycsb" src="ycsb/F_READ_latency.svg" alt="Worklod F: READ latency"></img> +</a> + +READ-MODIFY-WRITE latency: + +<a class="imglink" href="ycsb/F_READ-MODIFY-WRITE_latency.svg"> + <img class="ycsb" src="ycsb/F_READ-MODIFY-WRITE_latency.svg" alt="Worklod F: READ-MODIFY-WRITE latency"></img> +</a> + +UPDATE latency: + +<a class="imglink" href="ycsb/F_UPDATE_latency.svg"> + <img class="ycsb" src="ycsb/F_UPDATE_latency.svg" alt="Worklod F: UPDATE latency"></img> +</a> + + +{% page benchmark ru %} diff --git a/doc/www-data.in/docs b/doc/www-data.in/docs deleted file mode 100644 index ce9a84dc9e37235ee16cd99af130cfd86cc3fb83..0000000000000000000000000000000000000000 --- a/doc/www-data.in/docs +++ /dev/null @@ -1,27 +0,0 @@ -{% page docs en %} - -Documentation -============= - -- [Tarnatool/Box User Guide](http://tarantool.org/tarantool_user_guide.html) -- [Tarnatool/Box Developer guide](http://tarantool.org/tarantool_user_guide.html) - -## Where to get more help - -- [discussion list](http://groups.google.com/group/tarantool) -- [developer list](http://lists.launchpad.net/tarantool-developers) - -{% page docs ru %} - -Ð”Ð¾ÐºÑƒÐ¼ÐµÐ½Ñ‚Ð°Ñ†Ð¸Ñ -============ - -ПользовательÑÐºÐ°Ñ Ð´Ð¾ÐºÑƒÐ¼ÐµÐ½Ñ‚Ð°Ñ†Ð¸Ñ Ð½Ð° данный момент -доÑтупна [только на английÑком Ñзыке](tarantool_user_guide.html). - -## Другие иÑточники: - -- [руÑÑкоÑзычный ÑпиÑок раÑÑылки](http://groups.google.com/group/tarantool-ru) -- [ÑÑ‚ÐµÐ½Ð¾Ð³Ñ€Ð°Ñ„Ð¸Ñ Ð´Ð¾ÐºÐ»Ð°Ð´Ð° на Форуме Технологий Mail.Ru](http://habrahabr.ru/company/mailru/blog/136288/) -- [ÑÑ‚Ð°Ñ‚ÑŒÑ Ð½Ð° habrahabr.ru](http://habrahabr.ru/blogs/nosql/133435/) -- [Ð’Ñе материалы habrahabr.ru Ñ Ð¼ÐµÑ‚ÐºÐ¾Ð¹ tarantool](http://habrahabr.ru/tag/tarantool/) diff --git a/doc/www-data.in/download.cmake b/doc/www-data.in/download.cmake index 968cce73f927cbb2baa601df1f927cb8f069597f..5fe64d3a38f70e80f6e0a1713a5932497fe18303 100644 --- a/doc/www-data.in/download.cmake +++ b/doc/www-data.in/download.cmake @@ -1,6 +1,10 @@ {% page download en %} +# All downloads -### How to choose the right version for download +All published releases are available at <a +href="http://tarantool.org/dist">http://tarantool.org/dist</a>. + +# How to choose the right version for download Tarantool/Box uses a 3-digit versioning scheme <major>-<minor>-<patch>. @@ -15,24 +19,24 @@ The current version of the stable branch is **@PACKAGE_VERSION@**. An automatic build system creates, tests and publishes packages for every push into the stable branch. All binary packages contain -symbol information. Additionally, **-debug-** +symbol information. Additionally, **-debug-** packages contain asserts and are compiled without optimization. -#### Source tarball +## Source tarball The latest source archive is <a href="http://tarantool.org/dist/tarantool-@PACKAGE_VERSION@-src.tar.gz">tarantool-@PACKAGE_VERSION@-src.tar.gz</a>. Please consult with README for build instructions on your system. -### Binary downloads +## Binary downloads -To simplify problem analysis and avoid various bugs induced +To simplify problem analysis and avoid various bugs induced by compilation parameters and environment, it is recommended that production systems use the builds provided on this site. -#### RedHat, FreeBSD, Mac OS X +### RedHat, FreeBSD, Mac OS X -<table border=1 title="Download the latest build, @PACKAGE_VERSION@" width=100%> +<table border=1 title="Download the latest build, @PACKAGE_VERSION@" width=100%> <!-- RPM --> @@ -73,7 +77,7 @@ that production systems use the builds provided on this site. <tr> <td> - Binary tarball (<b>.tar.gz</b>) + Binary tarball (<b>.tar.gz</b>) </td> <td align=center> <a href="http://tarantool.org/dist/tarantool-@PACKAGE_VERSION@-linux-i686.tar.gz">32-bit</a> @@ -90,7 +94,7 @@ that production systems use the builds provided on this site. <tr> <td> - Binary tarball (<b>.tar.gz</b>) + Binary tarball (<b>.tar.gz</b>) </td> <td align=center> <a @@ -101,13 +105,13 @@ that production systems use the builds provided on this site. </td> </tr> <th colspan=4>Mac OS X</th> - <tr> + <tr> <td align=center colspan=4>brew install http://tarantool.org/dist/tarantool.rb</td> <tr> </table> -#### Debian GNU/Linux and Ubuntu +### Debian GNU/Linux and Ubuntu We maintain an always up-to-date Debian GNU/Linux and Ubuntu package repository at <a @@ -125,19 +129,23 @@ At the moment the repository contains builds for Debian "Sid", "Squeeze", sudo apt-get update sudo apt-get install tarantool tarantool-client -#### All downloads +# Development branch -An archive of old releases can be found at <a -href="http://tarantool.org/dist">http://tarantool.org/dist</a>. +In the same manner as for [the stable +branch](http://github.com/mailru/tarantool/tree/stable), every push into [the master +branch](http://github.com/mailru/tarantool) is [available +online](http://tarantool.org/dist/master). +The server roadmap is maintained on [Launchpad](http://launchpad.net/tarantool). -#### Connectors +## Connectors -- Perl driver, [MR:Tarantool](http://search.cpan.org/~yuran/MR-Tarantool/) -- An alternative Perl driver implementation, [DR:Tarantool](http://search.cpan.org/~unera/DR-Tarantool-0.22/lib/DR/Tarantool.pm) -- [Ruby driver](https://github.com/mailru/tarantool-ruby) -- Python driver, [hosted at pypi.python.org](http://pypi.python.org/pypi/tarantool) -- PHP driver [https://github.com/mailru/tarantool-php](https://github.com/mailru/tarantool-php) +- Perl driver, [DR:Tarantool](http://search.cpan.org/~unera/DR-Tarantool-0.22/lib/DR/Tarantool.pm) +- Perl driver, alternative implementation: [MR:Tarantool](http://search.cpan.org/~yuran/MR-Tarantool/) - Java driver, [Maven repository](http://dgreenru.github.com/tarantool-java) +- Ruby driver, [http://github.com/mailru/tarantool-ruby](https://github.com/mailru/tarantool-ruby) +- Python driver, [http://pypi.python.org/pypi/tarantool](http://pypi.python.org/pypi/tarantool) +- PHP driver, [https://github.com/mailru/tarantool-php](https://github.com/mailru/tarantool-php) +- C connector [is maintained in the server source tree](https://github.com/mailru/tarantool/blob/master/connector/c) {% page download ru %} @@ -151,30 +159,30 @@ Tarantool/Box иÑпользует Ñтандартную Ñхему нумер Изменение Ñредней цифры ÑвлÑетÑÑ Ð¸Ð½Ð´Ð¸ÐºÐ°Ñ‚Ð¾Ñ€Ð¾Ð¼ неÑовмеÑтимых изменений в Ñервере, таких как изменение протокола, удаление опций командной Ñтроки или конфигурационного файла. -ПоÑледнÑÑ Ñ†Ð¸Ñ„Ñ€Ð° увеличиваетÑÑ Ð¿Ñ€Ð¸ Ñоздании очередного +ПоÑледнÑÑ Ñ†Ð¸Ñ„Ñ€Ð° увеличиваетÑÑ Ð¿Ñ€Ð¸ Ñоздании очередного релиза, направленного на уÑтранение обнаруженных ошибок. -Ð’ конце Ñтроки верÑии также может приÑутÑтвовать git commit id, +Ð’ конце Ñтроки верÑии также может приÑутÑтвовать git commit id, что упрощает определение конкретной верÑии репозиториÑ, иÑпользованной Ð´Ð»Ñ ÑÐ¾Ð·Ð´Ð°Ð½Ð¸Ñ Ñ€ÐµÐ»Ð¸Ð·Ð°. Ð¢ÐµÐºÑƒÑ‰Ð°Ñ ÑÑ‚Ð°Ð±Ð¸Ð»ÑŒÐ½Ð°Ñ Ð²ÐµÑ€ÑÐ¸Ñ **@PACKAGE_VERSION@**. -#### ИÑходный код +#### ИÑходный код Ðрхив .tar.gz Ñ Ð¿Ð¾Ñледний верÑией иÑходного кода доÑтупен по Ñледующей -ÑÑылке: +ÑÑылке: <a href="http://tarantool.org/dist/tarantool-@PACKAGE_VERSION@-src.tar.gz">tarantool-@PACKAGE_VERSION@-src.tar.gz</a>. Файл README.<OS> Ñодержит инÑтрукции по Ñборке из иÑходников. -### Бинарные пакеты +### Бинарные пакеты Ð”Ð»Ñ Ð¸ÑÐ¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ð½Ð¸Ñ Ð² выÑоконагруженных проектах рекомендуютÑÑ Ð¿Ð°ÐºÐµÑ‚Ñ‹, опубликованные на Ñтом Ñайте. #### RedHat, FreeBSD, Mac OS X -<table border=1 title="Download the latest build, @PACKAGE_VERSION@" width=100%> +<table border=1 title="Download the latest build, @PACKAGE_VERSION@" width=100%> <!-- RPM --> @@ -215,7 +223,7 @@ Tarantool/Box иÑпользует Ñтандартную Ñхему нумер <tr> <td> - Binary tarball (<b>.tar.gz</b>) + Binary tarball (<b>.tar.gz</b>) </td> <td align=center> <a href="http://tarantool.org/dist/tarantool-@PACKAGE_VERSION@-linux-i686.tar.gz">32-bit</a> @@ -232,7 +240,7 @@ Tarantool/Box иÑпользует Ñтандартную Ñхему нумер <tr> <td> - Binary tarball (<b>.tar.gz</b>) + Binary tarball (<b>.tar.gz</b>) </td> <td align=center> <a @@ -243,7 +251,7 @@ Tarantool/Box иÑпользует Ñтандартную Ñхему нумер </td> </tr> <th colspan=4>Mac OS X</th> - <tr> + <tr> <td align=center colspan=4>brew install http://tarantool.org/dist/tarantool.rb</td> <tr> @@ -252,7 +260,7 @@ Tarantool/Box иÑпользует Ñтандартную Ñхему нумер #### Debian GNU/Linux and Ubuntu Мы поддерживаем ÑобÑтвенные репозитории .deb пакетов, который -Ñодержит поÑледние верÑии Ñервера и клиентÑких библиотек Ð´Ð»Ñ +Ñодержит поÑледние верÑии Ñервера и клиентÑких библиотек Ð´Ð»Ñ *Debian GNU/Linux* и *Ubuntu*: <a href="http://tarantool.org/dist/debian">http://tarantoo.org/dist/debian</a>, <a href="http://tarantool.org/dist/ubuntu">http://tarantool.org/dist/ubuntu</a>. diff --git a/doc/www-data.in/faq b/doc/www-data.in/faq index dc1de451e6e439fbcc6af7b275dee0b1b4822ffe..867f9a59d548a5ea4175877f68e6ee07f825d159 100644 --- a/doc/www-data.in/faq +++ b/doc/www-data.in/faq @@ -1,4 +1,4 @@ -{% page faq en %} +{% text main en %} ## Frequently Asked Questions @@ -40,42 +40,6 @@ A. It's a prime number which is easy to remember, because 3313, 3301, 313, 13 an A. If the ratio of arena_used to items_used >> 1, that indicates that there is fragmentation accumulated by the slab allocator. Imagine there are a lot of small tuples stored in the system initially, and later on each tuple becomes bigger and doesn't fit into its old slab size. The old slabs are never relinquished by the allocator. Currently this can be solved only by a server restart. -{% page faq ru %} - -**Q. Why Tarantool?** - -A. Tarantool is a result of a long trial and error process within Mail.Ru. It's an Nth generation of a family of custom in-memory data servers, developed for various web applications. Besides, when Tarantool development started (2008) there were no stable and sufficiently functional open source alternative. - -** Q. Why Lua?** - -A. Lua is a ligthweight, fast, extensible multi-paradigm language. Lua also -happens to be very easy to embed. Lua coroutines relate very closely to -Tarantool fibers, and Lua architecture works well with Tarantool internals. -Lua is the first, but, hopefully, not the last stored program language for Tarantool. - -**Q. What's the key advantage of Tarantool?** - -A. Tarantool provides a fairly rich core feature set (HASH and TREE indexes, secondary indexes, composite indexes, -asynchronous replication, hot standby, data durability) along with support for Lua stored procedures. -These two properties make it possible to code fast, atomic and reliable in-memory data servers which handle non-trivial application-specific logic. The win over traditional SQL servers is in performance: low-overhead, lock-free architecture means Tarantool can serve -an order of magnitude more requests per second, on comparable hardware. The win over NoSQL alternatives is in flexibility: Lua allows flexible processing of data stored in a compact, denormalized format. - -**Q. What are your development plans?** - -A. Performance. Better support for transactions. Advanced replication and clustering features. - -**Q. Who is developing Tarantool?** - -A. There is a small engineering team employed by Mail.ru -- check out our commit logs on github. The development is fully open, and Python and PHP drivers are written by Konstantin Cherkasoff and Alexander Kalendarev from community. - -**Q. How serious is Mail.Ru about Tarantool?** - -A. Tarantool is an open source project, distributed under a BSD license, and as such does not depend on any one sponsor. However, it is currently and integral part of Mail.Ru backbone, so it gets a lot of support from Mail.ru. - -**Q. Why is Tarantool primary port number 33013?** - -A. It's a prime number which is easy to remember, because 3313, 3301, 313, 13 and 3 are also prime numbers. - -**Q. My arena_used/items_used in SHOW SLAB output is >> 1. What does it mean and what should I do?** +{% page faq en %} -A. If the ratio of arena_used to items_used >> 1, that indicates that there is fragmentation accumulated by the slab allocator. Imagine there are a lot of small tuples stored in the system initially, and later on each tuple becomes bigger and doesn't fit into its old slab size. The old slabs are never relinquished by the allocator. Currently this can be solved only by a server restart. +{% page faq ru %} diff --git a/doc/www-data.in/index b/doc/www-data.in/index index 4b06cd64fd2c5e90b2e98fced9fb97a90624164c..1dd7804a6a3a34d385bfab2c9621a3b7325d7370 100644 --- a/doc/www-data.in/index +++ b/doc/www-data.in/index @@ -1,119 +1,69 @@ +{% page index en %} + {% text blurb en %} -# Tarantool/Box - an efficient in-memory data store -##Tarantool is an extensible, persistent, transactional database, designed to store the most volatile and highly accessible web data. +# Tarantool/Box +## A transactional NoSQL database +###[Overview](intro.html) [Documentation](tarantool_user_guide.html) [Download](download.html) {% text blurb ru %} -# Tarantool/Box - NoSQL СУБД Ð´Ð»Ñ Ð²Ñ‹Ñокой нагрузки -## Tarantool - раÑширÑемаÑ, Ñ‚Ñ€Ð°Ð½Ð·Ð°ÐºÑ†Ð¸Ð¾Ð½Ð½Ð°Ñ Ð¡Ð£Ð‘Ð” Ð´Ð»Ñ Ñ…Ñ€Ð°Ð½ÐµÐ½Ð¸Ñ Ð½Ð°Ð¸Ð±Ð¾Ð»ÐµÐµ запрашиваемых и чаÑто менÑющихÑÑ Ð´Ð°Ð½Ð½Ñ‹Ñ…. - -{% text home_page_news en %} - -What's new -========== -2012-10-20: Tarantool 1.4.8 is out, more raw performance and features - -2012-07-10: Tarantool 1.4.7 is out, ported to Mac OS X - -2012-05-09: Tarantool 1.4.6 is out, featuring multipart primary keys - -2012-04-08: Tarantool 1.4.5, next stable version of 1.4 branch. - -2012-02-18: <a href="http://tarantool.org">http://tarantool.org</a> gets a new look! - -2011-10-07: Tarantool 1.4.3, stable version of 1.4 branch. - -2011-08-25: Tarantool 1.4.2, featuring Lua stored prcoedures, is out. - -2011-06-05: <a href="http://tarantool.org/tarantool_user_guide.html">Tarantool User Guide</a> is published. - -2011-05-14: <a href="http://launchpad.net/tarantool/1.3/1.3.5/+download/tarantool-1.3.5-src.tar.gz">tarantool-1.3.5</a> (stable) is out. - -{% text home_page_news ru %} - -ÐовоÑти -======= -2012-10-20: Очередной релиз ветки 1.4: Tarantool 1.4.8 - -2012-07-10: Tarantool 1.4.7 is out, Ñ Ð¿Ð¾Ð´Ð´ÐµÑ€Ð¶ÐºÐ¾Ð¹ Mac OS X - -2012-05-09: Tarantool 1.4.6 добавлÑет поддержку первичных ключей по неÑкольким полÑм - -2012-04-08: Tarantool 1.4.5, Ð½Ð¾Ð²Ð°Ñ ÑÑ‚Ð°Ð±Ð¸Ð»ÑŒÐ½Ð°Ñ Ð²ÐµÑ€ÑÐ¸Ñ Ð²ÐµÑ‚ÐºÐ¸ 1.4. - -2012-02-18: Ðовый дизайн <a href="http://tarantool.org">http://tarantool.org</a> - -2011-10-07: Tarantool 1.4.3, stable version of 1.4 branch. - -2011-08-25: Tarantool 1.4.2, featuring Lua stored prcoedures, is out. - -2011-06-05: <a href="http://tarantool.org/tarantool_user_guide.html">Tarantool User Guide</a> is published. - -2011-05-14: <a href="http://launchpad.net/tarantool/1.3/1.3.5/+download/tarantool-1.3.5-src.tar.gz">tarantool-1.3.5</a> (stable) is out. - -{% text home_page_learn en %} +# Tarantool/Box +## NoSQL СУБД Ð´Ð»Ñ Ð²Ñ‹Ñокой нагрузки +###[Введение](intro.html) [ДокументациÑ](tarantool_user_guide.html) [Скачать](download.html) -Learn more -===================== +{% text tagline en %} -- [Introduction](intro.html) -- [Frequently Asked Questions](faq.html) -- [A benchmark](benchmark.html) +# Introduction -{% text home_page_learn ru %} +Tarantool/Box is an in-memory database designed to store the most volatile +and highly accessible web content. Tarantool/Box has been extensively used +in production since 2009. It's **open source**, BSD licensed. -Узнать больше -======================== +{% text tagline ru %} -- [Обзор](intro.ru.html) -- [ЧаÑто задаваемые вопроÑÑ‹](faq.ru.html) -- [Доклад на TechForum.Mail.Ru](http://habrahabr.ru/company/mailru/blog/136288/) +## Что такое Tarantool/Box? -{% text home_page_use en %} +Tarantool/Box - раÑширÑемаÑ, Ñ‚Ñ€Ð°Ð½Ð·Ð°ÐºÑ†Ð¸Ð¾Ð½Ð½Ð°Ñ Ð¡Ð£Ð‘Ð” Ð´Ð»Ñ Ñ…Ñ€Ð°Ð½ÐµÐ½Ð¸Ñ Ð½Ð°Ð¸Ð±Ð¾Ð»ÐµÐµ +запрашиваемых и чаÑто менÑющихÑÑ Ð´Ð°Ð½Ð½Ñ‹Ñ…. -Use Tarantool -============ -- <p id="download"><a id="current_download" href="download.html">Download Tarantool</a></p> -- [Read the User Guide](tarantool_user_guide.html) -- [Browse a stored procedures archive](http://github.com/mailru/tntlua) -- [Join the mailing list](http://groups.google.com/group/tarantool/subscribe) -- [Report a bug](https://bugs.launchpad.net/tarantool/+filebug) -- [View features and milestones](https://launchpad.net/tarantool) +{% text features en %} -{% text home_page_use ru %} +# Features -ИÑпользовать Tarantool -====================== +- [lowest CPU and RAM overhead](benchmark.html) to store or serve a +piece of content, +- optional Write Ahead Logging for persistency and reliability, +- universal data access with [rich Lua stored +procedures](http://github.com/mailru/tntlua), which can exchange messages +between each other or networked peers, +- asynchronous master-slave replication and hot backup. -- <p id="download"><a id="current_download" href="download.ru.html">Скачать Tarantool</a></p> -- [РуководÑтво пользователÑ](tarantool_user_guide.html) -- [Ðрхив процедур на Lua](http://github.com/mailru/tntlua) -- [СпиÑок раÑÑылки](http://groups.google.com/group/tarantool-ru) -- [Сообщить об ошибке](https://bugs.launchpad.net/tarantool/+filebug) +{% text example en %} -{% text home_page_join en %} +# Get started -Get Involved -============ +<pre class="example"> +# apt-get install tarantool tarantool-client +# cd /etc/tarantool +# cp instances.available/example.cfg instances.enabled/fqueue.cfg +# cd /usr/share/tarantool/lua +# wget http://github.com/mailru/tntlua/raw/master/fqueue.lua -O init.lua +# service tarantool start +tarantool: Staring instances + Starting 'fqueue' ... ok +</pre> -- [Browse Git source](https://github.com/mailru/tarantool) -- [Read the Developer Guide](tarantool_developer_guide.html) -- [IRC chat with developers](http://webchat.freenode.net/?channels=tarantool) -- [Developer list archives](https://lists.launchpad.net/tarantool-developers/) -- [Help improve our Wiki](http://github.com/mailru/tarantool/wiki) +A fast and customizable message queue server is up and running. -{% text home_page_join ru %} +{% text links en %} -УчаÑтвовать в проекте -===================== +# Learn more -- [ИÑходный код](https://github.com/mailru/tarantool) -- [РуководÑтво разработчика](tarantool_developer_guide.html) -- [IRC чат](http://webchat.freenode.net/?channels=tarantool) -- [СпиÑок раÑÑылки](https://lists.launchpad.net/tarantool-developers/) -- [Пополнить Вики](http://github.com/mailru/tarantool/wiki) +- [YCSB benchmark results](benchmark.html) +- [FAQ](faq.html) +- [GitHub source](http://github.com/mailru/tarantool) +- [Lua library]( http://github.com/mailru/tntlua) -{% page home en %} -{% page home ru %} +{% page index ru %} diff --git a/doc/www-data.in/intro b/doc/www-data.in/intro index f49c7cb1a9a450f8848c1b03ef21db9d7c1647d5..5e5d72710ca6a1dc8f61a2de1c3fc6532f38260b 100644 --- a/doc/www-data.in/intro +++ b/doc/www-data.in/intro @@ -2,17 +2,17 @@ ## What is Tarantool? -Tarantool/Box, or simply Tarantool, is a high performance key/value storage server. 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 and FreeBSD. +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. ## An overview of the architecture -The server <span class="strong"><strong>maintains all its 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. +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 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%. +<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 @@ -52,7 +52,7 @@ __ХарактериÑтики__ * возможноÑÑ‚ÑŒ обновлÑÑ‚ÑŒ ÑиÑтему незаметно от клиентÑких ÑервиÑов Ñ Ð¿Ð¾Ð¼Ð¾Ñ‰ÑŒÑŽ Ð¿Ñ€Ð¸Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ð»Ð¾ÐºÐ°Ð»ÑŒÐ½Ñ‹Ñ… реплик; * Ñ€ÐµÐ¿Ð»Ð¸ÐºÐ°Ñ†Ð¸Ñ Ð´Ð°Ð½Ð½Ñ‹Ñ… по Ñети; * проÑтой бинарный протокол Ð´Ð»Ñ Ñ€ÐµÐ°Ð»Ð¸Ð·Ð°Ñ†Ð¸Ð¸ дополнительной логики; -* СобираетÑÑ Ñ‚Ð¾Ð»ÑŒÐºÐ¾ под gcc; +* СобираетÑÑ Ñ‚Ð¾Ð»ÑŒÐºÐ¾ под gcc и clang; * ТеÑтировалÑÑ Ñ‚Ð¾Ð»ÑŒÐºÐ¾ под Linux. diff --git a/doc/www-data.in/sidebar b/doc/www-data.in/sidebar deleted file mode 100644 index 41fc0ca284c7d3d6e4f82a7d3ad5343a1bfe9c03..0000000000000000000000000000000000000000 --- a/doc/www-data.in/sidebar +++ /dev/null @@ -1,43 +0,0 @@ -{% text sidebar en %} - -* [Documentation](docs.html) - * [Introduction](intro.html) - * [Benchmark](benchmark.html) - * [User Guide](tarantool_user_guide.html) - * [FAQ](faq.html) - * [Developer guide](tarantool_developer_guide.html) -* [Github resources](http://github.com/mailru/tarantool) - * [Git source](https://github.com/mailru/tarantool) - * [Wiki](http://github.com/mailru/tarantool/wiki) - * [Lua code](http://github.com/mailru/tntlua) -* [Launchpad resources](http://launchpad.net/tarantool) - * [Bug Database](https://bugs.launchpad.net/tarantool) - * [Open tasks](https://blueprints.launchpad.net/tarantool) - * [Mailinng list](https://lists.launchpad.net/tarantool-developers/) -* Other - * [User group](http://groups.google.com/group/tarantool) - * [IRC chat](http://webchat.freenode.net/?channels=tarantool) - * [Latest build](download.html) - * [All downloads](http://tarantool.org/dist) - -{% text sidebar ru %} - -* [ДокументациÑ](docs.ru.html) - * [Введение](intro.ru.html) - * [Бенчмарк](benchmark.ru.html) - * [РуководÑтво пользователÑ](tarantool_user_guide.html) - * [ЧÐВО](faq.ru.html) - * [РуководÑтво разработчика](tarantool_developer_guide.html) -* [РеÑурÑÑ‹ Github](http://github.com/mailru/tarantool) - * [ИÑходный код](https://github.com/mailru/tarantool) - * [Вики](http://github.com/mailru/tarantool/wiki) - * [Lua примеры](http://github.com/mailru/tntlua) -* [РеÑурÑÑ‹ Launchpad](http://launchpad.net/tarantool) - * [База дефектов](https://bugs.launchpad.net/tarantool) - * [База задач](https://blueprints.launchpad.net/tarantool) - * [СпиÑок раÑÑылки](https://lists.launchpad.net/tarantool-developers/) -* Другое - * [Группа пользователей](http://groups.google.com/group/tarantool-ru) - * [IRC чат](http://webchat.freenode.net/?channels=tarantool) - * [ПоÑледний релиз](download.ru.html) - * [Ð’Ñе релизы](http://tarantool.org/dist) diff --git a/doc/www-data/global.css b/doc/www-data/global.css index d7b10f77eaa766b45f6c443ddccb26667c3e9e10..a2a3782ea49d270a9837183c3944657b81bb5331 100644 --- a/doc/www-data/global.css +++ b/doc/www-data/global.css @@ -13,7 +13,7 @@ */ html { - font-size: 100%; /* 1 */ + font-size: 120%; /* 1 */ overflow-y: scroll; /* 2 */ -webkit-text-size-adjust: 100%; /* 3 */ -ms-text-size-adjust: 100%; /* 3 */ @@ -30,6 +30,9 @@ body { /* ============================================================================= Links ========================================================================== */ +a { + color: #201e9e; +} /* * Addresses outline displayed oddly in Chrome @@ -44,10 +47,29 @@ a:focus { * people.opera.com/patrickl/experiments/keyboard/test */ -a:hover, a:active { +a:active { outline: 0; } +a:hover { + outline: 0; + background-color: rgba(0,0,0,0.1); + -moz-box-shadow: 0 1px 3px rgba(0,0,0,0.3); + -webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.3); + box-shadow: 0 1px 3px rgba(0,0,0,0.3); +} + +a.imglink:hover { + border : 0; + background-color: inherit; + -moz-box-shadow: none; + -webkit-box-shadow: none; + box-shadow: none; +} + +a:visited { + color: #3f3f3f; +} /* ============================================================================= Typography @@ -81,9 +103,10 @@ blockquote { pre, code, kbd, samp { font-family: monospace, serif; _font-family: 'courier new', monospace; - font-size: 1em; + font-size: 80%; } + /* * Improves readability of pre-formatted text in all browsers */ @@ -92,6 +115,12 @@ pre { white-space: pre; white-space: pre-wrap; word-wrap: break-word; + text-decoration: none; + outline: 0; + background-color: rgba(0,0,0,0.1); + -moz-box-shadow: 0 1px 3px rgba(0,0,0,0.3); + -webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.3); + box-shadow: 0 1px 3px rgba(0,0,0,0.3); } /* @@ -171,6 +200,9 @@ img { -ms-interpolation-mode: bicubic; /* 2 */ } +.ycsb { + width: 768px; +} /* ============================================================================= Tables @@ -196,13 +228,12 @@ table { */ #wrapper { - width: 970px; + width: 768px; margin: 0 auto; padding: 0; } #header, #footer, #content { - width: 970px; margin: 0 auto; padding: 0; overflow: hidden; @@ -212,11 +243,6 @@ table { #header { margin-bottom: 5px; } - -#footer p, #header p { - margin: 0 10px; -} - /* * http://sonspring.com/journal/clearing-floats */ @@ -234,7 +260,7 @@ table { ======================================================================== */ .grid { - width: 940px; + width: 768px; overflow: hidden; margin-left: auto; margin-right: auto; @@ -243,9 +269,6 @@ table { -webkit-border-radius: 3px; border-radius: 3px; - -moz-box-shadow: 0 1px 3px rgba(0,0,0,0.3); - -webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.3); - box-shadow: 0 1px 3px rgba(0,0,0,0.3); clear: both; } @@ -310,13 +333,6 @@ html, body, #wrapper { height: 100%; } -body { - background-color: #eee; - font-size: 80%; - font-family: Verdana, Arial, Helvetica, sans-serif; - line-height: 1.5; -} - #wrapper, #header, #content, #footer { background-color: #fff; } @@ -325,137 +341,32 @@ body { padding-bottom: 5px; } -a { color: #201e9e; } -a:visited { color: #3f3f3f; } - #footer img { vertical-align: middle; } -#logo { - width: 120px; - height: 120px; - float: left; +#footer { + text-align: right; + padding-top: 16px } #blurb { - margin-bottom: 8px; - color: #ffffff; -/* background-color: #00468c; */ - background: url('bg_header.png') repeat-x scroll 50% 0 white; - -moz-border-radius: 3px; - -webkit-border-radius: 3px; - border-radius: 3px; - - -moz-box-shadow: 0 1px 3px rgba(0,0,0,0.3); - -webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.3); - box-shadow: 0 1px 3px rgba(0,0,0,0.3); + margin: 40px auto; } #blurb h1 { - font-size: 1.5em; + font-size: 2em; line-height: 1; + text-align: center; } #blurb h2 { font-size: 1.2em; font-weight: normal; - font-style: italic; line-height: 1; - width: 80%; -} - -.front_block { - /*border: 1px dotted black;*/ - margin-top: 10px; - margin-bottom: 10px; - padding: 0 10px; -} - -.news_block { - /*border: 1px dotted black;*/ - margin-top: 10px; - margin-bottom: 10px; - margin-left: 230px; - margin-right: auto; - padding: 0 10px; -} - -#download a { - color: #ffffff; - text-decoration: none; -} -#download a:visited { - color: #eee; - text-decoration: none; -} - -#current_download { - font-size: 110%; - font-weight: bold; - padding: 4px 5px; - background-color: #ffaa00; - -moz-border-radius: 3px; - -webkit-border-radius: 3px; - border-radius: 3px; - - -moz-box-shadow: 0 1px 3px rgba(0,0,0,0.3); - -webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.3); - box-shadow: 0 1px 3px rgba(0,0,0,0.3); -} - -#content_cap { - color: #ffffff; - background-color: #00468c; -} - -#content_cap #logo { - width: 65px; - height: 65px; -} - -/* =========================================================================== - Navigation - ======================================================================= */ - -#nav { - width: 740px; - float: right; - -moz-border-radius: 3px; - -webkit-border-radius: 3px; - border-radius: 3px; - background: url('bg_header.png') repeat-x scroll 50% 0 white; -} - -#nav ul, #nav ol { - list-style: none outside none; - margin: 0 15px; - padding: 0; -} - -#nav ul li { - display: inline-block; -} - -#nav ul li a { - -moz-border-radius: 10px; - -webkit-border-radius: 10px; - border-radius: 10px; - color: #eee; - text-decoration: none; - text-shadow: 0 1px 1px rgba(0,0,0,0.5); - text-transform: uppercase; - font-size: 11px; - font-weight: bold; - line-height: 32px; - padding: 3px 12px; - margin: 0 10px; -} - -#nav ul li.current_download a { - background-color: rgba(0,0,0,0.5) !important; + text-align: center } -#nav ul li a:HOVER { - background-color: rgba(0,0,0,0.25) +#blurb h3 { + text-align: center } diff --git a/scripts/static.py b/scripts/static.py index 2d97f49e52e86962b31b1202b97683699f102009..866bc2716f25a0f0b6d1b608c5f9e90a8da01c76 100755 --- a/scripts/static.py +++ b/scripts/static.py @@ -12,6 +12,7 @@ import argparse import fnmatch import glob import shutil +import datetime default_lang = { @@ -185,13 +186,17 @@ class Scanner(object): def langselect(context, data): if isinstance(data, dict): lang = context['pagelang'] - data = data[lang] + if lang in data: + data = data[lang] + else: + data = data['en'] return data def make_environ(path): env = jinja2.Environment(loader = jinja2.FileSystemLoader(path)) env.filters['langselect'] = langselect + env.globals['date'] = datetime.datetime.today() return env @@ -224,7 +229,7 @@ class PageHandler(BaseHandler): if len(tags) < 2: raise StandardError('missing template name for page entry') layout = tags[1] - lang = tags[2] if tags and len(tags) > 2 else None + lang = tags[2] if tags and len(tags) > 2 else Nil if lang and lang in self.config['languages']: langdesc = self.config['languages'][lang] else: @@ -252,7 +257,7 @@ class TextHandler(BaseHandler): if len(tags) < 2: raise StandardError('missing item name for text entry') item = tags[1] - lang = tags[2] if tags and len(tags) > 2 else None + lang = tags[2] if tags and len(tags) > 2 else 'en' if lang and lang in self.config['languages']: langdesc = self.config['languages'][lang] else: