I. Background

The current Java, Go, etc. external Runner solutions use our custom RPC
protocols which makes the technical solutions overly complex, resulting in
the inability to promptly fix new features and bugs reported by users.

To thoroughly solve this problem, we need a simpler, more direct solution
that reuses the development ecosystems of other languages.
1.1 Problem to be solved

Provide a new multi-language plugin scheme that allows users to develop
plugins themselves to extend APISIX’s capabilities, and solve the current
*-plugin-runner maintenance cost issues.
1.2 The benefits of solving this problem

   -

   Reduce the maintenance costs of *-plugin-runners
   -

   Make it easier for users to develop custom plugins
   -

   Allow APISIX to have a healthy ecosystem of custom plugins

II. The design

We can add a configuration server_func_addr to APISIX, as a trusted
func_server.
At the same time, in the custom Plugin, we can trigger the corresponding
function through the newly added core.server_func, and pass the parameter
map over.

e.g.
```lua
function _M.access(conf, ctx) local res, err =
core.server_func("example_func", {foo="foo", bar="bar"}) ... ... end

```

Users can trigger corresponding functions at any phase of APISIX request
processing, and these functions only need to be simply triggered via HTTP.
No matter which language or framework users want to use, it is possible.

WDYT?

Reply via email to