Introducing a task scheduler in Karaf

2011-07-20 Thread Ioannis Canellos
Hi, I added a new module to Karaf. The purpose of this module is to provide means for scheduling tasks through the osgi service registry. The scheduler module registers a ServiceListener that listens for services of the java.lang.Runnable interface that also have 2 service properties that are req

Re: Introducing a task scheduler in Karaf

2011-07-20 Thread Jean-Baptiste Onofré
Hi Ioannis, It's a really good idea (we discussed of that for Cellar :)). It could be very helpful for a large set of requirements. I wonder: 1/ should it be a standard feature or an optional one (I think standard is better as it doesn't require any resource if not used. It could be comparabl

Re: Introducing a task scheduler in Karaf

2011-07-20 Thread Mark Derricutt
I've not looked at it but I believe apache sling has a scheduling service that wraps quartz already. Would it worth while extracting that to a common service both karaf and sling could share? Mark -- Sent from an Android. On 21/07/2011 12:49 AM, "Jean-Baptiste Onofré" wrote: > Hi Ioannis, > > I

Re: Introducing a task scheduler in Karaf

2011-07-20 Thread Glen Mazza
Pardon me for piping in (I know just enough to be dangerous ;), but was there any reinventing of the wheel in your commit, Ioannis, that could be avoided by closer integration with the Quartz Scheduler (already Apache-licensed and famous: http://www.quartz-scheduler.org/)--not just the "advance

Re: Introducing a task scheduler in Karaf

2011-07-20 Thread Charles Moulliard
Hi Ioannis, This is an excellent idea and could be very helpful for pure java project requiring scheduler like Quartz on Karaf platform. As Camel/ActiveMQ already uses Quartz like plenty of Java projects, that will be a very nice feature to deploy jobs on the platform. Regards, Charles Moulliard

Re: Introducing a task scheduler in Karaf

2011-07-20 Thread Ioannis Canellos
I am glad that I see so much interest in it. It would make sense to use quartz instead of Java Timer mostly due to the fact that quartz supports thread pooling while timers don't. So, I think that it would be a good idea to replace Timers with Quartz. @Glenn: No problem with peeping. We actually

Re: Introducing a task scheduler in Karaf

2011-07-20 Thread Claus Ibsen
On Wed, Jul 20, 2011 at 4:00 PM, Ioannis Canellos wrote: > I am glad that I see so much interest in it. > > It would make sense to use quartz instead of Java Timer mostly due to the > fact that quartz supports thread pooling while timers don't. So, I think > that it would be a good idea to replace

Re: Introducing a task scheduler in Karaf

2011-07-21 Thread Ioannis Canellos
> > > The JDK Timer is kinda @deprecated in favor of the > ScheduledExecutorService in Java5+. > The latter supports thread pooling. Thanks Claus for bringing this up. For me this is enough. If you think that we should still use quartz to take advantage of features like persistence, clustering et

Re: Introducing a task scheduler in Karaf

2011-07-21 Thread Guillaume Nodet
Well, honestly, I'm not sure it's really worth the pain if the goal is simply to avoid using Executors.newSingleThreadScheduledExecutor().schedule(runnable, delay, TimeUnit.MILLISECONDS) If there's a need to manage recurrent tasks, we need to have a full featured engine for that and have a mu

Re: Introducing a task scheduler in Karaf

2011-07-21 Thread Ioannis Canellos
Do you think that it worths using quartz instead? On Friday, July 22, 2011, Guillaume Nodet wrote: > Well, honestly, I'm not sure it's really worth the pain if the goal is > simply to avoid using >     Executors.newSingleThreadScheduledExecutor().schedule(runnable, > delay, TimeUnit.MILLISECOND

Re: Introducing a task scheduler in Karaf

2011-07-25 Thread Andreas Pieber
I'm not sure if it's really worth to use quartz here. Still I think we shouldn't start implementing things before there is actually a use case for it (at least I'm happy right now with the classical timer support :)). Quartz can also work with the new Java 6 scheduling interface --> we can upgrade

Re: Introducing a task scheduler in Karaf

2011-07-25 Thread Guillaume Nodet
I completely agree that implementation without a use case is not really the best way to go. Forcing users to use an OSGi service registration to avoid calling the JRE api does not seem worthwhile either. I guess the part I'm still missing is the use cases for wrapping Timer or ScheduledExecutorSe

Re: Introducing a task scheduler in Karaf

2011-07-25 Thread Jeremias Maerki
Are you guys aware of http://sling.apache.org/site/scheduler-service-commons-scheduler.html? On 20.07.2011 14:38:18 Ioannis Canellos wrote: > Hi, > > I added a new module to Karaf. The purpose of this module is to provide > means for scheduling tasks through the osgi service registry. > > The s

Re: Introducing a task scheduler in Karaf

2011-07-25 Thread Ioannis Canellos
> > I guess the part I'm still missing is the use cases for wrapping Timer > or ScheduledExecutorService.;-) The way I see it it's not about wrapping, but its about managing. So some uses could be: a) List the scheduled/recurring tasks. b) Cancel a task. c) reschedule a task. d) pause/resum

Re: Introducing a task scheduler in Karaf

2011-07-25 Thread Guillaume Nodet
Ok. What then I think a couple of commands on top of the sling service would do the trick. The extender part can be added on top of that too, but that's a different area imho. On Mon, Jul 25, 2011 at 16:08, Ioannis Canellos wrote: >> >>  I guess the part I'm still missing is the use cases for w

Re: Introducing a task scheduler in Karaf

2011-12-07 Thread Ioannis Canellos
As we are marching towards 3.0.0 release and we haven't done anything about it (its still in primitive state) maybe its a good idea to remove it from trunk and maybe put it in the sandbox or something. What do you think? -- *Ioannis Canellos* * FuseSource ** Blog: http:/

Re: Introducing a task scheduler in Karaf

2011-12-07 Thread Jamie G.
Rescheduling it for 3.1.0 would be acceptable. As to removing the code from trunk, would it make the most sense to temporally retreat it, then bring it back into the 3.1.0 branch once created? Jamie On Wed, Dec 7, 2011 at 11:25 AM, Ioannis Canellos wrote: > As we are marching towards 3.0.0 rele

Re: Introducing a task scheduler in Karaf

2011-12-07 Thread Ioannis Canellos
Yes, I was thinking something like this. -- *Ioannis Canellos* * FuseSource ** Blog: http://iocanel.blogspot.com ** Apache Karaf Committer & PMC Apache Camel Committer Apache ServiceMix

Re: Introducing a task scheduler in Karaf

2011-12-07 Thread Jean-Baptiste Onofré
Hi Ioannis, I think that we can let as it is in Karaf 3.0, but not advertising/blogging/documentating it. We can plan a refactoring in Karaf 3.1.0, this time with "communication" to the users. WDYT ? Regards JB On 12/07/2011 03:55 PM, Ioannis Canellos wrote: As we are marching towards 3.

Re: Introducing a task scheduler in Karaf

2011-12-07 Thread Andreas Pieber
I second JB on that. I've given it a short look a while ago and although it isn't completed I don't consider it harmful. Removing it and adding it sounds like too much work for a feature which doesn't harm to me :-) Kind regards, Andreas On Wed, Dec 7, 2011 at 16:01, Jean-Baptiste Onofré wrote: