Web server update III

By Danny Arends in Website
Posted at: 28 Oct 2012, 13:53, last edited: 28 Oct 2012, 13:53

After using my new web server written in the D programming language for around 2 weeks, I decided it was again time for an overhaul. I added some new features, and made it compatible with 64bit Linux systems.

Some of the changes:
Chunks - Files are now send using non-blocking sockets, thus if possible we send a single chunk per request.. But when we have a large file (like a game download) we now stream chunks to the client. This will allow me to implement a 'resume download' feature in the near future

Threads - Another change is to the way threads are used inside the web server. we now have 4 independent threads cooperating to bring you pages as fast as possible. The 4 different subsystems (Server, Router, File-buffer and Executor) send non-blocking messages to each other. This allows the client thread to continue monitoring the connection and operating while e.g. a large file is transferred or buffered.

Security - Command line commands are now 'bash compatible' and performed under a specialized user account which only allows access to its own website. This will increase security compared to the previous windows version, in which every command could possibly wipe my whole hard drive.

The new version increased only about 25 lines of code and I'm going to test out this version for a couple of weeks again, to see if its an improvement.

Once I clean up the source code I'll open source the whole project on Github.

Last modified: 28 Oct 2012, 13:53 | Edit