Dynamic Chat Room System Using JSP Source code

Download Free projects with Source Code

HTTP PROTOCOL CHAT SERVICES

 

INTRODUCTION

Project Overview

Chat Server software is a piece of software that can be installed on server computer to enable users to use client computers to instantly communicate via text, voice, and video. Chat server software can be installed on a separate machine than the web server software, or it can run on the same server machine. As a reminder, a web server software (Apache or IIS) is a piece of software that can be installed on server computer to serve web pages that can be viewed on client computers using a client software called a web browser (Internet Explorer, Netscape).

HTTP Chat Server is used provide chatting facility across company employees. This system is not a public chat service for public users like yahoo. Company employees wants to chat, then using public chat services like yahoo, MSN is not good for company standard. For this company need to implement chat services for their own domain.

  1. Admin System for creating chat rooms and maintenance.
  2. Different types of user interface for chat.
  3. Implement chat application using HTTP Chat Server With ICP and Bloom Filter program
  4. HTTP Chat Server With ICP and Bloom Filter program will be run in IIS(internet information server)
  5. IIS is a connection between the client and the server in an internet. 

A chat group or a virtual chat server groups sets of chat rooms within a private space so users within a chat group can see all the other chat rooms of the same chat group, but cannot see the chat rooms of another chat group. This feature is useful mostly for ISPs that want to provide chat hosting for multiple companies using the same server machine.

 EXISTING SYSTEM 

  •  Currently many chat services are providing only single languages.
  •  Time taken for the conversations is too slow.
  •  Chatting can be done only in on-line.
  •  Conversations cannot be Backup’ed.
  •  High cost investment. 

PROPOSED SYSTEM

  •  Multi Language.
  •  High Speed.
  •  Run in both off-line and on-line.
  •  Conversations can be Backup’ed.
  •  Investment is too low. 

 Description of Modules:

Chat Server software is a piece of software that can be installed on server computer to enable users to use client computers to instantly communicate via text. Chat server software can be installed on a separate machine than the web server software, or it can run on the same server machine. As a reminder, a web server software (Apache or IIS) is a piece of software that can be installed on server computer to serve web pages that can be viewed on client computers using a client software called a web browser (Internet Explorer, Netscape). The project has mainly two modules and many sub-modules.

  • Admin Module
  • Login
  • Manage Chat Room
  • Open Chat Room
  • Moderators
  • Backup Chat Rooms
  • Manage Chat Rooms
  • Logout
  • Client Module

 

Admin Modules:

 

Login

            It is used to login to the admin site to control the chat room. 

Manage Chat room

             Provide function for manage chat room such as join to the particular chat room or close the chat room and clear the chat room. 

Open Chat room 

            Provide function for adding new chat room created by administrator and it has information about Basic parameter, Advanced Parameters and Moderators. 

Moderators 

            Provide function for assign moderators to each chat room and control chat room by each moderators. 

Backup Chat room 

            Provide function for getting backup of chat room after deleting the chat room 

Manage Chat room 

            It has information about the chat room like, backup destination file, logs folder, system login, system email, license file etc. 

Logout 

            It terminates the admin window.    

 Client Module: 

  • It’s the window used to enter the chartroom.
  • In this module, we can give the nick name of the client and select the chat room.
  • After that only the chat window is opened.
  • We can chat with the particular user or the whole user.

 

Is the HTTP Chat Server the same as Instant Messaging Server?

They are both server type of software intended to be installed on your own server machine. A server type of software can be seen as a central engine that runs on a machine to provide Internet services (ex: web server software provides web sites hosting. Users visit a web site though client software called web browser, such as Internet Explorer).

A Chat Server makes hosting of named chat rooms possible. A chat room is a space where users can talk together (example: thematic rooms such as "sports", "movies"). The client application for the chat server is a Java chat applet.

