Giter Site home page Giter Site logo

dchat's Introduction

DChat

Node.js chat service based on websockets.

Features

  • Operates on both websocket and flashsocket client.
  • It starts several chat processes, equal the number of your CPUs.
  • All communications between chat instances are provided via Redis pub/sub.
  • Operates with several Redis instances via hashring.
  • Provide unlimited number of chat rooms.
  • Store message history, delete old messages after the time has passed.
  • Provide users-per-room counting.
  • Read-only user mode for load reduction.

Load Capabilities

Max connection count is limited by 'ulimit' and amount of memory. Each connection you expect should be provided with 1 MB of RAM.

Max number of clients is also limited by CPU. Small test on ubuntu VM with 4 CPUs (2.5 GHz Intel Core i5) showed, that 30.000 is ok.

Requirements

Node.js Modules

  • websocket >= 1.0.7
  • redis >= 0.7.1
  • hash_ring >= 0.2.0
  • policyfile >= 0.0.5 (For flash policy)
  • mongodb >= 1.1.8 (Only for utility purposes. Chat uses ObjectID for the generation of connection IDs)
  • underscore >= 1.4.1 (For cool object-operating methods)

All Node.js modules should be installed by 'npm install'.

Be careful!

All redis '*:users_count' collections should be deleted before chat is started for correct user counting.

Suggestions and Feedback

We will be very pleased if you'll send us some feedback, suggestions and feature-request. It surely will help this project to evolve.

dchat's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dchat's Issues

Redis hashring

Have you tried your demo with multiple instances of redis?

BTW: Nice demo :)

Best regards

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.