This project is read-only.

Lite Branch

Feb 16, 2009 at 4:30 PM
Heya,

What's the lite branch for? I assume, it's the light-weight version of the HttpServer. But I am wondering, why the HttpListener cannot be used in the same way it can for the trunk.

Is the lite branch an individual, rather inofficial branch, or will we see more information soon? I am quite curious about it :-)

Thanks.

Feb 16, 2009 at 5:52 PM
Never mind, figured out how to get it running. 
I like "lite" solutions. Thumbs up :-)
Feb 17, 2009 at 2:58 PM
Hi

Sorry for the congestion I cause, but today I found out something quite interesting:

The "normal" branch (or trunk) is about 1.5-2 times faster than the "lite" one for GET requests with just a one-line text response and status code 200 (haven't tested anything else, because that's not our focus).

For the trunk version one could easily use RequestReceived and deal there with the request. Lite requires me to create and add handlers and an ILogWriter. Both is absolutely unnecessary in our scenario here. Will the old behaviour be supported by the lite branch as well? Or are you even in the trunk moving away from it?

I am a bit concerned here, because that means I would need to fork a third, "really-lite" branch and maintain it myself -- where I barely have the time for. :-(

Thanks.
Carsten


Feb 25, 2009 at 3:12 AM
Hi there,

I started the lite branch as an experiment to remove external dependencies from C# WebServer and try to get the behavior closer to System.Net.HttpListener. I will look at porting the RequestReceived delegate from trunk to the lite branch, that seems like a generally useful feature. The documentation for the ILogWriter parameter to HttpListener.Create says "Logging engine for the server. Use NullLogWriter.Instance to disable". You can also use ConsoleLogWriter.Instance, or create your own ILogWriter (if you want log4net support, for example).

The likely reason for the speed difference is that the handlers in the lite branch use regular expression matching. Adding in the RequestReceived delegate and handling requests should bring the performance back to the same as trunk (as the rest of the underlying connection handling code is the same).
Feb 25, 2009 at 8:35 AM
Hi,

Porting the delegate into the lite branch and getting rid off regular expressions sounds like a plan. Also I like the idea of removing external dependencies so that there's really only a HttpServer.dll coming out. :-)

If there's anything I can help with, let me know, although I just recently started learning C# (am a Java guy originally). This is the project, I would like to use the "lite" web server implementation for.