Git Product home page Git Product logo

wochat's Introduction

WoChat

A WebSocket-based chat for Wisdom of Crowds experiments, which are usually deployed in LANs. The server-side has been developed in Java using Netty, while the client-side has been written in Javascript using JQuery.

Users are not required to register to log into WoChat; indeed, the WoChat software is designed to be totally anonymous and its users management system is based on IP addressing. Each user has to have a distinct IP and their sessions remain active until: a) they force disconnection, or b) admin disconnect them, or c) their connection go down. Therefore, if a user closes the WoChat tab or the browser, his session remains operating and resumes as soon as he comes back.

Download

You can easily clone the full project by executing:

$ git clone https://github.com/francesco-ficarola/wochat.git

Building and Running

After cloning the git repository you can build and run the software by executing:

$ cd wochat/
$ ./build.sh
$ ./run.sh

or, if you prefer all at once, just call the following script:

$ ./build-and-run.sh

The run.sh script is there for your convenience. Otherwise, after building, you can find the distribution package (i.e., WoChat.tar.gz) inside the target folder. You can extract it wherever you like, then run the software by executing:

$ cd WoChat/
$ ./startup.sh

If the server properly starts, then open your browser (Chrome or Firefox are recommended) and go to:

http://127.0.0.1:8080/

Configuration

You can find all parameters that can be changed in conf/wochat.properties:

  • server.port : the WoChat's service port
  • admin.username : admin's username (admin by default)
  • checkingtimes.pendingmessages : number of times of checking pending messages before disconnecting a user (set to 0 if you want to disable the acknowledgment mechanism)
  • communication.timeout : time interval of checking pending messages (it works if checkingtimes.pendingmessages is greater than 0)
  • killme.now : allows users to kill and disconnect themselves.

Admin commands

If you log into WoChat as Administrator, you can execute the following commands:

  • /users count : asks for the total number of users (active and inactive)
  • /users ping : sends pinglike messages
  • /users active : sends the number of active users (a /users ping request must be performed before)
  • /users surveying : sends a list of users still surveying (a /users ping request must be performed before)
  • /msg <your_message> : sends everyone admin's message
  • /disconnect <id_user> : forces user's disconnection
  • /start survey s<number> r<number> : starts the survey mode (number of survey and round)
  • /start chat : starts the chat mode
  • /kill wochat : kills WoChat

User commands

Below all commands available for users:

/killme now : auto-kill and disconnection (iff killme.now=true in wochat.properties)

Survey

All questions must be written in conf/woc.survey.* files, one for each line. Images in surveys are supported by the following syntax: [img]url_img[/img] (required a dedicated line).

Log-files

All log-files are saved in the "logs" folder (from the repository root: target/WoChat/logs).

  • wochat.log : system log
  • connections.log : information about users' connections
  • interactions.log : users' interactions
  • messages.csv : users' messages in CSV format
  • userslist.csv : list of all participants in CSV format
  • survey.csv : answers from all surveys in CSV format

Screenshots

Click to enlarge.

user interface

wochat's People

Watchers

 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.