Preface


  
Network Programming with Perl
By Lincoln  D.  Stein
Slots : 1
Table of Contents

    Content

The network is everywhere. At the office, machines are wired together into local area networks, and the local networks are interconnected via the Internet. At home, personal computers are intermittently connected to the Internet or, increasingly, via "always-on" cable and DSL modems. New wireless technologies, such as Bluetooth, promise to vastly expand the network realm, embracing everything from cell phones to kitchen appliances.

Such an environment creates tremendous opportunities for innovation. Whole new classes of applications are now predicated on the availability of high-bandwidth, always-on connectivity. Interactive games allow players from around the globe to compete on virtual playing fields and the instant messaging protocols let them broadcast news of their triumphs to their friends . New peer-to-peer systems, such as Napster and Gnutella, allow people to directly exchange MP3 audio files and other types of digital content. The SETI@Home project takes advantage of idle time on the millions of personal computers around the world to search for signs of extraterrestrial life in a vast collection of cosmic noise.

The ubiquity of the network allows for more earthbound applications as well. With the right knowledge, you can write a robot that will fetch and summarize prices from competitors ' Web sites; a script to page you when a certain stock drops below a specified level; a program to generate daily management reports and send them off via e-mail; a server that centralizes some number- crunching task on a single high- powered machine, or alternatively distributes that task among the multiple nodes of a computer cluster.

Whether you are searching for the best price on a futon or for life in a distant galaxy, you'll need to understand how network applications work in order to take full advantage of these opportunities. You'll need a working understanding of the TCP/IP protocol ”the common denominator for all Internet-based communications and the most common protocol in use in local area networks as well. You'll need to know how to connect to a remote program, to exchange data with that program, and what to do when something goes wrong. To work with existing applications, such as Web servers, you'll have to understand how the application-level protocols are built on top of TCP/IP, and how to deal with common data exchange formats such as XML and MIME.

This book uses the Perl programming language to illustrate how to design and implement practical network applications. Perl is an ideal language for network programming for a number of reasons. First, like the rest of the language, Perl's networking facilities were designed to make the easy things easy. It takes just two lines of code to open a network connection to a server somewhere on the Internet and send it a message. A fully capable Web server can be written in a few dozen lines of code.

Second, Perl's open architecture has encouraged many talented programmers to contribute to an ever-expanding library of useful third-party modules. Many of these modules provide powerful interfaces to common network applications. For example, after loading the LWP::Simple module, a single function call allows you to fetch the contents of a remote Web page and store it in a variable. Other third-party modules provide intuitive interfaces to e-mail, FTP, net news, and a variety of network databases.

Perl also provides impressive portability. Most of the applications developed in this book will run without modification on UNIX machines, Windows boxes, Macintoshes, VMS systems, and OS/2.

However, the most compelling reason to choose Perl for network application development is that it allows you to fully exploit the power of TCP/IP. Perl provides you with full access to the same low-level networking calls that are available to C programs and other natively compiled languages. You can create multicast applications, implement multiplexed servers, and design peer-to-peer systems. Using Perl, you can rapidly prototype new networking applications and develop interfaces to existing ones. Should you ever need to write a networking application in C or Java, you'll be delighted to discover how much of the Perl API carries over into these languages.


   
Top


Network Programming with Perl
Network Programming with Perl
ISBN: 0201615711
EAN: 2147483647
Year: 2000
Pages: 173

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net