You are on page 1of 25

Broadcasting ChatServer

An Instant Messaging Software Using Java

Overview

Broadcasting Chat Server is an application through which the user can communicate with
other users connected in the same network area (LAN).

This works under any operating system and is programmed in java.

To establish a communication between the systems, we need simple socket connections in


order to connect them in a network.

Socket programming uses the client socket and server socket methods to connect the local
host to the named host and port

The communication between various users is done using server client model i.e. Client-Server
Architecture.

Several client machines are connected to their dedicated server ports and communication is
established.

Instant Messaging (IM)

IM is a set of communication technologies used for text-based communication


between two or more participants over the Internet or other types of networks.

IMchat happens in real-time.

IM allows effective and efficient communication, allowing immediate receipt of


acknowledgment or reply.

In many cases, instant messaging includes added features which can make it
even more popular. For example Video Conferencing, Internet Calling, etc.

Many such IM Applications are Google Hangouts, WhatsApp Messenger,


Facebook Messenger, etc.

Advantages of Broadcast Chat-Server


over Instant Messaging

A Broadcasting Chat Server is an instant messaging program designed for


use within a single local area network (LAN).

Broadcasting Chat Server runs inside a company or private LAN, and so an


active Internet connection or a central server is not required (P2P).

Only people who are inside the firewall will have access to the system.

Communication data does not leave the LAN.

And also the system cannot be spammed from the outside.

Risks in Broadcasting Chat Server

Security Risks: IM connections usually occur in plain text, making them vulnerable
to eavesdropping. Also, IM client software often requires the user to expose open UDP
ports to the world, raising the threat posed by potential security vulnerabilities.

Compliance Risks: In addition to the malicious code threat, the use of instant
messaging at work also creates a risk of non-compliance to laws and regulations
governing use of electronic communications in businesses.

Inappropriate Risks: Organizations of all types must protect themselves from the
liability of their employees' inappropriate use of IM. The informal, immediate, and
ostensibly anonymous nature of instant messaging makes it a candidate for abuse in
the workplace.

Programming Environment
Java is used as the programming language for this Project

Why Java?

The Java programming language is a high-level language that can be


characterized by all of the following buzzwords:

Simple

Object oriented

Robust

Secure

Architecture neutral

Portable

High performance

Multithreaded

Dynamic

Benefits of Java

Java comes with a large set of classes and methods, the Java API that can be used without having to
develop as much code from scratch.

Unlike C, Java primitive types, such as int, are always the same size in the number of bits which helps
achieve cross-platform compatibility

Java has exception-handling that requires a programmer to handle error-conditions such an Input/Output
errors.

Code compiles on one Java platform can be run on other platforms that support Java without
modification of either the source-code nor the byte-code. For example, this means that a person can
make a Java program for a Windows computer and have it run a Linux computer or a Mac computer.

Java consists of a package java.net which supports a simplified, object-oriented socket interface that
makes network communications considerably easier.

Java Bytecode

Java bytecodes help make "write once, run


anywhere" possible.

With most programming languages, you either


compile or interpret a program so that you can
run it on your computer but in Java, a program
is both compiled and interpreted.

With the compiler, first you translate a program


into an intermediate language called Java
bytecodes the platform-independent codes
interpreted by the interpreter on the Java
platform.

The interpreter parses and runs each Java


bytecode instruction on the computer.

Compilation happens just once; interpretation


occurs each time the program is executed.

The Java Platform

A platform is the hardware or software environment in which a program runs.

Most platforms can be described as a combination of the operating system and


hardware.

The Java platform differs from most other platforms in that it's a software-only
platform that runs on top of other hardware-based platforms.

The Java platform has two components:

The Java Virtual Machine (Java VM)

The Java Application Programming Interface (Java API)

The Java API is grouped into libraries of related classes and interfaces; these
libraries are known as packages.

Networking Classes in
Java

Through the classes in java.net,


Java programs can use TCP or
UDP to communicate over the
Internet.

By using the java.net.Socket


class instead of relying on native
code, your Java programs can
communicate over the network in
a platform-independent fashion.

Additionally, java.net includes the


ServerSocket class, which
implements a socket that servers
can use to listen for and accept
connections to clients.

Client-Server Architecture Model

Client-Server Architecture Model

The client-server architecture model distinguishes Client (computing) systems


from Server (computing) systems, which communicate over a Computer network.

A client-server application is a Distributed system comprised of both client and


server software.

A client software process may initiate a communication session, while the server
waits for requests from any client.

In a network, the client/server model provides a convenient way to efficiently


interconnect programs that are distributed across different locations.

Most Internet applications, such as email, web access and database access, are
based on the client/server model. For example, a Web browser is a client program
at the user computer that may access information at any web server in the world.

Click icon to add picture

Client-Server Architecture Model

What is a Server?

A server computer is a computer dedicated to


running a server application.

A server application is a Computer program that


accepts Computer network connections in order
to service requests by sending back responses.

Servers can be run on a dedicated computer, but


many networked computers are capable of
hosting servers. In many cases, a computer can
provide several services and have several
servers running.

Servers are computer programs running to serve


the requests of other programs, theclients. Thus,
the server performs some task on behalf of
clients. The clients typically connect to the
server through the network but may run on the
same computer. In the context ofInternet
Protocol(IP) networking, a server is a program
that operates as asocketlistener.

What is a Client?

A client is an Application software or


system that accesses a remote
service on another Computer
system, known as a Server
computing, by way of a Network.

Client is a user system which uses


its server to get its program or
action executed.

Concepts of Java required in this


project

To have a basic server client connection through Java programming


language, we need the following concepts of java:

Network Packages

Thread Classes

AWT Tool Kit

Event Handling

Diagrams and Outputs

Client Service Request

Client requests service to Server


and Server grants the request
through a response.

Client Registration

Client has to first register


himself in the server to begin
chatting. Server encrypts the
PSWD and client is registered,
welcome message prompted by
server.

Create a New Room and


Chatting

Client can send offline messages


to other clients, server stores
and forwards the messages
when other users log on.

Client Logout

Client logs out of chat, server


notifies & updates all other users
by a message.

Server Shutdown

Server shuts down by sending


message and closes connection
by giving a prompt.

Future Improvements

Making it more secure by providing password protection. We can handle user data
separately proving them password access. We can also improvise it for private
conversation with a user selected user.

Presently the project runs on the local network i.e. LAN or local wireless network but later
we can make this run on internet by providing public IP address and making it run global.

Various emotions and smilies can also be added.

It can be enhanced in the field of voice chatting using VoIP Protocol and thus introduce
telecommunication through chatting software.

It can also be enhanced in the field of Video Conferencing

The End

Summer Training Project Presentation on Broadcasting Chat-Server


submitted in partial fulfilment of the requirement for the award of degree
of Bachelor in Technology in Computer Science of Engineering.

Submitted by:

Yatharth Manocha
(03296402714)

Aamir Mustafa
(03696402714)

Himanshu Tyagi
(03796402714)

5th Semester

You might also like