mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel L├ęcharny <elecha...@gmail.com>
Subject [MINA 3] HTTP protocol improvement
Date Sat, 09 Feb 2013 11:34:39 GMT
Hi guys,

we currently have a pretty rough HTTP codec in MINA 3, based on regexp.
It's good enough for test purposes, but I wonder if it wouldn't be a
good idea to start working on somethng more robust and faster too ?

I have gathered all the HTTP 1.1 grammar in one document, that could be
used as a base for a faster code (see the http.g file).

I don't know if we should use antlr or write a parser by hand. I think
that using antlr would be easier, but will be at least 2 times slower
than doig it by hand.

Another aspect is that we want this parser to be stateless, so that
means we have to keep a state in the session.

Last, not least, we have to think about the thread model : if we
consider that a user can only send one rrequest after the other (ie, the
second request can only be processed when the previous one has been
completed), then we have no issue. We can go a bit farther, and consider
that once we have decoded a full request, then we can accept another
one, whatever the server has to do with the previsous request : the
ncoming requests are all serialized until they are decoded, then we
spawn a new thread to process the HTTP request.

wdyt ?

Emmanuel L├ęcharny

View raw message