From: Eric Wong <e@80x24.org>
To: yahns-public@yhbt.net
Subject: Re: [PATCH] preliminary HTTP/2 support for Rack 1.x apps
Date: Sat, 20 Dec 2014 22:25:15 +0000 [thread overview]
Message-ID: <20141220222515.GA28045@dcvr.yhbt.net> (raw)
In-Reply-To: <1419048706-32113-1-git-send-email-e@80x24.org>
Eric Wong <e@80x24.org> wrote:
> +++ b/examples/yahns_http2_rack1.conf.rb
> +app(:rack, "config.ru", preload: false) do
> + protocols "http", "http2"
Maybe the new config option should actually be something like:
queue(protocol: 'http2') do
backlog 128
worker_threads 8
end
This means we'd have a third type of thread pool...
> +++ b/lib/yahns/http2_rack1.rb
> + stream.on(:half_close) do
> + log.info "dispatch: #{req.inspect}"
> + req = rack_env_for(req, input)
> + h2_res_emit(stream, *self.class.app.call(req))
> + end
And maybe enqueue work here:
stream.on(:half_close) do
@http2_queue.push([stream, req, input])
end
And making h2_res_emit thread-safe when called from another thread.
This would also make lazy, synchronous reading of rack.input for
TeeInput/StreamInput easier.
And yeah, the whole SPDY/HTTP-2 thing of reinventing a multi-stream
socket layer inside of TCP connections smells bad to me.
prev parent reply other threads:[~2014-12-20 22:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-20 4:11 [PATCH] preliminary HTTP/2 support for Rack 1.x apps Eric Wong
2014-12-20 22:25 ` 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: http://yhbt.net/yahns/README
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20141220222515.GA28045@dcvr.yhbt.net \
--to=e@80x24.org \
--cc=yahns-public@yhbt.net \
/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.
Code repositories for project(s) associated with this public inbox
http://yhbt.net/yahns.git/
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).