From sunet-devel-request@scsh.net Thu Nov 3 08:23:31 2005 Return-Path: X-Original-To: scsh@informatik.uni-tuebingen.de Delivered-To: scsh@informatik.uni-tuebingen.de Received: from localhost (loopback [127.0.0.1]) by mx1.informatik.uni-tuebingen.de (Postfix) with ESMTP id EB4A7148; Thu, 3 Nov 2005 08:23:29 +0100 (NFT) Received: from mx1.informatik.uni-tuebingen.de ([127.0.0.1]) by localhost (mx1 [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 30276-04; Thu, 3 Nov 2005 08:23:28 +0100 (NFT) Received: from www.scsh.net (bernard.Informatik.Uni-Tuebingen.De [134.2.12.122]) by mx1.informatik.uni-tuebingen.de (Postfix) with ESMTP id D6CB813D; Thu, 3 Nov 2005 08:23:27 +0100 (NFT) Received: by www.scsh.net (Postfix, from userid 3123) id 974B15EC9; Thu, 3 Nov 2005 08:23:27 +0100 (MET) Old-Return-Path: X-Original-To: sunet-devel@scsh.net Delivered-To: sunet-devel@scsh.net X-Authenticated: #3102804 To: Scheme 48 mailing list , sunet-devel@scsh.net Newsgroups: gmane.lisp.scheme.scsh.devel,gmane.lisp.scheme.scsh Subject: Network API proposal, first status of implementation for Scheme 48 From: Andreas Rottmann Date: Thu, 03 Nov 2005 08:23:08 +0100 Message-ID: <87ek5yfb4z.fsf@ivanova.rotty.yi.org> User-Agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.4 (gnu/linux) Cancel-Lock: sha1:n8iOJcuiH4+/Flb2Rd+iTQJy0iA= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Posted-To: gmane.lisp.scheme.scsh.devel,gmane.lisp.scheme.scsh X-Y-GMX-Trusted: 0 Resent-Message-ID: Resent-From: sunet-devel@scsh.net X-Mailing-List: archive/latest/3 X-Loop: sunet-devel@scsh.net List-Post: List-Help: List-Subscribe: List-Unsubscribe: Precedence: list Resent-Sender: sunet-devel-request@scsh.net List-Id: List-Archive: Resent-Date: Thu, 3 Nov 2005 08:23:27 +0100 (MET) The following message is a courtesy copy of an article that has been posted to gmane.lisp.scheme.scsh.devel,gmane.lisp.scheme.scsh as well. Hi! This in fact a followup on my earlier mail[0]. [0] http://article.gmane.org/gmane.lisp.scheme.scsh.devel/60 I've now diverged from earlier plan to go the route outlined by Mike Sperber (clean up the scsh networking API, then implement that on Scheme 48), but instead started from Taylor campells TCP interface proposal[1], generalized it a bit, so it can also cover stream-oriented connections in other domains (e.g. AF_UNIX) and added datagram (specifically UDP) support -- see [2] for the resulting (still very rough) proposal. If have now started implementing this for Scheme 48; at the bottom of the mail is a short note on the current status and some implementation details. [1] http://mumble.net/~campbell/proposals/tcp.text [2] http://stud3.tuwien.ac.at/~e9926584/SchemeNetworkAPI.html I think this network API is general enough in principle that it could be submitted as an SRFI when polished and specified better. In comparison to the scsh (highlevel) API, I think it abstracts a bit better from the underlying BSD socket API; I'd really appreciate comments from the users of the current networking API of scsh (esp. SUnet developers) and Scheme 48, if 1) my proposal would suffice the needs of SUnet, if not, what else would be needed 2) you think this proposal is viable (if brushed up appropriatly) as a high-level, common network API for Scheme 48 and scsh If 2) can be agreed upon, I'd volunteer implementing the proposal on top of the current scsh interface, which should be quite easy, and give porting SUnet to it a go. Also, I'd like to know about what the state of things wrt. coordinating the network API with the PLT people (that Mike mentioned) is. Cheers, Rotty -- Andreas Rottmann | Rotty@ICQ | 118634484@ICQ | a.rottmann@gmx.at http://yi.org/rotty | GnuPG Key: http://yi.org/rotty/gpg.asc Fingerprint | DFB4 4EB4 78A4 5EEE 6219 F228 F92F CFC5 01FD 5B62 v2sw7MYChw5pr5OFma7u7Lw2m5g/l7Di6e6t5BSb7en6g3/5HZa2Xs6MSr1/2p7 hackerkey.com Python is executable pseudocode, Perl is executable line-noise. From sunet-devel-request@scsh.net Thu Nov 3 08:35:17 2005 Return-Path: X-Original-To: scsh@informatik.uni-tuebingen.de Delivered-To: scsh@informatik.uni-tuebingen.de Received: from localhost (loopback [127.0.0.1]) by mx1.informatik.uni-tuebingen.de (Postfix) with ESMTP id D7DCF153; Thu, 3 Nov 2005 08:35:15 +0100 (NFT) Received: from mx1.informatik.uni-tuebingen.de ([127.0.0.1]) by localhost (mx1 [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 30290-03; Thu, 3 Nov 2005 08:35:12 +0100 (NFT) Received: from www.scsh.net (bernard.Informatik.Uni-Tuebingen.De [134.2.12.122]) by mx1.informatik.uni-tuebingen.de (Postfix) with ESMTP id 9E8F913D; Thu, 3 Nov 2005 08:35:11 +0100 (NFT) Received: by www.scsh.net (Postfix, from userid 3123) id 6C9495EC9; Thu, 3 Nov 2005 08:35:11 +0100 (MET) Old-Return-Path: X-Original-To: sunet-devel@scsh.net Delivered-To: sunet-devel@scsh.net X-Authenticated: #3102804 To: Scheme 48 mailing list , sunet-devel@scsh.net Newsgroups: gmane.lisp.scheme.scsh,gmane.lisp.scheme.scsh.devel Subject: Re: Network API proposal, first status of implementation for Scheme 48 References: <87ek5yfb4z.fsf@ivanova.rotty.yi.org> From: Andreas Rottmann User-Agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.4 (gnu/linux) Date: Thu, 03 Nov 2005 08:35:07 +0100 Message-ID: <877jbqfal0.fsf@ivanova.rotty.yi.org> Cancel-Lock: sha1:EafCLg6ZojLQlUFAiTaN6TUUCiM= In-Reply-To: <87ek5yfb4z.fsf@ivanova.rotty.yi.org> (Andreas Rottmann's message of "Thu, 03 Nov 2005 08:23:08 +0100") MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Posted-To: gmane.lisp.scheme.scsh,gmane.lisp.scheme.scsh.devel X-Y-GMX-Trusted: 0 Resent-Message-ID: <4xH7FD.A.hmJ.v2baDB@bernard> Resent-From: sunet-devel@scsh.net X-Mailing-List: archive/latest/4 X-Loop: sunet-devel@scsh.net List-Post: List-Help: List-Subscribe: List-Unsubscribe: Precedence: list Resent-Sender: sunet-devel-request@scsh.net List-Id: List-Archive: Resent-Date: Thu, 3 Nov 2005 08:35:11 +0100 (MET) The following message is a courtesy copy of an article that has been posted to gmane.lisp.scheme.scsh,gmane.lisp.scheme.scsh.devel as well. Andreas Rottmann writes: > If have now started implementing this for Scheme 48; at the bottom > of the mail is a short note on the current status and some > implementation details. > Forgot that: + New structures NETWORKING, NETWORKING-INTERNALS. These implement the new networking interface. + The C part has been refactored quite a bit; once this is complete, the C part should only be driven by the NETWORKING package, and SOCKET should use the NETWORKING-INTERNALS or NETWORKING structures only. Currently, there is a mismatch between the SOCKET structure and the C code, effectivly breaking SOCKET for the most part (see below). + TCP client interface implemented; old SOCKET-CLIENT interface in SOCKET implemented on top of NETWORKING-INTERNALS. - Extended functionality (both old and new interface): + IPv6 support + Proper condition objects, so network failures can be handled gracefully - Extended functionality (new interface): + Allows to specify local interface address and port number to bind to. + Allows retrieval of remote and local network addresses by introducing a connection disjoint type. + Allows plug-in of alternate host name resolvers; like the old interface, the default resolver uses gethostbyname(), which block all threads, it now however is possible to use a more sophisticated thread-respecting resolver, like the one in SUNet. + TCP server interface implemented Regards, Rotty -- Andreas Rottmann | Rotty@ICQ | 118634484@ICQ | a.rottmann@gmx.at http://yi.org/rotty | GnuPG Key: http://yi.org/rotty/gpg.asc Fingerprint | DFB4 4EB4 78A4 5EEE 6219 F228 F92F CFC5 01FD 5B62 v2sw7MYChw5pr5OFma7u7Lw2m5g/l7Di6e6t5BSb7en6g3/5HZa2Xs6MSr1/2p7 hackerkey.com It's *GNU*/Linux dammit! From sunet-devel-request@scsh.net Fri Nov 4 01:19:20 2005 Return-Path: X-Original-To: scsh@informatik.uni-tuebingen.de Delivered-To: scsh@informatik.uni-tuebingen.de Received: from localhost (loopback [127.0.0.1]) by mx4.informatik.uni-tuebingen.de (Postfix) with ESMTP id 725AB1145; Fri, 4 Nov 2005 01:19:19 +0100 (NFT) Received: from mx4.informatik.uni-tuebingen.de ([127.0.0.1]) by localhost (mx4 [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 48480-03; Fri, 4 Nov 2005 01:19:17 +0100 (NFT) Received: from www.scsh.net (bernard.Informatik.Uni-Tuebingen.De [134.2.12.122]) by mx4.informatik.uni-tuebingen.de (Postfix) with ESMTP id 84CDF10FB; Fri, 4 Nov 2005 01:19:17 +0100 (NFT) Received: by www.scsh.net (Postfix, from userid 3123) id 545765EC9; Fri, 4 Nov 2005 01:19:17 +0100 (MET) Old-Return-Path: X-Original-To: sunet-devel@scsh.net Delivered-To: sunet-devel@scsh.net X-Authenticated: #3102804 To: James Graves Cc: Scheme 48 mailing list , sunet-devel@scsh.net Subject: Re: Network API proposal, first status of implementation for Scheme 48 (resend) References: <87ek5yfb4z.fsf@ivanova.rotty.yi.org> <436A794B.4020607@xnet.com> From: Andreas Rottmann Date: Fri, 04 Nov 2005 01:19:13 +0100 In-Reply-To: <436A794B.4020607@xnet.com> (James Graves's message of "Thu, 03 Nov 2005 14:55:39 -0600") Message-ID: <87irv9l0xq.fsf@ivanova.rotty.yi.org> User-Agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Y-GMX-Trusted: 0 Resent-Message-ID: <-Myu3.A.ZsK.FkqaDB@bernard> Resent-From: sunet-devel@scsh.net X-Mailing-List: archive/latest/5 X-Loop: sunet-devel@scsh.net List-Post: List-Help: List-Subscribe: List-Unsubscribe: Precedence: list Resent-Sender: sunet-devel-request@scsh.net List-Id: List-Archive: Resent-Date: Fri, 4 Nov 2005 01:19:17 +0100 (MET) James Graves writes: > (resend) > > Andreas Rottmann wrote: > >> [2] http://stud3.tuwien.ac.at/~e9926584/SchemeNetworkAPI.html >> >> I think this network API is general enough in principle that it could >> be submitted as an SRFI when polished and specified better. In >> comparison to the scsh (highlevel) API, I think it abstracts a bit >> better from the underlying BSD socket API; I'd really appreciate >> comments from the users of the current networking API of scsh >> (esp. SUnet developers) and Scheme 48, [...] > > I'll need to sit down and review the proposal as a whole. > > However, as a potential user, I've got a comment. > > I'm currently working (slowly) on creating an interface for OpenSSL for > Scheme 48. > Cool! I'd love to hear wether TLS/SSL can be implemented as a natural extension of my proposal :). I've got a nit, however: have you considered wrapping GnuTLS[0] instead? OpenSSL has this unfortunate GPL-incompatibilty issue[1]. Also, you might be interested in my Scheme-level FFI for Scheme 48[2], although such a low-level library binding as TLS would probably be better done the "old fashioned way" anyway. [0] http://www.gnu.org/software/gnutls/ [1] http://www.gnome.org/~markmc/openssl-and-the-gpl.html [2] http://community.schemewiki.org/?scheme48-hacks > Normally it expects to be handed file descriptors of the already opened > TCP socket (to a web server, for example). > > Currently in Scheme 48, there are macros to access the underlying file > descriptor of a given port. How can / should this be handled with the > new network API? Or would there not be any changes at this level? > At that level, the new implementation should not matter, as it uses channels and ports in exactly the same ways as the old, a bit limited, socket API of Scheme 48 did. > Also, is this something that should be standardized across Scheme > implementations? > Some kind of network API should be definitly standardized across Scheme implementations. I'm ATM trying to get feedback if my proposal (when completed) is worthwhile to submit as an SRFI. Cheers, Rotty -- Andreas Rottmann | Rotty@ICQ | 118634484@ICQ | a.rottmann@gmx.at http://yi.org/rotty | GnuPG Key: http://yi.org/rotty/gpg.asc Fingerprint | DFB4 4EB4 78A4 5EEE 6219 F228 F92F CFC5 01FD 5B62 v2sw7MYChw5pr5OFma7u7Lw2m5g/l7Di6e6t5BSb7en6g3/5HZa2Xs6MSr1/2p7 hackerkey.com Say NO to Software Patents! -- http://petition.eurolinux.org/