How can I design multi-threaded application for larger user base

Posted by rokonoid on Programmers See other posts from Programmers or by rokonoid
Published on 2012-11-22T01:29:19Z Indexed on 2012/11/22 11:13 UTC
Read the original article Hit count: 185

Filed under:
|
|

Here's my scenario, I need to develop a scalable application. My user base may be over 100K, every user has 10 or more small tasks. Tasks check every minute with a third party application through web services, retrieving data which is written in the database, then the data is forwarded to it's original destination.

So here's the processing of a small task:

while(true){
    Boolean isNewInformationAvailable = checkWhetherInformationIsAvailableOrNot();

    If(isNewInformationAvailable ==true){
       fetchTheData();
       writeToDatabase();
       findTheDestination();
       deliverTheData();

       isAvailable =false;
    }  
}

As the application is large, how should I approach designing this? I'm going to use Java to write it.

Should I use concurrency, and how would you manage the concurrency?

© Programmers or respective owner

Related posts about java

Related posts about design