An Instant Messaging server lets you to create a private instant messaging network, providing buddy list management services, similar to what's offered by MSN, AOL or Yahoo. With Instant Messaging server, the instant messaging network is fully yours and is not based on or connected to any public networks. The client application for the instant messaging server is called a messenger and displays a live list of contacts. Double clicking on a contact starts a chat session with this person.

To summarize, a chat server provides community chat rooms where people will meet and talk other people, an instant messaging server manages personal contact lists from there one can launch one to one chats with a particular user.

 

  1. Admin System for creating chat rooms and maintenance.
  2. Different types of user interface for chat.
  3. Implement chat application using HTTP Chat Server With ICP and Bloom Filter program
  4. HTTP Chat Server With ICP and Bloom Filter program will be run in IIS(internet information server)
  5. IIS is a connection between the client and the server in an internet

 

Problem Definition:

 The proposed system provides a neutral communication platform where peers can have a personalized communication or a public knowledge sharing. Wherein unlike the conventional chat servers HTTP CHAT SERVER enables compliance standards for the users communicating, Helps in maintaining the communication chain without intrusion & facilitates a framework where instantaneous response is possible so the communication chain bonding is high with users chatting.On the following drawing, server machine 1 and server machine 2 can be in reality the same machine. Also web server 1 and web server 2 can be the same instance of web server software. To make the explanation clear, 2 instances of each are used in this particular deployment.The web server 1 represents the web server that serves your current web site's web pages. You want to add a live chat room to your web site. You can either have the chat hosted by another company or host it yourself. In your web page, you'll add a few line of HTML code to embed the appropriate chat applet. When your user opens up a web page from web server 1 containing the chat applet, the web browser will fetch the chat applet from a web server (web server 2) the same way as it retrieves images from a web server. However, because Java is a secure environment, that applet can only talk to a chat server that is on the same machine as the web server. This is why the chat server software has to run on the same server computer as the web server 2.Once started, a chat server listens to user requests (either through direct socket connections, or through HTTP tunneling connections if the user is behind a firewall). Direct socket connections are usually faster than HTTP tunneling ones, however they don't work if the end user is behind a firewall. HTTP tunneling uses standard HTTP requests, available even behind a firewall, to access a special router module of the Web server 2, the router module will then forward chat messages to the chat server software. HTTP tunneling is also useful to provide SSL chat sessions (see SSL chat).

Requirements Specifications 

Java 

Java is a simple, scalable, object oriented, general purpose programming languages with powerful features, which can be used to develop a variety of applications from simple web-animations to high-end business applications that program hand-held devices, microwave appliances, cross platform server applications, etc.Java is a strongly typed language. This specification clearly distinguishes between the compile time errors that must be detected at compile time and those that occur at run time.Generally a language is either compiled or interpreted, but Java is both compiled as well as interpreted. First a Java program is compiled and comes in the form of “Java byte code” (which is an intermediate code).then this Java byte code is run on interpreter to execute a program. This byte code is the actual power of Java to make it popular and dominating over other programming language.

Strength of Java

  1. Platform Independent
  2. Object Oriented
  3. Robust
  4. Secure
  5. Multi-threaded
  6. Dynamic
  7. High Performance

Platform Independent

Generally a language is either compiled or interpreted, but Java both compiled as well as interpreted. First a Java program is compiled and comes in the form of “Java byte code”. Then the Java byte code is run on interpreter to execute a program. This byte code is the actual power of Java to make it popular and dominating over other programming languages. The special program called Java interpreter or Java Virtual Machine (JVM) reads the byte code, translates it into the corresponding host machine instructions and then executes the machine instruction. A java program can run on any computer system for which a JVM and some library routines have been installed. So that java is called platform independent and Architecture Neutral. The JVM plays the main role to making Java portable.

Object Oriented

Objects have two sections. The first is data and the second is methods. Data represents what an object is. A method represents what an object does. The data and method are closely related to the real world structure and behavior of the objects.Java is a true object oriented language, which provides a platform to develop an effective and efficient application and program real life complexities. Java does not allow methods with class, thus an application consists of only the object which makes it true OOL.

