Page 1 of 1

Frequent Database Posting

Posted: Thu Dec 28, 2006 12:50 pm
by haptic
Hi, I have a concept for tracking a users visit to my flash site, and it would require information to be posted to a mySQL database frequently. Each time they click on a project it will post the amount of time they spent on the last project. I would say the average visitor to my site would probably make about 2-8 posts in the span of 2-8 minutes. Currently my site receives around 100 sessions/day, but this is expected to increase soon. Will this procedure be a problem for my database, bandwidth or server? is there a better method to retrieve this information?

ultimately this data will be utilized in a 3-dimensional bar graph, displaying project views, duration spent, and votes for favorites. The site this will be implemented into is http://www.haptic-data.com and under "post analysis" is a beta (xml-only) version of the dynamic graph.

Thank you!

Posted: Thu Dec 28, 2006 12:58 pm
by feyd
Let's do some math: assuming an average number of posts per visitor is 5 and that you'll hit 500 sessions per day. That's averaging one post per 34.5 seconds.

That is a VERY light load for a database.

Posted: Thu Dec 28, 2006 1:14 pm
by daedalus__
MySQL has a database engine that is optimized for temporary data but I forget what it is called and how it works.

Posted: Thu Dec 28, 2006 1:26 pm
by haptic
thanks for the help. Will sending this information to the database cause a major increase to my server's bandwidth?

Posted: Thu Dec 28, 2006 1:32 pm
by feyd
For the most part, not much. It depends on how much data you submit for each request.

Technically it's often possible to do all the calculations on the server using sessions. However this can get a tad bit murky if users open multiple tabs/windows.

Posted: Thu Dec 28, 2006 2:24 pm
by haptic
Thats a good point, I hadn't really thought about using sessions, maybe thats something I will integrate later if problems arise. Thanks for your help, I really appreciate it! I think I have all the information I need to get this project started.