We help IT Professionals succeed at work.

Interview question-howto do you improve scalability of the application in this case

chaitu chaitu
on
676 Views
Last Modified: 2010-05-18
one webapplication is there.In that application some users are doing voting(Y/N) on all the products;lets think user can do voting multiple times .

Let assume some 10000 users are doing voting on this application at the samer time.while inserting data in the table can we do any bulk inserts kind of thing ?the interview is mainly focussing on scalability of the application.how to do you improve scalability of the application?i said i will implement connection pooling concept or else executeBatch statements.but he is telling that how to use bulk inserts concept?


Comment
Watch Question

CERTIFIED EXPERT
Top Expert 2016

Commented:
Bulk inserts and batching is really the same thing, and *would* improve performance and scalability:

http://www.exampledepot.com/egs/java.sql/BatchUpdate.html
Java Developer
CERTIFIED EXPERT
Top Expert 2010
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Author

Commented:
you are talking about thread safe;do you mean that if i implement servlets in my application do i need to implement SingleThreadModel interface for all servlets?

"Servlet is loaded into the memory by Servlet Engine and it calls init() method on first request and then onwards only service() method is called for every other request by creating a separate thread for each request and finally destroy() method is called when the Servlet is removed by the Servlet Engine. Service() method can be replaced by doGet() or doPost() method.

Note that this architecture is a multi threaded model which is generally followed in most of the applications."

genearlly we follow above approach.Is it correct approach?
CERTIFIED EXPERT
Top Expert 2016

Commented:
There doesn't seem to be any more need for concern on the issue of thread safety than in any other web app that performs a db insert (i.e. the vast majority of them)

If you tell us more about how this voting occurs it might be possible to be more specific on improvements
Mick BarryJava Developer
CERTIFIED EXPERT
Top Expert 2010

Commented:
Yes thats a good approach, and you need to ensure your code is thread safe.
you want to also look at thread pool config for improving performance.

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.