From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: florian Newsgroups: gmane.emacs.help Subject: Using a command-line program (sqlite3) as a backend Date: Tue, 24 Mar 2009 14:18:34 -0700 (PDT) Organization: http://groups.google.com Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1237957317 16310 80.91.229.12 (25 Mar 2009 05:01:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 25 Mar 2009 05:01:57 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Mar 25 06:03:14 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LmLGi-0005Cb-Ai for geh-help-gnu-emacs@m.gmane.org; Wed, 25 Mar 2009 06:03:12 +0100 Original-Received: from localhost ([127.0.0.1]:59694 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LmLFL-0007Br-KZ for geh-help-gnu-emacs@m.gmane.org; Wed, 25 Mar 2009 01:01:47 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!postnews.google.com!p20g2000yqi.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 29 Original-NNTP-Posting-Host: 92.73.184.7 Original-X-Trace: posting.google.com 1237929515 30176 127.0.0.1 (24 Mar 2009 21:18:35 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Tue, 24 Mar 2009 21:18:35 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: p20g2000yqi.googlegroups.com; posting-host=92.73.184.7; posting-account=D6LMWQoAAAA9mPFBi-XXlCxVbyI2qOo- User-Agent: G2/1.0 X-HTTP-UserAgent: Opera/9.62 (Windows NT 5.1; U; en-GB) Presto/2.1.1,gzip(gfe),gzip(gfe) Original-Xref: news.stanford.edu gnu.emacs.help:167950 X-Mailman-Approved-At: Wed, 25 Mar 2009 00:58:28 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:63250 Archived-At: It seems to me I have a rather basic question: I would like to use an SQLite database, and be able to query and modify it from Elisp functions. It seems that nobody has written Elisp bindings for the SQLite library yet, and I am definitely not smart enough to do that myself. So I gather I will have to use SQLite's command-line interface, sqlite3. I don't see much of a problem in parsing the output (in fact, I've already written that), but I am wondering about the differences between running sqlite3 as a synchronous process for every query (in a one-shot fashion), and starting it up once, as an asynchronous process, and then having it linger in the background, sending it commands and parsing the output it returns as needed. To me, the synchronous method seems more robust, but I am wondering whether it will scale well (supposing I get fond of using the database and start to use it for more and more complex things). As to the asynchronous method, I seem to have heard that I/O via stdin and stdout is prone to, er, I don't know: hang? lock? I've forgotten, but I would much appreciate to be warned if that is the case. (I have tried to find hints in ispell.el (since that seems to be a similar situation), but only found out that it implements indeed both.) Can anybody offer me any advice here? Thanks so much! Florian