0% found this document useful (0 votes)
70 views5 pages

DesignandImplementation PID5149463

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
70 views5 pages

DesignandImplementation PID5149463

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/322221902

Design and Implementation of Client-Server Based Application Using Socket


Programming in a Distributed Computing Environment

Conference Paper · December 2017


DOI: 10.1109/ICCIC.2017.8524573

CITATIONS READS

10 11,380

4 authors, including:

Rolou Lyn Rodriguez Maata Ronald Soriano Cordova


Gulf College Oman Gulf College Oman
17 PUBLICATIONS   73 CITATIONS    12 PUBLICATIONS   25 CITATIONS   

SEE PROFILE SEE PROFILE

Alrence Halibas
RMIT International University Vietnam
20 PUBLICATIONS   107 CITATIONS   

SEE PROFILE

Some of the authors of this publication are also working on these related projects:

Research Paper View project

Alumni Tracking Information System (ATIS) Towards the Attainment of Quality Programmes View project

All content following this page was uploaded by Rolou Lyn Rodriguez Maata on 03 January 2018.

The user has requested enhancement of the downloaded file.


Design and Implementation of Client-Server Based
Application using Socket Programming in a
Distributed Computing Environment
Rolou Lyn R. Maata Ronald Cordova Balaji Sudramurthy Alrence Halibas
FCS, Gulf College FCS, Gulf College FCS, Gulf College FCS, Gulf College
Sultanate of Oman Sultanate of Oman Sultanate of Oman Sultanate of Oman
[email protected] [email protected] [email protected] [email protected]

Abstract—This research study discusses the detail overview in


developing a client server based application using socket II. LITERATURE REVIEW
programming in a distributed computing environment. The This research study is supported by concepts and principles
researchers developed a client-server based application called used in socket programming in a distributed computing
OpTel Billing System (OBS) using Java NetBeans and TCP environment.
datagram to demonstrate the concepts of socket programming
and its communication in a distributed computing. Interface
design, socket programming style, java classes, and exceptions A. Client Server Communication
are also considered in the development stage. The
communications between client server application processes
using socket mechanism were mainly analyzed. The main
objective of this research study is to demonstrate the principles
and concepts behind socket programming as well as the libraries
available in Java. In conclusion, socket programming is one of
the best method in distributed computing that can improve
system’s performance.

Keywords—socket programming; distributed computing Fig 1: Client Server Communication


environment; client-server based
Fig 1 shown above describes the use of client server model
I. INTRODUCTION based on its request – reply protocol. In this model, the client
Client-server program nowadays is no longer an unfamiliar directly sends his request to the server asking for an
concept in distributed computing and in computer networks appropriate service, and later server does the work and returns
[4]. In fact, the internet up to this date has many client server immediately the data or error code as a response back to the
applications readily available anytime. client. The server offers various services to the clients based
on its client’s request [6].
In client-server model [5], each computer terminal or
process on the network could be a client or a server. A “client”
is a program or a computer terminal that allows users to access B. Sockets and Socket Programming
and view its interfaces. Every client communicates and
connects with each through server [5]. In an overall concept, In distributed computing environment, client server
client serves as the one who initiates the communication application (consist of client program and server program) can
wherein the server is the one who waits passively to respond be designed using socket programming. Socket [13] is a two-
to the client’s request. way communication link between client and server programs
On the other hand, a socket is an abstraction which allows that are running in a network environment. It has an effective
program to send and receive data [3]. The most essential communication mechanism between two computers.
characteristic of socket programming that drive programmers
to design a program is due to its transparency [3]. It simply In Java programming, socket classes are used to represent
means that, whether a socket program is designed and written connections between the client and the server [8]. Java
in Java language, it still has the ability to communicate with provides two classes for this purpose: Socket and the
other socket program which is designed and written in other ServerSocket. These sockets connect two programs and
programming languages such as C or C++. implement two sides of the program (client and server).

To demonstrate the principles and concepts of socket The client server program allows user to run the client
programming, the researchers developed an application called software to create a query. The client connects and sends
OpTel Billing System. query to the identified server through the use of socket (client

978-1-5090-6621-6/17/$31.00 ©2017 IEEE


2017 IEEE International Conference on Computational Intelligence and Computing Research

side). The server once received the request from the client the requests coming from the client and maintains
analyzes the query and sends the result directly to the client. customers’ account information; and
f. The application requires log-in and password for
security purposes.
C. Communication Protocol

There are two communication protocols that are commonly B. InterfaceDesign


used in socket programming, the datagram communication
and stream communication [14]. The datagram
communication protocol is popularly known as UDP (user
datagram protocol) is considered a connectionless protocol.
This means that every time the client sends datagram, it also
requires them to send the local socket descriptor as well as the
receiving socket’s address. However, the stream
communication protocol, popularly known as TCP (transfer
control protocol) is a connection-oriented protocol. This
means that in order to establish communication over this type Fig 2: Client Server Application creates OBS Project with
of protocol, a connection must be established first between Java Packages
two identified sockets [14]. One socket listens for a
Fig 2 demonstrates the programming style used in the
connection request (main responsibility of the server) and the
development of OBS client and server programs. The
other socket asks for a connection (main responsibility of the
researchers used one project with two java classes namely:
client) in order to establish connections. Once they have
OBSClient and OBSServer. In this case, two programs were
already established the connection, it can be used to transmit
linked together to come up with functional application that
data in both directions [4].
meet specific objectives of the research.

III. METHODOLOGY
The application was designed using socket programming in
Java NetBeans supported by TCP datagram. The client server
based application has many functions. The two programs
(client and server) were simulated, demonstrated and
analyzed.

A. Application Concepts

This research study used a specific scenario in designing the


