From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: sqlite3 Date: Mon, 06 Dec 2021 09:05:34 -0500 Message-ID: References: <87tufmjyai.fsf@gnus.org> <875ys2lyt0.fsf@yahoo.com> <21295634-3291-4170-BA93-0542EFB1C3FA@mit.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26793"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: Arthur Miller , Po Lu , "larsi@gnus.org" , "emacs-devel@gnu.org" To: Qiantan Hong Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Dec 06 15:08:17 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1muEfA-0006ib-RK for ged-emacs-devel@m.gmane-mx.org; Mon, 06 Dec 2021 15:08:17 +0100 Original-Received: from localhost ([::1]:42606 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1muEf9-0007aR-TX for ged-emacs-devel@m.gmane-mx.org; Mon, 06 Dec 2021 09:08:15 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:45694) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1muEcw-000344-Hr for emacs-devel@gnu.org; Mon, 06 Dec 2021 09:05:58 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:3555) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1muEct-0004kF-KX for emacs-devel@gnu.org; Mon, 06 Dec 2021 09:05:57 -0500 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 56F58100241; Mon, 6 Dec 2021 09:05:53 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id ED784100091; Mon, 6 Dec 2021 09:05:51 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1638799551; bh=GjlOqxiU675kpP6uEq/1nuZiIKeizJ/x98cO2bAKuxw=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=K5Wb8lYux/p39h8QMyDzZk4D229YnD6EdnwRiPAcWRKB2Lbp/qOJQQXcXW9ba0Hap ktCc1LAoeiK5RGGog8F7WzaPKub28y7jA/T3dA397HMD687ZbahZknRVFe+BrkrAE4 umqm0Tbd2/E011cc/9706v5ydIruN9Iu04eUVnaM+KkiZyKuqdMZ6+9+q6Fk5HAQKt zAtFnFTf+OQO/QePa9PDIQU3hmYV8dM8ZzYkVOAnomI07JJ247UmjBr3rZgbU6I0Vs 8WFfbmJ9ja1WV/7duQ+5cAw3Gx4R1a6P8f0vAXPHF2j5AGbO+bVbw6lKnNGgDIZV3T +0N/4Z6O9CBiA== Original-Received: from ceviche (unknown [216.154.30.173]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id B117D1209B7; Mon, 6 Dec 2021 09:05:51 -0500 (EST) In-Reply-To: <21295634-3291-4170-BA93-0542EFB1C3FA@mit.edu> (Qiantan Hong's message of "Mon, 6 Dec 2021 13:50:51 +0000") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:281112 Archived-At: > It seems that to make it work one always need a single =E2=80=9Cmaster=E2= =80=9D process > that have exclusive access to the file and serves all read/write request. > It can be a database process, but I think an Emacs itself can also perfec= tly > do the job, (ab)using collaborative editing. Of course, there are many ways to skin this cat. I was just pointing out that the "naive" solution built on read+prin1+write-region doesn't work well enough if you want it to be robust. And the solution to the problem involves a very significant change to the code. Stefan