The World's Smallest Webserver(s) 73
The always excellent Russ Nelson sent us a report on the competition for the lucrative title of "World's Smallest Web Server". Apparently there are a few folks going for it. He writes "HP has one. Dallas Semiconductor has one (only $50). MMC Embedded
has one that isn't even
in the running, although it does have COM1-4 and LPT1. Dawning
Technologies' entry is a
joke: far too big to be "smallest". Stanford has one which is best known.
And Rt-Control has one named
uCsimm because it fits in a SIMM module. The latter two get bonus
points for running Linux. Phar Lap claims to have one, but it's a non-starter,
being PC-104 based. Dekad Ltd says theirs is really small, but
they don't have an Ethernet interface. The one from iReady really seems to
be the smallest, but it too lacks Ethernet. Emware's one is so small it
doesn't need any hardware (how they claim it's smallest without
reference to any hardware, I'll never know). "
Re:iPic (Score:1)
Re:$25 Web Server, including the Ethernet Interfac (Score:1)
Re:Emware's server (Score:1)
#!/bin/bash
###############################################
# #
# Project: Gild #
# http #
# #
# Purpose: HTTP 0.9 handler for GILD. Handles http requests #
# reasonably accurately, considering it's under 100 lines #
# of shell-script. #
# #
# Author : Simon Brooke #
# Copyright: (c) Simon Brooke 1997 #
# Version : 0.1 #
# Created : 10th October 1997 #
# #
###############################################
# $Header:
SERVER_ROOT="/usr/local/etc/gild/httpd"
DOCUMENT_ROOT="$SERVER_ROOT/htdocs/"
AGENT_NAME="GILD_http_handler/0.1"
now=`date "+%a, %d %b %Y %k-%M-%S"`
read command file protocol
case $command in
"HEAD"|"Head"|"head")
"GET"|"Get"|"get" )
* ) cat $SERVER_ROOT/error/501.html;
echo "$now: $REMOTE_HOST: Unknown command [$command]" \
>> $SERVER_ROOT/logs/error_log;
exit 0;;
esac
rq_file=$file
if [ -n $file ]
then
file=`echo "$DOCUMENT_ROOT$file"`
if [ -d $file ] # if it's a directory, look for it's
# index...
then
file=`echo "$file/index.html"`
fi
if [ -r $file ]
then
length=`ls -l $file | awk '{print $5}'`
ftype=`file $file | sed 's/[^:]*:
case $ftype in
"HTML" ) type=text/html;;
"ascii" ) type=text/plain;;
"english" ) type=text/plain;;
"a" ) type=text/plain;; # probably a shell script!
"GIF" ) type=image/gif;;
"JPEG" ) type=image/jpeg;;
* ) type=x-unknown/unknown;;
esac
echo "HTTP/0.9 200 OK"
echo "Date: $now"
echo "Server: $AGENT_NAME"
echo "Content-Type: $type"
echo "Content-Length: $length"
echo ""
case $command in
"HEAD"|"Head"|"head") exit 0;;
"GET"|"Get"|"get" ) cat $file;;
esac
echo "$now: $REMOTE_HOST: $command: $rq_file" \
>> $SERVER_ROOT/logs/access_log
else # didn't find it; report and log
cat $SERVER_ROOT/error/404.html
echo "$now: $REMOTE_HOST: No such file [$rq_file]" \
>> $SERVER_ROOT/logs/error_log
fi
fi
exit 0 # yes, I know it _shouldn't_ be necessary
Re:Emware's server (Score:1)
However, they've changed their pricing and now all you can really buy is an unlimited OEM development and distribution license, and thus the price is about the same as that of a very nice automobile.
I agree that calling emMicro a "Web Server" is pretty lame, although it does provide "services" to emGateway.
As to whether there are any shipping products, it's hard to say. They have a lot of press releases disclosing design wins, but those tend to be of the "these people say they're gonna use our stuff for this cool new product they're working on" sort, while OEMs tend not to be so interested in blowing emWare's horn when the product ships.
My project is in-house only (and I can only really afford to do so because I bought before they changed the pricing structure), so it will never "ship" in any traditional meaning of that word.
Re:Emware's server (Score:1)
A few comments about emWare and embedded web servers:
The first question that always came to my mind about embedded web servers was why? Most people are just interested in the hype of the whole thing and not if it will actually do anything for them. A real embedded web server will require more hardware and software than most embedded developers are willing to use in a typical application. The real question is why would you want to server up files through HTTP? You will still have to encode data into that file and process it to mean anything to the client.
What makes more sense is to have a complete distributed application framework. What emWare has done is create a piece of software that enables embedded developers to create distributed applications in their 8 bit Microchip PIC micro-controller, or micro-controller of their choice, without exorbitant hardware or software costs. It is true that this framework relies on a middle tier application that will proxy a light weight protocol to TCP/IP. This means though that one proxy application (in emWare's case, emGateway) can service a number of devices and provide a common interface for network clients to access those devices. It also means that this application can do some more of the traditional things network servers do but embedded ones don't, namely access control, and security.
Cheers,
wharper
BTW: There is a prototype emGateway running on Linux.
It's for virtual consoles. VERY useful. (Score:1)
My toaster has a custom control panel, with six buttons, four LEDs, and a seven-segment display. My ADSL modem, on the other hand, gets away with one failure-prone moving part - the power switch - by using a web server for its panel.
Using web-based consoles the graphic interface is done for you, and the software is available (for FREE!) from multiple vendors for all popular platforms. Powerful graphic design tools are available off-the-shelf as well. The last missing link is the web server for the little embedded systems.
With a rudimentary comm stack and an even more stripped-down web server, filling in the blanks in canned pages and forwarding responses to a cgi-based command handler, you've got all the control and display you need. You can even flip from machine, so you only need one window to run the whole show.
The smaller the web server, the more of your tiny processor is available for useful work (or the smaller a processor you can get away with).
So that's why you suddenly see a flood of little web servers for embedded micros, and why it's very important.
Re:iPic (Score:1)
Re:That's nice, but how about something useful lik (Score:1)
Re:You would only need the HD very sparingly (Score:1)
LK
Re:What happened to that Slashdot article? (Score:1)
If you read the updates section, the guy spends a lot of bits defending against suggestions that it isn't legit. Perhaps the story was pulled because he complained to the /. mavens that his little web server was being so severely /.ed. Just a guess.
--
Re:Possible use (Score:1)
Re:$25 Web Server, including the Ethernet Interfac (Score:1)
Re:I want a Webserver in my Toaster (Score:1)
Wouldn't the heat fry the chips very quickly ?
Re:iPic (Score:1)
$ ping 128.119.41.46
PING 128.119.41.46 (128.119.41.46): 56 data bytes
64 bytes from 128.119.41.46: icmp_seq=0 ttl=53 time=158.6 ms
64 bytes from 128.119.41.46: icmp_seq=1 ttl=53 time=146.0 ms
--- 128.119.41.46 ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max = 146.0/152.3/158.6 ms
$ telnet 128.119.41.46
Trying 128.119.41.46...
Connected to 128.119.41.46.
Escape character is '^]'.
Digital UNIX (eternity.cs.umass.edu) (ttyp3)
login:
I would tend to think so too. He had a link to the web server and it gave out an ip address. Unless he's doing some sort of trick with portforwarding, the machine's running Digital Unix.
Re:What? (Score:1)
Re:Possible use (Score:1)
Re:iPic (Score:1)
Re:What? (Score:1)
What? (Score:1)
Slashdot getting more and more boring ! (Score:1)
Khalid
Emware's server (Score:2)
They say it needs only 750 bytes of ROM and 28 of RAM which astounds me, but whatever..
Possible use (Score:2)
You wear eyeglasses with a camera in the middle (pricy, but available and very discreet), and have the world's smallest server and a good wireless transmitter hidden in your clothing/pockets. You then broadcast the premiere (or better yet one of the early test showings!) of the next Star Wars and other movies through video streaming in real time from the theater, which is then extended through repeaters througout the world (sit really still, and don't comment!). I'm sure Lucas would be thrilled about that one!
To up the ante, I offer a $250 prize to the first person who can prove they pull it off (but I assume no liability for their actions!). And here's my email (remove the !'s) to prove I mean it:
!rickyray!@!patrickhayes!.!com!
What happened to that Slashdot article? (Score:1)
Anyone know for certain what it was?
A Server in Every Traffic Light? (Score:1)
Does this current interest have to do with the fact that IPv6 [slashdot.org] will allow every traffic light to have its own IP? Just think of the possibilities for traffic reports!
Actually I can think of some advantages of including web servers in handhelds and similar devices -- it would raise journalism to a whole new speed. Now that I think about it, there's no reason other than the spirit of the Internet why it wouldn't be better to just use a central server...
Are these commercial-only? (Score:1)
Error: connection reset by peer (Score:2)
Re:Possible use (Score:1)
iPic (Score:3)
Re:$25 Web Server, including the Ethernet Interfac (Score:1)
http://www.lightner.net/lightner
Re:Slashdot getting more and more boring ! (Score:1)
You might not find this exciting, but I see great potential in developments like this.
Small intel-based full-featured Hardware (Score:1)
http://www.jumptec.de/product/data/slotpc/littlem
Re:I want a Webserver in my Toaster (Score:1)
Re:Are these commercial-only? (Score:1)
http://wearables.stanford.edu [stanford.edu]
Re:What? (Score:1)
This could be very useful... (Score:1)
It's the easiest way to share your documents quickly, and if someone adds some code, in a securer manner. Just a quick and dirty module to do file listings on directories and its browsable in your favourite browser. Running Apache for sending a couple of users alone might be a bit much to run and config.
I know of many companies who use apache to serve documents across the net simply because netbios is a nasty overkill. No more NFS/Netbios shares.
The smallest HTTP getter? Possibly snarf. The usage of these two tools is great for information passing. Slap on a small html interpreter; they come in a few hundred kb's for the pilot already.
Mm.. the possiblities...
Hey, this stuff is useful (Score:1)
I've bookmarked the Dallas page (I already had uCsimm bookmarked); I want to play with that toy... but I'll wait for the $50 version, $500 is too much for such a toy at home.
Re:What *I* want to see come from this. (Score:1)
LK
HP print servers (Score:1)
I think that there are a lot of applications for this and similar products. Wouldn't it be very nice to be able to program the VCR through a web page, instead of pressing the tiny buttons on the remote, or your company's PBX or central heating system).... and these are only some of the more obvious ideas..
Web server on a smartcard (Score:1)
Re:The real smallest (Score:2)
1. No UART. You have to do it yourself in software. He's using the internal RC oscilliator which does NOT give enough tolerance to run at 115,200bps which he claims it does.
2. A software UART which will give byte in/byte out will take around 100 instructions. Oh, and you can't receive any data whilst you're processing other stuff, which makes it hard with bytes end to end - remembering also that 115,200bps is a bit every 10us or so, and that a 4Mhz 12c509 only manages 1 instruction per us.
3. The RAM is patently too small to do *any* of this. You have something like 20 bytes of RAM on the PIC, even the default ICMP ping packet is around 56 bytes of payload, not taking into account the IP or ICMP headers. You need to copy the ping packet's data portion byte-for-byte when you do a ping reply - how are you going to do this when you can't even hold a single packet in RAM?
etc etc etc. It's a hoax. You couldn't even get a RFC-compliant IP (let alone TCP/IP) stack on a 16f84, and this is a LOT bigger/faster. People have got limited TCP/IP functionality on 6502's (in 32k RAM) - but not host RFC compliant, just enough to do Telnet.
Hugo
Re:Emware's server (Score:1)
Also, calling the embedded emMicro portion a "server" is stretching the definition quite thin. It's a communications stub which only talks to the emGateway portion running on a Windows PC. emGateway is the real web server.
What it does it does quite well. If they've cleared up the bugs it should be a fairly nice niche product.
Re:Linux's smallest webserver (Score:1)
Re:The real smallest (Score:1)
But there is a web server on a 16F84 but it also has a Seiko chip with the TCP/IP stack. I'm not sure of how much RAM and ROM are used but there is probably not much left (1Kx14 ROM and 64 bytes RAM are available and it is code compatible with the 12C50x for the most part).
I like the Seiko chip as it would allow me to use any processor. I need to get my hands on one of them to play.
Doesn't Motorola also have a 683xx chip with built in ethernet (external interface components are needed)? Tha would make for a nice web server too (like the uCLinux unit).
Re:Apple's Newton does it too (Score:1)
The other guys may be fast and small but the ease of configurability of my Newton server plus the fact that it generates all the HTML it serves on the fly and runs Newtonscript CGIs and supports a special HTTP-based intant messenger client make it a contender for the world's smallest COOL server.
Re:Emware's server (smallest with no hardware) (Score:1)
They say it needs only 750 bytes of ROM and 28 of RAM which astounds me, but whatever...
What Emware has done is totally believable. It sounds like the server is communicating with the browser with those "microtags" which sound like ~2 byte integers to me. Their server doesn't do TCP/IP, just a "simple serial protocol" which also implies very little code. And the 750 byte ROM estimate probably doesn't include the code to make the device actually do anthing when the browser tells it do -- it is just the framework for sending and receiving commands.
In other words, it sounds like what is in the device is just a simple framework for communication over a serial line (simpler, even, than a gdb sub!). Emware's business model has got to rely on their off-device technology or they are doomed.
They also claim to have trademarked the term which I find really funny. They even want to patent it.
What *I* want to see come from this. (Score:1)
22gb of musical bliss. Ahhhhh.
LK
$25 Web Server, including the Ethernet Interface (Score:1)
Re:What? (Score:1)
Does that make more sense to you?
It does to me.
Re:Emware's server (Score:2)
On the Win32 side, they provide a special-purpose proxy service that, on the one side, talks http to a TCP/IP network, and on the other it talks to the back end network (called emNet -- what else) to service requests coming in from the TCP/IP network. One could probably do the same sort of thing by devising a lightweight protocol to talk over a dedicated network of microcontrollers, and then writing service routines that were callable by CGI scripts off of Apache (that's what I was going to do before I found this software -- emWare probably took the better part of a year off my development schedule). Nevertheless, that would be a bunch of work, and emWare's already done it. Main downside is that it only runs on Win32 (95/58, NT & CE). The thing I like most about it is that you can focus on what the controller is supposed to be doing, and you don't have to screw around with matrix keypads and LCD displays and such. Once you get over the big hump in the learning curve, adding new functions is a breeze.
In addition to the http interface, they also have some Java Bean controls, and an API callable from C++.
I have it working on PICs (16C76) and some Hitachi H8 units (the H8S/2134 boards that emWare sells), and I'm working on an 8051 design now. I'm using multidrop RS-485. It's pretty straightforward once you see what it's doing, but it is quite expensive to get started with more than their eval license.