unicorn Ruby/Rack server user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
From: Michael Fischer <mfischer@zendesk.com>
To: Boaz Segev <boaz@2be.co.il>
Cc: Eric Wong <e@80x24.org>, unicorn-public <unicorn-public@bogomips.org>
Subject: Re: Please join the Rack Specification discussion for `env['upgrade.websocket']`
Date: Fri, 5 Aug 2016 21:10:24 -0700	[thread overview]
Message-ID: <CABHxtY5iSaYxCcoL65JQ10D9=HFw8TeQwnhwC8uXT5H5hT=52w@mail.gmail.com> (raw)
In-Reply-To: <202FC1D8-3042-4CBF-9DEA-85D1BEA080F3@2be.co.il>

On Fri, Aug 5, 2016 at 8:09 PM, Boaz Segev <boaz@2be.co.il> wrote:

> > 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
> > cares.
> Running two (or more) event loops, each with it's own resources, is wasteful and promotes needless context switches.
> There is no reason to hijack a socket when the server can easily provide callbacks for IO related events using it's existing established event loop.

I suspect we're missing the forest for the trees here :)

Unicorn is a forking webserver, not an event-driven or threaded
webserver.  Whether Unicorn ever supports the proposed standard or
not, I wouldn't recommend it be used for typical applications that use
WebSockets, as they usually involve persistent connections.  Unicorn
would quickly run out of worker processes capable of serving such
connections anyway, so I question whether it's worth delving into the
dirty details of IO syscalls.

Best regards,


  reply	other threads:[~2016-08-06  4:10 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
2016-08-06  3:09   ` Boaz Segev
2016-08-06  4:10     ` Michael Fischer [this message]
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='CABHxtY5iSaYxCcoL65JQ10D9=HFw8TeQwnhwC8uXT5H5hT=52w@mail.gmail.com' \
    --to=mfischer@zendesk.com \
    --cc=boaz@2be.co.il \
    --cc=e@80x24.org \
    --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).