A Report on Sip
By: Tommy • Essay • 1,561 Words • November 12, 2009 • 1,497 Views
Essay title: A Report on Sip
A Virtual Whiteboard Application
Irfan Abid (05-0094), Usman Chaudhry (05-0104)
Abstract – This application allows two users (one being server, and other client) to connect to each other using SIP. After connection, server can start drawing basic shapes on drawing canvas in application and client side can view it. SIP is used so that users don’t need to know each other’s physical IP beforehand to start. Users must only know each other’s ID. Registrar server keeps track of ID’s and their associated IP addresses.
MOTIVATION
The authors have always been interested in computer graphics, so they decided to take the project related to graphics which would seem interesting to casual computer users. Drawings are fun, as well as useful for illustration purposes. There are certain situations where text messages are not suitable for conveying information. For example, a user looking at a bar graph can quickly get an overview of the situation at first sight. While same information if contained in text message would require the reader to spend some time reading it.
SIP seemed promising for connection and session related tasks because it allowed users to be able to connect with a unique ID regardless of their physical location. Users can log on from different machines with different IP addresses, with their registered user ID’s. For our purposes we are only using this very basic functionality of SIP, i.e. to keep track of IP addresses of different users as they log on.
RELATED WORK
Authors have worked on other protocols before, such as ARP, ICMP etc. However, this was their first time to work on an application layer protocol. Further, they had done projects related to simple graphics in C++ in OOP course.
PROBLEM STATEMENT
It is desired to be able to make an application, which allowed users to do some communication using graphics instead of boring text. It is also desired to use an existing simple graphics application and modify it to use for this purpose. It is also desired to provide users, the convenience of being location independent. They should be able to communicate from anywhere without having to explicitly type each other’s IP addresses to connect.
METHODOLOGY
To provide users the ability to be independent of their physical locations, we can assign each user a unique ID. When each user logs on, he gets himself registered with Registrar server. Registrar server saves user’s ID and its IP address for current session. When a user wants to connect to another user, he simply invites the user through the server. If invitation is accepted by the user then he sends an OK message along with his IP address. At this point both users know each other’s IP address, and they can start actual communication. If users log off, and log on from another location, then same events happens with different IP addresses.
After connection establishment, the server side (which is the user who is drawing) starts dragging shapes on canvas in window. The application maintains an elements array. As a new shape is created by the server, the shape is given a unique ID and added to the array. A message is also generated containing information about that shape. The application reads the shape information and performs necessary steps to make it ready to transmit. It converts integers to characters and inserts zeroes at start of each property if necessary. Zero padding is necessary to keep the message length constant for different values of x, y, width, height. After message preparation, the message is sent. The message contains following information:
1. Shape ID: It is one character long. It represents shape type which can be one of the following:
i. Line (ID : 1)
ii. Circle (ID : 2)
iii. Ellipse (ID : 3)
iv. Rectangle (ID : 4)
v. Rounded Rectangle (ID : 5)
2. Element ID: It is one character long. As each shape is created, it is assigned an element ID to check whether it already exists on receiver end, or it is a new shape. Two shapes cannot have same element ID.
3. X-location: It is 4 characters long. It represents X-location of shape.
4. Y–location: It is 3 characters long. It represents Y-location of shape.
5. Width: it is 3 characters long. It represents width of shape.
6. Height: it is 4 characters