CSC/ECE 517 Fall 2016 E1689: Anonymous Chat Between Author and Reviewer

From Expertiza_Wiki
Jump to navigation Jump to search

Introduction to Expertiza

Expertiza is a peer review based system which provides incremental learning from the class. This project has been developed together by faculty and students using Ruby on Rails framework. Expertiza allows the instructor to create, edit and delete assignments, create new assignment topics, assign them to a particular class or selected students, have students work on teams and then review each other's assignments at the end. For the students, they can signup for topics, form teams, and submit their projects and assignments. Students then review the work done by other students and give suggestions to improve. Teams after reviews are allotted scores and they can refer to the peer comments to further improve their work. It also supports submission of different file types for assignments, including the URLs and wiki pages.

Problem Statement

During reviews, many a time, reviewers may have questions about the submitted material or the authors may want to give some instructions to the reviewers. It may sometimes block the reviewers from progressing with the review. Reviewers can end up submitting empty review forms with all 0s if they cannot figure something out. The aim of this project is to provide a mini-discussion platform for each submission so that reviewers and authors can ask/answer questions in the form of a chat window. For example, if the server on which the application is deployed is down, then the reviewer can send a message that the server is down to the authors and then the authors can get the server up and running and send a message to the reviewer informing the same rather than receiving low grade on that review.

Database Design

To implement the chat feature , we are creating 2 new models i.e Chat and Message. The associations for these models are Chat belongs to ReviewResponseMap and has many messages while Message belongs to Chat. The already existing ReviewResponseMap model contains the review responses, assignment_id, group id and reviewer id . Now, the Chat model will contain the response_map_id element. Using this element , the values of assignment_id, group_id and reviewer_id can be filled in the Chat database.

Tables and Schema

  • Chat (belongs to ReviewResponseMap)
  • response_map_id - primary key
  • Message (belongs to Chat)
  • id - primary key
  • body - contains the message body
  • sender_id - userid of the sender. hidden from the UI.

Modifications in UI

1)Scenario 1: When the reviewer has a doubt and wants to send a message to the reviewee group.
A new link for chat will be provided along with the view and edit options of a review.

2)Scenario 2: When the reviewee group wants to view their messages or send a message to one of the reviewers.
A new link for messages will be provided beside "Your work" where the group can view their chats and can send messages.

New Views to be added for anonymous chat

The plan is to add views which facilitate the chat between author and reviewer as shown below:

  • When the reviewee clicks on Messages link, all of his/her conversations are shown. When a particular conversation is clicked , the message log pops up in the lower right corner similar to a facebook/gmail chat application.
  • When the reviewer clicks on chat link, the message log for that particular reviewee group pops up in a similar fashion as mentioned above.

When clicked on test,the next view pops up.


Implementation details

Most of the web uses Http which uses TCP/IP transports. This means that the connection is initialed by client, server responds to the request and becomes idle. For implementing a chat feature using the above technique requires the client to keep on poling so that it receives the latest messages from the server. Apart from this, there are ways that server initiates the communication with the client when there is data which is called push or comet. Both these techniques involve overhead of http and isn't a very good way for low latency applications.

For a better way, we will use web sockets into place which provides persistent connections between a server and a client, which enables both to send data at any time.

To implement this we are planning to use Faye which is a messaging system with publish-subscribe. It works on Bayeux protocol.

We will have the messages of the chat displayed in a partial which is updated using Sync - Realtime Rails Partials.

Reference links