Hi,

As you may know, Stratos 4.1.0 Alpha release will be shipped with a Python
based cartridge agent. AFAIU, there were two main reasons to move to a
Python based agent.

1. Make it light weight to minimize the memory/CPU footprint. This was
important especially in the Docker scenario.

2. Allow Dev-Ops to extend the cartridge agent without having to modify the
core code. In most cases, cartridge agent has to be customized to suite the
requirements of the cartridge application. All dynamic configuration
changes and stats publishing are done by this agent. It is therefore
critical to make the agent flexible enough so that users developing
cartridges are able to manage and monitor the run time environment of the
cartridge application, as they wish.
At the same time, the design has to be simple enough to make sure that
we're not adding more complexity. A dev-ops should be able to easily
understand the flow and extend it to cater the cartridge application run
time requirements.

For this purpose I'd like to propose that we integrate a Python plugin
framework to make the cartridge agent easily extendable. Main requirements
are;

1. The plugin framework of choosing must be very easy to use
2. Have minimal or no external dependencies to make it lightweight
3. Should be able to dynamically load plugins without manual configurations
4. Version control of plugins and be able to control the loading order

I've done evaluation of following existing Python plugin frameworks;
Plug n' PLay (PnP) [1]
Trac [2]
Yapsy [3]
Zope [4]

As per my findings, I've concluded that Yapsy would be the best fit for our
requirements. PnP framework is very simple but lacks some of the features
like version control, control the loading behavior.

Here is a very good tutorial [5] for understanding the Yasy framework. I'd
like to work on an initial model for this integration. But before that
wanted to get your ideas regarding this feature.

[1] https://github.com/daltonmatos/plugnplay
[2] http://trac.edgewall.org/wiki/TracDev/ComponentArchitecture
[3] http://yapsy.sourceforge.net/
[4] http://docs.zope.org/zope.interface/
[5] http://www.micahcarrick.com/python-gtk-plugins-with-yapsy.html

Thanks.

-- 
Akila Ravihansa Perera
Software Engineer, WSO2

Blog: http://ravihansa3000.blogspot.com

Reply via email to