The Mohican Web Server for SCTP & TCP

ApachesĀ“s little brother

The Mohican web server has emerged as a programming project for a university course. The interesting thing about the server is its fast receiver thread which does not do much more than to call recv. Scanning for the end of request marker '[\r]\n[\r]\n' is done by the worker threads. Fragmented requests are not copied together but can be parsed as is in a fragmented manner. The server may be useful in order to test any sctp http client like f.i. a web browser. If you want to get a short view of what the server already supports you may have a glimpse on its sample configuration file. User added language extensions are currently not used for server side language selection but only for returning the document language via the Content-Language header. File extensions need to start with a dot and must not contain more than one dot.

We believe SCTP support for HTTP to be a good thing. It resolves the TCP slow start and head of line blocking problem by allowing more than one parallel data stream within one socket connection. The head of line blocking problem of TCP refers to the problem that the receiving of data can not continue if a package is lost until that package has been sent again. With SCTP all other parallel streams can continue which is a good thing because a single web page is made up of many different files. The gains may be even bigger for online video delivery of DASH or HLS videos with adaptive bitrate since such videos are fragmented into many little files where each fragment contains about one second of video at a given bitrate. The slow start problem at the other hand refers to browsers opening many parallel TCP connections at the same time which all need to start at a very slow bitrate due to the congestion control of TCP. The problem about head of line blocking is that a TCP timeout lasts up to four round trip times (RTT). Common RTTs for ADSL, 3G and GPRS are 40ms, 234ms and 700ms-1s.

In our opinion SCTP is the far better solution than SPDY/QUIC or HTTP/3.0 as favoured by Google because it is more simple and does not suffer from the drawbacks of QUIC and HTTP/2.0 like increased overhead and lower bitrates. Good bitrates and lower start-up delays matter for video delivery and that is why we wanna encourage the use of SCTP. Besides this SCTP would also have provisions for an unreliable data delivery. SCTP is implemented with all major operating systems including Windows, MacOS, FreeBSD and Linux.

Run the program with ../run mohican and compile it with ../run mohican --compile. If you do not want to recompile run it with build/mohican

Download:
mohican v0.3 pre-release
software/SHA512SUMS.signed.
Author:
Elmar Stellnberger estellnb@elstel.org
Please sign our Contributor License Agreement if you want to contribute code. Otherwise we can not assimilate and re-distribute your changes here at elstel.org