Robust

            Java provides checking for possible problems at two levels, one at the compile time and other at the run time , so program are highly reliable and eliminate situation that are error-prone compared to other OOL. Pointers are the main cause of runtime error because of improper use of memory. Java eliminates pointers manipulation completely from the language, therefore eliminates a large source of runtime errors. Java programmers need not remember to de-allocate memory in programs since there is a garbage collection mechanism which handles de-allocation of memory. It provides a powerful robust exception handling mechanism to deal with both expected and unexpected errors at run time.

Secure

            Java Applets can be executed in run time environment that restricts them from introducing viruses, deleting and modifying files in the host machine. The java enabled web browser checks the byte code of Applets to ensure that is should not do anything wrong before it will run the applet. The major security issue today’s software world is BUGS. Unintended bugs are responsible for more data loss than data loss because of viruses. In java it is easier to write bug-free code then in other language.

Multi-threaded

            A thread is a single sequence of execution that can run independently in an application. The execution of two or more sections of a java program at the same time and this technique is known as multithreading. A single java program can have many different threads executing independently and continuously. To making easy the use of threads java offers features for synchronization between threads.

Dynamic

            Java was designed to adapt to an evolving environment, therefore the java compiler is smart and dynamic

High Performance

            Java offers two flavors of programming, java Applets and java application. Applets are small java programs(mostly) that can be downloaded over a computer network and run from a web page by using a java enabled browser like Netscape / Microsoft internet explorer. Applet is used to add dynamic features like animation, sound etc., to web pages.

J2EE

The J2EE platform offers a multitiered distributed application model, reusable components, a unified security model, flexible transaction control, and web services support through integrated data interchange on Extensible Markup Language (XML)-based open standards and protocols.

J2EE Components

J2EE applications are made up of components. A J2EE component is a self-contained functional software unit that is assembled into a J2EE application with its related classes and files and that communicates with other components. The

J2EE specification defines the following J2EE components:

  • Application clients and applets are components that run on the client.
  • Java Servlet and Java Server Pages™ (JSP™) technology components are web components that run on the server.
  • Enterprise JavaBeans™ (EJB™) components (enterprise beans) are business components that run on the server. 

J2EE components are written in the Java programming language and are compiled in the same way as any program in the language. The difference between J2EE components and “standard” Java classes is that J2EE components are assembled into a J2EE application, are verified to be well formed and in compliance with the J2EE specification, and are deployed to production, where they are run and managed by the J2EE server.

Normally, thin-client multitiered applications are hard to write because they involve many lines of intricate code to handle transaction and state management, multithreading, resource pooling, and other complex low-level details. The component -based and platform-independent J2EE architecture makes J2EE applications easy to write because business logic is organized into reusable components.

In addition, the J2EE server provides underlying services in the form of a container for every component type.

 J2EE Server

The J2EE server provides the following services:

o   Naming and Directory - allows programs to locate services and components through the Java Naming and Directory InterfaceTM (JNDI) API

o   Authentication - enforces security by requiring users to log in

o   HTTP - enables Web browsers to access servlets and JavaServer PagesTM (JSP) files

o   EJB - allows clients to invoke methods on enterprise beans

The following figure shows the major elements of the architecture for the J2EE 

Analysis 

HTTP CHAT SERVER MODULES:

  1. Authenticate.
  2. Common Chat.
  3. Personalized Chat.
  4. Manage Chat Rooms.
  5. Back up

AUTHENTICATE:

Authentication module helps in sorting the users and their privileges. There are intentionally three types of users Common User, Moderator, & Administrator.

COMMON CHAT:

This module helps the knowledge sharing between the peers.

PERSONALIZED CHAT:

In this module it handles the users request for private communication .

MANAGE CHAT ROOMS:

This module can be accessed by the admin alone and this helps in setting out the criteria’s for chat .

BACK UP:

Back Up module helps in backing the communication chain.

 

