Subject: Re: WWW-to-FoxPro connection From: R Ballard Date: Thu, 4 May 1995 22:14:48 -0400 (EDT)
How the Web Was Won
Subject: Re: WWW-to-FoxPro connection From: R Ballard Date: Thu, 4 May 1995 22:14:48 -0400 (EDT)
In-Reply-To: <199504251706.NAA08659@larry.infi.net>
Message-ID: 
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Status: O
X-Status: 



On Tue, 25 Apr 1995, Tom Boyer wrote:

> It turns out that this whole area is just getting ready to explode.
> Windows-to-web connections are going to be pretty common by this time next
> year, and with them will come Web-accessible windows database applications.
> The technology is only about 8 months old now.

Actually the Web-accessible database technology has been around for about 
2 years on UNIX.  It takes quite a bit of time to translate X-Widgets to
MFCs, and even longer to plug the MFC Memory leaks generated by MFC 
"experts" who aren't quite aware that every instance needs a destructor 
and signal handling.

> Right now, it's probably not anything for amateurs like me to tackle, but
> here's one model of how it works:

> On a Windows box, you run the best TCP/IP you can buy and Robert Denny's
> httpd win server (descended from the NCSA httpd). The server communicates
> using a back-end Common Gateway Interface script (written in basic and
> compiled as a windows .exe), running FoxPro/Win queries through Windows DDE.
> There are other dos and win httpd servers out there, but probably not as
> well known as Denny's.

It is very important that the Windows Console be kept to an absolute 
minimum.  Set your screen saver to "Black", Background to "Black", and
foreground to White (or vice-versa).  SERVERS don't want to do lots of 
GRAPHICS with constant updates.  Typically, the server sends raw stats to 
a workstation which "GUI displays" the interface.  When it is necessary to
configure the interfaces on a GUI, it is best to send the messages to the 
objects and let the objects ship messages to base-classes on a CPU which 
can "Draw the lines and boxes" on the remote workstation.  It's like 
Remote OLE.  This technology is described in the ICCCM (first release 
1988).

> O'Reilly & Associates as of the beginning of May will begin selling Website,
> an adaptation of this server for Windows NT and Windows '95.
> Website, running on a pentium, is rated at something like 100,000
> transactions per HOUR, which is nearly enough to saturate a T-1 line. If it
That works out to about 27 transactions/second.  Unix, on a 100 Mips 
machine (Pentium 90), would run about 100 TP-1/second.  Of course those
servers don't do graphics.

> lives up to billing, it will be a viable competitor for Unix servers but
> much less costly, and have the considerable advantage of being able to run
> windows apps.
Let's see:
WindowsNT, Pentium100, 32Meg Ram, Multiuser License, Multi-user ES 
License, NetScape Server License... $30,000

Linux, Pentium90, 16Meg Ram, Multiuser Enabled (Default) All Servers... 
$1200

Your RIGHT!, I'd much rather sponsor all that advertising revenue and 
media hype.  DO buy the NT, Byte Magazine wouldn't have any big sponsors 
if you don't.  Remember how terrible it was when all those "Back Pages
companies like Microsoft, Lotus, and Novell" came out the a machine that
didn't run CP/M?  Everybody KNEW that MP/M was the way of the future.

It seems that Ray Noorda, the guy who took over Novell in 1982 is backing
products for Linux.  So are WordPerfect, Lotus, and Computer Associates.
It seems they aren't terribly keen on the possibility that Microsoft will 
"force Bundle" Microsoft "Everything" with the NT.  They've even thrown 
in some "free engineering" to the Linux Camp.  Let's face it, there are
several huge corporations who stand to lose a bundle if Microsoft sells
NT with a BUNDLE.

> >From where I sit, it looks like this means you can do structured Web
> databases in a fairly professional way for around $10,000 (not counting
> development time), instead of $50,000-$80,000 for a Sybase or Oracle
> installation. (that is, if you don't need Sybase/Oracle type power. FoxPro
> queries, if set up right, take less than a second for a 500,000-record
> search. I don't think you'd use Fox for a 10-million-record database)

I can get that kind of a response with "grep" or "awk" :-).

> DDE, for non-Windows types, is Dynamic Data Exchange. It takes advantage of
> Windows' multitasking capability to let one app query another app. In the

In effect, DDE is the inverse of an assembly line.  One application 
creates a huge buffer, in memory, and then hands it off to the other 
application which then reads and reacts to it.  Of course, each 
applicaiton drags all of it's instance variables, class variables, and 
methods (including HELP menus and messages) into the memory with it.

If the applets are small (say under 100k), the system can be kept 
entirely in memory.  If you have an application (Like a Web Browser) that
has several DDEs, each with graphic buttons, big GIFS, and must cycle 
through several hundred object just to "send itself" across a serial 
stream, you need either very LARGE memory chips, or you begin to Page 
memory to the Disk Drive.  If you have many very large objects, you must 
page through the disk to complete each transaction.  When you move a 
window, activate another transaction, or wake up the screen-saver, every
object must be executed to determine it's consequences.

Unix takes small messages and turns them into "streams", using small, 
independent processes which receive parameters from GUIs, but run 
independenly of the GUI interface.  In other words, I don't have to load
the equivalent of WORD to serve the equivalent of a WORD document.  The
editor who creates the document put's it in simple format which can be 
stored and delivered to the client.

When you put a web front-end to a database, the formatting to the 
delivery format must be done "on the fly".  If your server is delivering 
a specific page of a Word document, then the server must know Word.  You 
could create little files with one page/word document, but if you have to
copy and open each little file, the initialization of opens gets a bit 
disk-intensive.

> setup above, the GCI script sends the DDE requests -- with query arguments
> -- to Fox, which sends back query results and HTML code.

> If you want to do some reading on this subject, there is a surprising amount
> out there.

There is quite a bit out there, but it is important to be firmly grounded 
in the basics of interprocess communications principles for MS-Windows, 
X-Windows, and Unix before committing yourself to a server that might not 
be able to grow  to handle the traffic of the Internet (20%/month 
growth-rate potential).

Can your server shift gears from 20 transactions/second to 100 
transactions/second in less than 6 months?  This is why most of the 
Fortune 500 have adopted UNIX for there enterprise critical applications.

Rex Ballard


From rballard@cnj.digex.net Thu May  4 22:28:07 1995