PDA

View Full Version : Spring Batch for OLTP


tomkerigan
Sep 13th, 2007, 05:00 PM
I realize that most people will use Spring Batch for "after hours" processing, stuff that can take its time because it isn't interactive or run during business hours.

That being said, I need to write some code for an OLTP system that has several hundred I/O calls (read-only JDBC & JMS), all of which must eventually succeed in order for this overall function to be a success. On the occasion that one of the I/Os fails, I'd like to be able to checkpoint the previous set of I/Os that have already completed successfully and take it from there. I'd also like to be able to do some of this stuff in parallel.

I know that this is doable in Spring Batch, however, I'm wondering if it's advisable to use it in such an interactive manner.

Thoughts?

Dave Syer
Sep 13th, 2007, 07:40 PM
A lot of the patterns expressed in the Spring Batch Infrastructure were designed to support this kind of use case, so I think it is very natural in fact. The use of messaging middleware and JDBC (read/write as well as read only) is so common that it has been a central part of our strategy to support this kind of application. I like to think of it as "transaction optimisation". The implementation of RepeatOperations and RetryOperations in particular are motivated by client feedback and real-life, high-volume applications that we have worked on.