Announcement Announcement Module
Collapse
No announcement yet.
Conditionally enriching an item using multiple DAOs Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Conditionally enriching an item using multiple DAOs

    In a use case where I need to conditionally call a second service based on the results of a first service (i.e. by inspecting attributes on the item populated using the first DAO) is it appropriate to use a delegating writer together with a CompositeItemTransformer (see multi-line sample job - uses simple transformer)? Essentially applying the filter chain pattern to the item.

    Or is there another/better way to accomplish the same thing?

    Also,
    In the use case where there are three DAOs (where the 2nd and 3rd can be executed in parallel, but depend on results of the 1st), how do you parallelize the 2nd and 3rd DAOs?

    Nigel

  • #2
    Originally posted by ndefreitas View Post
    In a use case where I need to conditionally call a second service based on the results of a first service (i.e. by inspecting attributes on the item populated using the first DAO) is it appropriate to use a delegating writer together with a CompositeItemTransformer (see multi-line sample job - uses simple transformer)? Essentially applying the filter chain pattern to the item.

    Or is there another/better way to accomplish the same thing?
    it sounds like one transformer with an if statement would probably do it... 'filters' aren't usually conditional.

    Originally posted by ndefreitas View Post
    Also,
    In the use case where there are three DAOs (where the 2nd and 3rd can be executed in parallel, but depend on results of the 1st), how do you parallelize the 2nd and 3rd DAOs?

    Nigel
    services or DAOs? services can be exposed with message exchange patterns that allow for parallelism, while DAOs are typically invoked synchronously. chances are that you'd probably be better off parallelizing chunk processing rather than DAO invocation just because there's a whole host of concurrency issues with that approach.

    Comment


    • #3
      Chunk Processing

      I'll take a look at the chunking example and services...

      Comment

      Working...
      X