Implementation of a Distributed Control System in Java

Verified

Added on  2020/05/28

|10
|1703
|37
Project
AI Summary
This project focuses on the implementation of a client-server application in Java for an electronics company's distributed control system. The assignment addresses the problem of handling increased user access to services by utilizing a distributed system architecture. The solution involves two main parts: the client, which presents a menu-driven interface for user interaction, and the server, which processes client requests. The design includes flowcharts, sequence diagrams, and activity diagrams to illustrate the system's functionality. Input and output design details the communication between the client and server using sockets. The program's testing phase involves verifying the functionality of the menu options and the overall system's compliance with the problem statement. The project utilizes Java programming language with Netbeans IDE and socket-connected communication to achieve the desired distributed control system.
Document Page
RUNNING HEAD: Distributed Control System
Distributed Control System
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
Distributed Control System 1
Contents
I. Introduction..............................................................................................................................2
II. Problem....................................................................................................................................3
III. Suggested Solution...............................................................................................................3
The Client.............................................................................................................................3
The Server.............................................................................................................................3
IV. Design...................................................................................................................................4
Flowchart of system.....................................................................................................................4
Sequence Diagram.......................................................................................................................5
Activity Diagram..........................................................................................................................5
V. Input and Output Design of GSE.............................................................................................6
Server...........................................................................................................................................6
Menu Number...................................................................................................................6
Data...................................................................................................................................6
Client............................................................................................................................................6
VI. Program Testing....................................................................................................................7
References........................................................................................................................................8
Document Page
Distributed Control System 2
I. Introduction
The goals and objectives of a business can only be achieved by putting proper focus
on the implementation of a strategy in order to attain competitive advantage over
other businesses. Nowadays, customers access the services provided by businesses
anytime, anywhere with the help of internet enabled activities. The increased number
of users accessing the same service subsequently results in the slowing down of the
servers and data centers because high-end computers cannot always accommodate
such increased number of users (Thampi, et. al., 2012). After a point, peak overload is
reached which need to be handled significantly. In order to handle the issue, the
upgradation of computers is required continuously such that the users and system are
not disrupted by the upgrade. Autonomous hardware systems are made through the
use of architecture for working as a single unit for upgradation of systems.
This architecture is often termed as distributed system (Electrical Technology, 2017).
It is a system with the help of which single function is performed by multiple
computers. In this architecture, different machines handle a single program which is
further subdivided into different parts. The problems are solved by the way of
establishing communication between the machines and therefore networking is the
key to this architecture.
The way in which services are distributed from a central source is known as client-
server architecture and can also be regarded as the basis of distributed computer
systems. The service is provided by a single server and communication is established
with the server by multiple clients for consuming its products.
Different jobs are allocated to clients and servers in this architecture. The service
requests from clients are responded by the server as a part of its job while the data
provided in response is utilized for performing the tasks as a part of client’s job. This
assignment focuses on the implementation of client server application in java
language for an electronics company. Administrator and employees will be the users
of this system.
Document Page
Distributed Control System 3
II. Problem
The problem comprises of the requirement to develop an application in which the
server receives the request of the clients and accomplish them on client’s behalf. On
the other hand, the client performs the tasks of handling customer queries, logging
customers, viewing gadget related information along with making required changes in
gadget- price entities and calculating costs (Duke Computer Science, 2017).
An additional function related to the change and update of customer details will be
added for allowing the users to change their login details. Therefore, a solution is
created in the form of execution of client/server application.
III. Suggested Solution
The solution will comprise of the implementation of client/server application which
will perform the program’s functions but will be managed by separate parts:
The Client- Menu system will be displayed by this part that represents the
functions that the system executes. The function will be selected by the user
on the basis of menu and the same will be forwarded to the system (Career
Bless, 2017).
The Server- The client requests are received by this part of application along
with the messages of clients for determining the selected function. After this,
execution of the function takes place along with communication of its status to
the client (Calvert & Donahoo, 2011).
The application will be developed with the help of Java programming language using
Netbeans 7.4 Integrated Development Environment (IDE) tool. Socket connected
communication will be implemented by this program (Live Code, 2017).The
architecture used to organize the system is shown in Figure 1.
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
Distributed Control System 4
Figure 1 Architecture of Distributed Computer System
IV. Design
Flowchart of system
A flowchart represents the flow of various situations and decisions in a system with
the help of shapes and symbols (Alison, 2017). The main processes of the flowchart
are server and client. The processing of requests is shown to be a part of server while
the client allows user to choose a number shown by the menu system for providing
additional inputs to be processed by server.
Document Page
Distributed Control System 5
Figure 2 Flowchart of Gadgets Service Engine application
Sequence Diagram
Sequence diagrams are helpful for representing the changing aspects of object-
oriented designs and denote the manner in which object’s interaction take place in a
system with the help of time sequence ranging from top to bottom. Such diagrams
are helpful for representing the dynamics (Smart Draw, 2017).
Activity Diagram
Activity diagrams are helpful in the creation of models of processes which represent
the working of things in a business environment. It performs the function of assisting
the workflow in a less intellectual mode (Source Making, 2017).
Document Page
Distributed Control System 6
V. Input and Output Design of GSE
The program’s design is centered on two main processes that are performed at the
same time. The sequence of passing messages comprises the operations which are
utilized as inputs and outputs. Socket is utilized by both the processes using same
number (Saternos, 2014). The main interacting processes are following:
Server- This process includes processing of request from the client in message form.
The message comprise of a string which includes the following:
Menu Number - from 1 to 7 based on the selection.
Data- the data comprises either of the string or a sequence of strings joined by
hyphen (“-“). Data forwarded by server and client will then analyze the
individual array elements when it faces an encounter with hyphen.
Client- The display of the menu system along with the options numbered from 1 to
7 marks the start of the process (Proctor, 2017). The requirements of the problem
statement are the basis of these options. The details of the process are as follows:
Selection of the number from 1 to 7 is made by the user from the menu
displayed.
The sequence of additional data along with the number is forwarded to the
server in the form of string message as follows:
"1-"+GSECustID+"-"+GSECustPassword
"2-"
"3-"+strGadgetCode+"-"+strGadgetName+"-"+strGadgetPrice
"4-"+strDelGadgetCode
"5-"+strUpdateGadgetCode+"-"+GadgetCode+"-"+GadgetNam
e+"-"+GadgetPrice
"6-"+updGSECustID+"-"+newGSECustID+"-"+newGSECustP
assword+"-"+newGSECustName
"7-"+strBuyGadgetCode+"-"+GadgetQuantity
Server sends a message with one of the following reply:
Error message
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
Distributed Control System 7
Results of the process
After the proper execution of the option’s process and the display of the
message on the client’s end, the user is given an option to continue or exit.
VI. Program Testing
This part represents the screenshots taken from program’s execution. The
requirements of the problem statement are tested for compliance with the help of
menu options and execution of the program (School of Informatics. 2017).
Document Page
Distributed Control System 8
References
Alison. 2017. What is a System Flowchart?, [Online]. Available at:
https://alison.com/topic/learn/44675/what-is-a-system-flowchart [Accessed on: 3 January
2017].
Calvert, K. L. and Donahoo, M. J. 2011. TCP/IP Sockets in Java: Practical Guide for
Programmers, Morgan Kaufmann.
Career Bless. 2017. Java Program to Send a Message from Client to Server and Receive a
Response Back Using Socket Programming, [Online]. Available at:
http://www.careerbless.com/samplecodes/java/beginners/socket/SocketBasic1.php
[Accessed on: 3 January 2017].
Duke Computer Science. 2017. Sockets and Client/Server Communication, [Online].
Available at: https://users.cs.duke.edu/~chase/cps196/slides/sockets.pdf [Accessed on: 3
January 2017].
Electrical Technology. 2017. What is Distributed Control System (DCS)?, [Online].
Available at: https://www.electricaltechnology.org/2016/08/distributed-control-system-
dcs.html [Accessed on: 3 January 2017].
Live Code. 2017. How to communicate with other applications using sockets, [Online].
Available at: http://lessons.livecode.com/m/4071/l/12924-how-to-communicate-with-other-
applications-using-sockets [Accessed on: 3 January 2017].
Proctor, R. 2017. Sockets: Basic Client-Server Programming in Java - By Rick Proctor,
[Online]. Available at: http://edn.embarcadero.com/article/31995 [Accessed on: 3 January
2017].
Saternos, C. 2014. Client-Server Web Apps with JavaScript and Java: Rich, Scalable, and
RESTful. "O'Reilly Media, Inc.".
Document Page
Distributed Control System 9
School of Informatics. 2017. A Theory of Program Testing - A Grand Challenge for
Computer Science?, [Online]. Available at:
http://homepages.inf.ed.ac.uk/dts/funding/testing.html [Accessed on: 3 January 2017].
Smart Draw. 2017. Sequence Diagram, [Online]. Available at:
https://www.smartdraw.com/sequence-diagram/ [Accessed on: 3 January 2017].
Source Making. 2017. Activity Diagrams, [Online]. Available at:
https://sourcemaking.com/uml/modeling-business-systems/external-view/activity-diagrams
[Accessed on: 3 January 2017].
Thampi, S. M., Zomaya, A. Y., Strufe, T., Calero, J. M. A. and Thomas, T. 2012. Recent
Trends in Computer Networks and Distributed Systems Security. Springer.
chevron_up_icon
1 out of 10
circle_padding
hide_on_mobile
zoom_out_icon
[object Object]