From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Asynchronous DNS resolving Date: Fri, 13 Feb 2015 10:46:04 +0200 Message-ID: <83siea42sz.fsf@gnu.org> References: <877fvmffrz.fsf@building.gnus.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1423817194 27316 80.91.229.3 (13 Feb 2015 08:46:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 13 Feb 2015 08:46:34 +0000 (UTC) Cc: emacs-devel@gnu.org To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Feb 13 09:46:24 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YMBtH-0006Nn-IF for ged-emacs-devel@m.gmane.org; Fri, 13 Feb 2015 09:46:23 +0100 Original-Received: from localhost ([::1]:53959 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YMBtH-0004NH-4l for ged-emacs-devel@m.gmane.org; Fri, 13 Feb 2015 03:46:23 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44972) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YMBt8-0004NC-U3 for emacs-devel@gnu.org; Fri, 13 Feb 2015 03:46:21 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YMBt2-0002Mv-VD for emacs-devel@gnu.org; Fri, 13 Feb 2015 03:46:14 -0500 Original-Received: from mtaout28.012.net.il ([80.179.55.184]:49891) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YMBt2-0002Mn-Mj for emacs-devel@gnu.org; Fri, 13 Feb 2015 03:46:08 -0500 Original-Received: from conversion-daemon.mtaout28.012.net.il by mtaout28.012.net.il (HyperSendmail v2007.08) id <0NJP00600BYVIM00@mtaout28.012.net.il> for emacs-devel@gnu.org; Fri, 13 Feb 2015 10:44:26 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout28.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NJP0088HCA2JA00@mtaout28.012.net.il>; Fri, 13 Feb 2015 10:44:26 +0200 (IST) In-reply-to: <877fvmffrz.fsf@building.gnus.org> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 80.179.55.184 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:182996 Archived-At: > From: Lars Ingebrigtsen > Date: Fri, 13 Feb 2015 18:10:24 +1100 > > So perhaps doing what Firefox used to do in the 90s would be a possibly > solution, anyway? That is, have a teensy multi-threaded executable that > reads commands from STDIN and outputs the replies on STDOUT. Like > lib-src/dns-helper.c or something. > > The command format would be something like > > > > I.e., > > 45 lookup fsf.org > 46 lookup images.fsf.org > ... > > (Tags for streaming commands and matching up the responses with the > requests, a la IMAP.) > > We'd then have something like > > (with-domain-name-lookup (ip "fsf.org") > (message "We got %s and now we're going to connect" ip) > (with-url ("http://fsf.org" :ip-address ip ...) > (pop-to-buffer (current-buffer)))) > > to do a completely asynchronous web request. > > Or does anybody have a better idea for solving this problem? Can't you simulate async resolution with timers? Or even by opening a network-process to the DNS server and talking to it directly (which can be done asynchronously with filters and sentinels and stuff)?