Project 5: Mixing it up
Due: Dec 14th at Midnight
Introduction:
In this project you will use your favorate of the two languages we have
looked at this semester to write a program using one of the more recent
topics we've covered in class.
Details:
Use either python or ruby to do one of the projects below:
- Make a simple client-server pair of programs.
- One program, the server, should just listen on a port. (the
same port you were supposed to use for your ruby on rails project).
When a client connects, the server should accept a text file sent by
the client and print that text file to the screen.
- The other program, the client, should initiate a network
connection with the server, prompt the user for a text file, open that
text file, and then send that text file to the server.
- Make a simple multi-threaded program to solve a simple producer consumer problem.
- You need to have a shared data structure
- There should be one producer thread. It should add random
strings of text (from 4-10 characters long) to the data structure. (add
100 of them)
- There should be 2 consumer threads. Each thread should remove a
string from the shared data structure, and then print the string along
with some identification of the thread which did the consuming.
- All three threads should, of course, be running in parallel.
make sure that you make a new folder for this project and do all of your work in that folder.
Submission
Be sure to include the usual readme.txt which must include:
- Your name
- Which of the two projects you are doing
- which language you are using
- Directions for running your program including the port number if applicable
- anything that isn't quite done.
Then zip up the whole directory and submit it using the online submission.