Hi Allan, I have done this exact thing recently, I needed a "high speed" persistent queue in my one application running on SPARC. My application may have had some different requirements but essentially message stream from one system to the "SQLite queue" and get sent to another system(both directions).
I used SQLite in WAL mode....this is essential....you may also need to use a "busy handler".... I am not C expert at all but the BASIC queue I implemented in SQLIte seems to work 100% for my purposes.....and so far not a single issue with it running..... Chat later ;-) Lynton -----Original Message----- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Allan Nielsen Sent: Friday, September 09, 2011 9:04 AM To: sqlite-users@sqlite.org Subject: [sqlite] Implementing persistent queues in sqlite Hi Sqlite users After several frustrating days, i have decided to drop using BerkeleyDB for implementing a persistent queue, and new as an alternative I'm looking at sqlite. I have noticed that this topic have been discussed before on this list several time, but I'm asking again as I have some quite specific questions, but also because things might have changed since. First of all, let me explain my use cases: The queue is going to be used as an replacement for the syslog daemon. The sqlite functionality which will push new entries to the to queue, will be linked directly into my logging logging library and should insert into the table every time I do a syslog. The sqlite functionality which pop entries from the queue will be used from a call-home process where it will post new entries to a web server. When an entry is posted successfully the entries must be deleted, not before. If an error occurs, the entries must be posted again. Following are important - Several process will append to the same table simultaneous - Process might die while doing an insert or update - Long lived processes connected to the database may not be affected by other processes which dies doing transactions. - Performance is not unimportant, but is not expected to be a problem either. - Posting of messages might take a long time, during this period it must be possible to add new entries. So, here are my questions: - Could sqlite be the right tool for the job - Is there anything I should be aware of - Do you know of any projects which do this already - Does any of you have examples on how to do this Thanks for your time Allan W. Nielsen _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users ---------------------------------------------------------------------------- NOTICE: Please note that this eMail, and the contents thereof, is subject to the standard Sasol eMail legal notice which may be found at: http://www.sasol.com/legalnotices If you cannot access the legal notice through the URL attached and you wish to receive a copy thereof please send an eMail to legalnot...@sasol.com ---------------------------------------------------------------------------- _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users