mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff MAURY <jeffma...@jeffmaury.com>
Subject Re: [MINA3] HTTP/2 thoughts
Date Sun, 28 Jun 2015 09:48:13 GMT
The idea is to provide a helper function like:

HTTP2Session http2Session = HTTP2Session.from(minaSession)

and you should call this method from a SessionCreated event.

The HTTP2Session should provide the following methods:

   - HTTP2Stream createStream();
   - void close();
   - void addHTTP2Listenener(HTTP2Listener listener);
   - and more to be discussed


Regards
Jeff

On Sun, Jun 28, 2015 at 7:45 AM, Emmanuel Lécharny <elecharny@gmail.com>
wrote:

> Le 27/06/15 19:17, Jeff MAURY a écrit :
> > Hello,
> >
> > I am thinking about the HTTP/2 implementation we might have in MINA3 and
> I
> > want to share it with you.
> > As of yet, we have a basic HTTP/2 layer that just encode and decode
> HTTP/2
> > frames. This is not enough as the user has to manage the conversion
> between
> > HTTP/1.x PDUs (requests and responses) and HTTP/2 frames. No talking
> about
> > the flow control management.
> > We need to expose HTTP/2 streams to the user: I see to possible
> > implementations:
> >
> >    1. transmit the stream ID in HTTP/1.x messages but this will break the
> >    read-only nature of the those messages as the stream ID is created
> when a
> >    new HTTP request is sent
> >    2. Provider an HTTP/2 view of the MINA session where the user could
> >    allocate streams and also receive notification for new streams (in
> case of
> >    server push). This HTTP/2 view will be provided through an helper
> method.
>
> I would favor the second approach. The key here would be to generate
> this notification, which should somehow fit with teh way MINA works (we
> currentlysupport a set of events, which is not extensible). Would you do
> that through the SessionCreated event ?
>
>


-- 
Jeff MAURY


"Legacy code" often differs from its suggested alternative by actually
working and scaling.
 - Bjarne Stroustrup

http://www.jeffmaury.com
http://riadiscuss.jeffmaury.com
http://www.twitter.com/jeffmaury

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message