Monday, May 2, 2011

The Batch is Back - Open Scheduled Task Engine - Resources + Processes


Resources

Company

Name
string (unique)
QoSLevel
integer (ascending, sets number of times the company is slotted for execution)

Solution

Company
CompanyRef
Name
string (unique { Company, Name } )
QoSLevel
integer (ascending, sets number of times the solution is slotted for execution)
SuccessUri
Uri to send Success messages
SuccessPeriod
Number of days to retain SuccessActivity in the system, when the period has expired, the batch of activities is sent to the SuccessUri.
DeadLetterUri
Uri to send DeadLetter messages
DeadLetterPeriod
Number of days to retain DeadLetterActivity in the system, when the period has expired, the batch of activities is sent to the DeadLetterUri.

ActivityType

Solution
SolutionRef
Name
string (unique { Solution, Name } )
Verb
HTTP verb { POST, PUT, DELETE, GET }
UriPattern
Uri pattern, ie “http://api.myspace.com/music/song/{SongId}/republish”.  When executing, fields of the Parameter fill the pattern.
ParameterExpected
Description of parameter expected, used for documenting solutions
Retries
Number of times to retry failures of the activity.  When the retry count reaches or drops below zero, the activity is considered a dead letter.
ObjectIdRef
Field or fields of the Parameter that identifies the object, used for batch operations, ie updating the Uri of all Activities referencing an object.

RecurringActivity

Year
Year
Month
Month
Day
Day of month
DayOfWeek
Day of Week { 0 = Sunday, 1 = Monday, ..., 6 = Saturday }
Hour
Hour
Minute
Minute
Second
Second
ActivityType
ActivityTypeRef
Parameter
Object to fill the Activity UriPattern and be PUT or POST’d.
Retries
Number of times to retry execution of the Activity
Date/time algebra a la cron is used.  See http://www.scrounge.org/linux/cron.html

PointInTimeActivity

Date
DateTime to execute the activity
ActivityType
ActivityTypeRef
Parameter
Object to fill the Activity UriPattern and be PUT or POST’d.
Retries
Number of times to retry execution of the Activity

SuccessfulActivity

DateExecuted
DateTime the activity was executed
ActivityType
ActivityTypeRef
Parameter
Object to fill the Activity UriPattern and be PUT or POST’d.
LogDetails
Details about the Activity execution

FailedActivity

DateExecuted
DateTime the activity was executed
ActivityType
ActivityTypeRef
Parameter
Object to fill the Activity UriPattern and be PUT or POST’d.
LogDetails
Details about the Activity execution

Processes

PointInTimeActivity Executor

 Point-in-time activities are polled every 10 seconds, when an activity’s scheduled execution time has come or passed, the activity is executed.  Activity execution polling is distributed, using company/solution/activityType to partition.

RecurringActivity Executor

RecurringActivity -> PointInTimeActivity processor.  Recurring activity date time algebra is applied, creating point-in-time activities based on the recurrence schedule.  This process is executed every minute.

DeadLetter LogRoller

FailedActivity are polled every day, when an activity executed over the retention period, the activity and log details are sent to the configured Uri.

Success LogRoller

FailedActivity are polled every day, when an activity executed over the retention period, the activity and log details are sent to the configured Uri.

No comments:

Post a Comment