You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/03/15 02:50:22 UTC

[GitHub] [apisix] besich opened a new issue #6612: [PROPOSAL] Refactor the plugin code organization

besich opened a new issue #6612:
URL: https://github.com/apache/apisix/issues/6612


   ### Description
   
   # 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:
   * startup code. eg. in **“/plugins/example-plugin/package.json”**, it has **“main”:”index.lua”**. 
   * compile the plugin dependency library.
   * compile the plugin dependency environment variable.
   * unit tests about the plugin 
   * multi-language
   
   
   # BENEFIT
   * 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.
   * Development-friendly. During unit testing, you can only test the enabled plugin.
   * Maintenance-friendly. Because the core of APISIX should be relatively stable, the addition of the plugin will be dynamic and frequent.
   * Make technical preparations for a marketplace.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] spacewander commented on issue #6612: [PROPOSAL] Refactor the plugin code organization

Posted by GitBox <gi...@apache.org>.
spacewander commented on issue #6612:
URL: https://github.com/apache/apisix/issues/6612#issuecomment-1067516142


   This way is overcomplex. I will vote -1 for it.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] spacewander closed issue #6612: [PROPOSAL] Refactor the plugin code organization

Posted by GitBox <gi...@apache.org>.
spacewander closed issue #6612:
URL: https://github.com/apache/apisix/issues/6612


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] spacewander commented on issue #6612: [PROPOSAL] Refactor the plugin code organization

Posted by GitBox <gi...@apache.org>.
spacewander commented on issue #6612:
URL: https://github.com/apache/apisix/issues/6612#issuecomment-1067517498


   > The plugin can be compiled optionally
   
   The dependencies of the plugin are very hard to handle. Also, there are a lot of trouble to handle the dependencies between APISIX and plugins.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] spacewander commented on issue #6612: [PROPOSAL] Refactor the plugin code organization

Posted by GitBox <gi...@apache.org>.
spacewander commented on issue #6612:
URL: https://github.com/apache/apisix/issues/6612#issuecomment-1067518172


   > Because the core of APISIX should be relatively stable, the addition of the plugin will be dynamic and frequent.
   
   Only people who are not familiar with APISIX will think this way is easier to maintain. As the opinion from the maintainer of APISIX, such way will make APISIX harder to maintain.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] spacewander edited a comment on issue #6612: [PROPOSAL] Refactor the plugin code organization

Posted by GitBox <gi...@apache.org>.
spacewander edited a comment on issue #6612:
URL: https://github.com/apache/apisix/issues/6612#issuecomment-1067517498


   > The plugin can be compiled optionally
   
   The dependencies of the plugin are very hard to handle. Also, there is a lot of trouble handling the dependencies between APISIX and plugins.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] spacewander commented on issue #6612: [PROPOSAL] Refactor the plugin code organization

Posted by GitBox <gi...@apache.org>.
spacewander commented on issue #6612:
URL: https://github.com/apache/apisix/issues/6612#issuecomment-1067527737


   Two simple questions:
   1. what if a plugin depends on the apisix-base? How can we manage the dependencies with different plugins which require different apisix-base?
   2. how to deal with the ecosystem of APISIX, like dashboard, ingress controller, and more?
   
   Only people who are not familiar with APISIX will think this way is easier to maintain. In fact, it makes the situation more complex.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org