Peer to peer chatting application
Grrrr is a peer to peer chatting application, implemented with Apache ZooKeeper, Maven and Google Protocol Buffers. By creating nodes with host, port and udpport information under same ZooKeeper server group, each user(peer) would be able to communicate with each other if they are using same protocol. Implemented both TCP and UDP: user can broadcast or send private messages to other nodes by using Raw Socket, and can also download history data from another chat peer with Datagram Socket. To ensuring reliable delivery of all data packet when streaming, we implemented Go-Back-N algorithm.
“Grrrr” is the sounds that bears communicate with each other, we are a bunch of students in California which is known as “Bear State”, and this is how a bunch of grizzly bears talk! Also, Grrr has been taken so I have to add another ‘r’.
The user interface of Grrrr is a command-line interface, simply input a command followed by some arguments. Here is an example:
$ java -cp project2.jar cs682.Chat -user <username> -port <port> -udpport <udpport>
>> list
>> send [username] "message content"
>> broadcast "message content"
>> request [username]
Notice that before running Grrrr, the ZooKeeper server and the parameters in MyZooKeeper class should be set up first.
$ java -cp project2.jar cs682.Chat -user <username> -port <port> -udpport <udpport> -debug
>> mock <number>
Under debug mode, user can easily track the entire process of data streaming.
This project is for academic purposes only.