reddit / emacs

A server component for tramp?

ackerleytng · 2022-11-17 02:38
I ran into some issues with tramp+magit and while debugging that it seemed like there is quite a lot of parsing or shell stuff (like getting exit codes) done in tramp. I get that tramp was built for maximum flexibility over tramp remotes, but for the most common cases, would having a server running on the remote side be able to speed things up, and perhaps provide server to emacs communication too? Vscode has a remote component, which I believe is written in nodejs and runs on the places nodejs runs.
uita23 · 2022-11-17 04:06
Assuming the vscode remote component is Free, why not just add support for that to Emacs?
spacexfanboy · 2022-11-17 04:16
> Can VS Code Server be installed or used on its own? > No. The VS Code Server is a component of the Remote Development extensions and is managed by a VS Code client. It is installed and updated automatically by VS Code when it connects to an endpoint and if installed separately could become quickly out of date. It is not intended or licensed for use by other clients. https://code.visualstudio.com/docs/remote/faq
mmaug · 2022-11-17 04:22
A server process optimized for remote access sounds great, but that also requires a client to issue properly formatted messages that the server understands. In a corporate environment, installing the server can easily bring IT operations, cyber security, and non-Emacs/Tramp developers to your door step. The battle to get login access to remote systems via ssh is often a much easier battle to fight. My own experience in corporate data centers has involved running applications, git, and debuggers within docker containers on remote servers. If the network is sufficient, developing remote objects from my local desktop is an enjoyable endeavor (got my start with Emacs on a VT100 text terminal connected to our mainframe by a 2400 baud RS232 serial cable, so remote Tramp sessions seem fast). Now using Tramp with AWS/Azure cloud servers may be a little more painful, but a specialized server process is unlikely to address the network performance.
ackerleytng · 2022-11-17 04:41
We could wrap a socket or port with an ssh tunnel, and multiplexing the ssh connection could help here!
imonabudgetm8 · 2022-11-17 08:08
Wait so it just straight up downloads a binary to the remote machine and runs it?
[deleted] · 2022-11-17 08:28
[deleted]
lyl18 · 2022-11-17 08:29
i would guess it's more like ansible, where the client programs are pushed to the remote system over the connection and then executed, rather than have the remote try to make outgoing network requests.
mmaug · 2022-11-17 12:17
There are ways to improve Tramp performance over ssh documented in the info files which will reduce the overhead of establishing new network connections. Those are certainly simpler to implement than creating a new Tramp server component.
jplindstrom · 2022-11-17 14:07
OP said it's a Node.js app, so not _technically_, no. But tramp runs shell commands on the remote, right? So... same, same, but different.
ackerleytng · 2022-11-17 15:07
Haven't looked into the details much but this is my guess too, maybe it copies something over to the remote side
ackerleytng · 2022-11-17 15:12
This is true! I should definitely do more profiling first. A coworker showed me a vscode setup that was so much faster out of the box that I wish we could improve the experience for fellow emacs users.
ackerleytng · 2022-11-17 15:14
With a finer grained interface than shell commands on remote. Could we perhaps provide finer grained control, like maybe delta remote editing updates instead of full file updates?
trararawe · 2022-11-17 21:37
Yes
mavit0 · 2022-11-18 00:55
I find the GVFS-based `sftp` method to be much quicker than the default `ssh` method, by the way.
SomeConcernedDude · 2022-11-20 15:31
I have been trying to make Tramp bearable for weeks now and I still can't manage it. I tried VSCode the other day and working remotely was fairly straightforward and error-free. Why should I keep putting myself through this, dear emacs community?