Vous êtes sur la page 1sur 1

06 Apr 2009

Assignment 7: Parallel calls


At VeriPark, we do Internet banking applications where each web server typically has 200 available threads. Each Internet banking landing page akes !"# web service calls to back end syste s s$ch as credit card, core banking, loan anage ent, etc. Each call easily takes 2"% seconds. &e need to ake these calls in parallel so that the page loads in 2"% seconds at ost. 'owever when we are aking these parallel calls we can allocate one thread to each call. In that case one Internet banking c$sto er arriving at the landing page wo$ld then cons$ e # threads. (ne the ain thread the re)$est is getting serviced and then ! separate threads *ro the A+P thread pool to serve the *o$r parallel calls. In s$ch a case, i* 20 people arrive at the landing page all the available threads will be *inished and the 2,st person will wait % seconds $ntil any thread starts working on this person-s re)$est. In this e.ercise we want yo$ to design a parallel calling syste so that these parallel calls will only cons$ e the ain thread and the total thread co$nt o* the application will not decrease anyti e d$ring the e.ec$tion o* yo$r code. I* yo$ can anage this, then the scalability o* the internet banking web application will ove *ro 20 people to 200 people. A great i prove ent that /$sti*ies the i portance o* good technical design in so*tware. In this assign ent we re)$est yo$ to develop a web based application which will a database server. 0etails below1 ake parallel calls to

,. &e need to b$ild an A+P.2E3 application that calls *o$r stored proced$res in a database which each proc takes one second to e.ec$te and then ret$rn a string 2. 3he page needs to call these stored procs in parallel so that the e.ec$tion o* the page sho$ld not take three seconds b$t sho$ld take aro$nd one second. %. 3he page sho$ld display the strings retrieved *ro procs in a table in the page

!. +ince this is a server side application. &e sho$ld not create new threads b$t $se the e.isting threads in the A+P.2E3 pool. #. 3he application sho$ld be designed in s$ch a way that even tho$gh three parallel calls are e.ec$ting only (2E thread is cons$ ed *ro the thread pool.

Instructions
,. 4o$ have *o$r ho$rs to co plete this test 2. A*ter *o$r ho$rs we kindly re)$est yo$ to send $s back the *ollowing1 a. +creenhots b. Pro/ect *iles c. 0atabase script *iles

d. 3race res$lt showing that the available thread co$nt decre ents only one d$ring the e.ec$tion o* the page

Vous aimerez peut-être aussi