[xwiki-devs] Questions about the new Job Module in commons
Hi Devs/Thomas, I've just realized that we now have a new job module in commons…. I don't recall seeing a proposal/vote on this but I may just have missed it. I would like to be sure we have considered existing libraries before deciding to full recode it. I've done a very quick google search and I can see for example: * http://www.eclipse.org/articles/Article-Concurrency/jobs-api.html for example * http://stackoverflow.com/questions/8738160/eclipse-jobs-api-for-a-stand-alon... says it can be used standalone Also there are lots of job/scheduling apis at: * http://java-source.net/open-source/job-schedulers I think having our own interface is ok (to be independent of any underlying implementation) but we also have our own implementation now too. Something to consider for example is that right now our Scheduler module uses the Quartz API and when we rewrite it I guess the idea will be to use this new job module, right? Thus I assume we'll need to write a "Quartz bridge" to transform XWiki Job instances into Quartz Job instances so that we can execute them with Quartz. Or maybe the integration would be at a different level, in the Job Manager? In any case I'd like to see a bit more information on this job module and be confident that we have thought about all this and documented it on extensions.xwiki.org. Thanks -Vincent
On Mon, Mar 26, 2012 at 10:20 AM, Vincent Massol <vincent@massol.net> wrote:
Hi Devs/Thomas,
I've just realized that we now have a new job module in commons….
I don't recall seeing a proposal/vote on this but I may just have missed it.
http://markmail.org/message/lcdx7nzr756jt3ob
I would like to be sure we have considered existing libraries before deciding to full recode it.
I've done a very quick google search and I can see for example: * http://www.eclipse.org/articles/Article-Concurrency/jobs-api.html for example * http://stackoverflow.com/questions/8738160/eclipse-jobs-api-for-a-stand-alon... says it can be used standalone
Also there are lots of job/scheduling apis at: * http://java-source.net/open-source/job-schedulers
I think having our own interface is ok (to be independent of any underlying implementation) but we also have our own implementation now too.
Something to consider for example is that right now our Scheduler module uses the Quartz API and when we rewrite it I guess the idea will be to use this new job module, right? Thus I assume we'll need to write a "Quartz bridge" to transform XWiki Job instances into Quartz Job instances so that we can execute them with Quartz. Or maybe the integration would be at a different level, in the Job Manager?
This module is actually 90% API, the main goal that leads to its creating was to make extension manager background tasks (install, uninstall, etc.) able to communicate progress/log informations and ask live question. The JobManager implementation right now is just a daemon thread and a stack with all jobs executed one by one as they come (because EM did not needed more), but AbstractJob can be reused for any background task without (does not have to be handled by JobManager). But since we need to refactor the scheduler plugin the component way the implementation is probably going to change later and use some scheduling tool like quartz yes but did not had much time to do it now.
In any case I'd like to see a bit more information on this job module and be confident that we have thought about all this and documented it on extensions.xwiki.org.
Sure will take care of the documentation as soon as 4.0M2 is released, I wanted to move on EM planning before.
Thanks -Vincent
_______________________________________________ devs mailing list devs@xwiki.org http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne
participants (2)
-
Thomas Mortagne -
Vincent Massol