Announcement Announcement Module
Collapse
No announcement yet.
Suggestions for issuing multiple Rest request concurrently from controller method Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Suggestions for issuing multiple Rest request concurrently from controller method

    I have a Spring MVC implementation which issues Rest requests to multiple services with in the controller methods. The controllers then map the responses to the UI model and return it to the UI. I currently have it working using the Spring RestTemplate to make the requests and handle responses and such. The issue I have is that when I have a controller method that makes multiple Rest requests they are made in serial which makes the response times to the UI much larger. Can anyone point me to an example or give me some ideas of a strategy to use where I can make multiple Rest requests from within a single controller method concurrently?

  • #2
    Not sure why this would be tied to the web stuff... Simply use springs task executor and let that execute the tasks and wait for the results. I suggest a read of the specific part of the reference guide for that.

    Comment

    Working...
    X