• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Paul Clapham
  • Rob Spoor
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Carey Brown

Implement Async process for external service with callback to main Request - Springs

Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a design problem to solve where my application is developed using Springs.
There is a REST api which have to be designed in the following way.
Process request and call an external web service and get the results.
Start processing
-> Call External Web Service in async way. External service will inform main request once completes if main request is still alive.
-> Continue to process main request.
-> Check if async process completes in next 100millisec
-> If results arrived, return Status 201 with new URI to get complete results.
-> If external service is not complete, return Client with Status 202 asking client to call back after some time.

I am thinking on how to achieve this solution. I know we might have many solutions.
But can i have some good approach/suggestions in achieving this? Not very detailed.
Please let me know if you need any more details on this if it is not clear.
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic