
Baru-baru ini, teman baik kami dari jaringan ritel besar memiliki tugas mempercepat pencarian di 1C.
-, ( , 9 , %like%) - 2,5 . , โ Tarantool. ElasticSearch, .. , , . , , MS SQL.
-, . , 0,2 5-12 1 ( ). 90 , , 10-50 .
Stage 1
- . 1 ( ) 700 90 . 200 .
, Elastic. ( ) - . 50 100 , .
MySQL PostgreSQL, . 10 10 700 . 10 100 insert 0,9 , 20 2,5 . 30 1.
1- , ยซ 1 ยป. , 1- , ยซ, MS SQLยป.
MS SQL 45 . , in-memory .
, , 3-5 .
, , , ( ) ( , ).
, 1 .
, RabbitMQ + Memcached / Redis, . 1. โ ยซ ยป .
MS SQL 2017 โ Memory Optimized Tables.
Tarantool.
ยซยป . , , , () .
, , , MS SQL Tarantool.
(*) 5 (15 , , , ).

Stage 2
, , Tarantool 2.1 SQL- Tarantool PHP.
- , Tarantool , .
, . Lua ( Tarantool Cartridge Vshard). 0,004 0,21 . 30 100 . 7 .
Tarantool , SQL โ . Lua, . 6 . SQL- 20 , Lua 50 , , 1 .
Tarantool ( read only, updated: 3 1,5 ) : MS SQL 50 , Tarantool 120 ( : Tarantool 2.2, , 2.3 , Tarantool 2.3 โ ). . 1 300 , (Tarantool memtx).
Lua, Tarantool. .
: ElasticSearch.
local function get_stockBalance_to_queue(spaceIn)
local x = os.clock();
local space_name = 'STOCKBALANCES';
if spaceIn ~= nil and 'string' == type(spaceIn) and spaceIn ~= '' then
space_name = spaceIn;
end
local maxRows = 50000;
local goods = {};
local goodsIds = '';
local i = 0;
local iStock = 0;
local session = os.time(os.date("!*t"));
local borderTime = session โ (10);
box.begin()
for _, tuple in pairs(box.space[space_name].index.ISPROCESSED:select(0, { iterator = box.index.EQ, offset = 0, limit = maxRows })) do
if i == maxRows then break end
if tuple[6] < borderTime then
if goods[tuple[1]] == nil then
goods[tuple[1]] = 1;
i = i + 1;
goodsIds = goodsIds .. '"' .. tuple[1] .. '",';
end
pcall(function() box.space[space_name]:update({ tuple[1], tuple[2] }, { { '=', 5, 1 }, { '=', 6, session } }) end);
iStock = iStock + 1;
end
end
local stockTmp = {};
local goodsInStockTmp = {};
local instock = 0;
local stockBalance = _G.Functions.getSumStock(goodsIds);
local goodsInStock = _G.Functions.getGoodsInStock(goodsIds);
local iGoods = 0;
for _, tuple in pairs(goods) do
stockTmp = stockBalance[tuple[1]]['quantityNet'];
goodsInStockTmp = goodsInStock[tuple[1]];
if not stockTmp then
instock = 0;
elseif stockTmp > 0 then
instock = 1;
elseif stockTmp < 0 then
instock = 0;
else
instock = 0;
end
if instock ~= goodsInStockTmp then
iGoods = iGoods + 1;
pcall(function() box.space.GOODS:update(tuple[1], { { '=', 100, 0 }, { '=', 105, instock } }) end);
end
end
box.commit();
return space_name .. ' for update: ' .. iStock .. ' Goods for update: ' .. i .. ' Updated goods: ' .. iGoods .. ', ' .. (string.format("elapsed time: %.2f", os.clock() โ x));
end;
ElasticSearch / , Tarantool .
:

, , . , , .
(, , ) Tarantool box.slab.info. 1 . .
, Mail.ru Group, , Telegram, , .
Stage 3
ยซ , โ . โ . Tarantool, Bitrix- Bitrix-?ยป ( , )
ยซ ? โ . โ , ยป.
ยซยป โ , , Tarantool. , . , , , .
P.S. , . . ,