[Logo] Terracotta Discussion Forums
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
[Expert]
Spring Batch Integration  XML
Forum Index -> Terracotta for Spring
Author Message
patb23

neo

Joined: 11/16/2009 05:34:09
Messages: 2
Offline

Hi,
I am a newbie and got to know of Terracotta through Spring batch documentation. My knowledge is limited to first few chapters of Terracotta book.

Have a question on how Terracotta can be used in the Partitioning of Batch Process. (http://static.springsource.org/spring-batch/reference/html-single/index.html#partitioning)
If StepExecutionSplitter is responsible for splitting into blocks of work and PartionHandler is responsible for forking, which of these two should Terracotta be informed of?
1. Assuming a grid size of 2, If it is Partition Handler, will each Terr-Client work on its own Partition (that was split by the StepExecutionSplitter)?
2. My understanding so far is that terracotta would take care of this transparently if you specify the object & step. If so, why would I need Spring's Partitioning Support?
Hope my question is clear. Appreciate any suggestions/directions.
The Batch Step is given below:
Code:
 	<bean name="dscall:master" class="org.springframework.batch.core.partition.support.PartitionStep" >
 		<property name="jobRepository" ref="jobRepository" />
 		<property name="stepExecutionSplitter">
 			<bean class="org.springframework.batch.core.partition.support.SimpleStepExecutionSplitter">
 				<constructor-arg ref="jobRepository" />
 				<constructor-arg ref="ds-call" />
 				<constructor-arg>
 					<bean class="com.pcg.batch.partition.support.ListPartitioner">
 						<property name="cache" ref="ehcache" />
 					</bean>
 				</constructor-arg>
 			</bean>
 		</property>
 		<property name="partitionHandler">
 			<bean class="org.springframework.batch.core.partition.support.TaskExecutorPartitionHandler">
 				<property name="gridSize" value="4"/>
 				<property name="taskExecutor">
 					<bean class="org.springframework.core.task.SimpleAsyncTaskExecutor" >
 						<property name="concurrencyLimit" value="-1"/>
 					</bean>
 				</property>
 				<property name="step" ref="ds-call" />
 			</bean>
 		</property>
 	</bean>
 	<batch:step id="ds-call">
 		<batch:tasklet>
 			<batch:chunk reader="policyReader" writer="dsWriter" commit-interval="5"  task-executor="partitionTaskExecutor" throttle-limit="5"/>
 		</batch:tasklet>
 	</batch:step>
 

ari

seraphim

Joined: 05/24/2006 14:23:21
Messages: 1665
Location: San Francisco, CA
Offline

Spring Batch is not well designed to cluster on Terracotta. It assumes presence of a GridGain-like framework. I recommend taking a look at the TIM built by Grid Dynamics and its associated webcast available somewhere here on our site for more direction.

Sorry. I recognize that using Springds stuff is attractive due to the size of their community and quality of their software but we never did get the traction we wanted with the Batch team to build out the integration to us properly :(

--Ari
[WWW]
tgautier

seraphim

Joined: 06/05/2006 12:19:26
Messages: 1781
Offline

It seems to me the Spring Batch forums would be a better place to ask this question.

http://forum.springsource.org/forumdisplay.php?f=41

As for support of Spring Batch, in my understanding there are experimental versions of clustering support for Spring Batch for TC, although as Ari says the design of Spring Batch assumes a database and doesn't really gain much value when introducing Terracotta.
[WWW]
patb23

neo

Joined: 11/16/2009 05:34:09
Messages: 2
Offline

Thank you very much for the replies. What was not clear to me was - there is a chapter in the book that talks about Spring integration and at the same time Spring batch API mentions support for frameworks including Terracotta. I did not know which way should I start to achieve Virtualization. Hence my question.

I gather from your responses that it would be easier for me to start with the approach in the book (it would be more specific to terracotta. Also it is easier to get help from the Forum).

Please note that I tried the PartionHandler (Batch API) by specifying the size of each partition (without virtualization - running on the same JVM). I guess with Terracotta, it would have been transparent and will be managed by Terracotta.
Thanks

 
Forum Index -> Terracotta for Spring
Go to:   
Powered by JForum 2.1.7 © JForum Team