ENTERPRISE JOB SCHEDULER
SAJEEV RAMAKRISHNAN
29 AUG 2014
AGENDAEnterprise Job Scheduler Background CRON vs. Enterprise Job Scheduler Quartz concepts
Deployment Architecture Scheduler features Hardware/software Technologies Used
Enterprise Job Scheduler Use Cases
Conclusion
References
BACKGROUND Enterprise job scheduling is an approach for fulfilling various jobs in an enterprise ranging from
workflow automation, system maintenance and providing reminder services The basic job scheduling solution in most of the UNIX environments rely on CRON jobs. This
is a simple program to configure scheduled jobs using a command line interface. The CRON based solution is not reliable and has a single point of failure in the form of a UNIX
node. Enterprises aim for 99.9 % availability of their services which the current CRON jobs cannot
provide. Highly available systems can improve customer satisfaction and repeated business for an
organization. The requirement of an enterprise job scheduler arise in order to provide highly available fault
tolerant scheduling system which can run on multiple nodes in a cluster. The rich web interface comes as part of this scheduler helps the application support group to
respond to their day to day activities as quickly as possible.
CRON VS. ENTERPRISE JOB SCHEDULERFeatures Enterprise Job Scheduler CRON
Load balancing Yes No
High Availability Yes No
Failover Yes No
Clustering Yes No
Scalability Yes No
Different types of Jobs (Shell, Java, HTTP, other scripting) Yes No
Extensibility using JAVA Yes No
One-stop Admin Web GUI Yes No
Notification mechanism via Email Yes No
Single point of failure No Yes
Inbuilt view of execution history Yes No
Operational efficiency Yes No
Separation of concerns (scheduled jobs) Yes No
Remote job execution Yes No
Jobs can be stored in DB Yes No
Grouping of Jobs Yes No
Easy to manage application maintenance slots Yes No
Auditing and Accountability Yes No
QUARTZ CONCEPTSJobs And Triggers A Job is a JAVA class that implement the Job interface, which has only one execute(--) method. When a job is invoked (triggered), the execute method is invoked by one of the scheduler’s worker
threads. Trigger objects are used to trigger (invoke) the execution (or ‘firing’) of jobs. Suppose we have an HTTP GET job, which means we have written a JAVA class with an execute(--)
method and this method will have the required code to make an HTTP GET call to a given URL with associated properties.
In order to run this HTTP GET job, we need to create a trigger with the scheduling information as well as the various properties required for running this job, say HTTP GET URL, time outs, content-Type etc.
Suppose We are create a trigger to run this job every Saturday with a set of properties, We can call it as trigger1 and if We want to run the same job with different set of properties every Monday, then we can call it as trigger2.
Here we have configured two triggers, trigger1 and trigger2 for the same HTTP GET Job, of a given Job.
DEPLOYMENT ARCHITECTURE
Site1 Domain
Scheduler(MS1)
Site1 DB (Active) Site2 DB (Passive)
Dotted arrow = Passive
Scheduler(MS2)
Site2 Domain
Scheduler(MS1) Scheduler(MS2)
Web GUI Web GUI Web GUI Web GUI
SCHEDULER FEATURES Job CRUD Support Trigger CRUD support Scheduler control REST support Monitoring support Alerting support (Email) Load balancing & Failover Platform independent
HARDWARE/SOFTWARE
Requirements
Operating Systems Linux / Windows
Disk space 2 GB
JEE Servers Weblogic 10.3.x, Apache Tomcat 6.x, 7.x
JDK versions 1.6, 1.7
Quartz version 2.x
Database Oracle 10g/11g/ MySQL
Deployable .war file or exploded war file folder
TECHNOLOGIES USED
Frameworks & Libraries Spring web MVC 3.2Spring ROO 1.2.4Spring Jackson API 1.9.10Quartz 2.2.1jQuery 1.8.2jqGrid 4.6.0DOJO 1.6
Server Side Technologies JSP/JSPXApache Tiles
Client Side Technologies HTMLJavaScriptCSS
Database Oracle 10g/11g
Development Tools Spring Tool Suite (STS), Maven
Version Control SVN
ENTERPRISE JOB SCHEDULER USE CASES
# Use Cases
1 Configure any CRON based triggers and invoke any application urls.
2 Application support group can group triggers and control them based on the same
3 Run local shell / batch scripts or commands
4 Reminder services for reminding password reset, certificate renewal etc.
5 Control scheduler, jobs and triggers using web GUI or REST services
6 Remote shell script execution
7 Any new jobs can be added by simply writing a JAVA class which inherits the Quartz Job interface
8 Custom Email Adapter Job for receiving Email for products where email adapter cannot work from more than one site. Eg. OSB
9 Monitoring services for monitoring application servers.
CONCLUSION
The scheduler will be able to address the problems of load balancing and fail over in a clustered production environment
It has the ability to schedule jobs much easier and can improve the efficiency and effectiveness of application support group
It will enable the application development team to concentrate on the business logic rather than in scheduling logics
This product ultimately supports and delivers high availability of various enterprise services by increasing the uptime of services.
FUTURE WORK
Workflow support by chaining of multiple triggers Multi scheduler support. As of now, it can support only single scheduler More interactive web GUI Selenium test cases for webpage testing Flexible alert list for different kinds of trigger failures
REFERENCES http://quartz-scheduler.org Clarence Ho. Pro Spring 3. Apress, 2012 Ken Rimple, Srini Penchikala. Spring Roo in Action. Manning Publications, 2012 Ashish Sarin. Spring Roo 1.1 Cookbook. Packt Publishing http://docs.spring.io/ http://dojotoolkit.org/ http://trirand.com/blog/jqgrid/jqgrid.html https://code.google.com/p/myschedule http://jsonlint.com/
Any Questions?
Thank You
Top Related