Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

need 4 computers to interact, don't know about resources for that

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi and thanks for reading my posting! :)
I need to admit at once that I'm not a professional user of C or C++ but any comments are welcome as I'm eager to read manuals.
My task is the following:
I need to write a program that allows 4 people to sit at 4 different machines and answer questions the program asks them. While 1 person answers the other 3 should be able to see the answer and the question asked. At the same time the program should keep a record of the questions and answers. I think that these people should answer in turn and must wait until the previous person answers. So probably the program should notify the person whose turn is to answer and shouldn't allow anybody else to answer.

Again I know almost nothing about C and C++. The most valuable information that I drastically need is how to organize interaction between 4 machines: what kind of means already exist in C and C++ for that and what should I do myself. Any comments about keeping track of the answers can help as well.

Thanks a lot for your help!
 
hi there...
Pretty down-to-earth hah ! Anyway u have to decide on a technology to interact between different machines.The tchnology could be a simple socket application or u could use Corba or COM - DCOM.But looking at your case (seems like a study project !) I would recommend Socket programming.But if u have a licence for some Corba implementation like Orbix,try Corba instead.I dont know if i'm clear enough...if ur still confused let me know.
 
By way of sockets... depending on what you're working with, you can go client/server or peer-to-peer.

In client/server, make one of those computers the server, and the other three computers connect to that. Everybody gets their information from the server, and don't make any decisions without consulting the server first. That means the server will do most of the work, keeping track of what everyone knows.

For peer-to-peer (a wee bit harder), every computer must notify every other computer about what it is doing. That means that every computer must maintain some data on what it thinks the other computers know. So, you'll be passing messages like COMPUTER1_TURN_BEGIN, COMPUTER1_TURN_END, COMPUTER2_ACKNOWLEDGE, etc...

Make it any easier?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top