From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HTML_MESSAGE,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 24908 invoked from network); 4 Jan 2021 04:40:51 -0000 Received: from tb-ob0.topicbox.com (64.147.108.117) by inbox.vuxu.org with ESMTPUTF8; 4 Jan 2021 04:40:51 -0000 Received: from tb-mx1.topicbox.com (tb-mx1.nyi.icgroup.com [10.90.30.61]) by tb-ob0.topicbox.com (Postfix) with ESMTP id 18DE627532 for ; Sun, 3 Jan 2021 23:40:45 -0500 (EST) (envelope-from bounce.mMcb2e189b0570c6833f195230.r522be890-2105-11eb-b15e-8d699134e1fa@9fans.bounce.topicbox.com) Received: by tb-mx1.topicbox.com (Postfix, from userid 1132) id 0DA72100C0B5; Sun, 3 Jan 2021 23:40:45 -0500 (EST) ARC-Authentication-Results: i=2; topicbox.com; arc=pass; dkim=none (no signatures found); dmarc=none policy.published-domain-policy=none policy.applied-disposition=none policy.evaluated-disposition=none (p=none,d=none,d.eval=none) policy.policy-from=p header.from=monkey.org; spf=pass smtp.mailfrom=marius.eriksen@gmail.com smtp.helo=mail-qt1-f171.google.com; x-internal-arc=fail (as.1.topicbox.com=pass, ams.1.topicbox.com=fail (message has been altered)) (Message modified while forwarding at Topicbox) ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d= topicbox.com; h=mime-version:from:date:message-id:to :content-type:list-help:list-id:list-post:list-subscribe :reply-to:subject:content-transfer-encoding:list-unsubscribe; s= sysmsg-1; t=1609735244; bh=/6iV9JWW5kJQWu2PgEdw7JaGujFOe20hN3ulq Xasj70=; b=h64FZCE2zYD80lsPBAqfEL7Mr8C9XjmMseGbrp0q+PyLBHKSgoitS JmMsJB+jxifKDjQ67HqF0wAgOOmk+wJbZ0T25xCX9FcQWOnDKO6be3NPMG7XbkNF NaKQOj6mVmG2EE1Fj87XoSk+KCl3s9+V/y0/hsJHcX/f1tFxijZOFs= ARC-Seal: i=2; a=rsa-sha256; cv=pass; d=topicbox.com; s=sysmsg-1; t= 1609735244; b=BzZDlfb8cCh/hVAjgvjvZIMpzwqShS6cT4ZjcOI2BF1Iy3bnSF weuVZ9OIwslkIhGs69P9yTBbf7d361CqLgTX+RjBzLr1qNQDgw+Dd/SBkzuNa5uA gq6HUyfsb51JKK82qn3qBHvcoxFJaV9s/eLWftP8/ot5QB+v4qPKd76kY= Authentication-Results: topicbox.com; arc=pass; dkim=none (no signatures found); dmarc=none policy.published-domain-policy=none policy.applied-disposition=none policy.evaluated-disposition=none (p=none,d=none,d.eval=none) policy.policy-from=p header.from=monkey.org; spf=pass smtp.mailfrom=marius.eriksen@gmail.com smtp.helo=mail-qt1-f171.google.com; x-internal-arc=fail (as.1.topicbox.com=pass, ams.1.topicbox.com=fail (message has been altered)) (Message modified while forwarding at Topicbox) X-Received-Authentication-Results: tb-mx0.topicbox.com; arc=none (no signatures found); bimi=skipped (DMARC none); dkim=none (no signatures found); dmarc=none policy.published-domain-policy=none policy.applied-disposition=none policy.evaluated-disposition=none (p=none,d=none,d.eval=none) policy.policy-from=p header.from=monkey.org; iprev=pass smtp.remote-ip=209.85.160.171 (mail-qt1-f171.google.com); spf=pass smtp.mailfrom=marius.eriksen@gmail.com smtp.helo=mail-qt1-f171.google.com; x-aligned-from=fail; x-google-dkim=pass (2048-bit rsa key) header.d=1e100.net header.i=@1e100.net header.b=plznJuAW; x-ptr=pass smtp.helo=mail-qt1-f171.google.com policy.ptr=mail-qt1-f171.google.com; x-return-mx=pass header.domain=monkey.org policy.is_org=yes (MX Records found: mx.monkey.org.cust.b.hostedemail.com); x-return-mx=pass smtp.domain=gmail.com policy.is_org=yes (MX Records found: alt4.gmail-smtp-in.l.google.com,alt3.gmail-smtp-in.l.google.com,alt2.gmail-smtp-in.l.google.com,gmail-smtp-in.l.google.com,alt1.gmail-smtp-in.l.google.com); x-tls=pass smtp.version=TLSv1.2 smtp.cipher=ECDHE-RSA-AES256-GCM-SHA384 smtp.bits=256/256; x-vs=clean score=-100 state=0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=9fans.net; h= mime-version:from:date:message-id:to:content-type:list-help :list-id:list-post:list-subscribe:reply-to:subject :content-transfer-encoding:list-unsubscribe; s=dkim-1; bh=HVucW/ y/jUFk731iy9AZQOdAfK+IcqYijmC9YhC2raY=; b=kHIMS4xOkMaAv6kLfCEI4b gOsl+Z8oSHXWhZqOJ98IazkkJgQhTIJAeglGD+UPEGz3hy8kdGJjkJ0Pgg1OLNfO 0j6pWL/gln0H1g9qr6cBGMwRTNBBecB/CSfdmYCXCyVM2+QqWbijV1fkz17RZBZM epXuX9rT3Y88/x/ZFOYjg= Received: from tb-mx0.topicbox.com (localhost.local [127.0.0.1]) by tb-mx0.topicbox.com (Postfix) with ESMTP id A8315F71D74 for <9fans@9fans.net>; Sun, 3 Jan 2021 23:40:36 -0500 (EST) (envelope-from marius.eriksen@gmail.com) Received: from tb-mx0.topicbox.com (localhost [127.0.0.1]) by tb-mx0.topicbox.com (Authentication Milter) with ESMTP id 1401E046630; Sun, 3 Jan 2021 23:40:36 -0500 ARC-Seal: i=1; a=rsa-sha256; cv=none; d=topicbox.com; s=arcseal; t= 1609735236; b=yEjzJjF5wJg+OBKsLA1CJXw25srtfk2KtQKPRScnqJq+0YSO3z LsL9a1tZNTUh0QZrXQBdXjhTjBhoTmFCJ3ty3yC1YwQXVJ5GEb73fGShl2wyJ81/ 2EYANsNUkP9t3K98yc6I2XAGBRclKGASBy+AgKNAhrIeAIEsLXp3/yzT1pXjspJ2 NYY8Ktlv01J/wu8TCjfVnHqn56gURAj0Q0jZ1mUsfMBFfx6LiAsmwmBsKL86I8Nv koY/98x0KKBm9t7ldteUAi+lnd1nxmKE1aD7HnBhGk9/M5gRVaQVqJwLSu/I6+/u SgbNtgFzAVgqnG5PTHe6dCtWDpTUoaU9zbPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d= topicbox.com; h=mime-version:from:date:message-id:subject:to :content-type; s=arcseal; t=1609735236; bh=lK7CjN9lsV2An+/EmWkXq r1gAb13kjidC1ND5tLKoNY=; b=XfignAwToHg/sTA1sAA9FnJDsZ8RqeHNSvCnU cGTfiRnUvtgZ9vv6Z5s5JiduMPSdjtteF9NLkJQFiQc5zTdJHecrV+67MFNbJGVo pECIVUkCg9W2Z/4DluwmPDKpn90r/uX/TbSOCyUsQmHhVJu7s/86v+jUfY7GvjVX MCfpaEvS0iYmTU6rBQ5QLwMPW8ulE9+Ea6M+/BhTViR645LMBAoWFZgBuG8+Qcqb V8/zoNNEZ8ftRZtXehRLOBVkH5gj2ftoKjkd6VX1mAO2exU6bg52t0yIhpvUfdtC YuDxt5Db6XF41+irbb0JJaPJs0e/WLwoM2G2RpXGniN9QI4gg== ARC-Authentication-Results: i=1; tb-mx0.topicbox.com; arc=none (no signatures found); bimi=skipped (DMARC none); dkim=none (no signatures found); dmarc=none policy.published-domain-policy=none policy.applied-disposition=none policy.evaluated-disposition=none (p=none,d=none,d.eval=none) policy.policy-from=p header.from=monkey.org; iprev=pass smtp.remote-ip=209.85.160.171 (mail-qt1-f171.google.com); spf=pass smtp.mailfrom=marius.eriksen@gmail.com smtp.helo=mail-qt1-f171.google.com; x-aligned-from=fail; x-google-dkim=pass (2048-bit rsa key) header.d=1e100.net header.i=@1e100.net header.b=plznJuAW; x-ptr=pass smtp.helo=mail-qt1-f171.google.com policy.ptr=mail-qt1-f171.google.com; x-return-mx=pass header.domain=monkey.org policy.is_org=yes (MX Records found: mx.monkey.org.cust.b.hostedemail.com); x-return-mx=pass smtp.domain=gmail.com policy.is_org=yes (MX Records found: alt4.gmail-smtp-in.l.google.com,alt3.gmail-smtp-in.l.google.com,alt2.gmail-smtp-in.l.google.com,gmail-smtp-in.l.google.com,alt1.gmail-smtp-in.l.google.com); x-tls=pass smtp.version=TLSv1.2 smtp.cipher=ECDHE-RSA-AES256-GCM-SHA384 smtp.bits=256/256; x-vs=clean score=-100 state=0 X-ME-VSCause: gggruggvucftvghtrhhoucdtuddrgedujedrvdefuddgudehkeculddtuddrgeduhedrtd dtmdcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggft fghnshhusghstghrihgsvgdpuffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftd dtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpegghfffkffuvfgt segrtderredttdejnecuhfhrohhmpedfmhgrrhhiuhhsucgrrdcuvghrihhkshgvnhdfuc eomhgrrhhiuhhssehmohhnkhgvhidrohhrgheqnecuggftrfgrthhtvghrnhepieegjeev ffdtfedvieehleffkefffeetteetvedtvdefgedukeekffefuefgjefhnecuffhomhgrih hnpehgihhthhhusgdrtghomhenucfkphepvddtledrkeehrdduiedtrddujedunecuvehl uhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepvddtledrkeehrdduiedtrd dujedupdhhvghlohepmhgrihhlqdhqthduqdhfudejuddrghhoohhglhgvrdgtohhmpdhm rghilhhfrhhomhepoehmrghrihhushdrvghrihhkshgvnhesghhmrghilhdrtghomhequc fukfgkgfepuddvuddttd X-ME-VSScore: -100 X-ME-VSCategory: clean Received-SPF: pass (gmail.com ... _spf.google.com: Sender is authorized to use 'marius.eriksen@gmail.com' in 'mfrom' identity (mechanism 'include:_netblocks.google.com' matched)) receiver=tb-mx0.topicbox.com; identity=mailfrom; envelope-from="marius.eriksen@gmail.com"; helo=mail-qt1-f171.google.com; client-ip=209.85.160.171 Received: from mail-qt1-f171.google.com (mail-qt1-f171.google.com [209.85.160.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tb-mx0.topicbox.com (Postfix) with ESMTPS for <9fans@9fans.net>; Sun, 3 Jan 2021 23:40:36 -0500 (EST) (envelope-from marius.eriksen@gmail.com) Received: by mail-qt1-f171.google.com with SMTP id y15so17781657qtv.5 for <9fans@9fans.net>; Sun, 03 Jan 2021 20:40:36 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=lK7CjN9lsV2An+/EmWkXqr1gAb13kjidC1ND5tLKoNY=; b=plznJuAWLCo5VPdKm2J6J0uuW2iVbobNyooAg/PWxxPGkWwxPdNLjThnNAMW0zUuCB +yLeH8JP10weYQAm0iWleXza3S2QbVw9kvF1RZSqXdAT7tstCnaUcTYfZ5XH8DW/GpaY ZV2cGNmtw8eA8jQgjksCB/5HEBunWo9AwuAZmJv79kCHXsa88VFc1LbjhlBtm8A5ciRO 75JJvyme3aCftqrJuD9Inh9Hdoxu3h5+dpTYLpw0OFSxFjps7s7Urr0ILhVEdchiMpM1 L1WAEFFCbNmigxyQFtMRe4WvcZ9hqR2loygth+4lLi6fWhhtwkxuZ6AXF8FpmvpZjjmN j4bQ== X-Gm-Message-State: AOAM532c8RYK3gmXCtiNFdRc7ad8n6ryWAay3Fi8+oRVAbn57U0rGBh7 RryxYe1d2zF80tNpBkmRm3auX/owCmiC/ByuK4BHaww5w3k= X-Google-Smtp-Source: ABdhPJzVM49hkwQ2mRGjtwBdZ/WChzjwlPgjGW/vUvEpJ3lXVUGRqj2pxWUhgPkSrghv1SWt8XT/9zUekXUP4epYjXE= X-Received: by 2002:ac8:5286:: with SMTP id s6mr69832861qtn.22.1609735235577; Sun, 03 Jan 2021 20:40:35 -0800 (PST) MIME-Version: 1.0 From: "marius a. eriksen" Date: Sun, 3 Jan 2021 20:40:24 -0800 Message-ID: To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: multipart/alternative; boundary="000000000000e6293a05b80bb0fc" Topicbox-Policy-Reasoning: allow: sender is a member Topicbox-Message-UUID: ff7b2466-4e46-11eb-ad76-bc6d82ce0a4f Archived-At: =?UTF-8?B?PGh0dHBzOi8vOWZhbnMudG9waWNib3guY29tL2dyb3Vwcy85?= =?UTF-8?B?ZmFucy9UNWFkZGMxN2EwZTE5Y2Q5MS1NY2IyZTE4OWIwNTcwYzY4MzNmMTk1?= =?UTF-8?B?MjMwPg==?= List-Help: List-Id: "9fans" <9fans.9fans.net> List-Post: List-Software: Topicbox v0 List-Subscribe: Precedence: list Reply-To: 9fans <9fans@9fans.net> Subject: [9fans] plan9port: acme remoting Content-Transfer-Encoding: 7bit List-Unsubscribe: , Topicbox-Delivery-ID: 2:9fans:437d30aa-c441-11e9-8a57-d036212d11b0:522be890-2105-11eb-b15e-8d699134e1fa:Mcb2e189b0570c6833f195230:1:eT6Kz-LkNSinA4_djpwefbmHrLwqktxCqA8SWy_moTc --000000000000e6293a05b80bb0fc Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Lately, I have needed to do a great deal of my work on remote servers. It's been difficult to do this with acme. Previously, I have attempted to run acme entirely remotely, and then attach to a local devdraw instance . This works okay, but also has many drawbacks, among which: (1) it's not economical with networking, and so not great for high latency or otherwise poor connections; (2) it's not resilient to connection disconnects; (3) often I want access to local resources too. I built an experimental remoting layer in acme to see how far I could get in recreating a modern "remoting" experience with acme. Since acme itself, of course, is designed around a bunch of 9p servers, this turned out to be fairly easy to do, and the resulting experience is nearly transparent. A remote may be attached to one or more path prefixes. These are similar to mount points in a file system. Thus, if the prefix /home/meriksen is attached to the remote "dev", then any file with this prefix is transparely fetched from the dev. Similarly, when commands are run from any directory with this prefix, the command is transparently run on the remote. The command is run in an environment that includes the acme and plumber 9p servers (forwarded from the local host), and so even acme programs just work. For example, if you run 'win' from a directory that is attached to a remote, 'win' is run on the remote host, but it accesses the acme 9p file tree (which is forwarded from the local acme) and creates its window and interacts with acme. It "just works". (I regularly run other programs like this too, e.g., acme-lsp, which uses the plumber to coordinate interaction). The design of the feature is quite simple: a new program, acmesrv is run by acme (through ssh) on the remote host. Acme becomes a client of acmesrv, through which all further interaction is facilitated. Acmesrv itself is really just a 9p multiplexer: the local acme program exports the acme and plumber 9p servers; acmesrv provides two new 9p servers (exportfs and cmdfs) that gives the local acme access to the remote's file system (exportfs) and to run commands (cmdfs). The local acme manages a session for each remote, and properly deals with session disconnect/reconnect, etc. Thus, poor network conditions and disconnects are easily supported. Since acme's file handling is anyway stateless (the file is not kept open during editing), file state is easily maintained through disconnect-reconnect cycles. There are some synchronous code paths in acme, and these may cause temporary freezes when using remoting. For example, when acme queries for the existence of a file (stat), this blocks UI updates in acme. On session establishment (e.g., the first time a file is accessed on a remote), this can cause additional delays, since the file cannot be queried before first establishing a new session. I've not found this to be a big deal. This has been my "daily driver" for about a month at this point, and overall I'm very happy with the experience. It creates a nearly transparent experience editing remote files, and retains most of acme's functionality in remote settings as well. I never hesitate to shut my laptop lid while in the middle of a project. Most things just work. There are wrinkles, of course, and there are some sharp edges in this (experimental) implementation, but, to me, this provides really very useful functionality that lets me use acme in more challenging environments. (Not to mention that this means I can use a beefy remote host for heavy lifting.) In case this would be useful to anyone else, this version of acme resides in my plan9port tree on github . (Currently, these diffs: 1 , 2 , 3 , 4 .) -m. (And of course, I realize that this approach goes against the spirit of acme and plan9 -- acmesrv here is recreating a very specific slice of functionality that could be recreated by standard means if we had real filesystems. But we don't live in that world, and this is immensely useful to me.) ------------------------------------------ 9fans: 9fans Permalink: https://9fans.topicbox.com/groups/9fans/T5addc17a0e19cd91-Mcb2e1= 89b0570c6833f195230 Delivery options: https://9fans.topicbox.com/groups/9fans/subscription --000000000000e6293a05b80bb0fc Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Lately, I have needed to do a great deal of my= work on remote servers. It's been difficult to do this with acme. Prev= iously, I have attempted to run acme entirely remotely, and then attach to a local devdraw insta= nce. This works okay, but also has many drawbacks, among which: (1= ) it's not economical with networking, and so not great for high latenc= y or otherwise poor connections; (2) it's not resilient to connection d= isconnects; (3) often I want access to local resources too.

I built an experimental remoting layer in acme to see how far I could= get in recreating a modern "remoting" experience with acme. Sinc= e acme itself, of course, is designed around a bunch of 9p servers, this tu= rned out to be fairly easy to do, and the resulting experience is nearly tr= ansparent.

A remote may be attached to one = or more path prefixes. These are similar to mount points in a file system. = Thus, if the prefix /home/meriksen is attached to the remote "dev"= ;, then any file with this prefix is transparely fetched from the dev. Simi= larly, when commands are run from any directory with this prefix, the comma= nd is transparently run on the remote. The command is run in an environment= that includes the acme and plumber 9p servers (forwarded from the local ho= st), and so even acme programs just work. For example, if you run 'win&= #39; from a directory that is attached to a remote, 'win' is run on= the remote host, but it accesses the acme 9p file tree (which is forwarded= from the local acme) and creates its window and interacts with acme. It &q= uot;just works". (I regularly run other programs like this too, e.g., = acme-lsp, which uses the plumber to coordinate interaction).

The design of the feature is quite simple: a new program, acmesrv is run by acme (through ssh) on the remote host. Acme = becomes a client of acmesrv, through which all further interaction is facil= itated. Acmesrv itself is really just a 9p multiplexer: the local acme prog= ram exports the acme and plumber 9p servers; acmesrv provides two new 9p se= rvers (exportfs and cmdfs) that gives the local acme access to the remote&#= 39;s file system (exportfs) and to run commands (cmdfs).

The local acme manages a session for each remote, and properly dea= ls with session disconnect/reconnect, etc. Thus, poor network conditions an= d disconnects are easily supported. Since acme's file handling is anywa= y stateless (the file is not kept open during editing), file state is easil= y maintained through disconnect-reconnect cycles. 

There are some synchronous code paths in acme, and these may cause = temporary freezes when using remoting. For example, when acme queries for t= he existence of a file (stat), this blocks UI updates in acme. On session e= stablishment (e.g., the first time a file is accessed on a remote), this ca= n cause additional delays, since the file cannot be queried before first es= tablishing a new session. I've not found this to be a big deal.

This has been my "daily driver" for about a m= onth at this point, and overall I'm very happy with the experience. It = creates a nearly transparent experience editing remote files, and retains m= ost of acme's functionality in remote settings as well. I never hesitat= e to shut my laptop lid while in the middle of a project. Most things just = work. There are wrinkles, of course, and there are some sharp edges in this= (experimental) implementation, but, to me, this provides really very usefu= l functionality that lets me use acme in more challenging environments. (No= t to mention that this means I can use a beefy remote host for heavy liftin= g.)

In case this would be useful to anyone else,= this version of acme resides in my plan9port tree on github. (Currentl= y, these diffs: 1, 2, 3, 4.)

-m.<= /div>

(And of course, I realize that this approach goe= s against the spirit of acme and plan9 -- acmesrv here is recreating a very= specific slice of functionality that could be recreated by standard means = if we had real filesystems. But we don't live in that world, and this i= s immensely useful to me.)
= --000000000000e6293a05b80bb0fc--