Project: Snap Chat

Friday, August 20, 2010

CONTENTS

Chapter 1       Introduction
1.1       Objective
Chapter 2       Proposed Methodology
Chapter 3       Materials
                                    3.1       Features of openSUSE
3.2       Sockets
3.3       GNOME
3.4       GTK+

Chapter 4       Software Requirement Specifications
4.1       General characteristics
4.2       Specific requirements

Chapter 5       Resource Requirement
5.1       Hardware requirements
5.2       Software requirements

Chapter 6       Result and Discussion
6.1       Screen Shots
Chapter 7       References
Chapter 8       Conclusion





CHAPTER 1
INTRODUCTION

CHAT PROGRAM USING LINUX is a program that enables users stationed at different computer systems to communicate with each other using a local area network. The program uses linux as the operating system. The program provides one-to-one chatting facility but no conferencing. The chat program has been created in the GNOME environment.
GNOME  (abbreviation of GNU Network Object Model Environment) is a desktop environment—a graphical user interface that runs on top of a computer operating system—composed entirely of free and open source software. It was created by two Mexican programmers, Miguel de Icaza and Federico Mena. It is an international project that includes creating software development frameworks, selecting application software for the desktop, and working on the programs that manage application launching, file handling, and window and task management. GNOME is part of the GNU Project and can be used with various Unix-like operating systems, most notably GNU/Linux, and as part of the Java Desktop System in Solaris.
The program makes use of sockets which provide the connection between a client and a server. This program can be considered to be an implementation of the client-server architecture model The client–server model of computing is a distributed application structure that partitions tasks or workloads between the providers of a resource or service, called servers, and service requesters, called clients.


1.1 OBJECTIVE
The aim of the project to provide the users with a program that will enable to communicate with each other through a local network. The users will share information in the form of


CHAPTER 2
PROPOSED METHODOLOGY

The Methodology shall follow the following steps:

Step 1: Design

The first step in developing a computer program is design. Producing a good design leads to efficient code which does what it is meant to in the best way possible. Extra time spent in design reduces the time spent coding and testing, which will help reduce the overall duration of the development. The key point is not to start coding until design is complete.
Design processes include defining the data requirements (often the inputs to the program) working out what processing must be completed and how, as well as the information to be provided (the outputs). Pseudo code is often produced during the design stage to work out the steps needed in the program. In addition to the basic designing techniques a clear and in depth knowledge of LINUX command line interpreter (CLI) is required. The LINUX version used here is OpenSUSE 11.2, which is the latest version of open source LINUX sponsored by SUSE.

Step 2: Coding Writing and Developing

Once design is complete, then coding can start. The program is written in the language chosen, making sure that all the language syntax rules are followed precisely. Here the program shall be coded in basic C++/C using a GCC compiled already present in LINUX OpenSUSE 11.2.
Techniques such as debugging, dry running programs and meticulously checking syntax can help to find errors and are ought to be used.




Step 3: Testing Computer Programs

The purpose of testing is to ensure that the program works as expected. However this statement oversimplifies the possible complexities of thorough testing. Learning how to test well is a key skill for developers.

There are lots of different ways of testing and there are many different types of test that can be undertaken. Testing of our chat program is to be done in some simple routines:
·         Check on three different individual systems.
·         Check on two client server system.
·         Check on multiple shared computers in a OOPs Lab.
Good development includes choosing the appropriate tests for the particular program.

Step 4: Maintenance of Computer Software

More time is spent maintaining programs than is commonly realised. The world changes and so do the requirements for programs. Making sure that programs are maintainable is really important and can be the difference between an excellent and average programmer. Our chat program shall be open-sourced online and given a one week check by worldwide users.









CHAPTER 3
MATERIALS

openSUSE is a general purpose operating system built on top of the Linux kernel, developed by the community-supported openSUSE Project and sponsored by Novell. After acquiring SUSE Linux in January 2004, Novell decided to release the SUSE Linux Professional product as a 100% open source project, involving the community in the development process.
openSUSE is driven by the openSUSE Project community and sponsored by Novell, to develop and maintain SUSE Linux distributions components. It is the equivalent of the historic "SuSE Linux Professional". After their acquisition of SUSE Linux, Novell has decided to make the community an important part of their development process.
Beyond the distribution, the openSUSE Project provides a web portal for community involvement. The community assists in developing openSUSE collaboratively with representatives from Novell by contributing code through the openSUSE Build Service, writing documentation, designing artwork, fostering discussion on open mailing lists and in Internet Relay Chat channels, and improving the openSUSE site through its wiki interface. Novell markets openSUSE as the best, easiest distribution for all users.
Like most Linux distributions, openSUSE includes both a default graphical user interface (GUI) and a command line interface option. During installation, the user may choose among KDE SCGNOME and Xfce GUIs. openSUSE supports thousands of software packages across the full range of free software / open source development.
3.1 FEATURES OF openSUSE

o   YaST Control Center

o   SUSE includes an installation and administration program called YaST2 which handles hard disk partitioning, system setup, RPM package management, online updates, network and firewall configuration, user administration and more in an integrated interface. YaST also integrates with SaX2 to help users handle their graphics card and monitor, touch displays, and even additional monitors with Xinerama. In more recent times, many more YaST modules have been added including Bluetooth support.

o   AutoYaST

o   AutoYaST is part of YaST2 and is used for automatic installation. The configuration is stored in an XML file and the installation happens without user interaction.

o   ZYpp package management

o   ZYpp (or libzypp) is a Linux software management engine which has a powerful dependency resolver and a convenient package management API.

o   Build Service

