On Mon, Jan 9, 2012 at 10:07 PM, Robin Brandt <robin.brandt at gmail.com> wrote:
> Hello there,
>> I'm currently looking into implementing the SPDY [1] protocol based on
> Warp. I read in the archives that Daniel Sommermann wanted to start
> something similar for snap-server but I haven't seen any updates for
> some time. So if you've got a finished implementation somewhere in
> your drawer this would be a great time to publish it ;)
>> Otherwise I'd start with the parser for the framing layer. SPDY
> compresses some parts of the frames using zlib. Michael already merged
> a small patch I wrote into zlib-bindings to support initial
> dictionaries so I think I'm ready to go there.
>> Another thing that is needed to fully support SPDY is TLS. I think I'd
> use the tls library by Vincent here. There is some implementation work
> needed in the library for an extension called NPN (next protocol
> negotiation) which SPDY uses. Vincent offered to help here. Thanks :)
> (By the way, although it's possible to force at least Chrome to use
> non-encrypted connections "it'll break all sorts of things" according
> to the SPDY book [2]).
>> With this post I'd like to start a discussion about the implementation
> and interfaces of this so the result can be reused in other contexts
> (e.g. for Snap). If you've got any suggestions and sources of
> inspiration I'm happy to hear them.
>> Best regards,
> Robin
>>> [1] http://dev.chromium.org/spdy> [2] http://spdybook.com/
Hi Robin,
I know I already expressed this to you, but I'll state it for
everyone: I'm very excited at the prospect of having a SPDY
implementation.
I'll admit to being a bit unknowledgeable of the inner workings of
SPDY. My question is: what, if anything, needs to be modified in Warp
to make this a possibility? There's already an experimental branch
that adds direct tls support[1] to Warp, and the mechanism it uses is
fairly generic, so it might be sufficient for providing SPDY support
as well. The basic idea is to provide a general Connection type[2]
that can be implemented by different backends.
Also, that branch has bitrotted versus the 1.0 changes. I'll update it
and have it ready for part of the 1.0 release. It would be great if
whatever changes are necessary for SPDY were part of 1.0 as well.
Michael
[1] https://github.com/yesodweb/wai/tree/warp-tls
[2] https://github.com/yesodweb/wai/blob/warp-tls/warp/Network/Wai/Handler/Warp.hs#L127