tags:

views:

1754

answers:

8

I am thinking of the next steps for a project I have written. It is currently a desktop application that controls a serial port device.

I am considering allowing browser clients to connect to some process to get "near real time" updates about the state, etc of the device. Possibly also allowing control from a browser client.

I'd rather not write my own webserver from scratch and this would be a very scaled down web server.

Any suggestions on where to look?

I'd prefer C++ or C# implementation.

+5  A: 

If you are running on Windows, use http.sys. It is a lightweight web server that is exposed through the .NET framework.

http://mikehadlow.blogspot.com/2006/07/playing-with-httpsys.html

Jonathan Allen
this looks promising. I will definitely have a closer look at it.
Tim
+3  A: 

I don't know any C# http server, but you could make your own pretty quickly (see http://www.codeplex.com/webserver).

As suggested, lighthttpd might do the trick.

I'd also recommend simpleweb, which is a very light and powerful http server written in Java.

Wookai
A: 

I don't know if will fit your project but http://www.tntnet.org/ looks promising. Alternatively, you can look for a http server library which you can add your custom code to build a web server with application embedded. There are many (like libmicrohttpd), that it is not worth enumerating here without knowing your project.

artificialidiot
+1  A: 

When you run a web project from Visual Studio, you are typically running it via Cassini2. That is a downloadable project as well.

Otherwise, if you want something smaller, you can look at Indy 10 library (open source), which is a complete set of networking apis. You could probably write your own web server fairly quickly with that.

Or, NSoftware also has some networking apis. They are commercial, but well documented, and I've had good luck with their support (but it has been a while for that).

Chris Brandsma
+3  A: 

I've heard good things from a friend about lighthttpd

Adriano Varoli Piazza
Don't know how "scaled-down" it is, IRT memory footprit, etc... But it's plenty fast!
Calyth
A: 

Since you're not writing it yourself, does it have to be a minimal server? Apache and related might serve your purpose. It's heavyweight, but without knowing more of your requirements that might or might not be a problem.

David Thornley
+2  A: 

nginx is very lightweight and very scalable (e.g. see Wordpress's story for a high-profile case). POSIX-only.

orip
+1  A: 

Check out my webserver project: http://www.codeplex.com/webserver It contains a lite branch for a minimal one.

jgauffin