project report on data transmission using multitasking socket
Post on 08-Nov-2014
736 Views
Preview:
DESCRIPTION
TRANSCRIPT
A
PROJECT REPORT
ON
“Data Transmission Using Multi-Tasking Sockets”
Submitted in partial fulfillment for the Degree of B. Tech
in
Information Technology
Session 2012 – 2013
Submitted by
Awadhesh Kumar Singh(09EBKIT010)
DEPARTMENT OF (CS & IT)B.K. BIRLA INSTITUTE OF ENGINEERING &TECHNOLOGY,
PILANI (RAJ.) (Affiliated to Rajasthan Technical University, Kota)
1
CERTIFICATE
This is to certify that the work entitled “Data Transmission Using Multi-Tasking Sockets”is the original work being submitted by “Awadhesh Kumar Singh(09EBKIT010)“ in partial fulfillment for the Degree of B.Tech in “Information Technology” of the Rajasthan Technical University, Kota. To the best of my knowledge and belief, the candidate has fulfilled the requirements of the rules and regulations relating to the degree in B.Tech. of Rajasthan Technical University, Kota. The matter embodied in this project has not been submitted for the award of any degree of any university.
Date: Signature of Supervisor (Guide - Mr. Gopal Krishan Prajapat)
BKBIET, Pilani
College Seal
Mr. S B Dandin Mr.Nimish Kumar Mr.Himanshu Verma (Dean CS/IT) (Project Evaluator) (Project Evaluator)
2
DECLARATION
I hereby declare that the work, which is being presented in the Project, entitled “Data
Transmission Using Multi-Tasking Sockets” submitted in partial fulfillment of the
requirement for the award of Degree of “Bachelor of Technology” in Department of CS & IT
Engineering with Specialization in Information Technology, and submitted to the
Department of CS & IT Engineering, B. K. Birla Institute of Engineering and Technology,
Pilani, Rajasthan Technical University, Kota is an authentic record of my own investigations
carried out under the supervision of Mr. Gopal Krishan Prajapat, Department of CS & IT
Engineering, B. K. Birla Institute of Engineering and Technology, Pilani.
I have not submitted the matter presented in this project anywhere for the award of any other
degree.
Awadhesh Kumar Singh
Enrolment No.: 09EBKIT010 B. K. Birla Institute of Engineering and Technology, Pilani.
Counter Signed by
(Dean- Mr. Shridhar B. Dandin)
B. K. Birla Institute of Engineering and Technology, Pilani.
(Guide- Mr. Gopal Krishan Prajapat)
B. K. Birla Institute of Engineering and Technology, Pilani.
3
ACKNOWLEDGEMENTS
This work would not been possible, but it is the wealth of experience and acknowledges that is
generated within the portals of B. K. Birla Institute of Engineering and Technology, Pilani,
which enlightened my path to complete my project.
First and foremost I wish to place my profound gratitude and sincere thanks to respected guide
Mr. Gopal Krishan Prajapat for his valuable time and tireless efforts without which this work
would not have completed on time.
I also like to thank Dr. P.S. Bhatnagar (Director, B. K. Birla Institute of Engineering and
Technology) and Mr. Shridhar Dandin(Dean CS & IT, B. K. Birla Institute of Engineering and
Technology) for providing me with highly motivating and vibrant atmosphere in the college and
department.
Before bring it to end I would like to add little heartfelt words to my all friends who were part of
this project in numerous ways.
Date: 07/01/2013 Awadhesh Kumar Singh
(09EBKIT010)
(IT 4th year)
4
CONTENTS
CHAPTER TOPIC PAGE NO.
DECLARATION 3
ACKNOWLEDGEMENTS 4
CONTENTS 5
LIST OF FIGURES 7
LIST OF ABBREVATIONS 8
TEAM INFORMATION 9
ABSTRACT 10
CHAPTER 1 INTRODUCTION 11
1.1 PURPOSE 12
1.2 SCOPE & OBJECTIVE 12
1.3 EXISTING MODEL 12
CHAPTER 2 TOOLS & ENVIRONMENT USED 13
2.1 SOFTWARE REQUIREMENTS 13
2.2 HARDWARE REQUIREMENTS 13
CHAPTER 3 ANALYSIS & DESIGN DOCUMENT 14
3.1 FEASIBILITY STUDY 14
3.1.1 ECONOMIC FEASIBILITY 14
5
3.1.2 TECHNICAL FEASIBILITY 15
3.1.3 BEHAVIOURAL FEASIBILITY 15
3.2 FUNCTIONAL DESCRIPTION 16
3.3 MODULE CLASSIFICATION 16
3.3.1 CLIENT BASED MODULE 16
3.3.2 SERVER BASED MODULE 16
3.4 E MAILS CLIENTS’ OPERATIONS 17
3.5 E MAILS SERVER’S OPERATIONS 17
3.6 E MAIL INBOX’S OPERATIONS 18
3.7 DIAGRAMS 19
3.7.1 DATA FLOW DIAGRAMS 19
3.7.2 UML DIAGRAMS 21
3.8 SNAPSHOTS 25
CHAPTER 4 CONCLUSION 29
CHAPTER 5 LIMITATION OF THE PROJECT 30
CHAPTER 6 FUTURE SCOPE & APPLICATIONS 31
REFERENCES 32
GLOSSARY 33
APPENDIX 34
6
LIST OF FIGURES
DFD Level 1(Interaction b/w client & server) DFD Level 2(Architecture for functionality of Java Mail in LAN) DFD Level 3 Class Diagram for Java Mail Use Case Diagram for client module Use Case Diagram for Storage Module Use Case Diagram for Client Module Use Case Diagram for Server Module Use Case Diagram for Sending/Receiving Module
7
LIST OF ABBREVIATION
TCP: Transmission Control Protocol.
UDP: User Datagram Protocol.
JDK: Java Development Tool Kit.
IDE: Integrated Development Environment.
PCM: Pulse-Code Modulation .
8
TEAM INFORMATION
The Project is under the process of completion by
AKANKSHA JANGIR
Information & Technology
09EBKIT002
B. K. Birla Institute of Engineering and Technology, Pilani.
AWADHESH KUMAR SINGH
Information & Technology
09EBKIT010
B. K. Birla Institute of Engineering and Technology, Pilani.
KAVITA CHOUHAN
Information & Technology
09EBKIT022
B. K. Birla Institute of Engineering and Technology, Pilani.
9
ABSTRACT
In yesteryears Computer Science Engineering has entered a new phase where the characteristics
of various platforms have been combined together to yield a new platform compatible with
each and every working application which are characterized and controlled at a huge scale by the
developers. Nowadays portable applications have been built which can run on similar
environments or different after modifying them to some extent.
This Project a new socket class which supports both TCP and UDP communication, but it
provides some advantages compared to other classes that you may find here or on some other
Socket Programming articles.
First of all, this class doesn’t have any limitation like the need to provide a window handle to
be used. This limitation is bad if all you want is a simple console application. So this library
doesn’t have such a limitation.
It also provides threading support automatically for you, which handles the socket
connection and disconnection to a peer. It also features some options not yet found in any
socket classes that I have seen so far.
It supports both client and server sockets. A server socket can be referred as to a socket that
can accept many connections.
This document is meant for describing all the features and procedures that were followed while
developing the system. This document specially mentions the details of the project how it will be
developed, the primary requirements, as well as various features and functionalities of the project
and the procedures which will be followed in achieving these objectives.
10
Chapter-1
INTRODUCTION
This article is about a client/server multi-threaded socket class. The thread is optional since the
developer is still responsible to decide if needs it. There are other Socket classes here and other
places over the Internet but none of them can provide feedback (event detection) to your
application like this one does. It provides you with the following events detection: connection
established, connection dropped, connection failed and data reception (including 0 byte packet).
Data transmission, digital transmission, or digital communications is the physical transfer of data
(a digital bit stream) over a point-to-point or point-to-multipoint communication channel.
Examples of such channels are copper wires, optical fibers, wireless communication channels,
and storage media. The data is represented as an electromagnetic signal, such as an electrical
voltage, radio wave, microwave, or infrared signal.
While analog communications is the transfer of continuously varying information signal, digital
communications is the transfer of discrete messages. The messages are either represented by a
sequence of pulses by means of a line code (baseband transmission), or by a limited set of
continuously varying wave forms (pass band transmission), using a digital modulation method.
The pass band modulation and corresponding demodulation (also known as detection) is carried
out by modem equipment. According to the most common definition of digital signal, both
baseband and pass band signals representing bit-streams are considered as digital transmission,
while an alternative definition only considers the baseband signal as digital, and pass band
transmission of digital data as a form of digital-to-analog conversion.
Data transmitted may be digital messages originating from a data source, for example a computer
or a keyboard. It may also be an analog signal such as a phone call or a video signal, digitized
into a bit-stream for example using pulse-code modulation (PCM) or more advanced source
coding (analog-to-digital conversion and data compression) schemes. This source coding and
decoding is carried out by codec equipment.
11
3.8. Purpose
This document describes the capabilities that will be provided by the software applications ‘Data
Transmission Using Sockets’. Its purpose is to send the information from one place to another
using through a secured interface. These programs use sockets to create the connection between
the sender and the receiver. Special protocols like TCP and UDP are used to send the data
through requests and acknowledgements.
1.2 Scope and objective
A Data Transmission Application is a software application which enables a user to send and
interact with other users and also to send information in the form of text, images and other
information typically located on a local system within the LAN. Text and images are send as
attachments to the receiver where on the other side the receiver opens the attachments and gets
the information send by the sender in the safer manner. This model allows a user to quickly send
the small amount of information or data within the secured LAN.
1.3 Existing Model
We have many number of secure data transmission methods out of which data transmission
using sockets is one of the best opted methods for the secured data transmission within a LAN.
This existing model uses the TCP/IP protocols to connect the both sender and the receiver
locations.
.
12
Chapter-2
TOOLS AND ENVIRONMENT USED
2.1Software Requirement
1) Language : JDK1.3
2) Platform : Windows and Linux (platform Independent)
3) Client : Own Client designed Using Java Socket
4) Server : Server designed Using Java Server Socket
5) IDE : NetBeans IDE 6.9.1
2.2Hardware Requirement
1) RAM : 128MB (Minimum)
2) Processor : Pentium 2 and above
3) Processor Speed : Above 500 MHz
13
Chapter-3
ANALYSIS & DESIGN DOCUMENT
3.1FEASIBILITY STUDY
All projects are feasible – given unlimited resources and infinite time! Unfortunately, the
development of computer- based system or product is more likely plagued by a scarcity of
resources and difficult delivery dates. It is both necessary and prudent to evaluate the feasibility
of a project at the earliest possible time. Months or years of effort, thousands or millions of
dollars, and untold professional embarrassment can be averted if an ill-conceived system is
recognized early in the definition phase.
Feasibility and risk analysis are related in many ways. If project risk is great the feasibility of
producing quality software is reduced. During product engineering, however, we concentrate our
attention on four primary areas of interest.
3.1.1ECONOMIC FEASIBILITY
Economic feasibility attempts to weigh the costs of developing and implementing a new system,
against the benefits that would accrue from having the new system in place. This feasibility study
gives the top management the economic justification for the new system. A simple economic
analysis which gives the actual comparison of costs and benefits are much more meaningful in
this case. In addition, this proves to be a useful point of reference to compare actual costs as the
project progresses. There could be various types of intangible benefits on account of automation.
These could include increased customer satisfaction, improvement in product quality better
decision making timeliness of information, expediting activities, improved accuracy of
operations, better documentation and record keeping, faster retrieval of information, better
employee morale.
14
In present system assessing student’s answers is a very time consuming activity that makes
teachers cut down the time they can allocate to other duties. It is considered to play a
fundamental role in the educational process.
If it is developed in the electronic system like computer then the burden on the teachers can be
reduced. No need to waste the time. Using out tool results will come within fraction of a second.
The decision making becomes easy.
3.1.2 TECHNICAL FEASIBILITY
Evaluating the technical feasibility is the trickiest part of a feasibility study. This is because, at
this point in time, not too many detailed design of the system, making it difficult to access issues
like performance, costs on (on account of the kind of technology to be deployed).
A number of issues have to be considered while doing a technical analysis:
Understanding the different technologies involved in the proposed system before commencing
the project. It should be very clear about what are the technologies that are to be required for the
development of the new system. Finding out whether the organization currently possesses the
required technologies.
Our new web browser software is installed in any local system. So, it is necessary to install the
primary software requirements prior to it. One major advantage in application is platform
neutral. We can deploy and use it in any operating system since this browser works in Windows
and Linux platforms as well.
3.1.3 BEHAVIORAL FEASIBILITY
People are inherently resistant to change and computer has been known to facilitate changes. An
estimate should be made of how strong the user is likely to move towards the development of
computerized system.
This software lets the owner of the desktop only to use it or say the user of the desktop can only
use this software. This ensures proper authentication and authorization and no much security
required as there is no data which can be corrupted.
15
3.2 FUNCTIONAL DESCRIPTION
Transmitting Message and Files between Client and Server.
The data will be valid until the Server is Valid.
Everything defined as Object oriented.
Server has been developed using Server Socket programming in Java.
Client has been developed using Socket Programming.
Transmitting data between Client and Server has been developed IP Address.
We are running it as Server Client in PC itself.
We can convert it to internet server and client processing by Implementing POP3 protocol and SMTP server. Because of Object Oriented Technology it is very easy to convert.
We have Used Data file to store username and password.
Usage of Sql Server will not be needed for sending Messages and attachments.
3.3 MODULE CLASSIFICATION 3.3.1 Client based:
Email Client ( ) Email ( ) (maintenance) User ( )
3.3.2 Server based:
EmailServer ( )Inbox:
InboxList( )
RecipientList( )
Design view:FontChange( )
16
MainFunctionmenuGUI( )
MainLoginmenuGUI( )
ReadMailWindowGUI( )
SendMailWindowGUI( )
ViewGraphicsAttachments( )
ViewMediaAttachments( )
ViewtextAttachments ( )
3.4 OPERATIONS INVOLVED IN E MAIL CLIENTS
EMail Clients:
This is the module which Handles Client events as follows ,
Interacting with Login menu GUI of Design view.
Getting User name from server.
Sending undeleted mail back to server for storage.
Setting up Client Data Storage.
Shut down the server when finished.
Delete mail from Inbox.
Send inbox item to server for storage while exit.
Create a copy of Inbox backup for UnDeletion.
3.5 OPERATIONS INVOLVED IN E MAIL SERVER
3.5.1 EMail Server :
Create new instance of server storage vectors
Create new instance of server GUI to display messages
Starts the server
17
Set up socket to accept connections
Accept new client
Update server window details
Run indefinitely
Starts up the server in the correct manner
Extract information for server from files
Read object from file and add to server vector
Gets a vector of emails from persistent storage
Set up file input stream from persistent server file
Read object from file and add to server vector
Display message and close stream
Output server information to persistent storage
Sends all server usernames to file
Set up new file output stream
Update server message window
Send all server mail to a file
3.6 OPERATIONS INVOLVED IN E MAIL INBOX
Check if there is mail to select
Get the mail selected by user
Delete mail from vector
Update read property of mail
Update list of emails
Open email in new mail window
18
Delete mail from mail vector
Display message to user
Retrieve the backup inbox from client
Display message to user
Updates the content of the inbox list
If mail is unread create different description
Set inbox window to description of mail
3.7 DIAGRAMS
3.7.1 Data flow Diagrams:
Context level Diagram
Fig 1: DFD1: Interaction between client and Server
19
Client Server
First Level Data Flow Diagram
Fig 2: DFD2: Architecture for the functionality Java Mail in LAN
Fig 3: DFD3: Step wise functions of a Java Mail from initial step to the final step
20
Client 1 Server Client 2
Client 3
3.7.2 UML Diagrams
Class Diagram
A class is a set of objects that share same attributes, operations. Graphically a class is represented
as a rectangle, including its name, attributes, and operations. A class diagram shows a set of
classes and the relationships among them.
Class Diagram for Java Mail
EMailServeruserNames : VectorPORT : int
getUser()addMail()addUser()getEmail()readInMailFromServerFile()readInUserNamesFromServerFile()deleteMail()
EMailClientinbox : VectorPORT : inthost : InetAddress
addMail()addUser()getMail()getName()getUserNames()deleteMail()deleteAll()
LoginMenulogin : JButton
login()
SendMailnames : Stringrecipient : String
sendEmail()setNewFont()sendAttachment()
InboxListselectedMailNumber : intmailDescriptor : Vector
refreshListContents()
ReadMailemail : Email
readMail()setNewFont()unreadMail()deleteMail()undeleteMail()
Fig 4: Class Diagram
21
Use Case Diagrams
Use Case diagrams shows a set of use cases and actors and their relationships. These diagrams
illustrate the static use case view of a system and are important in organizing and modeling the
behaviors of a system.
Actor Use Case
Fig 5: Case Diagram
Use Case Diagram for Login Module:
Request Server
Fetch the usernamesClient
Accesing Mails
Inbox
Enter ID and Pwd
Server
Fig 6: Case Diagram For Login Module
22
Usecase diagram 1: This diagram illustrates the Login Module, thereby the actions performed between the Client and Server. Initially the Client requests the Server and Client gets login with desired username and password, therby access the mails from the Inbox.
Use Case Diagram for Storage Module:
Read Mails
Usernames
Unread MailsClient
Attachments
Storage Manager
Fig 7: Case Diagram For Storage Module
Usecase diagram 2: This diagram illustrates the Storage Module. The 23sernames are saved in
Usernames.dat and the mails are saved in Mail.dat. We can save all the attachments in our
memory by downloading into our system.
23
Use Case Diagram for Client Module:
ServerLogin
Accesing Mails
Client
Enter login details
Fig 8: Case Diagram For Client ModuleUsecase diagram 3: This diagram illustrates the Client Module. The Client gets logins with their
desired username and password. Once the client logs in, the client is free to use all the functions
associated with the mailing as Accessing Mails.
Use Case Diagram for Server module:
Client 1
Client 2
Client 3
Login Server
Fig 9: Case Diagram for Server Module
24
Usecase diagram 4: This diagram illustrates the Server Module. This module integrates with all
the clients present in the LAN. This module also facilitates the clients to interact with each other.
Use Case Diagram for Sending/Receiving Module:
Client 1
ServerLogin
Read Mails Client 2
Received Mails
Fig 10: Case Diagram for Sending/Receiving Module
Usecase diagram 5: This diagram illustrates the Client Module. This module uses the
client/server method which integrates all the clients and server. The clients who are connected
within the LAN can interact with each other and perform respective functions related to mailing.
25
3.8 SNAPSHOTS
3.8.1 This is Email system Login menu used by clients.
3.8.2 This is server window that carries information of clients .
26
3.8.3 This is UI for creating new user
3.8.3 This is UI for login existing user.
3.8.4 This is Email system menu for clients .
27
3.8.5 This is Inbox window for clients.
3.8.6 UI for sending Email to other clients.
28
Chapter-4
29
CONCLUSIONS
1. Based on this project myself can conclude that the data transmission using sockets within
a LAN enables the local users to exchange the data more conveniently.
2. This project can be enhanced with more functionality like virus checking, spasms, trash
etc. The future enhancements may include more secure encryption and decryption of data
being sent and received.
3. The use of socket programming enables the secure paths for the data to travel between
authorized sender and receiver hence providing the security to greater extent.
30
Chapter-5
LIMITATIONS OF THE PROJECT
The main limitation of this project is that the end user must be connected to a secured
LAN within his/her organization/institution.
To run the project safely, there must be installed JMF & JDK in the system.
Chapter-6
31
FUTURE SCOPE & APPLICATIONS OF PROJECT
The working model will be shown in the near future.
Using data transmission by sockets both sender and receiver can exchange data from one
point to another without their physical displacement.
This project finds its own importance within a local area network where people from
same organization can exchange data pertained to personal organization.
REFERENCES
32
WebSites:
http://en.wikipedia.comhttp://www.google.com
Books:
Software Engineering-A Practitioner’s Approach JAVA-The Complete Reference The Complete Reference J2EE
33
GLOSSARY
Feasibility Study : Feasibility Study is made on the system being developed to analyse whether the system development process require training of personnel.
Data Flow Diagram(DFD): Data Flow Diagrams(DFDs) reveal relationships among and between the various components in a program or system.
Technical Feasibility : Technical Feasibility centers on the existing manual system of the test management process and to what extent it can support the support.
APPENDIX
34
Client Based ModulePage No.16
Use Case DiagramPage No.22
Class DiagramPage No.21
Snapshots Page No.25
35
top related