From: Cyrill Gorcunov <gorcunov@gmail.com>
To: tml <tarantool-patches@dev.tarantool.org>
Cc: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
Subject: [Tarantool-patches] [PATCH v10 0/4] box/cbox: implement cfunc Lua module
Date: Thu, 5 Nov 2020 18:18:04 +0300 [thread overview]
Message-ID: <20201105151808.456573-1-gorcunov@gmail.com> (raw)
The cbox module provide a way to execute C stored procedures
on read only nodes without registering them in `_func` system space.
The series implements a bare minimum. Vlad, please take a look
once time permit. The issue with `call` simplification where
we plan to drop `tarantooL` will be addressed in another issue
which I already assigned to myself.
v1-v3 are development ones and not sent.
v5 (by vlad):
- drop exists, list methods: they are redundant
- rename cfunc to cbox
- when create a function make it callable Lua object
- initialize cbox out of modules
- fix error in passing module name for reloading
- make api been cbox.func.[create|drop] and
cbox.module.reload
- fix test for OSX sake
v6 (by vlad):
- move module handling into module_cache file.
v7:
- development
v8:
- use rbtree for function instance storage, since
i don't like the idea of unexpected rehashing of
values in case of massive number of functions
allocated
- use reference counter and free function instance
if only load/unload are coupled
- keep a pointer to the function inside Lua object
so we don't need to lookup on every function call.
this force us to implement __gc method
- use new API and update docs
v9:
- development
v10:
- use hashes for function names lookup
- simply function loads counting
- use luaL_register_module and luaL_register_type for
easier methods registering
- carry functions as userdata object
branch gorcunov/gh-4642-func-ro-10
issue https://github.com/tarantool/tarantool/issues/4642
Cyrill Gorcunov (4):
box/func: factor out c function entry structure
module_cache: move module handling into own subsystem
box/cbox: implement cbox Lua module
test: box/cfunc -- add simple module test
src/box/CMakeLists.txt | 2 +
src/box/box.cc | 2 +-
src/box/func.c | 476 +--------------------------------------
src/box/func.h | 41 +---
src/box/func_def.h | 14 --
src/box/lua/cbox.c | 443 ++++++++++++++++++++++++++++++++++++
src/box/lua/cbox.h | 24 ++
src/box/lua/init.c | 2 +
src/box/module_cache.c | 484 ++++++++++++++++++++++++++++++++++++++++
src/box/module_cache.h | 158 +++++++++++++
test/box/CMakeLists.txt | 2 +
test/box/cbox.result | 148 ++++++++++++
test/box/cbox.test.lua | 55 +++++
test/box/cfunc1.c | 58 +++++
test/box/cfunc2.c | 132 +++++++++++
test/box/suite.ini | 2 +-
16 files changed, 1520 insertions(+), 523 deletions(-)
create mode 100644 src/box/lua/cbox.c
create mode 100644 src/box/lua/cbox.h
create mode 100644 src/box/module_cache.c
create mode 100644 src/box/module_cache.h
create mode 100644 test/box/cbox.result
create mode 100644 test/box/cbox.test.lua
create mode 100644 test/box/cfunc1.c
create mode 100644 test/box/cfunc2.c
base-commit: bc6caac60d5ef070460374149cb7abe2b0db3cde
--
2.26.2
next reply other threads:[~2020-11-05 15:18 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-05 15:18 Cyrill Gorcunov [this message]
2020-11-05 15:18 ` [Tarantool-patches] [PATCH v10 1/4] box/func: factor out c function entry structure Cyrill Gorcunov
2020-11-12 22:53 ` Vladislav Shpilevoy
2020-11-13 17:56 ` Cyrill Gorcunov
2020-11-05 15:18 ` [Tarantool-patches] [PATCH v10 2/4] module_cache: move module handling into own subsystem Cyrill Gorcunov
2020-11-12 22:54 ` Vladislav Shpilevoy
2020-11-16 9:54 ` Cyrill Gorcunov
2020-11-16 14:41 ` Cyrill Gorcunov
2020-11-05 15:18 ` [Tarantool-patches] [PATCH v10 3/4] box/cbox: implement cbox Lua module Cyrill Gorcunov
2020-11-12 22:53 ` Vladislav Shpilevoy
2020-11-16 20:26 ` Cyrill Gorcunov
2020-11-05 15:18 ` [Tarantool-patches] [PATCH v10 4/4] test: box/cfunc -- add simple module test Cyrill Gorcunov
2020-11-12 22:53 ` [Tarantool-patches] [PATCH v10 0/4] box/cbox: implement cfunc Lua module Vladislav Shpilevoy
2020-11-13 17:54 ` Cyrill Gorcunov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201105151808.456573-1-gorcunov@gmail.com \
--to=gorcunov@gmail.com \
--cc=tarantool-patches@dev.tarantool.org \
--cc=v.shpilevoy@tarantool.org \
--subject='Re: [Tarantool-patches] [PATCH v10 0/4] box/cbox: implement cfunc Lua module' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox