Tarantool development patches archive
 help / color / mirror / Atom feed
* [Tarantool-patches] [PATCH v8 0/4] box/cbox: implement cfunc Lua module
@ 2020-10-14 13:35 Cyrill Gorcunov
  2020-10-14 13:35 ` [Tarantool-patches] [PATCH v8 1/4] box/func: factor out c function entry structure Cyrill Gorcunov
                   ` (3 more replies)
  0 siblings, 4 replies; 22+ messages in thread
From: Cyrill Gorcunov @ 2020-10-14 13:35 UTC (permalink / raw)
  To: tml; +Cc: Vladislav Shpilevoy

The cbox module provide a way to execute C stored procedures
on read only nodes without registring 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 storange, 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

branch gorcunov/gh-4642-func-ro-8
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          |   7 +-
 src/box/func.c          | 475 +------------------------------------
 src/box/func.h          |  41 +---
 src/box/lua/cbox.c      | 486 ++++++++++++++++++++++++++++++++++++++
 src/box/lua/cbox.h      |  39 ++++
 src/box/lua/init.c      |   2 +
 src/box/module_cache.c  | 503 ++++++++++++++++++++++++++++++++++++++++
 src/box/module_cache.h  | 156 +++++++++++++
 test/box/CMakeLists.txt |   2 +
 test/box/cbox.result    | 134 +++++++++++
 test/box/cbox.test.lua  |  51 ++++
 test/box/cfunc1.c       |  49 ++++
 test/box/cfunc2.c       | 112 +++++++++
 test/box/suite.ini      |   2 +-
 15 files changed, 1553 insertions(+), 508 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: 0dc72812fb78a192945612f0e954026a0ffe4053
-- 
2.26.2

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2020-11-13 18:30 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-14 13:35 [Tarantool-patches] [PATCH v8 0/4] box/cbox: implement cfunc Lua module Cyrill Gorcunov
2020-10-14 13:35 ` [Tarantool-patches] [PATCH v8 1/4] box/func: factor out c function entry structure Cyrill Gorcunov
2020-10-29 22:15   ` Vladislav Shpilevoy
2020-10-30  9:51     ` Cyrill Gorcunov
2020-10-31  0:13       ` Vladislav Shpilevoy
2020-10-31 15:27         ` Cyrill Gorcunov
2020-10-14 13:35 ` [Tarantool-patches] [PATCH v8 2/4] module_cache: move module handling into own subsystem Cyrill Gorcunov
2020-10-29 22:15   ` Vladislav Shpilevoy
2020-10-30 10:15     ` Cyrill Gorcunov
2020-10-31  0:15       ` Vladislav Shpilevoy
2020-10-31 15:29         ` Cyrill Gorcunov
2020-10-14 13:35 ` [Tarantool-patches] [PATCH v8 3/4] box/cbox: implement cbox Lua module Cyrill Gorcunov
2020-10-29 22:15   ` Vladislav Shpilevoy
2020-10-30 12:51     ` Cyrill Gorcunov
2020-10-31  0:21       ` Vladislav Shpilevoy
2020-10-31 21:59         ` Cyrill Gorcunov
2020-11-01  8:26           ` Cyrill Gorcunov
2020-11-02 22:25           ` Vladislav Shpilevoy
2020-11-03  7:26             ` Cyrill Gorcunov
2020-11-12 22:54     ` Vladislav Shpilevoy
2020-11-13 18:30       ` Cyrill Gorcunov
2020-10-14 13:35 ` [Tarantool-patches] [PATCH v8 4/4] test: box/cfunc -- add simple module test Cyrill Gorcunov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox