Docsity

Protocol Description for COP5615 Project #3: Message Types and Formats, Study Guides, Projects, Research of Computer Science

Toggle sidebar
bg1
COP5615 Project #3 - Protocol Description
Fan Mao - Sean D. Matthews - Luis L. Perez - Jiangyan Xu
General message format
In no particular order, the following information should be passed between
communicating servers:
●<dest addr> represents the destination IP/hostname and port number of the recipient
of the message.
●<origin addr>, similarly, represents the IP/hostname and port number of the message
sender.
●<ticker> is an object which a server can “tick” to note that it has received this
message. As the message is passed around, this will prevent duplicate receipts.
●<message type> represents a special code which servers use to interpret what type of
message they are receiving and how they should handle the messages’s contents,
especially the <payload>.
●<payload> carries all information specific to some error, command, or other <message
type>.
This fields will be part of a Serializable class.
Neighbor discovery messages
The following message types are used by the neighbor discovery mechanisms:
●SD_REQUEST: Sent by the newcomer to the server's broadcast address. Contains the
new server's host address and port and a unique seed so that only the servers of that
network can become a neighbor.
●SD_ACKREQUEST: Sent by the already existing servers to the newcomer if they
accept it as their new neighbor, in response to a previous SD_REQUEST. The
message includes the server's host address, port, the original seed sent (with an
updated <ticker> with the same message ID) by the newcomer and its current user list.
pf2

Partial preview of the text

Download Protocol Description for COP5615 Project #3: Message Types and Formats and more Study Guides, Projects, Research Computer Science in PDF only on Docsity!

COP5615 Project #3 - Protocol Description

Fan Mao - Sean D. Matthews - Luis L. Perez - Jiangyan Xu

General message format

In no particular order, the following information should be passed between communicating servers: ● represents the destination IP/hostname and port number of the recipient of the message. ● , similarly, represents the IP/hostname and port number of the message sender. ● is an object which a server can “tick” to note that it has received this message. As the message is passed around, this will prevent duplicate receipts. ● represents a special code which servers use to interpret what type of message they are receiving and how they should handle the messages’s contents, especially the . ● carries all information specific to some error, command, or other . This fields will be part of a Serializable class.

Neighbor discovery messages

The following message types are used by the neighbor discovery mechanisms: ● SD_REQUEST : Sent by the newcomer to the server's broadcast address. Contains the new server's host address and port and a unique seed so that only the servers of that network can become a neighbor. ● SD_ACKREQUEST : Sent by the already existing servers to the newcomer if they accept it as their new neighbor, in response to a previous SD_REQUEST. The message includes the server's host address, port, the original seed sent (with an updated with the same message ID) by the newcomer and its current user list.

Failure detection messages

The following message types are used by the server failure detection and recovery mechanisms: ● FD_HEARTBEAT : Sent by a server as multicast messages to its neighborhood and unicast messages to all its children every certain amount of time (N seconds), when the receivers get this message, they simply update the neighbor or server list. A server/agent checks all the objects it cares (namely, the list) every N seconds, if an entry hasn't been updated in last M checks, it had died. ● FD_CALLAGENT : Sent by a server that has realized that one of its neighbors is dead to its now “orphan” agents. Includes the server's contact address, port and a unique seed. ● FD_ACKCALL : Sent by an agent that has verified that its original server is dead and left its current chat room, in response to a FD_CALLAGENT message. The message includes the unique seed, and an updated for the original message ID.

Failure recovery messages

● FR_INVITE : Sent by a recovering server to its old agents to invite them to come back. The message will include the server's address, port, and the original seed they received when they joined the server for the first time. ● FR_ACKINVITE : Sent by an agent that has verified the sender's seed and original information, in response to a FR_INVITE message. The message includes the unique seed and an updated for the original message ID.

Node search messages

● NS_QUERY : Sent by a node to its server, asking it to search for another user in the network. Also can be sent from a server that is “forwarding” the search request to another server. The message includes a unique search identifier, a message counter that is incremented every time a message is forwarded and the user alias the agent is looking for. ● NS_RESPONSE : Sent by a server to a node that initiated a search procedure, in response to a NS_QUERY message. Also can be sent from a server to another server that “forwarded” the search request. It may include the newfound user agent's IP address and port with an END_SEARCHING status flag indicating that the search is over or an IN_SEARCHING flag indicating that the server did not find the user in its list but it's forwarding the search request to its neighbors. Additionally, the original search identifier is included and the message counter is incremented.