| ECS-L Home Automation and Security Archives |
| Subject: From: Date: | RE: [ECS] CGI advice needed Martin Terry Sun, 30 Jan 2000 12:26:07 -0800 |
Mark, As far as a OS independant web server goes, I imagine there is source code available for many of the GNU type servers, and some of these have already been coded for "platform independance". I believe apache has source code available for many platforms? In ECS's case you would probably want to find a minimal implementation of a web server. Not being much of a programmer, this process makes me think in somewhat of a grey area. Starting at the basic traditional level, a web server fetches static pages stored on disk and gives them to the client at the client's request. Pretty basic. Adding CGI lets the client start a process on the server that changes a web page, then serves that up to the client. In ECS's case this is probably OK, because unlike a traditional web server, ECS will have few concurrent client connections. If you start to scale to hundreds of concurrent connections, traditional CGI starts to create a huge overhead because of the number of processes that are spawned for each connection, but again ECS should be able to handle this due to low client connections. ECS would probably build web pages "on the fly" so to speak, or at least static web pages on disk would have references to ECS items that would then have their current state inserted as the page is fetched. I'm not sure how this kind of "state reference" is handled in html, but it sounds fairly trivial, much like CGI can show the state of environmental variables of a windows machine. On the input side, a client browser would submit a form that changes the state of an item, which ECS would process. I'm guessing that most of these internal states are kept just that - internal in most web servers, instead of keeping a file of all the current states on disk then refering to the file when necessary. Actually, this project follows the lines of most embedded web servers that are being implemented today. For example, most of the new networked printers you buy today have a built in webserver in the firmware. Once the unit has been assigned or learned it's IP address, you can point a web browser to that address and get a "configuration page" that let's you setup all the internal configuration items - a process that used to be done with a specialized network application or via the front panel of the printer. All the web pages and server process are implemented in firmware and RAM, most of these units don't have disks. You might want to check out the comp.arch.embedded newsgroup. They may have some information on embedded web servers as this is a fairly common practice these days. Before you know it your toaster WILL have an embedded web server for selecting color. :) -----Original Message----- From: Mark Gilmore [mailto:omnip@usit.net] Sent: Sunday, January 30, 2000 8:46 AM To: ecs-list@netbloc.com Subject: Re: [ECS] CGI advice needed Per helpful inputs from SCOTT/MARTIN/KENT, I am strongly leaning towards making ECS a web server. I have already added test code in ECS to generate a web page listing all Items and State-dropdowns for each (generating any required web pages will be trivial). Any thoughts on how to best make ECS a web server ? MS VC++ has support for this, but I would like to find a system-independent solution (if possible). I don't mind AT ALL if you call today (collect). Thanks, -- Mark Gilmore Omnipotence (ECS home automation software) http://www.usit.com/omnip 423-745-0026