In addition to Just Journal and my .NET charting component, I have just started another programming project.
My interest in .NET has faded a bit after administering a Windows web server again. Its not worth it.
On to my new project. It is a Web Server written in Java. I have been looking over source code for several months on Tomcat, Jigsaw, and Jetty. Some of it is way over my head, but I got some ideas. I had all but given up on the project, when I found some source on java.sun.com from 1997. It is a VERY basic web server consisting of 2 classes and one interface. Based on this code, I decided to try my hand at a webserver. Everyone who knows me well should know i've always wanted to write a web browser. My recent reading has suggested that a web server is simplier.. so i decided to go for it.
Many of you probably think i'm nuts. How can luke write a web server?
Well remember, I started wtih working code. After making a few changes including converting the code to seperate files in a package, and tweaking the output a bit along with some subtle improvements to get rid of deprecated functions, i now have the webserver spitting out 1.8 pages per second. I ran a Microsoft stress test on a static file and received those results. It is a threaded server with 5 worker threads. I think i can get more out of it by increasing threads by a few and streamlining the Worker class a bit. I want to change the way it handles files.. for one i think the headers should be generated in a seperate method..
the current model does this...
start server.. binds to port.
reads config file (terrible setup now)
starts some worker threads in a for loop
listens for requests
Then each worker thread handling a request does the following...
tries to access file on file system....
spits out a bad header after reviewing a hash map of the possible content types (is the file a png, html, etc)
I added several content types to the file as well. xml and png were among them.
The server spits out the bytes to the client.
That is about it.
I will continue to work on JJ though.