Giter Club home page Giter Club logo

kafka-chat's Introduction

kafka-chat

A CLI Chat Program Based on Apache Kafka

Requirements

How to Build

  1. Resolve maven dependency

    $ mvn dependency:copy-dependencies
    
  2. Build jar using maven mvn

    $ mvn package
    

How to Run

  1. Start ZooKeeper server on your machine

    $ bin/zookeeper-server-start.sh config/zookeeper.properties
    
  2. Start Kafka server on your machine

    $ bin/kafka-server-start.sh config/server.properties
    
  3. Run ChatServer from the generated jar in target folder

    $ java -cp target/dependency/*:target/kafka-chat-1.0.jar com.edmundophie.chat.ChatServer
    
  4. Run ChatClient from the generated jar in target folder

    $ java -cp target/dependency/*:target/kafka-chat-1.0.jar com.edmundophie.chat.ChatClient
    

Chat Commands

  • nick <nickname> : login as nickname. Leave nickname empty to login as a random user
  • join <channelname> : join to a channel named channelname
  • leave <channelname> : leave a channel named channelname
  • @<channelname> <message> : send message to a channel named channelname
  • <message> : send a message to all user joined channel
  • logout : logout from current nickname
  • exit : stop program

Testing

Conducted Testing:

  • All basic commands (nick, join, leave, etc)
  • Invalid command (e.g. @<channelname> without message)
  • Send a message when no channel is joined
  • Send a message to a channel that is not a member of
  • Join a channel that already a member of
  • Leave a channel that is not a member of
  • Logout and relogin with the same nickname
  • Login with existed nickname
  • Multiclient chat

Testing Screenshoot:

alt text

Team Member

  • Edmund Ophie 13512095
  • Kevin 13512097

kafka-chat's People

Contributors

kevinzhong94 avatar edmundophie avatar

Watchers

geminilu avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.