GithubHelp home page GithubHelp logo

pollchat's Introduction

pollchat

Pollchat is an in-browser multi-user chat app built on Apache Kafka using Websockets and Node.js

It was written by David Basden [email protected] as a demonstration/exploration of what Kafka can be used for. It's best if you read the introductory blog post as well to get some context.

Disclaimer

This is seriously some write-once, throwaway code. The code is quick-and-dirty, has config harcoded up the wazoo, and comes with no guarantees. But it should work.

Steps to success

  1. Have a working ZooKeeper and Kafka cluster

  2. Get yourself a server with Node.js installed, and a webserver like apache or nginx

  3. You'll also need to install a couple of Node.js modules for kafka and websocket support

    npm install kafka
    npm install websocket
    

    We found that on a current build of Node.js, it would throw errors relating to the pick module. Commenting out the offending line in node_modules/kafka/node_modules/std/std.js seems to fix that up.

  4. Edit server.js and fill in your kafkahost and kafkaport. Adjust the listenport as well if you want

  5. Now fire up the server.js daemon, something like daemontools is recommended for serious usage

  6. Edit index.html and fill in the Node.js websocket listener details. Place it in a directory being served by apache/nginx/other

  7. Hit the page from your browser, you've just started a chat client!

pollchat's People

Contributors

barneydesmond avatar dbasden avatar

Watchers

 avatar  avatar  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.