Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

database driven Web application performance questions . I need advise and help  RSS feed

 
raminaa niilian
Ranch Hand
Posts: 551
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for reading my post.
It is a week that im looking to find out some ways and advise about working on a Ads management (banner management)
system , it should be able to handle about 20-30 hit / second (each hit has 2 insert + 2 update in database).
Now i have some question about it from the guys who have experience or knowledge about it.
0-total tables count will not pass 17 , so it is small application in size ?
1-is it feasible with Tomcat + Derby or any small footprint database using DAO pattern(i did not come to a decision about db yet)
2-how much hard and painfull is tuning such application ? I will do it using Struts as front end.
3-What hardware it will require ? does it run on ordiinary machine or need some super power machines ?
4-I looked into caching solution , OScache , EHCache , ... . which one is suitable for my job , do you suggest any other caching solutio?
I thought that i cache data between DB and view , is it a wise move ? or i need some more caching ?
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A hundred hits a second doesn't sound like *that* much to me, especially if the queries are simple. It's probably most important to have the right indices installed in the database.

I'd start the project with a naive implementation and think about performance improvements when the basic solution is working and proven not to work fast enough. Introducing a cache later on shouldn't be too hard.

What you might want to think about is using an ORM tool that has a configurable build-in cache.
 
raminaa niilian
Ranch Hand
Posts: 551
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
Thank you for reply , 100 hits for you is easy but for a new comer or mid-level developer is a dream :-) .
you said i use ORM with caching ability ? do you mean hibernate ?

and should i use caching just for database ?

Thank you
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by raminaa niilian:
Hi
Thank you for reply , 100 hits for you is easy but for a new comer or mid-level developer is a dream :-) .


Have you tried? It shouldn't take too long to write a simple prototype to test how many hits you can get with your database of choice.


you said i use ORM with caching ability ? do you mean hibernate ?


That's certainly an option. I'm not an expert in this area, though. You might want to start a new topic in our ORM forum...


and should i use caching just for database ?


I can't tell without knowing much more about the system. I actually think I couldn't tell much before seeing a first rough implementation in action and measuring the bottlenecks.
 
Virag Saksena
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You mentioned 2 inserts and 2 updates per hit, but no selects.
One thing you could do to improve your insert/update performance is to use PreparedStatement and batch your operations.
So with each hit you would add to the Batch (you could use add timestamp for the hit at that point if needed)
When the batch reaches a pre-defined size (let's say 100) then execute it, so you'd avoid repeated database calls.
The only downside being that if your JVM crashes between the batch executes, you'd lose that data
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!