lcFrank's Emails

Re: Web neurons

Home dic local
lcRe: Web neurons
ltRe: Web neurons
Hi John, >I'm struggling with CGI. Don't really get it at all. I have the Httpd >1.4c Windows 3.1 sever. there's a load of stuff about "back ends" and >the fact that Visual Basic has to create .exe's for Windows 3.1. Seems >greatly over-complex. This seems complex to me too. I don't know much about running httpd under Windows 3.1 and Visual Basic. I run a Cern Httpd on Linux. and do most cgi-programming in Perl. I think Perl is the way to go in developing a web- neuron system, for the following reasons: - Interpeted language. - Most Internet hosts are un*x, If we want the system to be used (tested) on the Net , it should run under un*x and system administrators should be able to check the source (security issues). - Perl is very good for handeling strings, this we need if we want the script to extract data from HTML docs. One drawback might be the speed of perl, but I think this is no problem as netwerk connections are the speed limiting factor. >I understand that say taking items from an HTML form then passes those items >into the URL each item separated by "&". This sounds like it could be used >to This one way to do it (GET method) the other way is the POST method, in which case the variables are send using the body ('content') of the doc. >fire off something like a Web neuron and pass inputs to it. Do you think >Webon is a good name for WEB neurON, I'll try it for a bit and see how it > goes. And what about "Weblet" for a small group of linked Webons that > perhaps do a specific task. The names are ok with me, although Webon looks a bit like WebNOB (a notice board system I just developed). I also question if web neuron is right, because the functionality of a web neuron could be more than just firing another HTML page. It is not clear to me how you see the processing capabilities of one page. In programming the the following concepts (with -> my understanding of how it is implemented in the webneurons): - Data (types) -> in HTML - Operators -> in HTML - Statements -> 'if' in HTML other statements in the structure (the links) - Subroutines, functions etc -> in links Maybe a webneuron could be called a 'web unit of processing' (WebUp or wup). >I think a good start for us would be to try to build a simple example >Webon network to run on just one machine. What about an address book? >I already have an idea how this should be programmed using Webons, >since it came up in the follwing post:- (Swap HTML pages for "Webons") >I really don't believe you would. Any database and database handling program can be duplicated by linked HTML pages with suitable HTML extensions that allow:- > > Triggering of other pages (this can give multi-tasking capabilities) > Data to be passed between pages > Data to be stored in pages, and named > Simple logic flow (IF, ELSE) acting on stored data names > String handling Perl is good in string handeling! > Links to be made/broken > Pages to be created/deleted Should the weblet be allowed to do those things or only the programmer? > (things I didn't think of yet) What about returning some output to the caller, this is in my view the trickiest part of the webneurons since several webneurons could return output to one call and the system doesn't consist of one to one links (it is not possible to let the webbrowser fire all the neurons) so neurons should send the IP-number of the original caller to each neuron they fire or the first neuron should return the output. (I think only the last solution is realistic: a user should call an 'output neuron') >all automatically. >In this I am thinking that each HTML page represents one database element. >It may look like a lot but not that many extensions are needed, >just the right ones (IMHO). >Databases have to do things like - find, sort, add (record), delete, goto next, >update, etc. >As a crude example - to find say Mr Jones' record in an HTML address book:- >Input "Jones" from the user. >Trigger the first Surname element page, and pass "Jones" to it. >Store "Jones" as say ARG1 in that page. >Suppose the contents of this page were "Bloggs" stored as CONTENTS. >Also, that the record number "1" is stored as RECNUM. >Do a test - IF CONTENTS=ARG1 then trigger a result page and pass it RECNUM. > ELSE, trigger the next Surname element page (in record 2) and pass it "Jones" >Carry on until you get a match, > or the last element passes say "No match" to the results page. >The record number could be stored as text in the results page and displayed. >Note there is no need for a search Loop as in standard languages. Only one simple IF ELSE per element page. In fact maybe Looping should be banned. >This does involve a radically different programming strategy. >Each database element now becomes a sort of "object" with its own code, > and with explicit links to other elements. >I wish I lived in Hawaii too. >[end of post] >------------------------------------------------------------------------------ >So can we duplicate this with CGI scripts? I believe it can be. > Assuming we are running on just one machine one Webon should be able to > fire another in the Weblet without going back to the server. The URL would This is probably possible but I wonder why not using browser/server from the start > just be the filename in this case. You also need an interpreter to go > through the code in each Webon. Another plus using perl, we already have the interpeter, we just have to 'parse' the HTML files. >>The cgi firing equivelant wouldn't be in the HTML page itself but in the url: >>/cgi-bin/fire/foo.html ->fire it >>/cgi-bin/view/foo.html ->view >>/cgi-bin/edit/foo.html ->edit >>etc. >So you must be saying that foo.html is a Webon. yes >I presume that embedding "FIRE" somewhere in the URL tells the server >to execute foo.html rather than view it or edit it. But is /fire a directory? no FIRE (and EDIT, view is not nesscary : with URL /foo.html you get the html file) is the processing script. /foo.html is the PATH variable passed to fire, so fire 'knows' which web neuron to process. > Are there three copies of foo.html in three directories? I really don't > know anything about CGI. one foo.html in the http server 'root document' directory >If, after firing foo.html, foo.html itself has a fire command for say >foo2.html (in the same directory), what would be the exact process of >getting foo2.html to fire. What is doing the interpreting of the lines >in foo.html? In the conventional sense this would be done by the browser, > say Netscape. But I don't see anything like Netscape here. In the above example 'fire' is the processing script excuted at the server side (not by netscape). It reads foo.html which containts foo2.html. The script then calls /fire/foo2.html. (so the script contains some 'browser' functionality, this is not as diffcult as it sounds, I've once written a script which called several Net search engines (like Meta crawler an Savysearch do). If netscape would be used for processing the system would not be distributed: all webneurons have to be send to the caller(browser) and processed by the browser, making the system very slow and complex. a plugin or java script would be nessecary. You would put the security at the caller side and not on the source provider side (which is the big problem of Java although SUN claims it to be secure). If the processing is done on the server side only data has to be send over the net if a weblet on another server is called (by the browser or by a weblet!) which makes the development of real code 'reuse' and 'superprograms' (a program running on computers all over the world) possible. >What type of CGI script do you use.. PERL, VB? I can't program anything yet >because I'm not set up for it. Perl, I will check how it runs under MS-win, since my apprentices don't run linux neither. >Look forward to your reply. >By the way, what does "Drs" mean? It is an abreviation of 'doctorandus' a dutch academic title (I am a biologist). If we go ahead, I propose we develop this as public domain software (under the Perl artisic license or GNU license). Maybe it is good if more people get involved in this project. We could setup some pages on the web, with the ideas, scripts, docs examples etc. I think we need to: - solve the output question - specify a 'template' webneuron (how and which data is stored in the HTML file/table). Regards, Frank ____________________________________________________________ Drs. F.P. Schuurmans CYBER PUBLISHERS frank@bio.vu.nl Amsterdam, The Netherlands