6 Replies Latest reply on Sep 26, 2011 6:41 AM by Claus Ibsen

    Concurent Web Services call and design

    johnwalker Newbie



      Hoping someone can assist me with the following use case:


      1) Multiples clients can access a Web Service that is exposing a single operation:


      operation(int id, String .. params)


      2) Camel must:


      1. Validate the client message:

      1a.  The id value must be within a range (between 1 and N)

      1b.  For a given id, there must be M parameters

      For e.g., for id=1: M=3, for id=2: M=3, etc..

      1c.  Log Client requests:

      For e.g.: date, time, operation signature: id, String .. params

      2. Lookup the "target operation" from a database.

      For e.g:

      - id=1 linked to "targetOperation1(String p1, String p2, String p3)"

      - id=2 linked to "targetOperation2(String p1)"

      - etc.

      3. Call the the target operation (external web service)


      4. Send the target operation response back to the Client




      1.  How to manage with Camel concurrent call to the web service ?































      1. Does it create a socket automatically per client request ?

      2. If yes, does it use for that a pool of connections ?

      3. Is concurrency a problem to care about, or does Camel care about it alone ?

      2. Is the following design appropriate ?

      1. Competing Consumer EIP: To parallelize the Clients request and process them independantly from each others

      2. For each paralellized Client request, apply the Request-Reply EIP with a Processor to log, validate, lookup and identify the target Web Service to call

      3. Pipe the target Web Service calls (should/can I do that or should I call the target web service directly?). If so, how do I distinguish the responses and forward them to the correct reply queue ?

      4. Call the target Web Service

      5. Forward back to the reply queue the (request-reply EIP) the target web service response

      6. Send back to the client the response

      3. Is there an exisiting example around treating this problem ?


      4. Can Fuse IDE be the right tool to solve such problems ?


      Thanks a lot for any help!