Coder Social home page Coder Social logo

tarantool / doc Goto Github PK

View Code? Open in Web Editor NEW
13.0 30.0 43.0 64.05 MB

Tarantool documentation

Home Page: https://www.tarantool.io/en/doc/

License: Other

CMake 3.17% JavaScript 7.87% CSS 36.54% HTML 1.63% Python 20.28% Makefile 0.09% Shell 1.44% Less 22.37% Jinja 6.61%

doc's Introduction

Tarantool Documentation

Tarantool documentation source, published at https://www.tarantool.io/doc/.

How to build Tarantool documentation using Docker

See Docker

Prepare for work

First of all, pull the image for building the docs.

docker pull tarantool/doc-builder:fat-4.3

Next, initialize a Makefile for your OS:

docker run --rm -it -v $(pwd):/doc tarantool/doc-builder:fat-4.3 sh -c "cmake ."

Update submodules and generate documentation sources from code

A big part of documentation sources comes from several other projects, connected as Git submodules. To include their latest contents in the docs, run these two steps.

  1. Update the submodules:

    git submodule update --init
    git fetch --recurse-submodules
    git submodule update --remote --checkout

    This will initialize Git submodules and update them to the top of the stable branch in each repository.

    git submodule update can sometimes fail, for example, when you have changes in submodules' files. You can reinitialize submodules to fix the problem.

    Caution: all untracked changes in submodules will be lost!

    git submodule deinit -f .
    git submodule update --init

    Note that there's an option to update submodule repositories with a make command. However, it's intended for use in a CI environment and not on a local machine.

    docker run --rm -it -v $(pwd):/doc tarantool/doc-builder:fat-4.3 sh -c "make pull-modules"
  2. Build the submodules content:

    docker run --rm -it -v $(pwd):/doc tarantool/doc-builder:fat-4.3 sh -c "make build-modules"

    This command will do two things:

    1. Generate documentation source files from the source code
    2. Copy these files to the right places under the ./doc/ directory.

    If you're editing submodules locally, repeat this step to view the updated results.

Now you're ready to build and preview the documentation locally.

Build and run the documentation on your machine

When editing the documentation, you can set up a live-reload server. It will build your documentation and serve it on 127.0.0.1:8000. Every time you make changes in the source files, it will rebuild the docs and refresh the browser page.

docker run --rm -it -p 8000:8000 -v $(pwd):/doc tarantool/doc-builder:fat-4.3 sh -c "make autobuild"

First build will take some time. When it's done, open 127.0.0.1:8000 in the browser. Now when you make changes, they will be rebuilt in a few seconds, and the browser tab with preview will reload automatically.

You can also build the docs manually with make html, and then serve them using python3 built-in server:

docker run --rm -it -v $(pwd):/doc tarantool/doc-builder:fat-4.3 sh -c "make html"
docker run --rm -it -v $(pwd):/doc tarantool/doc-builder:fat-4.3 sh -c "make html-ru"
python3 -m http.server --directory output/html

or python2 built-in server:

cd output/html
python -m SimpleHTTPServer

then go to localhost:8000 in your browser.

There are other commands which can run in the tarantool/doc-builder container:

docker run --rm -it -v $(pwd):/doc tarantool/doc-builder:fat-4.3 sh -c "make html"
docker run --rm -it -v $(pwd):/doc tarantool/doc-builder:fat-4.3 sh -c "make html-ru"
docker run --rm -it -v $(pwd):/doc tarantool/doc-builder:fat-4.3 sh -c "make singlehtml"
docker run --rm -it -v $(pwd):/doc tarantool/doc-builder:fat-4.3 sh -c "make singlehtml-ru"
docker run --rm -it -v $(pwd):/doc tarantool/doc-builder:fat-4.3 sh -c "make pdf"
docker run --rm -it -v $(pwd):/doc tarantool/doc-builder:fat-4.3 sh -c "make pdf-ru"
docker run --rm -it -v $(pwd):/doc tarantool/doc-builder:fat-4.3 sh -c "make json"
docker run --rm -it -v $(pwd):/doc tarantool/doc-builder:fat-4.3 sh -c "make json-ru"
docker run --rm -it -v $(pwd):/doc tarantool/doc-builder:fat-4.3 sh -c "make epub"
docker run --rm -it -v $(pwd):/doc tarantool/doc-builder:fat-4.3 sh -c "make epub-ru"
docker run --rm -it -v $(pwd):/doc tarantool/doc-builder:fat-4.3 sh -c "make update-po"