Number of modules and their description

 

AUTHENTICATE:

Authentication module helps in sorting the users and their privileges. There are intentionally three types of users Common User, Moderator, & Administrator.User is privileged to chat in common and personalized. Where the moderator is allowed to manage the specific chat room to which he is associated by the admin to.The Admin user manages, backs up & ensures the compliancy standard.

COMMON CHAT:

This module helps the knowledge sharing between the peers. Messages posted by the users get reflected in no time to all the users at that point of time. This happens based on the criteria set by the admin. Reply messages to the common messages get reflected in-turn in the common chat.

PERSONALIZED CHAT:

In this module it handles the users request for private communication ie,..chat between two individuals. And thus ensures 100% privacy between them without intrusion.

MANAGE CHAT ROOMS:

This module can be accessed by the admin alone and this helps in setting out the criteria’s for chat and absolute management of all the chat rooms. Admin can configure or delete cum backup the chat room at any point of time.

 BACK UP:

Back Up module helps in backing the communication chain in a specific chat room in a log file in the server system for both personalized and common chat date-wise.   Thus enabling the users to actually maintain authentication for the communication happening.

 Testing

            Testing is the major quality control measure employed during software development. The goal of testing is to uncover requirement, design or coding errors in the programs. A strategy for software testing may be viewed in the context of the piral. Unit testing begins at the vortex of the spiral and concentrates on each unit of the software as implemented in source code.Testing progresses by moving outward along the spiral to integration testing, where the focus is on design and the construction of the architecture. Taking another turn outward on the spiral, we encounter validation testing, where requirements established as part of software requirement analysis are validated against the software that has been constructed. Finally, we arrive at system testing, where the software and other system elements are tested as a whole.

DIFFERENT TYPES OF TESTING DONE

UNIT TESTING

            Unit testing focuses verification effort on the system unit of software design the module. This is also known as module testing

In this testing step each modules is found to be working satisfactorily as regards to the expected output from the module.

INTEGRATION TESTING

Integration testing is a systematic technique for constructing the program structure while at the same time conducting tests to uncover errors associated within the interface.

INTEGRATION TESTING

Integration testing is a systematic technique for constructing the program structure while at the same time conducting tests to uncover errors associated within the interface.

ACCEPTANCE TESTING

User acceptance of the system is the key factor for the success of any system. The system under consideration was tested for user acceptance by constantly keeping in touch with prospective system users at the time of developing and making change wherever required.

INTEGRATION TESTING

Integration testing is a systematic technique for constructing the program structure while at the same time conducting tests to uncover errors associated within the interface.

ACCEPTANCE TESTING

User acceptance of the system is the key factor for the success of any system. The system under consideration was tested for user acceptance by constantly keeping in touch with prospective system users at the time of developing and making change wherever required.

VALIDATION TESTING:

Validation can be defined in many ways, but a simple definition is that validation succeeds when software functions in a manner that can be reasonably expected by the customer.

 

Implementation

Implementation involves the consideration of the basis application to complete replacement with the computer system. It is the process if converting

A new or revised system design into an operational point. During the design phase, the product structure is undergoing a data structure, the general algorithms and the interfaces and control/data linkages needed to support communication among the various sub structures were established. The implementation view of software requirements presents the real world manifestation of processing functions and information structures. In some cases a physical representation is developed as the first step in the software development. Implementation is the physical realization of this abstraction. Thus, the implementation process is simply a translation of the design into the physical realization using the language of the target architecture.

       There are three types of implementations, viz., immediate changeover, parallel running and speed change over. The first one, as the name indicates, completely replaces the existing system. The main problem with this type of implementation is that any failure in new system may cause problem to the client, since no copy of the old one is available. The next type maintains both system parallel so that they can be used interchangeably. But is may consume double the amount of the memory and cost maintenance is high.

       The third and the best one replaces the existing system step by step so that each and every problem is solved at the time of detection. The processes are executed manually.

 

