Hi Krishanthan,

We have to fix this. Here is the propose way for fixing this. We can
generate a key(token) when user subscribe to cartridge. (this only valid
for framework cartridge, which need to give artifact repository. e.g: git
repo url ). This key return to user after subscribe. We should have REST
endpoint to get artifact update notifications. User can create post commit
hook from their git server (e.g github ..etc), and call above REST endpoint
giving above mention key as token. This will verify with subscription token
and pass ADC to take action for artifact update. It will create depsync
message and send to instance notifier, which subscribe by Stratos agent,
which reside in instance and update the artifacts.  There is no poling, it
will trigger on demand.


On Sat, Jan 18, 2014 at 9:37 AM, Kishanthan Thangarajah <
[email protected]> wrote:

> On Thu, Jan 16, 2014 at 9:30 PM, Isuru Haththotuwa <[email protected]>
> wrote:
> > Hi Devs,
> >
> > This is to discuss $subject.
> >
> > One approach is to use a git hook configured in the repository as an
> > eventing mechanism [1]. Here, when the repository receives an git push,
> an
> > event will be fired and we can use this to get notifications that there
> is
> > an update. Currently, user interaction with Stratos is done through a
> Rest
> > API. We can use the same mechanism to receive events from the repository.
> > However, in this approach we would need to handle how to authenticate the
> > event which is received from the external repository.
> >
> > Another approach is to use a task in the cartridge agent itself to run
> > periodically and check for updates in the git repository. This approach
> is
> > much simpler.
> >
> > WDYT?
>
> But the question would be how often the artifacts gets updated? If it
> is frequent then periodic check seems to be good. If not, considering
> performance, an event driven approach could be the option.
>
> How about having both the options and allow users to decide on which
> they want to use?
>
> >
> >
> > [1]. http://developer.github.com/v3/repos/hooks/
> >
> > --
> > Thanks and Regards,
> >
> > Isuru H.
> > +94 716 358 048
> >
> >
>



-- 
Lakmal Warusawithana
Software Architect; WSO2 Inc.
Mobile : +94714289692
Blog : http://lakmalsview.blogspot.com/

Reply via email to