Results 1 to 7 of 7

Thread: Generic Slave for Remote chunking

  1. #1
    Join Date
    Mar 2011
    Posts
    7

    Default Generic Slave for Remote chunking

    Hi all,

    I'm trying to design a batch architecture based on spring-batch and JMS. I have read a lot about remote chunking and I have a question.

    I've seen that the slave that executes de ItemProcessor needs to create an specific context for each job. If you don't know the job beforehand, is there a way to create a generic slave, and along with the data pass the job definition (or the specific part of it)?

    TIA
    Felipe

  2. #2
    Join Date
    Mar 2011
    Posts
    7

    Default

    I have been investigating how to implement a generic slave. As I want the slave to be generic, the ChunkHandler shouldn't be initialized with a preconfigured ChunkProcessor. The ChunkProcessor must be passed to the ChunkHandler.

    I have thought to pass the ChunkProcessor within the JMS message. To do this, ChunkProcessor must be Serializable.

    One thing that I don't know is if this overhead of unmarshalling the ChunkProcessor is going to be expensive.

    Is this a sensible way to go?

    TIA
    Felipe

  3. #3
    Join Date
    Mar 2011
    Posts
    7

    Default

    I have seen that GridGain has done something similar:

    SerializableChunkProcessor

    TIA
    Felipe

  4. #4
    Join Date
    Mar 2011
    Posts
    7

    Default

    Hi all,

    Finally I have make it work. I did 3 things:
    - make all the objects serializable, specially the one's inside the ChunkProcessor
    - use annotations for the custom objects
    - enable loadtime-weaving in the remote slave to reconstruct the annotated objects

    If I can, I will upload the code as an example

    Thanks
    Felipe

  5. #5
    Join Date
    Nov 2011
    Posts
    23

    Default

    do you know same way how to executed partitioned step remotely.

  6. #6
    Join Date
    Mar 2011
    Posts
    7

    Default

    Take a look at this project. There are plenty of examples.

    http://code.google.com/p/springbatch-in-action/

    Also is worth having a look to the different integrations with grids.

    https://github.com/dsyer/spring-batch-grid

    I have done my example with JMS (JBoss). How are you planning to pass the data to the slaves?

    Regads,
    Felipe

  7. #7
    Join Date
    Nov 2011
    Posts
    23

    Default

    I have followed the dave syers example , i am not passing data to remote nodes. The data is there in the database. It picks from database and executes.But i have problem running remote step it says with following error

    step executions for given job execution are expected to be already saved

    and i have posted in this forum.
    http://forum.springsource.org/showth...ed-ERROR-GRIDG

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •