Boost logo

Boost :

Subject: [boost] [GSoC 2014] Http Server Proposal
From: Vinícius dos Santos Oliveira (vini.ipsmaker_at_[hidden])
Date: 2014-02-28 20:06:57


Hi guys,

I'm interested in develop an asynchronous HTTP server for Boost as part
of GSoC.

The design would be inspired from Node.js without the facilities or
inspirations that were created to overcome JavaScript quirks and
limitations.

The library would be modular to the point where you can use only small
parts of it and you could also replace components that you don't like.

The library should have a small overhead to be used on embedded
projects, but the modular design will allow you to use higher
abstractions when such concerns don't exist. Of course it's difficult to
find the "right" answer to the problem, then I'll limit the
higher-abstractions to "proven" techniques and avoid controversial
features. I hope to give more details in the middle of the next week.

The library will not be about writing template-driven web pages, but it
will be about HTTP and you will be able to do things like video live
stream via HTTP (try to do that with Django or PHP). I also intend to
allow a efficient use in multithreaded environment with high-load of
data (although network applications are usually I/O bound and not CPU
bound). Of course it'll be possible to use WebSocket with this library
too.

Another thing I want to allow is to mock HTTP requests and transparently
replace parts of the stack without affecting already written code. The
purpose of this feature is to allow other transport mechanism such as
FastCGI and also provide a future-proof approach by better allowing
HTTP/2.0 when released.

I would implement such library on top of Boost ASIO and I'd include
facilities that I'm sure would work on long-term. Because the success of
such project is very sensible to the chosen design, I'd limit its scope
to things that I know it will work long-term. If the implementation
project end up being too small, I can also implement WebSocket support
(I had implemented it before and it wouldn't be such challenge for me),
where the implementation effort is higher than the interface effort. I'm
not sure about the deliverables (yet!), but I hope to give more details
soon, once I have written nice texts.

I'm particularly interested in an elegant way to represent some data
structures, but I'll detail the plans soon (lots of text to write, ideas
to explain and references to convince, among other).

The text was a bit long, but it's because I already have something in
mind. I hope to deliver a proposal explaining all the design, why I
think it would work and other matters in the middle of the next week.
I'm also open to suggestions and modifications in the
not-yet-presented-proposal. I can provide background about my
experiences later, but for now I want to know what do you guys think
about the idea.

TL;DR:
For now I want to know what do you guys think about having a core HTTP
server library in Boost.

-- 
Vinícius dos Santos Oliveira
https://about.me/vinipsmaker



Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk