T
Tan Thuan Seah
Hi all
I was given a task to write a crowd control system using Java. The
system is such that there are 5 number of gates which allows crowd to
enter/exit the stadium. The gates are supposed to ensure that the crowd
inside the stadium is within the limit of say 50. Once this limit is
reached, the gates will not allow anyone to enter but only exit from the
stadium. The gates will open once more if the crowd inside is <50. I am
looking around for methods to synchonize the gates. The setup of the system
is such that there is no center control. So the coordination is among the
gates.
My plan is such:
Each gate is a thread first initialized with 50/5=10 person each
After the gate has hit that limit of 10 person, it will have to 'borrow'
from other gates.
Two questions here, I was given a few methods of communication. Through
pipes, socket, RMI or mpiJava. Are there any other methods to communicate
which I had yet to be exposed to? Also, I was thinking of setting up the
gates using ring topology for network. And I am looking around for solution
to maintain commmuncation if one of the gate were to fail. Any references
would be helpful. Thanks in advance.
Thuan Seah
I was given a task to write a crowd control system using Java. The
system is such that there are 5 number of gates which allows crowd to
enter/exit the stadium. The gates are supposed to ensure that the crowd
inside the stadium is within the limit of say 50. Once this limit is
reached, the gates will not allow anyone to enter but only exit from the
stadium. The gates will open once more if the crowd inside is <50. I am
looking around for methods to synchonize the gates. The setup of the system
is such that there is no center control. So the coordination is among the
gates.
My plan is such:
Each gate is a thread first initialized with 50/5=10 person each
After the gate has hit that limit of 10 person, it will have to 'borrow'
from other gates.
Two questions here, I was given a few methods of communication. Through
pipes, socket, RMI or mpiJava. Are there any other methods to communicate
which I had yet to be exposed to? Also, I was thinking of setting up the
gates using ring topology for network. And I am looking around for solution
to maintain commmuncation if one of the gate were to fail. Any references
would be helpful. Thanks in advance.
Thuan Seah