From: Bob Proulx <bob@proulx.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Preventing ERC automated channel disconnects
Date: Sat, 5 Dec 2015 13:41:49 -0700 [thread overview]
Message-ID: <20151205124313155407128@bob.proulx.com> (raw)
In-Reply-To: <m2lh9abokq.fsf@charm-wifi.irisa.fr>
Alan Schmitt wrote:
> Bob Proulx writes:
> > I use an irc bouncer proxy to maintain a persistent connection.
>
> I did not know about IRC bouncers, so I looked it up, and I really like
> the idea
It works pretty well. It means that on my laptop when I am connected
that I have a local client for my typing instead of the many terrible
high latency WAN connections that I happen to be on at various client
sites. It means I get a local notification (beep, balloon) when I am
messaged.
The local client connects when it can and retries when it can't.
Without a bouncer it would mean that my account presence would be
coming and going and coming and going all of the time which is
somewhat annoying to others unless I only used a persistent server.
Also when offline I would be unavailable for messaging. With the
alternative of a persistent remote server I would be suffering from
the terrible network connections I too often work in.
The local notifications are the main advantage I like of using the irc
bouncer. It allows me to be coordinating with other team members more
effectively when working a problem without needing to be checking
(polling) my remote irc client during the work.
Meanwhile this doesn't remove the advantage of having a persistent
server keeping the session alive. The advantage there is that my team
members can always message me even when I am offline. When I come
online I will check my messages and see anything that was sent to me
and be able to respond. In many ways it makes this more like email.
Generally I prefer email. But others prefer other things and this is
a compromise that sits between. And also when the conversation starts
up again it is just normal irc again.
> (I'm currently using weechat in a tmux session on a server to stay
> connected,
I am doing almost the same thing using 'screen' and 'irssi'. I go
back and forth on using 'mosh' (the mobile shell) or not. It has some
quirks that one needs to know about, specifically it will leave orphan
processes behind unless you avoid doing so. But I am back to using it
again and it has advantages if you drive it.
https://mosh.mit.edu/
If you haven't tried 'mosh' then in your situation I suggest giving it
a try. It is very clever. It uses normal ssh to start a UDP
connection for the communication between. It is specifically designed
for use in high latency, high packet loss, and unreliable networks.
That part it does very well. That is the main reason I use it and
like it.
But mosh has a basic flaw that it doesn't specifically address. The
mosh server side creates a persistent presence somewhat like screen and
tmux do. Which is how it allows you to reconnect seamlessly. But if
the client side dies while offline nothing ever cleans up that remote
shell. And since the client has died nothing will ever be able to
connect to that server side of the session again either. The server
side of the session will be left as an orphan. Anything running in
that session will hang around and consume memory and resources until
it is manually killed. Periodically it is a good idea to run a ps
listing and look for orphan processes and clean them up manually.
But here is the trick to avoid it. Never run a simple shell on the
remote side of a mosh connection. A simple shell could be left
hanging with no way to reconnect to it. Instead start up a screen or
tmux session and only use mosh to resume a running screen or tmux.
That way when a new login comes along and resumes the screen / tmux it
will cause the mosh server to see that the process is finished and the
mosh server will exit too. If you only run mosh resuming screen
sessions then it won't ever leave orphaned processes behind.
mosh -- myserver.example.com screen -dR
The '--' is needed because 'mosh' also inconveniently looks for its
own options anywhere on the command line. For a command that runs
other commands that is an unfortunate choice. Using '--' tells mosh
that it has no more options to the right and the -dR is then passed
through as part of the 'screen -dR' command on the remote system.
For screen the -d option detaches the remote session first so that it
can be re-attached. Then the -R resumes the unattached session. Same
as -r but -R starts a session if one is not running. Resume or start.
I know you said you were using tmux. I am sure it is similar things
there too. But I only know screen and therefore I only talked about
screen.
> but it's outside of emacs which is sad).
Which is exactly why I would like to be able to use emacs too. But at
the moment using erc means that it disconnects everything every time I
use it. Bad. (Unless I take extreme measures to cut the network
before it can disconnect, then exit erc while it can't tell the remote
end to leave channels.) Otherwise I would be using emacs erc as my
irc client.
> Which irc bouncer would you recommend using?
I don't have any specific recommendation. I happen to be using irssi
because through my route through irc clients it was the one I liked
and was using and irssi also provides an irc bouncer proxy. Therefore
I happen to be using it. And the bouncer feature works well enough.
But if someone were wanting *only* an irc bouncer I don't think irssi
is particularly outstanding if that is the only task it is doing.
A good friend of mine is using 'Bip'. It sounds interesting. I have
been wanting to set it up and try it. I think if you were going to
start somewhere that Bip might be a good place to start. But note
that I haven't tried it yet myself.
Bob
next prev parent reply other threads:[~2015-12-05 20:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-03 21:16 Preventing ERC automated channel disconnects Bob Proulx
2015-12-04 0:58 ` Emanuel Berg
2015-12-04 8:33 ` Alan Schmitt
2015-12-05 20:41 ` Bob Proulx [this message]
2015-12-07 7:30 ` Alan Schmitt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20151205124313155407128@bob.proulx.com \
--to=bob@proulx.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).