There are many ways to accomplish that. I've been crunching the methods for years and finally picked a simple, but flexible architecture. The main thing to consider is execution permissions. You don't want just anyone being able to run anything on your UV box from a web server or console.
Take a look at the guts of MVWWW if you want a starting point to build your own UV http service. If you do, PLEASE let me know so I can include it in the project! This is a file-spool based http service. For Windows, you will need ActivePerl in order to run the perl spooler and CGI client. You will also need Winetd or another Inet variant for Windows. If you just want the architecture, then here's a compressed version. Client-side (browser) calls a URL. (http://www.myhost.com/cgi-bin/mvwww.cgi?mvwrun=testapp) The web browser executes the CGI script (mvwww.cgi in this example) The CGI script makes a socket connection to the spooler (inetd service the standard I/O app called mvwspool.pl) The spooler generates a unique ID for the request. The spooler grabs the query, post, headers, etc from the CGI environment and saves them to a request queue file using the ID. The spooler broadcasts the presence of a new queue item, by writing an empty file in the main spool dir using the ID. At this point, the spooler waits for a response in a separate response directory. Server-side, our HTTP phantom runs and waits until new item IDs show up in a local directory (the main spooler dir) NOTE: Just like using a 'critical section' in threading, the directory is locked via MV file lock when it is being read or written to. This syncs all phantoms and allows for multi-threaded processing. When a new item ID is found, the empty item is deleted from the main spooler directory so other processes won't barge in and take over our request. The HTTP phantom then reads the actual request from the request queue, using the item ID as reference. The request is parsed, looking for a static CGI variable. In the case of MVWWW, it's "mvwrun". The subroutine to be called, is assigned to this CGI variable. We use CALL @ to call the subroutine named in the MV variable. Once our MV subroutine has RETURNed, we write the response into the response directory. The spooler sees the response, picks it up, and then sends it back to the client via standard I/O. That's it, in a nutshell. Plans are in the works to implement a spool manager. As it is, this architecture is not DoS attack proof. It also needs to have injection management added. As it is, you can inject a request directly into the spooler. The future manager will monitor how many, and how often, requests come from a client. It will also determine who can access it. Glen http://picksource.com > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] Behalf Of [EMAIL PROTECTED] > Sent: Tuesday, February 08, 2005 12:43 PM > To: [email protected] > Subject: Re: [U2] Universe to Web interface > > > In a message dated 2/8/2005 9:33:25 AM Pacific Standard Time, > [EMAIL PROTECTED] writes: > > > It sounds like you want to visit a web page and see the output of a UV > > BASIC program, but I might be misunderstanding you. > > Really it doesn't matter so much what I'm trying to do. > I'm just looking for an example of how ANYONE has done this UV on Windows. > Examples for Unix or Linux aren't helping me :) > Thanks > Will > ------- > u2-users mailing list > [email protected] > To unsubscribe please visit http://listserver.u2ug.org/ ------- u2-users mailing list [email protected] To unsubscribe please visit http://listserver.u2ug.org/
