October 21, 2008
Building Your Own Web ServerWebster2 is a low-power, personal web serverCraig A. Lindley
Need a low-power, small-footprint web server? From hardware to software, Craig shows you how to roll your own server.
Craig is a degreed hardware engineer who, until recently, had been writing large-scale Java applications. He can be contacted at calhjh@gmail.com.
To lower my energy consumption and carbon footprint, I decided about a year ago to build a low-power web server for use in hosting my personal website. Previously I had used an old desktop PC as a host, but knew it consumed way more energy (100× even without a monitor) than what I had in mind.
My quest began with the design of a web server based on a 20-MHz 8-bit PIC microcontroller (this design was published in the July 2008 issue of Nuts and Volts (www.nutsvolts.com). The design consumed little power, but wasn't fast enough to be truly practical. This first-generation "Webster" was like the little engine that could. It tried really hard to push out media-rich pages, but it took a long, long time to do so.
The second-generation "Webster" used a faster 16-bit PIC processor with built-in Ethernet hardware also running the Microchip TCPIP stack. But even with an increased clock rate and word length, this design also was quickly dismissed as inadequate.
For generation three, I used a NetBurner (NB) MOD5270 module (www.netburner.com) coupled with custom electronics, which included a power supply and an SD card interface. This design had all of the features and performance I needed and was used successfully for my website for eight months. Unfortunately, this web server was terminally damaged when I tried to change out a part that had failed.
Knowing I had to build yet another web server to replace the broken one and being happy with the NB hardware, I created the fourth generation Webster, which I call "Webster2" because it is the second of the designs published. In this iteration, I did away with custom hardware and based the design on the NB MOD5270LC development kit. With the stock NB hardware, building the web server was a breeze. (For the record, I have no affiliation with NetBurner Inc. other than being a very satisfied customer.)
Webster2's features include:
At present, the Webster2 web server software is configured to serve static HTML pages only and cannot be used for applications that require write access to the underlying filesystem. This was a conscious design decision that could easily be changed if your application requires it.
|
|
||||||||||||||||||||||||||||||
|
|
|
|