Forum Discussion

srivera's avatar
srivera
New Contributor II
7 years ago

Scatter gather pattern

Does SnapLogic support some EAI patterns like Scatter-Gather? If so, where can I find them.

Thanks

6 Replies

  • srivera's avatar
    srivera
    New Contributor II

    Call multiple RESTful API currently and then join all the results back together for 1 return document.

    customer Info (input)

    • Call API 1 with customer info
    • Call API 2 with customer info or subset
    • Call API N with customer info
    • Wait for all to return
    • Gather all results together
    • return 1 merged document to caller

    Scatter-Gather

    • hrender's avatar
      hrender
      New Contributor

      I just did something like this but with multiple DB SELECT queries. I used an N-way copy to copy the data out to each SELECT with an N-way JOIN/merge snap on the return side to combine the results into a single document. It should work conceptually with multiple REST GETs in place of the DB SELECTs.

      • aakumar's avatar
        aakumar
        New Contributor III

        can you please share your piple line as an example? [after you remove any sensitive info from the pipeline]

    • aleung's avatar
      aleung
      Contributor III

      Here is what it might look like. You likely want to add mapper in places you want to do some cleansing with the payload. In the Join snap, you should select “Merge” as Join type.

      • srivera's avatar
        srivera
        New Contributor II

        Thanks Alan. I’ll check that out.