From 3fe169b061d78e9008741bfd223a1437a10baa5c Mon Sep 17 00:00:00 2001 From: Oleg Jukovec Date: Mon, 18 Sep 2023 15:00:37 +0300 Subject: [PATCH] readme: focus on `VShard` instead of `Cartridge` Part of #366 --- CHANGELOG.md | 2 ++ README.md | 19 +++++++++++++------ 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4aaa8a00..a6d729bd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. You could to specify an environment variable `CARTIRDGE_VERSION` to install the `cartridge` and run tests cases with it. * Return explicit error for `*_many` call with no tuples/objects (#377). +* Quickstart section in the README.md focuses on usage with `vshard` instead of + `Cartridge` (#366). ### Fixed * `crud.readview` resource cleanup on garbage collect (#379). diff --git a/README.md b/README.md index 146d9d12..c938caad 100644 --- a/README.md +++ b/README.md @@ -71,8 +71,8 @@ project: ```shell $ tt rocks install crud ``` - - And add the [initialization code](#API) to storage and router instance files. +* Add the [crud initialization code](#API) to router and storage instances + initialization code for [VShard](https://github.com/tarantool/vshard). * Add crud into dependencies of a Cartridge application and add crud roles into dependencies of your roles (see [Cartridge roles](#cartridge-roles) section). * Add crud into dependencies of your application (rockspec, RPM spec -- depends @@ -82,12 +82,19 @@ project: ## API The CRUD operations should be called from router. -All storage replica sets should call `crud.init_storage()` -(or enable the `crud-storage` role) + +All VShard storages should call `crud.init_storage()` after +`vshard.storage.cfg()` (or enable the `crud-storage` role for Cartridge) first to initialize storage-side functions that are used to manipulate data across the cluster. -All routers should call `crud.init_router()` (or enable the `crud-router` role) -to make `crud` functions callable via `net.box`. + +All VShard routers should call `crud.init_router()` after `vshard.router.cfg()` +(or enable the `crud-router` role for Cartridge) to make `crud` functions +callable via `net.box`. + +You can check out an example of the configuration for local development +(a single instance that combines router and storage) in +[playground.lua](./doc/playground.lua). All operations return a table that contains rows (tuples) and metadata (space format).