Linkcheck

There's a specific build mode which checks internal and external links instead of producing a document.

docker run --rm -it -v $(pwd):/doc tarantool/doc-builder:fat-4.3 sh -c "make linkcheck"

If you need to save the linkcheck's report in a file, you can use the following trick:

docker run --rm -it -v $(pwd):/doc tarantool/doc-builder:fat-4.3 sh -c "make linkcheck" 2>&1 | tee linkcheck.log

Here 2>&1 redirects the stderr output to stdout, and then tee both shows in on screen and writes to a file.

Vale

Tarantool documentation uses the Vale linter for checking grammar, style, and word usage. Its configuration is placed in the vale.ini file located in the root project directory.

To enable RST support in Vale, you need to install Sphinx. Then, you can enable Vale integration in your IDE, for example:

Localization

Terms:

  • translation unit (TU) is an atomic piece of text which can be translated. A paragraph, a list item, a heading, image's alt-text and so on.
  • translation source files are the files with translation units in English only. They're located in locale/en.
  • translation files are the files which match original text to translated text. They're located in locale/ru.

To update the translation files, run the make update-po task:

docker run --rm -it -v $(pwd):/doc tarantool/doc-builder:fat-4.3 sh -c "make update-po"

Translate the strings in the updated files and then commit the changes.

How to contribute

To contribute to documentation, use the REST format for drafting and submit your updates as a pull request via GitHub.

To comply with the writing and formatting style, use the guidelines provided in the documentation, common sense and existing documents.

Notes:

  • If you suggest creating a new documentation section (a whole new page), it has to be saved to the relevant section at GitHub.
  • If you want to contribute to localizing this documentation (for example, into Russian), add your translation strings to .po files stored in the corresponding locale directory (for example, /locale/ru/LC_MESSAGES/ for Russian). See more about localizing with Sphinx at http://www.sphinx-doc.org/en/stable/intl.html.

doc's People

Contributors

alexandra-mara avatar andreyaksenov avatar art-dr avatar artembo avatar artur-barsegyan avatar bigbes avatar bloomerwd avatar differentialorange avatar kostja avatar lapaevpavel avatar lastochka42 avatar lenkis avatar llelik8 avatar mejedi avatar nickvolynkin avatar onvember avatar p7nov avatar patiencedaur avatar pgulutzan avatar rindblack15 avatar rtsisyk avatar rybakit avatar s-tatus avatar serpentian avatar sofiayem avatar totktonada avatar v-izmalkov avatar vadimpopov avatar veod32 avatar xuniq avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

doc's Issues

More visibility for index data types

Index data types are documented here:

https://tarantool.org/doc/book/box/box_space.html#lua-function.space_object.create_index

Please note the formattng. Not a table, index types are not in bold, in other words - difficult to spot in the manual. Yet this is one of the most basic things people are looking for.

We have a nice table here:
https://tarantool.org/doc/book/box/index.html#data-types
but it doesn't mention index data types. Why not list them there or somewhere nearby?
They should be easy to find, and this is one of the most basic things people are looking at when learning a database.

Disambiguate the description of box.space.select, box.space.index.select

https://tarantool.org/doc/book/box/box_space.html#lua-function.space_object.select

The description does not make it obvious if you  try to understand whether the functions return a single tuple or an array of tuples.

It first says "Search for a tuple or a set of tuples in the given space.". OK, fair enough, but what is the type of return value?

Return:
the tuples whose primary-key fields are equal to the passed field-values.

But then:

Return type:
tuple

The return type is an array of tuples. get{} returns a single tuple, and select{} returns an array.
Let's make it clear in the docs.

Update vinyl terminology in intro

https://tarantool.org/doc/intro.html:

Tarantool's disk-based storage engine is a fusion of ideas from modern filesystems, log-structured merge trees and classical B-trees. All data is organized into runs. Each run is represented by a file on disk. Run size is a configuration option and normally is around 64MB. Each run is a collection of pages, serving different purposes. Pages in a fully merged run contain non-overlapping ranges of keys. A run can be partially merged if there were a lot of changes in its key range recently. In that case some pages represent new keys and values in the run. The disk-based storage engine is append only: new data never overwrites old data. The disk-based storage engine is named vinyl.

We actually use the word "range" now for this. So, s/run/range/ in this paragraph.

On the same token, it's better to move and split this paragraph:

Tarantool supports multi-part index keys. The possible index types are HASH, TREE, BITSET, and RTREE.
To notimply that vinyl supports HASH, BITSET or RTREE.

https://tarantool.org/doc/faq.html: make the link clickable

A:
    Who is developing Tarantool?
There is an engineering team employed by Mail.Ru -- check out our commit logs on github.com/tarantool. The development is fully open. Most of the connectors' authors, and the maintainers for different distributions, come from the wider community.

Document reconnect_after option in net.box:new

With reconnect_after <timeout> option, net.box instance will automatically reconnect any time the connection is broken or if a connection attempt fails. The number of retries is unlimited. Once a connection is explicitly closed (or garbage-collected), reconnects stop.

Assume application maintains a connection to server X. With reconnect_after, transient network failures become transparent to the application. Reconnect happens automatically in the background and queries/requests that suffered due to connectivity loss are transparently retried.

In the presense of reconnect_after, wait_connected ignores transient failures. The wait completes once the connection is established or is closed explicitly.

Clickable links in https://tarantool.org/doc/book/intro.html

To get started, you can either download the whole package as described in the first part of Chapter 2 "Getting started", or you can initially skip the download and connect to the online Tarantool server running on the web at http://try.tarantool.org. Either way, the first tryout can be a matter of following the example in the second part of chapter 2: "Starting Tarantool and making your first database".

Let's make chapter references clickable here and in the rest of the manual?

'Obsolete' appendix in documentation

We need to place another appendix into our User Guide - 'Obsolete' section. When we threw something from Public API - there are people, that are unhappy about it. We need to anticipate them.

First thing is to describe removed (from 1.7.0) 'inc'/'dec' functions. Replacing them with 'upsert' (+ 'get') if we need to have (async master-master)-proof version, or simple insert/update on single instance.

Fix markup in functions to include them in search results

Functions that are documented without '.. function::' directive are not included in search results.

E.g. On this page, here are 2 functions with "base64" in their names:
http://tarantool.org/doc/reference/digest.html?highlight=base64
But they are not retrieved when you try to find them with "Search the manual = base64":
http://tarantool.org/doc/search.html?q=base64&check_keywords=yes&area=default

Function descriptions should be revised to make sure that they all are documented using '.. function::'.

Obsolete content about HASH indexes

"HASH which is fastest and uses the least memory but must be unique, "
"The two ordinary index types are 'tree' which is the default, and 'hash' which must be unique and which may be faster or smaller."

https://tarantool.org/doc/book/box/index.html

  • the memory difference between the two is negligible nowadays: TREE uses 10 bytes per tuple on average, while hash uses 16 bytes (on average). Either way we should not emphasize the difference in index size any more, it's small either way.
  • the main difference between hash and tree indexes is absense of GT/GE/LE/LT iterators in the former.

Explain the difference in binary and text protocols

https://groups.google.com/d/msg/tarantool/n1ysVE2SCPA/TUaca_nmBwAJ

This question in the group demonstrates that users don't clearly understand the difference between console as a client and console text protocol, as well as the difference beteween console.listen and box.cfg{listen}.

Please address the issue in the server administration part of the guide, and highlight how console and binary protocols interact with access control subsystem (you default to guest in binary protocol, and need to authenticate to change user, and you default to admin in text protocol, and authentication is emulated with box.session.su()).

Community documentation

Any people should have a chance to contribute our documentation.

Let's have a look at the nginx community (https://www.nginx.com/resources/wiki/)
Anyone may change anything in the nginx documentation.

For instance, If I want to change something in the docs, I'll need push one button -- easy and useful! This action will bring me at the GH where I could make some changes into the docs and do a PR to main repo.

Function grant//create doc improvments

  1. Specifying if_not_exists=true would cause error: Function '...' already exists if the function already exists. in https://tarantool.org/doc/book/box/authentication.html?highlight=authentication#functions-and-the-func-space

true must be replaced with false

tarantool> box.schema.func.create('f1')

---
...
tarantool> box.schema.func.create('f1')

---
- error: Function 'f1' already exists
...
tarantool> box.schema.func.create('f1', {if_not_exists=true})

---
...
  1. Mention, that if you want grant function execution, you need to create that function first here https://tarantool.org/doc/book/box/box_schema.html#lua-function.box.schema.user.grant

Usage examples of connectors

Stage 1. Design primitive data-oriented application which should show "the great power" (c) of Tarantool 1.6 (Google for "Northwind Database" for inspiration)

Stage 2. Implement client examples using connector libraries for supported languages (PHP/Perl/Python/C/etc.). Update repositories, README and packages. The end user should be able to understand how to perform basic requests to Tarantool using his favorite language. (Please open a separate ticket for each language in the corresponding repository).

Improve documentation design

Suggestions:

  • Make TOC hide/show on demand + let the main text occupy more screen width
  • Include all subsections in TOC (for convenience, maybe add expandable nested sections to the TOC, like in tarantool-c doc)
  • Increase font size in func descriptions, both in text and auto-generated labels like "Parameters" (make it = general body text) - e.g. see the bug in https://tarantool.org/doc/reference_lua/msgpack.html?highlight=msgpack#module-msgpack
  • Make vertical paddings before some paragraphs narrower:
    • before the first item in a bullet list
    • before parts of a func description (parameters, rtype, etc)
  • Multiple functions definitions with one name - normal display
  • Refactor .. varfunc:: -> italic in {}
  • Center images in App D. Vinyl
  • Cookbook - Every example must have links. Break it into chapters.

Update https://tarantool.org/doc/intro.html#database-features

Citation:

"Tarantool's disk-based storage engine is a fusion of ideas from modern filesystems, log-structured merge trees and classical B-trees. All data is organized into branches. Each branch is represented by a file on disk. Branch size is a configuration option and normally is around 64MB. Each branch is a collection of pages, serving different purposes. Pages in a fully merged branch contain non-overlapping ranges of keys. A branch can be partially merged if there were a lot of changes in its key range recently. In that case some pages represent new keys and values in the branch. The disk-based storage engine is append only: new data never overwrites old data."

Update https://tarantool.org/doc/intro.html#database-features to reflect changes in Vinyl engine: the terminology (node -> range, branch -> run), the name of the engine.

On the same token, cross-link the introduction and the appendix, which provides additional details.

Document index_object.get() method

[ ] add a description for index_object.get() method (file box/box_index.rst)
[ ] add a ref to it from box_index_get() method in C API (file reference_capi/box_index.rst)

download page

Visit the Tarantool repository at GitHub to download the latest source files for version 1.7.

No way. You can't use sources from GitHub, only from Releases page. VERSION file is absent.

Please consult with the Tarantool documentation for build-from-source instructions on your system.

build-from-source must lead to https://tarantool.org/doc/dev_guide/building_from_source.html

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.