I am working on a program that receives search requests for a topic, makes API calls to the New York Times API to fetch articles related to the topic, and then to the Twitter API to fetch tweets mentioning the articles and finally processes the results and returns it back.
I have to make this multi-threaded. I thought about using an ExecutorService with a fixed-sized thread pool. So, every incoming search request will handled by a separate thread. I also use the Callable interface to submit tasks. The class that implements the Callable does the API processing(making & receiving API requests/responses). Finally the result is then fetched by a Future and displayed as the output. This happens for every incoming request.
Does this make sense? Or is there a better way to do this?
EDIT: I am running this on my local machine accepting data from the command line interface.