Hi,

I just noticed Fei Liang also sent a discussion issue here
https://github.com/apache/apisix/issues/6612 :)

Best Regards!
@ Zhiyuan Ju <https://github.com/juzhiyuan>


Fei Liang <bsch1...@gmail.com> 于2022年3月15日周二 10:54写道:

> deal all:
>
>
> PROPOSAL
>
> Refactor the plugin code organization, make the plugin independent from
> APISIX, and maintain the plugin independently.
>
>
> BACKGROUND
>
> The current APISIX compilation method is a full installation, which is very
> unfriendly to developers and users who install through source code.
>
> Because many plugins depend on third-party libraries, the complicated
> environment is complex, but most of the time, these plugins are not needed.
>
>
> Technical
>
> Current: plugins are mixed under /apisix/plugins/*.lua
>
> Suggestion: migrate to /plugins/*plugin*/, *plugin* represents different
> plugins. One plugin is a One directory.
>
>
> Under each plugin directory, there is an independent
> /plugins/*plugin*/package.json file, which has description information,
> which stores related to the independent plugin data.
>
>
> for example:
>
>    1. startup code. eg. in “/plugins/example-plugin/package.json”, it has
>    “main”:”index.lua”.
>    2. compile the plugin dependency library.
>    3. compile the plugin dependency environment variable.
>    4. unit tests about the plugin
>    5. multi-language
>
>
> BENEFIT
>
>    1. The plugin can be compiled optionally. When compiling the APISIX,
>    obtain which plugin enabled from the configuration file, and then
> compile
>    after dynamically generating rockspec.
>    2. Development-friendly. During unit testing, you can only test the
>    enabled plugin.
>    3. Maintenance-friendly. Because the core of APISIX should be relatively
>    stable, the addition of the plugin will be dynamic and frequent.
>    4. Make technical preparations for a marketplace.
>

Reply via email to