Wednesday, October 5, 2011

Asynchronously Job Execution on Cloud

Job Scheduling:

As old as computer themselves
- Batch processing of punch cards

Batch Processing
- Maintenance tasks

Process optimizations
- shared resources across users
- postpone to times when less busy
- generally increases apps tsp

Event Driven process automation

Offloads part of process
- to another thread
- for execution ata lter point

Provides
- persis
-failure handling
-listener and plug-ins infra

In java space
-embedded
-standalone(RMI, WS)





Distributed environments

- Cluster
- high availability

-failure capabilities

- Load balancing
-round robin , sticky session


cloud
-same as above
- but elasticity
-dynamic cluster redefinition

But Certainly increase IT INFra


Clustered Jon Scheduling and Execution

HA
- Node failure handled by scheduler
-Never loose job or their execution path
- Jobs can be executed on any node
-Preferably the one scheduled on?

Load Balancing
- Round Robin ?
- First Node that can "acquire" the job , executes it
- Sticky Session?
- Preferably the one schooled on??
- On the node with the job's session???

Elastic?
- Node come and go

Node gone ! = failure

What about a new node???

What does this mean to scheduling?
- There is more than asynchronous execution
- We do make assumptions



High Availability

-Persistent and redundant storage no SPoF (Single point of failure)

- Redirect "Best suited"

- Not only the time of failure

- Pick up the least busiest node

Obviously does nothing: load???
Available threads
Available memory
Amount of cores
Operating System



Quartz Enterprise Scheduler

- Open Source job scheduling service
- Runs embedded inside virtually any Java Application

- JAVA EE or
- JAVA SE Application

- Use to create very simple or complex schedules
- Handles tens,hundreds 1000s of jobs

Two main concepts
-Jobs
-Any Java class that implements the simple Job iNterface

- Triggers
-at certain time day/days or week
-repeated number of time until specific day/week or indefinitely or time interval delay

Clustering through
- The database
- Support for major database vendors out of box
- Terracotta clustering
- Simply requires configuration changes

What's Quartz Where??
- Terracotta clustered Scheduler feature

-Adds locality capabilities to jobs and triggers
-Defines Node Groups(one or multiple nodes)
- Jobs and/or TriggerGroups execute on particular NodeGroups
- Contraints
-memory,amount of cores,avg load

No comments:

Post a Comment