Sunday, October 23, 2011

A very lean war file for MySchedule

On the next coming MySchedule release, I've been working on removing few dependencies in the project to improve its size, but yet still keeping all the original functionality.



The result is about 70% reduction in war file size!


There are few things that I removed that resulted in a much smaller webapp.

1. Removed MySQL jdbc driver. Not every one uses Quartz with this DB, so including it in distribution is not necessary. You can easily add it into a server classpath without modifying the war.

2. Removed Groovy. I've improved the UI and the ScriptingJob component so that it works with any Java standard script engine. The JDK comes with JavaScript engine built-in! So now Groovy can be optional, and yet user can still use it by simply add it to the server classpath, and they can select the language in MySchedule UI. Without it, MySchedule will just default to JavaScript for scripting.

3. Removed Spring (MVC) Framework. Now this is a big task because MySchedule uses Spring annotations, controllers and service beans in IoC config to bootstrap the entire webapp. I've replaced it with a simple static AppConfig that wired my services together, and then used the plain Servlet API to process all http requests.



So why remove Spring? Don't get me wrong, I like working with Spring, and I think it's awesome framework. I have been working with Spring based projects for a long time, and I even have my own set of SpringMVC template to
start any web application quickly. I know where things are configured and where to add new code to make a Spring app works, and it's flexibility are fantastic for development, especially for larger projects.  But in MySchedule case, it is just a small webapp that has it's focus is on Quartz. I wanted to remove Spring to create less confusion for any one who want to look at the code. The Spring bundled with Quartz in its core, and I want to avoid (I didn't use any of that any way.) I also want to shrink the war file size. And lastly, just to 
challenge of myself that, yes there is life outside of Spring, and it still can be maintainable. :-P



So in replacing Spring, but kept very much of same coding style, I have created my tiny little web request processing library. It only has few classes, and it will allow me to use single Servlet controller to map and process all URL actions through many smaller unit of code, which I called action handler. Now MySchedule can be easily configured through one MainServlet class. Not bad!

Tuesday, October 18, 2011

Quartz Extra!

Looking for some extra goodies for Quartz Scheduler? Check out myschedule-2.2.0 release!

Besides some small update to the web UI for quartz management, this release comes with a standalone quartz-extra jar you may download. See what it can do in QuartzExtraUserGuide.

Sunday, September 25, 2011

Quartz 2.1.0 has been released!

In this release, I have helped fixed some bugs, and added a new built-in trigger type: DailyTimeIntervalTrigger. This new trigger will allow you to specify a interval time in either seconds, minutes, or hours interval on each day (Like fire every 72 mins starting at 7am everyday). And the daily start time will be reset each day regardless what time it ended in that day! You may even limit daily ending time too. And you may limit the days to run on certain weekdays only as well. You may see many examples on how this trigger is used here: http://svn.terracotta.org/fisheye/browse/Quartz/trunk/quartz/src/test/java/org/quartz/DailyTimeIntervalScheduleBuilderTest.java?r=HEAD

Another feature worthy of note in this release is the "batch" mode is finally working! You may turn this on by using "org.quartz.scheduler.batchTriggerAcquisitionMaxCount" and "org.quartz.scheduler.batchTriggerAcquisitionFireAheadTimeWindowin your quartz.properties file. See config doc here: http://quartz-scheduler.org/documentation/quartz-2.1.x/configuration/ConfigMain
I have created number of googlecode projects in attempt to try out new codes and ideas in the past. I now have links to all of them in my consolidated playground area http://code.google.com/p/zemiandeng/

I also kept few Java project templates (Maven based) in there: http://code.google.com/p/zemiandeng/source/browse/ These can get you started a project fairly quickly. See the README.txt in each for more details. I have added:
  * java-project-template
  * servlet-project-template
  * springmvc-project-template

There is also the "java-tool" with misc command line programs that I have collected over the years.

I also have stored a more reasonable preferences with Eclipse workspace, and few more custom Cygwin/Bash scripts setup.

All these are publicly and freely available (Apache License 2.0) if you find it useful. Enjoy!
Both myschedule-2.1.2 (for Quartz-2.1.0) and myschedule-1.5.2(for Quartz-1.8.5) releases are available for download here: http://code.google.com/p/myschedule/downloads/list

I have fixed few bugs and improved the UI slightly. Both of these releases should now deployable on Tomcat6, Tomcat7, and JBossAS servers!

Sunday, July 24, 2011

MySchedule-2.0.0 released

The lastest myschedule-2.x release supports the latest Quartz 2.0 API. The Quartz 2.0 is not backward compatible to Quartz 1.8.x, so the MySchedule has matained the myschedule-1.x for the older one.

Try it out here: http://code.google.com/p/myschedule/downloads/list !

Saturday, July 23, 2011

Becoming a Quartz commiter

I started my first commit to the Quartz's svn repository yesterday. I hope to contribute some effort in helping the project. I think the Quartz is an exellent open source project to work with and it's already been use by many users. The project offer many opportunities in dealing with real world situations. The quartz project has a scheduler layer, cron expression implementation, job persistence storage layer (using JDBC), and many framework components such as plugins and listeners. Many users have integrated Quartz in various environments such in standalone JavaSE, Spring, Servlet container (Tomcat eg), or application server (JBoss eg). In helping this community, I also get a chance to expose to these programming models. It will be great experience to have.