Giter Club home page Giter Club logo

talktalktalk's Introduction

TalkTalkTalk

TalkTalkTalk is an easy-to-install single-page chat room. No login required, no complex layout. Just chat.

Live demo

Installation

The best way to test TalkTalkTalk is to install it locally on a Windows or Linux machine. You need to have Python installed. Just do:

git clone https://github.com/josephernest/talktalktalk.git      # or unzip talktalktalk-master.zip
pip install bottle bleach gevent gevent-websocket               # these Python module are required, compilation can 
cd talktalktalk                                                 #                              take up to 3 minutes
python talktalktalk.py start                                    # or use ./talktalktalk.py start instead to have a 
                                                                #                     proper name when using "top"

Open your browser at the address 127.0.0.1:9000, it works!

Now that it works locally, you probably want to install it on a web server, using an Apache server? The installation process is the same, you probably have nothing else to do, because the .htaccess file is already telling your web server how to redirect the traffic to the Python script, and everything should work out of the box. If it doesn't, try to run a2enmod proxy proxy_wstunnel ; service apache2 restart to enable WebSocket handling by Apache.

Why another chat software?

There are thousands of great chat software everywhere, but I never found the one I was looking for, because:

  • some of them are cool, but not open-source, and so you cannot host them on your own server (e.g. tlk.io),
  • some of them are cool, but not easy to install, require a too big server, or offer too many features I don't need (e.g. mattermost.org),
  • some of them are interesting tutorials about how to program a chat in PHP, node.js, but are not ready-to-use for everyday discussion inside a small team, because they lack some important feature (such as chat history, disconnection/reconnection handling, usable user interface, etc.)

That's why I decided to make TalkTalkTalk, that has the following features:

  • open-source
  • easy to install
  • persistent database, i.e. if you come back to the chat room tomorrow you can read all past messages, and you can see what happened when you were offline (very useful for team work)
  • mobile devices support (it's not as easy as it may sound to detect accurately connection/disconnection)
  • LPWP website, a.k.a. "Landing Page=Working Page", i.e. the first page that you visit on the website is the page where things actually happen, that means that there is no annoying welcome page or login page, etc.

About

Author: Joseph Ernest (@JosephErnest)

Other projects: BigPicture, bigpicture.js, SamplerBox, Void, YellowNoiseAudio, etc.

License

MIT license

FAQ

Q: How to send messages? Is there a way to get username autocompletion like in IRC?
A: Use <ENTER> to send messages. Use <TAB> to autocomplete usernames, example: us + <TAB> will give user1, then user2, etc. It also works with @<username>.

Q: How to find the date and time of the messages?
A: Hover over the messages, and a tooltip will show the date and time.

Q: Is there a flood control feature?
A: The chat has a very basic flood control: a user cannot send more than 10 messages in 5 seconds.

Q: Is there a way to prevent a particular username from being used by anyone except me?
A: The username admin is available if and only if the username adminxyz is entered in the input box. Change adminxyz to a private password in the beginning of talktalktalk.py, and as a result noone else than you will be able to use the username admin.

Q: Tech question: why use WebSocket instead of good old polling method?
A: I use WebSocket because it allows good performance: having 100 users at the same time results in less than 1% CPU usage, on my small server. Before using WebSocket, I first tried with standard polling (i.e. every client requests changes from the server every 250 milliseconds), but benchmarks showed that having 100 users connected to the chat room at the same time was eating a 40% of CPU of my small web server. That was too much, thus the use of WebSocket that is far better.

Q: Tech question: why use dumbdbm on server?
A: Because it works. If you know a Python database module that 1) stores data in a file (i.e. no database server needed), 2) is lightweight, 3) allows inserts / queries with a dictionary syntax (db['hello'] = 'blah'), and if possible allows integers as dictionary keys, I'm interested!

talktalktalk's People

Contributors

colwin avatar josephernest avatar neutralinsomniac 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.