Issue Details (XML | Word | Printable)

Key: BATCH-375
Type: Bug Bug
Status: Closed Closed
Resolution: Won't Fix
Priority: Major Major
Assignee: Robert Kasanicky
Reporter: Robert Kasanicky
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Spring Batch

separate optional features from core framework

Created: 21/Feb/08 02:49 AM   Updated: 19/Jun/08 02:28 AM
Component/s: Core
Affects Version/s: 1.0.0.m5
Fix Version/s: 1.0.0.m5

Time Tracking:
Original Estimate: 0.25d
Original Estimate - 0.25d
Remaining Estimate: 0.25d
Remaining Estimate - 0.25d
Time Spent: Not Specified
Remaining Estimate - 0.25d

Issue Links:
Related


 Description  « Hide
I believe we need to carefully separate framework core functionality (transactional item processing with restart support) from other provided features - examples being start limit support and isAllowStartIfComplete property. I see these as nice-to-have features not essential to a batch framework and our architecture should clearly reflect that - currently they are penetrated in the very heart of the domain model and execution logic, which I see as a design flaw. They should instead be layered on top of the core (e.g. subclasses providing extra properties).

I remember Lucas arguing in the past that start limit support is a scheduling concern, strictly speaking out of framework's focus that would better be removed. I largely agree with that - however including few useful addons can indeed have a positive overall effect as it can serve as excellent example how to extend framework core capabilities cleanly - assuming we manage to achieve clear core/add-on separation in the first place.

 All   Comments   Work Log   Change History   FishEye   Related Builds      Sort Order: Ascending order - Click to sort in descending order
Dave Syer added a comment - 27/Feb/08 06:08 AM
Start limit is not a scheduling concern, nor is it nice to have (users must be able to protect against automatically running the same job with the same crummy data an infinite number of times). We are the only people who can answer the question "how many times has this job instance been run before"? This is a similar issue to BATCH-372, which we closed off. For my money all we need to do here is review the properties in the public API of Job and Step and make sure they are all actually used sensibly.

Robert Kasanicky added a comment - 27/Feb/08 07:53 AM
What about the isAllowStartIfComplete property? I think it would be best to remove it completely, it doesn't make any good sense to me.

Dave Syer added a comment - 27/Feb/08 11:21 AM
It makes sense to me: some steps are idempotent, and in fact often they are required as "preparation stages" (e.g. clear a directory), so they are always required, even if they were successfully executed already. If we could move this out of the Step interface. that would be good. Would that make sense though - doesn't the job need that information?

Dave Syer added a comment - 27/Feb/08 12:41 PM
Consensus seems to be: Where possible, flags can be combined and pushed down to the implementation, replaced with a shouldStart() query on the STep interface.

Robert Kasanicky added a comment - 28/Feb/08 02:46 AM
Note that moving the start limit and isAllowStartIfComplete properties from interface into implementation brings us back to the awkward execution logic where each step will be investigating its execution history although it is the first run of the job and there's nothing to be found in execution history.

Dave Syer added a comment - 28/Feb/08 03:16 AM
OK, so there's nothing to be gained. Closing.