Project Implementation Suggestions

Download Report

Transcript Project Implementation Suggestions

Project 1 Notes

Not familiar with threads & sockets?


Try building separate programs
Program 1A




Use Threads alone, no sockets
Design a “dummy” thread or “modified send” thread that will allow
messages to be typed and “pass” it to the receive thread (using
thread-to-thread communication)
Receive thread receives messages & writes onto screen.
You can debug the file handling part using Program 1A
B. Prabhakaran
1
Project 1 Notes

Not familiar with threads & sockets?

Program 1B







Use sockets alone and no threads
Develop 1 client- 1 server program
Extend it to multi-client – 1 server program
Now, make the communication “peer-to-peer”, i.e., make the “server” side
also behave like a “client”.
Debug the program 1B separately without threads
You may even test it 3-4 machines and 15-20 processes
Integration

Integrate program 1B into the send & receive threads of program 1A.

Machines

net01.utdallas.edu, net02, net03, …

Problems: Email [email protected] ; if needed, cc me
B. Prabhakaran
2
Project 1 Notes

“Starting” Trouble:


One problem to be solved is how will you know when other
processes have begun their execution.
What you might need: a table that describes process-id and the
respective port numbers.


Configuration file showing the “static” table
Registration Server




Wait till all processes register and then broadcast the table
Dynamically broadcast the table every time a process joins
No “efficiency” requirements. Only requirement is that the
program should work without crashing.
Minimal User Interface requirements. No extra credit for
“sophisticated” user interfaces.
B. Prabhakaran
3