PROJECT THEME ANALYSIS

 

         SYSTEM SPECIFICATION

                   Hardware Specification:

PROCESSOR                      :   Pentium Family

SPEED                              :   750 MHZ and above

RAM MEMORY                    :     512 MB

HARD DISC                        :     80GB

MONITOR                          :   15 inch VGA color monitor

MOUSE                             :   Logitech scroll mouse

 

                     Software Specification:

 

OPERATING SYSTEM                   : Windows XP

PLAT FORM                                              : J2EE

WEB TECHNOLOGY                   : HTML,Java Script,JSP,  Servlets                                              

WEB SERVER                                 : Apache Tomcat web server

BACK END                                       : My-SQL

 

ANALYSIS

FUNCTIONAL DESCRIPTION

                     The functional description depicts the flow of events. It shows how the real time entities interact with the application and perform various functions with in their permissible limits. A description of each functional required to solve the problem is presented in the functional description

 SYSTEM IMPLEMENTATION DESIGN  

                     Implementation is the final phone of the project system design, control flow, testing all is pointed towards the implementation. Implementation and maintenance are the 2 faces of a coin.  The implementation phase is fewer creatures than system design. It is primarily concerned with user training site preparation file conversion. Implementation is used here to mean the process of conversion is one aspect of implementation. Systems implementation means the process of converting a new revised system design into an operational one. The term implementation has different meaning, ranging from the conversion of basic applications to a complete replacement of computer system.

 Usually, there are three types of implementation.

  • Implementation of a computer system to, replace a manual system.
  • Implementation of a new computer system to, replace an Existing one
  • Implementation of a modified application to, replace an Existing application using the same computer.

The goal of the system implementation is concerned with translating the design specification into the source code and to provide the neat documentation, so that debugging, testing and modification are eased. After then, test has performed on all modules of the developed project.

 SYSTEMS MAINTENANCE DESIGN

                        Maintenance is necessary to eliminate errors in the system during its working life and to tune the system to any variations in its working environment. It has been seen that there are always some errors found in the system that must be noted and corrected. It also means the review of the system from time to time. The review of the system is done for

            ● knowing the full capabilities of the system

            ● Knowing the required changes or the additional requirements &

            ● studying the performance

                     Software maintenance like software development requires a combination of managerial control and technical expertise. The management of software maintenance is change forms, change request summaries and change control bound that approves product changes and provides configuration management for various product versions and user sites. Every project has its own merits and demerits, all merits considered as the projects achievements, and demerits are considered to be the future enhancements. In this section we will see all the achievements, maintenance

Activities and future enhancements

                     The improper input form the user can make the system defective. Thus the process of system maintenance includes user requirements to be met in terms of performing appropriate procedures correctly, presenting proper form of Information, providing accurate results, using appropriate methods of interaction and providing overall reliability.The emphasis is on the basic requirements such as understanding ongoing process, including how and why they are performed, identifying data used and information processes activities, determining the process timing and volume. This provides a framework to assist in perceiving system weakness and requirements.

 1. CORRECTIVE 

                              Corrective maintenance of a software product may be Necessary neither to rectify some bugs observed while the system is in Use nor to enhance the performance of the system.

2. ADAPTIVE

                              A software product might need maintenance and the Customer needs the product to run on new platforms, on new operating System or when they need the product to interface with new hardware or Software.

3. PERFECTIVE

                              A software product needs maintenance to support the New features that the user want or to change the different functionalities of The system according to customer demands.

 

TESTING

1.2.5 TESTING 

         The purpose of system testing is to identify and correct errors in the candidate system. In system testing performance of service interruptions that result in system failure are checked during the test. System testing makes a logical assumption that it all the parts of the system are correct, the goal will be successfully achieved. It creates two problems. Time lack between the came and appearance of the problem. Effect of system error on files and recorders within the system.testing is a vital to the success of the system testing makes a logical assumption that if all the parts of the system are correct, the goal will be successfully achieved. The software testing is a quality assurance function with the following objectives: 

  • Verification of the software requirements.
  • To provide a method of systematic assembly of the software                    
  • Definition of quality baseline to which maintenance can be traced. 

                     The goal of verification is to asses and improve the quality of the work products generated during development and modification of software quality attributes of interest include correctness, consistency, reliability, usefulness, usability, efficiency, performance to standards and overall cost effectiveness. System testing is the stage of implementation, which is aimed at ensuring that the system works accurately and efficiently before the live operation Commences initially test data is provided to the system. All combinations of data are given to the system and the results are compared with the original results got from the manual. Test data is not enough to prove the Success of the system. Hence some of the aspects are tested during live operation.Inadequate testing or non-testing leads to errors that may not appear until months later. This creates two problems. They are:

                         ●The time lag between the cause and the appearance of problem.

                        ● The effect of the system errors during execution. 

          The different types of system testing that are being carried out during the development of this new system are:

  •   Program Testing
  •   Unit Testing
  •   Top down Integrating Testing
  •   Recovery Testing
  •   Performance Testing

 

PROGRAM TESTING

           A program testing represents the logical elements of a system. It checks two different types of errors.

                             * Logical Errors

                             * Syntax Errors

                             Syntax errors deal with the program statement that violates one or more rule of the Java. A logic error on the other hand, deals with the incorrect MIB and ASN errors with the invalid combinations of output.

 UNIT TESTING

            Unit testing focuses verification effort on the smallest unit of software design that is the software component or module. Hence the important control paths are tested to uncover error within the boundary of the module. The relative complexity of tests and uncovered errors is limited constrained scope established for unit testing. The unit testing is white-box oriented and the step can be conducted in parallel for multiple components.  In this testing each module individually and integrated the over all system is testing forms verification efforts on the smallest unit of software design in the module is known as module testing. The modules of the system are tested separately. This testing is carried out during programming stage itself. It is easy to find the error detecting the system. In the system each modules are tested separately along their conditional statements. Each module works properly without any mistakes.

 INTEGRATION TESTING

           Top down integration is an incremental approach to test the newly developed system. Modules are integrated by moving downward in hierarchy, beginning with the login module from encryption and decryption module. The integration process is performed in a series of steps. 

  •  The main login module is used to validate the authorized user.
  •  Tests are conducted as each module is integrated
  •  Regression testing may be conducted to ensure that new errors haven’t been introduced.          

This testing is the re-execution of some subset of tests that have already been conducted to ensure that changes have not propagated unintended side effects for ex, during the introduction of new modules in to the system. In this system each modules are tested separately along their conditional statements. Each module works properly without any mistakes in the system each module are tested separately along their conditional statements. Each module works properly without any mistakes.

 PERFORMANCE TESTING

               Performance testing is designed to test run-time performance of software within the context of an integrated system. It occurs throughout all steps in the testing process. Even at unit level, the performance of an individual module may be assessed. However, it is not until all system elements are fully integrated that the true performance of a system can be ascertained. The tester can uncover situations that lead to degradation and possible system failure. System testing is the stage of implementation, which is aimed at ensuring that the system works accurately and efficiently before the live operation commences. Initially test data is provided to the system. All combinations of data are given to the system and the results are compared with the original results got from the manual. Test data is not enough to prove the success of the system. Hence some of the aspects are tested during live operation. Each module works properly without any mistakes in the system each module are tested separately along their conditional statements. Each module works properly without any mistakes

  CONCLUSION

                Thus this project reduces the cost and time of company authorities. This reduces the limitations of the existing system. This is very much secured and platform &protocol independent because this is done under Java platform. This is used for the organization that uses it. Employee can easily communicate as well as they can mail to anybody using their own mail ID. The public users can send resumes to that organization for that the company doesn’t uses any databases because it is an online one. Hence, we would like to mention that this new system would help the organization in an efficient and effective manner.

 

 

Get Code