o   The openSUSE Build Service provides software developers with a tool to compile, release and publish their software for many distributions, including Mandriva, Ubuntu, Fedora and Debian. It typically simplifies the packaging process, so developers can more easily package a single program for many distributions, and many openSUSE releases, making more packages available to users regardless of what distribution version they use. It is published under the GPL.

o   Desktop innovation

o   Xgl and Compiz

In January 2, 2006, SUSE developer David Reveman announced Xgl, an X server architecture designed to take advantage of modern graphics cards via their OpenGL drivers, layered on top of OpenGL via glitz. Compiz, one of the first compositing window managers for the X Window System that is able to take advantage of this OpenGL-acceleration, was also released.
3.2 SOCKETS
v  What is a Socket?
o   A socket is a communication mechanism that allows client/server systems to be developed either locally, on a single machine, or across networks. Linux functions such as printing, connecting to databases, and serving web pages as well as network utilities such as rlogin for remote login and ftp for file transfer usually use sockets to communicate.
o   Sockets are created and used differently from pipes because they make a clear distinction between client and server. The socket mechanism can implement multiple clients attached to a single server.
v  Socket Connections
o   First, a server application creates a socket, which like a file descriptor is a resource assigned to the server process and that process alone. The server creates it using the system call socket, and it can’t be shared with other processes.
o   Next, the server process gives the socket a name. Local sockets are given a filename in the Linux file system, often to be found in /tmp or /usr/tmp. For network sockets, the filename will be a service identifier (port number/access point) relevant to the particular network to which the clients can connect. This identifier allows Linux to route incoming connections specifying a particular port number to the correct server process. For example, a web server typically creates a socket on port 80, an identifier reserved for the purpose. Web browsers know to use port 80 for their HTTP connections to web sites the user wants to read. A socket is named using the system call bind. The server process then waits for a client to connect to the named socket. The system call, listen, creates a queue for incoming connections. The server can accept them using the system call accept.
o   When the server calls accept, a new socket is created that is distinct from the named socket. This new socket is used solely for communication with this particular client. The named socket remains for further connections from other clients. If the server is written appropriately, it can take advantage of multiple connections. A web server will do this so that it can serve pages to many clients at once. For a simple server, further clients wait on the listen queue until the server is ready again.
o   The client side of a socket-based system is more straightforward. The client creates an unnamed socket by calling socket. It then calls connect to establish a connection with the server by using the server’s named socket as an address.
o   Once established, sockets can be used like low-level file descriptors, providing two-way data communications.

3.3 GNOME
v  The GNOME project provides two things: The GNOME desktop environment, an intuitive and attractive desktop for users, and the GNOME development platform, an extensive framework for building applications that integrate into the rest of the desktop. The GNOME project puts heavy emphasis on simplicity, usability, and making things “just work”. The other aims of the project are:
o   Freedom—to create a desktop environment that will always have the source code available for re-use under a free software license.
o   Accessibility—ensuring the desktop can be used by anyone, regardless of technical skill or physical disability.
o   Internationalization and localization—making the desktop available in many languages. At the moment GNOME is being translated to 161 languages.[3]
o   Developer-friendliness—ensuring it is easy to write software that integrates smoothly with the desktop, and allow developers a free choice of programming language.
o   Organization—a regular release cycle and a disciplined community structure.
o   Support—ensuring backing from other institutions beyond the GNOME community.







3.4 GTK+
v  GTK+ was originally designed and used in the GNU Image Manipulation Program (GIMP) as a replacement of the Motif toolkit; at some point Peter Mattis became disenchanted with Motif and began to write his own GUI toolkit called the GIMP toolkit and had successfully replaced Motif by the 0.60 release of GIMP. Finally GTK was re-written to be object oriented and was renamed GTK+. This was first used in the 0.99 release of GIMP.












           











CHAPTER 4
SOFTWARE REQUIREMENT SPECIFICATION (SRS)

4.1    GENERAL CHARACHTERISTICS:
v  USER CHARACTERISTICS
o   The user must be familiar with basic working of a computer system.

v  PRODUCT PERSPECTIVE
o   GNOME Terminal (GNU Network Object Model Environment)
o   GTK+ Kit (GIMP Toolkit) (GIMP - GNU Image Manipulation Program)
o   External interface includes a keyboard, mouse.

4.2     SPECIFIC REQUIREMENTS
v  EXTERNAL INTERFACE REQUIREMENT
o   Input from the user will be via keyboard.
o   The program will give appropriate responses to the given input.








CHAPTER 5
RESOURCE REQUIREMENT

5.1    Hardware Requirements
v  For OpenSUSE 11.2
o   Processor: Intel Pentium 1-4, Xeon or newer; AMD Duron, Athlon, Athlon XP, MP, 64, Sempron, Opteron or newer
o   Memory: Minimum 256MB; 512MB recommended
o   Hard Disk: Minimum 500MB for minimal system; 2.5GB for standard system
o   Graphics & Sound Card: Supports most modern sound and graphics cards

v  For the Chat Program Execution
o   Minimum three computer systems (Desktop/Laptop) with the above mentioned requirements
o   Cross-wire cables
o   RJ45’s
5.2    Software Requirements
·         OpenSUSE 11.2








CHAPTER 6
RESULT AND DISSCUSSION



















CHAPTER 7
REFERENCES

v  Beginning Linux Programming 4th Edition – Neil Matthew, Richard Stones
v  Beej's Guide to Network Programming - Brian "Beej Jorgensen" Hall
v  www.wikipedia.com
















CHAPTER 8
CONCLUSION

We have presented a Chat program based on linux. This chat program can connect users at different workstations / computer systems and can enable them to communicate.
It took us over five weeks to complete this project. Unix is a very interesting and easy to understand language, and it has got a number of advantages such as multitasking with protected memory, efficient virtual memory, powerful unified file system, most portable operating system, optimized for program development.