Electronic Postcard Application with CGI and Sockets
Name
Short: CGI and Sockets
Long: Electronic Postcard Application with CGI and Sockets
Objective
The purpose of this lab is to implement a part of a distributed application using CGI to execute the program through the web server and sockets for inter-process communication.
Time allocation
Four hours are allocated to complete this lab assignment.
Exercise
You will have to implement a CGI program that:
- Builds a web page that presents the available cards as thumbnails. The information about the available cards should be taken form the cards database. The program should use sockets in order to connect to the CardDatabaseServer.
- For a chosen card, constructs a web page presenting the card and a text area to fill in the message.
- Given a message and a card, constructs a web page as it will be seen by the recipient. The program should connect to the CardWriteServer in order to write the message on the chosen card.
Tips
- Make sure you understand the protocols used by CardDatabase and CardWrite servers. Use telnet to try out a few commands.
- Start by modifying the client in the sockets example.
- Manually set the QUERY_STRING environment variable for debugging purposes.
- Build three separate programs, one for each type of web page to be generated.
Reporting your work
The lab is reported by showing the assistant the working application. All members of the lab group should be present when reporting.
Appendices