In the first part of the assignment, you'll develop a simple Web
Crawler that will download the contents of a URL and display it on the
standard output. This first part is intended to be very simple. It's
primary purpose is to expose you to several patterns,
e.g., Factory Method, Visitor, Facade, Wrapper Facade, and
Connector, and ACE C++
framework components, e.g., ACE_Connector
and ACE_SOCK_Stream. All of these patterns and framework
components will be reused in subsequent parts of this assignment so
it's important to understand them and get them right.
To start off, we'll write one program: a Web Crawler client. In brackets are some hints about what kinds of ACE classes you might want to look up to do these (see ACE HTML manual pages and ACE tutorial reference for additional details).
ACE_INET_Addr, ACE_SOCK_Connector,
ACE_SOCK_Stream].
/tmp created by your Web Crawler on the local host
[ACE_FILE_Addr, ACE_FILE_IO,
ACE_SOCK_Stream]. To ensure unique file names in
/tmp, I recommend you either use
ACE_OS::mktemp or use the ACE_FILE_Addr file
(ACE_sap_any_cast (ACE_FILE_Addr &)) feature to create a unique
temporary file.
ACE_OS::unlink. In fact, I recommend that you
remove the temp file [ACE_OS::unlink] immediately after
you open it so that if your program crashes the temp file won't be
left in /tmp.
ACE_OS::perror] and exit with a return status of 1 if
any of the system calls fail to work properly. If everything works
correctly, the program should exit with a return status of 0. Speaking of errors, make sure that the client won't hang indefinitely if the server fails to follow the HTTP protocol or of the network and remote hosts fail. For instance, make sure that all of your connect, send and recv calls time out after a user-specified period of time has elapsed.
The next diagram presents a more detailed view of the classes and their relationships:
Please see the online help for information on how to setup your development environment on Washington University's computing system. In addition, you can obtain the program shells online, as well.
Last modified 16:29:25 CST 28 February 1999