[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
3. Some Applications and Techniques
In this chapter, we look at a number of self-contained
scripts, with an emphasis on concise networking. Along the way, we
work towards creating building blocks that encapsulate often needed
functions of the networking world, show new techniques that
broaden the scope of problems that can be solved with gawk
, and
explore leading edge technology that may shape the future of networking.
We often refer to the site-independent core of the server that
we built in
A Simple Web Server.
When building new and nontrivial servers, we
always copy this building block and append new instances of the two
functions SetUpServer
and HandleGET
.
This makes a lot of sense, since
this scheme of event-driven
execution provides gawk
with an interface to the most widely
accepted standard for GUIs: the web browser. Now, gawk
can rival even
Tcl/Tk.
Tcl and gawk
have much in common. Both are simple scripting languages
that allow us to quickly solve problems with short programs. But Tcl has Tk
on top of it, and gawk
had nothing comparable up to now. While Tcl
needs a large and ever-changing library (Tk, which was bound to the X Window
System until recently), gawk
needs just the networking interface
and some kind of browser on the client's side. Besides better portability,
the most important advantage of this approach (embracing well-established
standards such HTTP and HTML) is that we do not need to change the
language. We let others do the work of fighting over protocols and standards.
We can use HTML, JavaScript, VRML, or whatever else comes along to do our work.
3.1 PANIC: An Emergency Web Server | An Emergency Web Server. | |
3.2 GETURL: Retrieving Web Pages | Retrieving Web Pages. | |
3.3 REMCONF: Remote Configuration of Embedded Systems | Remote Configuration Of Embedded Systems. | |
3.4 URLCHK: Look for Changed Web Pages | Look For Changed Web Pages. | |
3.5 WEBGRAB: Extract Links from a Page | Extract Links From A Page. | |
3.6 STATIST: Graphing a Statistical Distribution | Graphing A Statistical Distribution. | |
3.7 MAZE: Walking Through a Maze In Virtual Reality | Walking Through A Maze In Virtual Reality. | |
3.8 MOBAGWHO: a Simple Mobile Agent | A Simple Mobile Agent. | |
3.9 STOXPRED: Stock Market Prediction As A Service | Stock Market Prediction As A Service. | |
3.10 PROTBASE: Searching Through A Protein Database | Searching Through A Protein Database. |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |