• Post Reply Bookmark Topic Watch Topic
  • New Topic

Design Phase  RSS feed

 
Atul Mishra
Ranch Hand
Posts: 140
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I am in the design phase of our new project using J2EE. [Technologies to be used is STRUTS for frontend and Eclipse is IDE. Right now its Tomcat as the server]

Following is what I have for one of the requirements -

15000-30000 concurrent users accessing the web site and selecting products from the DB. So that can be 15000-30000 simultaneous access to DB also. For this this is what I have, the common general approach.
1. front end, I have a user input page
2. Struts action classes which takes the input params and calls DAO to get result.
3. DAO class which selects from DB based on criteria [ DAO accesses, gets connection from a dataasource which has a connection pool set up]. while selecting I have to do updates also. [Like the status of the selected product needs to be updated for each users]

4. DAO returns me a "List" - which I add to Struts form class
5. In display JSP I iterate thru the list and display values.

Now for this flow, what all do I need to consider so that I get good performances ?

Since its 15000-30000 concurrent users, do I need to add a delegate between actionc alss and DAO ?

in DAO, I am using batch[select and update], anything which I can consider for a good performance ?

Whats the best "session handling" technique which I can use.
Please suggest ideas.

Thanks,
 
Roger Chung-Wee
Ranch Hand
Posts: 1683
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Even if you have 30,000 concurrent users, you will not have all of them requiring simultaneous DB access. Really, only a small fraction of those users will be doing anything at the same time.

You ask about a delegate. The purpose of a business delegate is to hide the business logic layer from the presentation layer, it is not a performance issue. I like the use of the business delegate as it's good design, you just need the Action class to call a proxy which knows what to do with the requests.
 
Atul Mishra
Ranch Hand
Posts: 140
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your reply.

Does my current design look okay for this ?

Will it be giving a good performance ?
As you say 30000 willnot "naturally" be accesing DB. But that should be considered right.
For J2EE GUI what all "patterns" need to be added so that there wont be any performance issue for 30000 concurrent users ?

Please suggest your thoughts.

Thanks again
 
rajesh bala
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would suggest not to confuse too much with patterns and performance. Patterns are there to solve common problems and maintain for good extensibility. Give higher preference to design and maintainability rather than performance. As you develop good design, performance can be taken care of.

Coming back to your question..

1. You can support 30,000 users concurrently. But ask your manager on the following. What is the realistic users hitting the application per second. What is the memory occupied by every user (might be sessions etc). So assume 2k per user. Then you need 30000 * 2k specifically for session management.
2. Ask him, what is the acceptable response time.
3. Ask him, Will the hardware be able to support this much.

~Rajesh.B
 
Vinay Singh
Ranch Hand
Posts: 174
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would agree with Roger to have business layer which would invoke your DAO.
Business delegate pattern fits in here.
Now as you mentioned that the user would be selecting products, I would assume that products do not change every 30 mins.
So why not load the products in server memory (not session) when you start up your application.
Servletlistner class helps you achieve this.
So when user asks for product you deliver it from server instead of going to database.
As and when these products gets updated , you could invoke the method of the class which loads this product and that could reload it in memory.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!