I’m trying to understand why one would use Spring Batch over a scripting language like Ruby for running your batch-like jobs.
I’m working on something that will need to run repeatedly and thought Spring Batch sounds interesting because you could use POJOs. The thing is, I already have a job manager that can run whatever I tell it to and alert me if anything goes wrong. Would Spring Batch still be useful for this situation or no?
Thanks for your input.
Well, if Ruby has infrastructure for running batch jobs, it can compete with Spring Batch. Otherwise you’ll have to write a lot from scratch. And the basis is quite big: it’s not only periodic processing, but also exception handling, connectors for data providers and data consumers. If you feel you can program everything with Ruby – go ahead. Otherwise read Spring Batch docu and see, how the provided functionality can make your life easier.
Well, you need to be more concrete here. Business-specific objects (which flow through Spring Batch) can in general be not POJOs and Spring Batch does not care about that. But Spring Batch classes are programmed in a way they can be easily integrated into Spring, and thus they have setters/getters for parts that can be tuned.
At least from what you’ve mentioned you have only the “job management” part, but there is no “batch” part in your story. And that is more tricky: reading data in chunks from source, transforming, and writing it to destination. That includes the proper transaction management and handling of cases when chunk should be redone, or chunk cannot be restarted and one need to redo the whole job, or skipping the chunk.