项目作者: ohbriansung

项目描述 :
Peer to peer chatting application
高级语言: Java
项目地址: git://github.com/ohbriansung/Grrrr.git
创建时间: 2018-05-18T02:09:01Z
项目社区:https://github.com/ohbriansung/Grrrr

开源协议:

下载


Grrrr

Introduction

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:

Grrrr

How to use

Command to open Grrrr

  1. $ java -cp project2.jar cs682.Chat -user <username> -port <port> -udpport <udpport>

Command to explore nodes

  1. >> list

Command to send private message

  1. >> send [username] "message content"

Command to broadcast

  1. >> broadcast "message content"

Command to request a history data:

  1. >> request [username]

Notice that before running Grrrr, the ZooKeeper server and the parameters in MyZooKeeper class should be set up first.

Debug mode

Command to open Grrrr with debug mode

  1. $ java -cp project2.jar cs682.Chat -user <username> -port <port> -udpport <udpport> -debug

Command to generate mock history data

  1. >> mock <number>

Under debug mode, user can easily track the entire process of data streaming.

Author and Contributor

  1. Chien-Yu (Brian) Sung
  2. Dr. Rollins - page

Acknowledgment

This project is for academic purposes only.

References