client server application in order to demonstrate the proper
implementation of socket programming. The researchers
designed and implement a client server based application run Fig 3: Authentication Access
in a distributed computing environment called “OpTel Billing Fig 3 illustrates the authentication procedure of the
Service (OBS)”. This application implements communication application whereas it require users to perform authentication
between a client and a server. Further, the application involves access in order for them to access.
only one client and one server; with the following
requirements:
a. The client sends enquiries to the server;
b. The server executes the commands and displays
whatever the server sends back to the client;
c. The OBS application is a standard application
available in all OpTel branches wherein the customer
can enquire about their bills;
d. The application must be able to handle multi-users Fig 4: Established connections with the use of temporary
access on the client side; ports assigned
e. A distributed application OpTel Billing System
(OBS) enables a client (customer) to send request to
the server (OpTel machine). The server manages all
2017 IEEE International Conference on Computational Intelligence and Computing Research

Fig 4 demonstrate how the two programs is connected statement in the selection of the main menu, IOException |
through sockets with the use of port. The two programs were ClassNotFoundException, ObjectInputStream,
successfully connected using the port 7777. The ports of two ObjectOutputStream,Util.Scanner were also used to complete
programs are essential as it the application.

C. Main User Interface


IV. CONCLUSION AND FUTURE WORK
This research study presents the overview and the detail
implementation of the OBS application using socket
programming method. In the development of this study, we
have chosen Java NetBeans programming language as it
covers a wide range of functions and classes. In addition,
researchers found out that programming style, concepts,
functions, datagram and socket programming are easily done
in Java programming language. The designed application is
used to simulate scenario and able to illustrate the use of
socket programming and how it works in the real-world
environment. Thus, the researchers would like to recommend
that the application can be designed in an object oriented
approach and environment for future enhancement and further
Fig 5: Main User Interface of the OBS application improvement. Other functionalities can also be embedded and
integrated in order to design a newly updated version of this
Fig 5 demonstrates the main user interface of an application. application in the future.
The interface includes labels that increase the usability and
user-friendliness of the application. REFERENCES

[1] D. Lowe, “Java All-in-one for Dummies 5th edition”, John Wiley &
D. Socket Programming Style Sons, Inc. USA, 2017
[2] S. Shin, D. Yoon, H. Song, B. Kim, J. Han, “Communication System of
a Segmented Rescue Robot Utilizing socket programming and ROS”,
IEEE 14th International Conference on Ubiquitous Robots and Ambient
Intelligence (URAI), South Korea, July 2017
[3] M. Al Yemem, “Voice Chat Application using Socket Programming:,
European Academic Research, Vol. 2 Issue 8, August 2014.
[4] T. Duong-Ba, T. Nguyen, B. Rose, D. Tan “Distributed Client Server
Assignment for Computing, Volume 2, Issue 4, pp. 422 – 435,
December 2014
[5] Z. Yuqing, W. Wu, D. Li, “Efficient Client Assignment for Client-
Server Systems”, IEEE Transactions on Network and Service
Management, Vol. 13 Issue 4, pp. 835-847, August 2016.
[6] Xue, M. and Zhu, C. , “The Socket Programming and Software Design
for Communication Based on Client/Server”,” 2009 Pacific-Asia
Conference on Circuits, Communications and Systems, pp. 774-777,
2009
[7] M. Malik, Y. Ali, “Java Socket Programming: From Theory to Practice”,
CreateSpace Independent Publishing, pp. 8-15, December 2014.
[8] K. Calvert, M. Donahoo, “TCP/IP Sockets in Java: Practical Guide for
Programmers 2nd edition”, Morgan Kaufmann, pp. 15-50 USA 2008
[9] P. Ashishkumar, P. Barkha, “Implementation of DNA cryptography in
cloud computing and using socket programming”, 2016 International
Conference on Computer Communication and Informatics, pp. 9-15,
India, January 2016
[10] A. Jitbanyud, N. Toadithep, “The system of powerful computer
laboratory class via socket program”, 2010 3rd IEEE International
Conference on Computer Science and Information Technology, pp. 638
– 641 China, July 2010
Fig 6: OBS Programming Style [11] M. Xue, C. Zhu, “The Socket Programmiing and Software Design for
Communication Based on Client/Server”, IEEE Pacific-Asia Conference
on Circuits, Communications and Systems, pp. 775-777, China, May
Fig 6 illustrates the programming style used in developing the 2009.
OBS application. During the simulation and demonstration [12] O. Ayurzana, Y. Park, J. Kwon, H. Kim, “Development of Telemetering
stage, OBS programs used classes, interfaces, exceptions, System of Water Supply using the RF module and TCP/IP socket
InetAddress, Socket, ServerSocket. However, switch
2017 IEEE International Conference on Computational Intelligence and Computing Research

Program”, IEEE 2006 SICE-ICASE International Joint Conference, pp.


3744-3746, South Korea
[13] J. McManis, S. Hashmi, M Ahsan, and J. Haider, “Developing
Intelligent Software Interface for Wireless Monitoring of Vehicle Speed
and Management of Associated Data”, IET Wireless Sensor Systems,
2016.
[14] IDG Communications (2017). Sockets Programming in Java World from
IDG. [Online]. Available at: https://www.javaworld.com / article /
2077322/core-java/core-java-sockets-programming-in-java-a-
tutorial.html. [Accessed 17-July-2017]
[15] “Socket Programming in .NET”, Springer”, [Online] Available:
https://link.springer.com/chapter/10.1007/978-1-4302-0660-6_4
[Accessed: 17-July-2017]
[16] Jeff, C. “Sockets and Client-Server Communication”, Duke University,
[Online] Available:
http://db.cs.duke.edu/courses/spring06/cps196/slides/sockets.pdf
[Accessed: 02-May-2017]

View publication stats

You might also like