title: Deciding between Spring Batch Step, Tasklet or Chunks
body: <p>I have a straight forward requirement in which, i need to read a list of items(from DB) and need to process the items and once processed, it has to be updated into DB.</p>
  
  <p>I'm thinking of using Spring batch Chunks with reader, processor and writer. My reader will return one item at a time from the list and sends it to processor and once processing is over, it returns to Writer where it updates the DB</p>
  
  <p>I may be multithreading it later with some cost of synchronization in these methods.</p>
  
  <p>Here I foresee a few concerns.</p>
  
  <ol>
  <li>Number of items to be processed could be more. May be in 10,000s or even more.</li>
  <li>some logical calculation is required in the processor. hence processing 1 item at a time. not sure about the performance even if it is multithreaded with 10 threads.</li>
  <li>Writer can update the results in the DB for that processed item. Not sure how to do batch updates because it always has only 1 item processed and ready.</li>
  </ol>
  
  <p>Is this approach correct for this kind of usecase or anything better can be done?
  Is there anyother way of processing a bunch of items at one call of reader, processor &amp; writer? if so, do i need to create some mechnism where i extract say 10 items from the list and give it to processor?
  it seems writer updates each records as it comes, batch updates makes sense only if the writer receives a bunch of processed items. any suggestion?</p>
  
  <p>Please throw some lights on this design for better performance.</p>
  
  <p>Thanks,</p>