Hi Devs,

​WSO2 App-Factory which is an aPaaS uses apache stratos as the underline
PaaS framework. We need an improvement in stratos cartridge agent as per
the following description.

​

Based on the current setup of the app-factory it is necessary to inform
from cartridge side to app-factory side about the last deployment status of
each service. In multi-tenant case, (we use “wso2-as”) this functionality
is implemented as a container lifecycle listener and this can be deployed
as an extension to the wso2-as.


But, in single tenant cartridges like, php there is no concept called
container listeners since we use Apache httpd server. Hence, in order to
get notification from cartridge side we need to have another mechanism.


There are few options to this problem.


   1.

   After subscribing to new cartridge or updating git repo, we have to pool
   from appfactory until the service is up and running.
   2.

   Create a web service client (and related server side also) to inform
   from cartridge to appfacotry about the deployment status. In this case, we
   have to bundle each cartridge agent with new client library and bind them
   using cartridge extension scripts. This is like using app-factory specific
   cartridge agent.
   3.

   Introduce new “Instance-Status-Event” type to cartridge agent which is
   published to Message Broker of straots side. This event is something like
   “Artifact-Deployed” and published from cartridge side after each successful
   git pull. This is the closest point to the service deployment in cartridge
   side and in app-factory side we can get the notification.



We can use any of above options or combination of those. From those options
“No:03” is selected and from appfactory side we can listener to the “Active
MQ” topic and get the event notification as per the below diagram.


​

In this method I am planing to provide a patch (git pull request) to
stratos cartridge to publish new event to the “instance status topic” and a
patch to messaging module which event processing logic goes.

In app-factory side we have to implement necessary logic to process the
notification and update the deployment status of each application created
by users.

Any comment on this item would be appreciated.

Thanks,
Roshan Deniyage
Associate Technical Lead
WSO2, Inc: http://wso2.com

Mobile    :  +94 777636406
Twitter    :  *https://twitter.com/roshku <https://twitter.com/roshku>*
LinkedIn :  https://www.linkedin.com/in/roshandeniyage

Reply via email to