Safely logging data to a file or SQLite database during heavy traffic

3 views
Skip to first unread message

Malcolm

unread,
Dec 29, 2009, 11:24:38 PM12/29/09
to cherrypy-users
I've built a small CherryPy 3.2 application that's designed to log
data to file or a SQLite database.

What do I need to do (if anything) to make sure my writes to a regular
file on disk or to a SQLite database are atomic in nature when
multiple clients post data to my application simultaneously?

Do I need to use a Queue type data structure and then run a background
thread that monitors my Queue for data which it (and it alone) removes
and copies to the destination file or SQLite datatbase?

Thank you,
Malcolm

Reply all
Reply to author
Forward
0 new messages