Calling a web service on a Route

Clovertech Forums Cloverleaf Calling a web service on a Route

  • Creator
    Topic
  • #120929
    Rob Lindsey
    Participant

      We have to enhance data messages by calling a mapping web service for our insurances, the issue that I run into is the speed of the processing.  While we can process the data it just seems to do not very quickly, it is the limiting factor of our through put.  We have a timeout on the call but we are never hitting that.  I am wondering if anyone knows if we were to use Multi-Threaded translation under the Configure processes to have it call the web service on multiple messages at the same time.  Right now we have it setup with 2 sub threads, Message Ordering: Thread Out, Tcl Interpreters: All Restricted.

      We have 4 CPUs in our system  but the number of Sub-threads can go up to 16.  Does anyone know if we bump that number of sub-threads to a higher number if that will allow the engine to process multiple messages to the web service call at the same time?

      Thanks in advance for any information.

      Rob Lindsey

    Viewing 5 reply threads
    • Author
      Replies
      • #120930
        Peter Heggie
        Participant

          Is it just efficiency and performance you are concerned with, or is it also a strict requirement to complete the end-to-end message flow as soon as possible (after the message first enters Cloverleaf)?

          If ASAP end-to-end processing is not a strict requirement, then a different design pattern can be used. The interface can be split into two parts, where the first part ends with the message being stored in a database table, along with certain meta-data. The second part waits until conditions are met before pulling the message out of the DB table and sending them onto the rest of the interface process.

          The conditions to be met are that a certain number of messages are available in the table to be processed. SQL: Select <messages> where count (available messages) is greater than X.

          Peter Heggie

        • #120931
          Rob Lindsey
          Participant

            It is the performance but I have to keep the order.  I would really like to be able to have the web service call be called for 5 to 10 messages all at the same time if there are many messages waiting in the Recovery DB I want the route to call the Web service for as many as it can handle.  So if there are 100 msgs in the recovery db I want to process those as fast as possible by have lets say 10 messages start the translation at the same time and each one call the Web service instead of just single threaded.  I hope this makes sense.

          • #120934

            In CIS 2022.09.02, we added/improved Multi-threaded WS clients which will do as you describe I believe.

            -- Max Drown (Infor)

          • #120935
            Rob Lindsey
            Participant

              Max, would love to speak IRL about this so that maybe I can explain a bit better of what I am seeing and maybe not understanding.

              Possible?

              6158028183

            • #120937

              I’ll take a stab at explaining here. If you need more details, send me your email address and I’ll contact you.

              Most likely your delay is caused by the lag between when the query goes out and the response comes back in. The response arrives before the Await Replies timeout, so the query is not resent, but a queue does build up in state 11.

              One way to fix this is to use a “round-robin” trix ID with n identical outbound WS client threads. For example, the thread names would be query_1, query_2, …, query_5 and the trxid would route the messages to query_1, query_2, …, query_n. This effectively sends n messages out at a time. This is an asynchronous message flow which is obviously much faster.

              In CIS 2022.09.02 (much improved in CIS 2022.09.02) we added multi-threaded WS clients. You can configure a client for asynchronous message flow. In theory, you no longer need the “round robin” trxid or the multiple OB client threads because the WS client will handle the asynchronous traffic itself. The thread will send out a configurable number of queries and wait on acks for each query independently.

              You’ll find these settings under the Bus section of the WS client protocol properties.

              -- Max Drown (Infor)

            • #120938
              Rob Lindsey
              Participant

                So we have a program that we wrote to call a Web service and placed it on the route and not on the outbound thread as we need to enhance the data msg with the return from the web service and send it off to a different end point (i.e. outbound) so using outbound threads won’t work.

                So when we get 70,000+ data messages each one using a route, the route has the Web service call and the messages get backed up in state 5 waiting for the reply to come back from the web service.  I am trying to get multiple messages to be translated (i.e. from state 5 into state 7) at the same time.

                Added a picture of what a testing set of threads looks like and where the web service call is placed.  imdb_connection is the tclproc.

                robert   dot   m   dot  lindsey   at   quest diagnostics    dot  com    (remove spaces and change at and dot to what are necessary)

                Thanks

                 

                Attachments:
                You must be logged in to view attached files.
            Viewing 5 reply threads
            • You must be logged in to reply to this topic.