Project: Developing an online Chat Room

print
Project: Developing an online Chat Room

Instant messaging (IM) is a type of online chat which offers real-time text transmission over the Internet. It is based on C/S architecture which means it has a client and a server. The client contacts the server to create account, get online users, send and receive messages.
Multi-thread programmming

I implement a thread pool which manages a queue of tasks and several threads. These threads (we may call them workers) are universal, which means they are capable of many kinds of tasks. When any of the threads (workers) are idle, they look for new tasks from the queue.

In the following diagram, the green squares are worker threads:
multithreading
Socket Programming

I develop the server program for an online chatroom. Many clients can connect to your chat room. Any clients can send messages that will be received by all other online clients. The client and server will communicate by sending textual data based on a protocol. The client constructs a request and send it to the server. Then the server processes the resquest and sends a response to the client.

Secure Communication

I use both asymmetric encryptions (e.g. RSA) and symmetric encryptions (e.g. DES, TEA). In general, asymmetric encryptions are (a lot) slower than symmetric encryptions and using asymmetric cipher on raw data is computationally infeasible. One popular solution is: exchange keys under asymmetric encryptions and then use symmetric ciphers with the keys.

Download it
chat1 chat2

https://docs.google.com/uc?export=download&id=0BxHY5QjZ1t84QklEQVNXMC1FRjQ

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.