[Coco] The Coco's first webserver, written in Basic09

Aaron Wolfe aawolfe at gmail.com
Thu Dec 31 14:43:03 EST 2009


its now over 6k, but most of that is the index page embedded in the
code.   it seems to be fairly stable now, coming up on 300 requests
and several hours of up time while serving up much larger content than
the first version.  once again, a couple strange individuals
apparently tried to crash it, but this time they were unsuccessful.
coco 1, crashers 0 (unless you count yesterday :)

I can appreciate wanting to use the coco as a general purpose web
server, and wanting to author the web pages using standard tools and
whatnot.

The reality is that the Coco, while an amazing computer, is never
going to be a good general purpose web server.  The computer on the
other end of the DriveWire cable would probably be a much better
choice.  There just isn't enough bandwidth to serve very much content,
as you can sort of see with the links I gave to load files off the
drives.  Wait till you see how long it takes an image, even a 4k
image, to load.

However, I could image lots of special purpose tools that generate
HTML output.  How about a file manager with nice directory displays
and file utilities? Maybe a status display of different things
happening in OS-9, memory map, etc.  Maybe a "web printer" where you
pipe output to a command that in turn puts it in the browser? Anything
is possible, but I think we'll see more usefulness from specialized
applications rather than general purpose website hosting.   Maybe I'm
wrong, please don't let me discourage you if you really want to host a
website with a Coco.  But I don't want to give false impressions about
the capabilities of this system either.

One thing that might be worth mentioning:  The coco doesn't seem to
have any trouble running multiple instances of the web server.  Our
current design allows 8 devices that can be used as incoming or
outgoing telnet connections, and 7 devices that can be used by things
like chat, ftp, and the web server.  This ratio can be adjusted to
your liking.  If we did have several different web based utilities on
the coco, it would not be any problem to run more than one of them at
once.

-Aaron







On Thu, Dec 31, 2009 at 10:08 AM, Christian Lesage <hyperfrog at gmail.com> wrote:
> Nice job. How large is your code now? I will stop hijacking this thread, as
> I believe I said all I had to say. I hope the discussion provided you with
> some ideas on the subject of generating dynamic content and using standard
> authoring tools.
>
> Happy New Year!
>
> Christian
>
> Aaron Wolfe wrote:
>>
>> Well it wasn't up for long before I found some problems :)  However, I
>> think I really, really fixed it this time.  I'm about to get some
>> sleep, we'll see if she's still running in the morning.
>>
>> I *think* it's also stable enough that it can support telnet users at
>> the same time.
>>
>> The http server now lets you put a regular OS-9 path for the path part
>> of the URL.  It currently won't serve the file unless it's name ends
>> in .txt or .html, but you can pull up files from any device otherwise.
>>
>> here's some html in a ram drive:
>> http://home.spogbiper.com/r0/drivewire.html
>>
>> the same file on a drivewire virtual disk:
>> http://home.spogbiper.com/x1/wwwroot/drivewire.html
>>
>> If anyone wants to test serving files, there are many ways to get them
>> onto the coco:
>>
>> use a line editor
>>
>> use the command:
>> wget http://www.someplace.com/somefile.html > /x1/wwwroot/somefile.html
>> (also works for ftp urls)
>>
>> try:
>> ftp ftp.someserver.com
>>
>> (this is an interactive FTP client.  be sure to be in the directory
>> you want to save the file in before starting, there's no was to change
>> local dir from inside the client yet)
>>
>> or: just email the file to me
>>
>> -Aaron
>>
>>
>>
>
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> http://five.pairlist.net/mailman/listinfo/coco
>



More information about the Coco mailing list