You are required to implement the following steps using GUI.
When the server is started, it will open a file ([url removed, login to view]) which will have a mapping of hostnames to passwords. The server will store this mapping in some storage object. You may use any type of structure (arrays, arraylists, vectors etc.) to store this information. And perform authentication.
1. One of the clients creates a new group. All the five clients must join the same group.
2. Once the group is created, the server must send to each client in the group, an array of addresses and ports of all other clients in the group.
3. Client that creates the group has the token at the beginning of the program.
4. Clients use this information when implementing the token passing algorithm. (Sending chat messages to the group still happen via the server.)
5. This chat group must have an organized conversation. This means there must be one token floating around the group. Only the client holding the token must be able to send messages on the group chat.
6. Along with the message, the client must present its badge (indicating it has the token) to the server when sending a message. If Badge = true, then the client has the token. If Badge = false, then the client does not have the token. If a client tries to talk to the server without the token, server must send the following message to that client: “Please acquire token.” Assume there are no malicious clients who would try to send a dummy token to the server.
7. The chat messages are passed similar to the multicast as in the previous lab assignment, i.e., chat messages go from client to server to rest of the group.
8. There must be ACQUIRE TOKEN and SEND TOKEN buttons next to SEND button in your chat client GUI. Any client/s that want/s to send messages must send a REQ to all the other clients and wait. All the clients must update their request array.
9. Once the client holding the token is done sending messages to the group, it must send the token (last array, tail of Q) over to the head of the Q.