Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4273200
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T07:40:50+00:00 2026-05-21T07:40:50+00:00

I am in the process of writing a web-app that uses multiple web APIs.

  • 0

I am in the process of writing a web-app that uses multiple web APIs.
For a single request of a single user, my app may need to perform up to 30 HTTP requests to other sites. The site housing the web-app can have hundreds of concurrent users.

I’ve been looking around trying to figure out which library should I use. I’m looking for a mature project that has detailed documentation and tested code, one that will still be around in years to come. Not sure if something like that exists (!)

Couple of questions :

  1. In a case such as described above, should I be using an asynchronous HTTP client (without threading), or a regular (possibly pooled) HTTP client (with threading)? Asynchronicity relieves my app from using threads, but makes the code more scattered – will the above mentioned number of requests burden my server too much? (it says here that asynchronous is more scalable)

  2. Which library is the common one to use? Is it Apache HttpComponenets HttpClient or its asynch couterpart HttpAsynchClient – which is in Alpha…)? How about jfarcand’s AsyncHttpClient?


Okay, let’s say I will use threads.
After digging around I realize that spawning threads from within a servlet (in my case – a Struts action), may be a big No No :

related questions:

What is recommended way for spawning threads from a servlet in Tomcat

Need help with java web app design to perform background tasks

Can i spawn a thread from a servlet ?

The way I see it, these are my options:

  1. use my own thread pool (container doesn’t manage my threads)
  2. use a WorkManager such as CommonJ (seems like an inactive product)
  3. use a 3rd party scheduler such as Quartz (may be an overkill … ?)

I would appreciate any recommendations for this specific use case – aggregating lotsa data from different web services (this aggregation is invoked by a single user’s single request).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T07:40:51+00:00Added an answer on May 21, 2026 at 7:40 am

    Good question. I would try an asynchronous solution first to see how everything works. The asynchronous solution would be the simplest to implement.

    If that doesn’t work, try a more threaded model.

    I would use HttpClient for making your requests. I’ve worked with it a lot and use it for any http work that I have to do.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am writing a Web app that will need to run a background process
I am in the process of writing a web app that includes a reporting
I'm writing a web testing framework for windows that uses multiple browsers to test
I'm in the process of writing a small web app that would allow me
I'm writing a web app that will use twitter as its primary log on
We are in the process of writing a native windows app (MFC) that will
At work we have a web app that we'll need to interface with another
I have an app that I am in the process of writing and I
I'm writing an iPhone app that requests data from a web service, and in
I'm writing a web-crawler that should be able to parse multiple pages at the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.