Hi there,
For 10,000 writes a day, I would go for the database solution. A database is designed for a multi-user scenario, while, as you found out, writing to an XML file may get you into concurrency problems.
Another approach is to cache the data in in-memory variables, and write them every 10 or 100 hits. This approach would only work if the exact count isn't very important. That is, missing a few counts shouldn't be a problem in that scenario. If, for instance, the server reboots, you loose the number of hits currently held in memory.
Cheers,
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
|