unicorn Ruby/Rack server user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
From: Eric Wong <e@80x24.org>
To: Bo <boaz@2be.co.il>
Cc: unicorn-public@bogomips.org
Subject: Re: Please join the Rack Specification discussion for `env['upgrade.websocket']`
Date: Sat, 6 Aug 2016 01:01:26 +0000	[thread overview]
Message-ID: <20160806010126.GA7486@dcvr> (raw)
In-Reply-To: <58D32D89-4523-436E-8C0E-FA8F4E7AFFB2@plezi.io>

Bo <boaz@2be.co.il> wrote:
> Please join the Rack Specification discussion for `env['upgrade.websocket']`

Fwiw, I have not existed outside of plain-text email for years;
so I'll respond inline here and you can link others to this
thread on:

(which anybody may reply-all to after disabling HTML in their mailer)

> I represent an effort to extend Rack so that it allows server-side
> websocket upgrade implementation support and pure Rack websocket
> applications.
> This new Rack feature proposal is gaining support, with over 42
> support votes in the [original Rack discussion
> thread](https://github.com/rack/rack/issues/1093).

You mention performance several times, but I am not sure what
you mean.  unicorn completely stops caring for a socket after
it's hijacked by the app.  In other words:

  Your Rack app could take the socket and inject it into an
  event loop running in a separate thread.  That event loop
  could be 100% C code running without GVL for all unicorn

  unicorn would only parse the first HTTP request (with the
  Upgrade header) before the Rack app hijacks it.

Also, Ruby IO.select also supports arbitrary number of
descriptors in some cases (Linux for sure, and probably most
server-oriented *BSDs).  Of course, the malloc usage + O(n)
behavior still suck, but no, select(2) is not always limited to
<=1024 FDs.

In any case, I'd be glad to help with lower-level issues over
plain-text email, but I'm not going to attempt to run a
mainstream browser capable of WebSockets or JS.
I suppose curl can deal with WebSockets nowadays?

  reply	other threads:[~2016-08-06  1:01 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-05 23:49 Please join the Rack Specification discussion for `env['upgrade.websocket']` Bo
2016-08-06  1:01 ` Eric Wong [this message]
2016-08-06  3:09   ` Boaz Segev
2016-08-06  4:10     ` Michael Fischer
2016-08-06  7:37       ` Boaz Segev
2016-08-09  1:08         ` Sam Saffron
2016-08-09  2:42           ` Eric Wong
2016-08-09  3:17           ` Boaz Segev
2016-08-06  4:59     ` Eric Wong

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:

  List information: https://yhbt.net/unicorn/

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

  git send-email \
    --in-reply-to=20160806010126.GA7486@dcvr \
    --to=e@80x24.org \
    --cc=boaz@2be.co.il \
    --cc=unicorn-public@bogomips.org \


* 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.
Code repositories for project(s) associated with this public inbox


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).