unofficial mirror of meta@public-inbox.org
 help / color / mirror / Atom feed
From: Eric Wong <e@80x24.org>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: meta@public-inbox.org
Subject: TLS support and event loops
Date: Fri, 24 May 2019 11:44:13 +0000	[thread overview]
Message-ID: <20190524114413.GA30724@dcvr> (raw)
In-Reply-To: <20190519220417.ejyqwyy6xwkq6lts@dcvr>

Eric Wong <e@80x24.org> wrote:
> "Eric W. Biederman" <ebiederm@xmission.com> wrote:
> > Oh that and IO::Socket::SSL.  Something that is currently missing  (or
> > at least missing until recently I haven't check in the last couple of
> > months) is ssl support for our nntp sockets.  So do imap or prevent
> > mischief for our nntp streams we need to use tls.  Which IO::Socket::SSL
> > seems to do.
> 
> Yup, IO::Socket::SSL will be what we use for STARTTLS support,
> not sure when I'll get around to it.
> 
> Fwiw, it's also used by Perlbal for non-blocking HTTPS with
> Danga::Socket.  I plan on keeping PublicInbox::DS close to
> Danga::Socket, for now[1])...
> 
> Using the TLS support in the kernel might be a fun option to
> add, too; but portable stuff, first.

> [1] I've also been thinking about making PublicInbox::DS switch
>     to EPOLLONESHOT/EV_ONESHOT to map better to my mind when
>     distinguishing between SSL_ERROR_WANT_READ/WRITE..  And it
>     would give me an excuse to pick up and dogfood an epoll API
>     to reduce syscall overhead:
>     https://lore.kernel.org/lkml/1393206162-18151-1-git-send-email-n1ght.4nd.d4y@gmail.com/

Or the userspace pollable epoll stuff:
     https://lore.kernel.org/lkml/20190516085810.31077-1-rpenyaev@suse.de/

But yeah, I think the first step would be to convert to
EPOLLONESHOT or EPOLLET to simplify socket state management.
That should make dealing with non-blocking OpenSSL easier.

Fwiw, I never understood the appeal of level-triggering or the
"reactor pattern", but that's what everybody else seems to
pick for event loops.

      reply	other threads:[~2019-05-24 11:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-17  2:00 [PATCH] PublicInbox::Import Extend add with a optional raw message parameter Eric W. Biederman
2019-05-18  8:03 ` Eric Wong
2019-05-18 15:09   ` Eric W. Biederman
2019-05-18 21:39     ` Eric Wong
2019-05-19 18:14       ` Eric W. Biederman
2019-05-19 22:04         ` Eric Wong
2019-05-24 11:44           ` Eric Wong [this message]

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://public-inbox.org/README

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190524114413.GA30724@dcvr \
    --to=e@80x24.org \
    --cc=ebiederm@xmission.com \
    --cc=meta@public-inbox.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).