DCOMS

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 40

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

net/publication/331683230

Distributed Computer Systems (DCOMS) - Assignment

Research · January 2019


DOI: 10.13140/RG.2.2.16447.36005

CITATIONS READS
0 3,470

1 author:

Abdurraouf Fathi Sawehli


Asia Pacific University of Technology and Innovation
21 PUBLICATIONS 1 CITATION

SEE PROFILE

All content following this page was uploaded by Abdurraouf Fathi Sawehli on 12 March 2019.

The user has requested enhancement of the downloaded file.


ASSIGNMENT
TECHNOLOGY PARK MALAYSIA

CT024-3-3-DCOMS

DISTRIBUTED COMPUTER SYSTEMS

UC3F1801IT(SE/CS/MBT/NC/FC/IS)

HAND OUT DATE: 23 OCTOBER 2018

HAND IN DATE: 21th JANUARY 2019

WEIGHTAGE: 100%

INSTRUCTIONS TO CANDIDATES:

1 Submit your assignment at the administrative counter

2 Students are advised to underpin their answers with the use of


references (cited using the Harvard Name System of Referencing)

3 Late submission will be awarded zero (0) unless Extenuating


Circumstances (EC) are upheld

4 Cases of plagiarism will be penalized

5 The assignment should be bound in an appropriate style (comb bound or stapled).

6 Where the assignment should be submitted in both hardcopy and softcopy, the
softcopy of the written assignment and source code (where appropriate) should be
on a CD in an envelope / CD cover and attached to the hardcopy.

7 You must obtain 50% overall to pass this module.

8 The presentation is compulsory

Version 1.3 UCTI ExCv 2009-12-02


1
Contents
1. Document overall: ....................................................................................................................... 3

1.1 Introduction: .......................................................................................................................... 3

1.2 Object-Oriented Programming: ............................................................................................ 4

1.3 Distributed Systems: ............................................................................................................. 6

1.4 Use case diagram .................................................................................................................. 7

2. DCOMS Technologies: ............................................................................................................... 8

2.1 RPC: ...................................................................................................................................... 8

2.2 CORBA: ................................................................................................................................ 9

2.3 DCOM/COM+: ................................................................................................................... 10

2.4 Java RMI -The Recommended Distributed System-: ......................................................... 11

3. ICE technology for DCOMS: ................................................................................................... 13

3.1 Overview of ICE: ................................................................................................................ 13

3.2 Architecture of ICE: ............................................................................................................ 13

3.3 Benefits of ICE: .................................................................................................................. 15

3.4 Alternatives of ICE: ............................................................................................................ 16

4. Virtualization, cloud and grid computing usage in DCOMS:................................................... 18

4.1 Grid Computing: ................................................................................................................. 18

4.2 Cloud Computing:............................................................................................................... 19

4.3 Differences between Grid and Cloud computing: .............................................................. 21

4.4 Virtualization: ..................................................................................................................... 23

6. Program User guide: ................................................................................................................. 26

7. Testing: ..................................................................................................................................... 34

8. Conclusion: ............................................................................................................................... 37

9. References ................................................................................................................................. 38

2
1. Document overall:
1.1 Introduction:
Asia Pacific University is one of the leading organizations in Malaysia which provides various
courses for all levels of education starting from diploma and before it to Ph.D. researchers. APU
has an international student’s community from more than 110 countries which imply the
significant number of its student. APU is a place where technology, innovation, and creativity are
the first concern to prepare ready and professional graduates who can play vital roles in their future
career. (APU, 2019)

To provide the best services of accessing information for students, APU needs to develop a library
information system to manage the library resources and allow natural transaction process. The
system should be designed and implemented using Java RMI technology which a concept that
involves writing both the server and the client programs. The system should cover all the following
functions to become an ideal system.

- The library information system should be designed and implemented with a graphical user
interface to ensure accessibility and provide a user-friendly approach.
- Students need to register an account with the Name, TP Number(ID), DOB, Course, Year.
If the username exists in the system, the system should notify the user to enter a different
username.
- Each successfully registered user will have to receive an acknowledgment using email
Through Socket Programming.
- After the student has registered to the library information system, the user should be able
to request a list of available “Distributed System Books” from the library information
system.
- The system should return a list of available books to the user and based on the list of books
given; the user should be able to lend a book from the list or return it.

Also, the communication between client and server must use RMI with Serialization and support
Multiple Threads to allow multiple users to use the system at the same time. Lastly, the system
should use a SQL database through JDBC to store and retrieve all transactions, and Object-
Oriented Programming approach should be followed.

3
1.2 Object-Oriented Programming:
Object-oriented programming (OOP) is a programming style based on the concept of objects that
hold data and known as attributes. Objects can be a block of code, which is known as methods.
Object's methods can access and alter the data of the object which they are related with. In OOP,
applications are developed by making them out of objects that collaborate. (Eckel, 2014) There
are various principles in OOP which are:

- Class and Object:

Classes and objects are the basics of any OOP program. A Java class can be described as a template
that defines the behavior that the object of its kind support or a collection of objects. An object can
be as a student in this assignment (human) who have a state and behavior. If we consider a student,
then its state is – username and TP, and the action is to borrow or return a book. Further, the object
states are stored in the database, and the action is shown as methods.

Moreover, every class has a constructor as each time we create an object, the constructor will be
invoked to initialize it. The constructor must be the same as the class name, and the compiler will
build a default constructor for the class if we do not write it and classes can have more than one
constructor.

- Encapsulation:

Encapsulation is a way of covering the data (variables) and codes acting on the data (methods)
together as one part, and it is also known as data hiding. In this principle, all fields of a class are
secreted from other classes, and they can be retrieved only through the methods of their existing
class. Encapsulation can be achieved by declaring all the class variables as private and then provide
public setter and getter methods to alter and view the variables values (Eckel, 2014).

To add on that, hiding the internals of the object protects its integrity by avoiding users
from setting the internal data of the component into an illegal or unpredictable state and it can
reduce system complexity. There are four access modifiers to set access levels for classes,
variables, methods, and constructors.

1. Visible to the package, the default. No modifiers are needed.

2. Visible to the class only (private).

4
3. Visible to the world (public).

4. Visible to the package and all subclasses (protected).

- Inheritance:

Inheritance is the process in which one class obtains the fields (data members) and methods of
another class. The goal of inheritance is to offer the reusability of our code so that a class can write
the unique features only and rest of the shared properties and functionalities can be extended from
another class. When we deal with Inheritance, there are two concepts which are Child Class that
extends the structures of another class and Parent Class that whose properties and functionalities
are inherited.

- Polymorphism

Polymorphism is the capability of the variable, function, and object to taking various forms.
Polymorphism in OOP happens when a parent class reference is used to mention to a child class
object. There are two types of polymorphism which are Overriding and known as run-time
polymorphism since the compiler determines which method will be executed when the code is
compiled, and Overloading, which is known as compile-time polymorphism as the method will be
used for method overriding is determined at runtime based on the dynamic type of an object.
Polymorphism is closely connected with inheritance as we can Override methods of the parent
class. Moreover, all classes in Java are inherited from Object class, that is why we can override
Object’s methods. (Panda, 2013)

Overall, Object-Oriented Programming brings several advantages over other programming styles.
It allows the code to be easily reused in other programs. It will enable hiding some parts of the
objects to avoid any tempering and prevent some types of errors. OOP forces programmers to do
extensive planning to carry out an excellent design. Thus, it used widely for large programs since
they are challenging to develop. Lastly, Object Oriented Programs are more comfortable to change
and maintain than a non-Object-Oriented Programs even though a lot of work is done before the
program is written, but less work is needed to support it over time.

5
1.3 Distributed Systems:
A distributed system is a network that involves autonomous computers that are connected through
a distribution middleware. They support sharing various resources and capabilities to provide users
with a single and coherent, integrated network. A distributed system consists of multiple software
components that are on multiple computers which are client and server. However, they run as a
single system. Computers in a distributed system can be physically close together and connected
by a local network, or they can be geographically distant and connected by 6a extensive area
network. It also can have a different number of mainframes, personal computers, workstations,
etc. with one primary goal is to make this network as a single computer and a global clock is not
needed and they can be placed in different geographical areas (Kozlovski, 2018).

Distributed systems bring many benefits over centralized systems such as scalability in which a
system can be extended merely by adding additional machines when needed. Redundancy is
another advantage in which different devices provide the same functionalities in the case when
one computer goes down; the work does not stop. Thus, excellent fault tolerance is produced
compared to other network models. Distributed computing systems are independent, and they can
run on hardware that is provided by many vendors as well as they can use different standards-
based software components. These components are synchronized, and they allow resource sharing
by systems connected to the network at the same time. Even though there are multiple components,
they work autonomously in general.

The devices in the distributed systems can be organized in the form of client/server systems or
peer to peer systems. In client-server systems, the client requests the resource and the server
provides that resource. A server can serve multiple clients at the same time and remain separate.
Both the client and server usually communicate via a computer network, and so they are a part of
distributed systems. On the other hand, Peer to Peer Systems consists of nodes that are equally
participated in sharing data. All tasks are evenly divided between all the nodes and the only
cooperate as required to share resources, and this is implemented with the help of a network.
However, a distributed system is quite challenging since a secure connection must be provided to
every node and connection. Besides, data might be lost in the network while being sent from one
node to another and the database connected to the distributed systems is quite complicated to
implement (Birman, 2013).

6
1.4 Use case diagram
A use case diagram is a graphic depiction of the interactions among the elements of a system. It
is a methodology used in system analysis to identify, clarify, and organize system requirements.
Below is the use case diagram of the system.

Use case diagram: APU Library information system

The figure shows the use case diagram of the system (Abdurraouf,2019)

7
2. DCOMS Technologies:
When network computing started to grab hold, the need to share resources and data among
computers is necessary. Today various applications utilize distributed computing in one way or
another. From extensive scale ERP applications that permit monitoring of all the different parts of
an enterprise, to file servers, web application servers, database servers and even printing servers
that empower a few machines to share a single printer. There are many recent applications of
distributed computing with the advanced process (Obasanjo, 2012).

2.1 RPC:
The first distributed computing technology that gained an extensive use was the Remote Procedure
Call. It is defined under RFC 1831 and known as RPC. It is introduced to be as like making local
procedure calls a could be expected. The thought behind RPC is to create a function call to a
procedure in another process and address space either on a similar processor or over the system on
another processor without managing the details of how this ought to be implemented other than
making a procedure call.

Before the RPC call is created, both the client and server need to have stubs for the remote function
which generally produced by an interface definition language (IDL). At the point when an RPC
call is generated by the client, the arguments to the remote function are marshaled and moved
through the network, and the client holds up until the point that a reaction is sent by the server.
However, there are a few challenges with marshaling specific arguments like pointers as the
memory address on the client is entirely unusable to the server. Thus, different approaches for
passing pointers are used such as disabling pointer arguments or duplicating what the pointer
indicates at and sending that to the remote function.

The RPC function locates the server in two ways. The first way is to hardcode the address of the
remote server which is not flexible and might require recompilation when the server shuts down.
The second way is to use dynamic binding in which server exports interfaces or services they
support, and the client can choose which server they need to use out.

Nevertheless, RPC applications as any other distributed systems have some issues, and they are
unique to their situations like network packets that have client requests or server responses are lost,
or the client cannot locate its server.

8
The need for distributed object and component systems:

Since distributed computing turned out widely, more adaptability and functionality were needed
than RPC could give. RPC demonstrated that it is appropriate for Two-Tier Client/Server
Architectures in which the application rationale is either in the client application or inside the real
database or file server. However, this was insufficient, and an ever-increasing number of
individuals needed a Three-Tier Client/Server Architectures in which the application is divided
into client application which is as GUI or browser) application rationale and information store like
a database server. After that, people wanted to move to N-tier applications in which there are a
few separate layers of application rationale in the middle of the client application and the database
server.

The benefit of N- tier applications is that the application rationale can be isolated into reusable,
measured parts rather than one stable codebase. Distributed object systems tackled a significant
number of the issues in RPC that made huge scale framework building troublesome. Similarly,
Object Oriented ideal models cleared Procedural programming and structure ideal models.
Distributed object systems make it conceivable to plan and execute a distributed system as a
gathering of reusable, and effortlessly deployable segments where difficulty can be effectively
overseen and taken cover behind layers of abstraction.

2.2 CORBA:
A CORBA application consists of an Object Request Broker (ORB), a client and a server. An ORB
oversees for matching a requesting client to the server that will perform the request, utilizing an
object reference to find the target object. At the point when the ORB looks at the object reference
and finds that the target object is remote, it marshals the arguments and routes the invocation out
over the system to the remote object 's ORB. The remote ORB then invokes the technique locally
and directs the outcomes back to the client through the network. There are numerous optional
features that ORBs can do other than directly sending and getting remote method invocations such
as looking into objects by name, keeping up persistent objects, and supporting exchange
processing. An essential element of CORBA is its interoperability between different stages and
programming languages.

The initial phase in making a CORBA application is to characterize the interface for the remote
object utilizing the OMG's interface definition language (IDL). Compiling the IDL files will yield

9
two types of stub files; one that executes the client side of the application and another that
implements the server. Stubs and skeletons fill in as intermediaries for client and servers. Since
IDL characterizes interfaces so entirely, the stub on the client side has no collaborating with the
skeleton on the server side, regardless of whether the two are compiled into various programming
languages, utilize distinctive ORBs and keep running on different operating systems.

At that point to invoke the remote object case, the client initially gets its object reference using the
Orb. To make the remote invocation, the client utilizes a similar code that it would use in a local
invocation. However, it employs an object reference to the remote object rather than an occasion
of a local object. At the point when the ORB looks at the object reference and finds that the
intended object is isolated, it marshals the arguments and routes the invocation out over the
network to the remote object’s ORB rather than to another procedure inside a similar PC.

CORBA additionally supports dynamically finding data about remote objects at runtime. The IDL
compiler produces the type of data for every technique in an interface and saves it in the Interface
Repository (IR). A client would be able to inquire the IR to get run-time data about a specific
interface and after that utilization that data to make and invoke a method on the remote CORBA
server object dynamically through the Dynamic Invocation Interface (DII). Likewise, on the server
side, the Dynamic Skeleton Interface (DSI) enables a client to invoke activity of a remote CORBA
Server object that has no compile-time information of the object it is performing.

CORBA is frequently viewed as a shallow specification since it focuses more with syntax structure
than semantics. CORBA determines many services that can be given however just to the degree of
describing what interfaces ought to be utilized by application designers.

2.3 DCOM/COM+ :
Distributed Component Object Model (DCOM) is a distributed approach of Microsoft's COM
technology which permits the creation and utilization of binary objects/components from
languages other than the one they were initially written in, and it supports Java(J++), C++, Visual
Basic, JScript, and VBScript. DCOM works over the network by utilizing proxies and stubs. At
the point when the client instantiates a part whose registry entry recommends that it stays outside
the procedure space, DCOM makes a wrapper for the component and points the client a pointer to
the wrapper. The wrapper is known as a proxy, essentially marshals methods call and route them

10
over the network. On the opposite end, DCOM makes another wrapper, called a stub, which
unmarshals methods calls and routes them to an object of the part (Rouse, 2012).

DCOM servers can support various interfaces, and each one of them represents an alternative state
of the object. The DCOM client calls into the uncovered methods for a DCOM server by gaining
a pointer to one of the server object’s interfaces. The client object can invoke the server object
uncovered methods through the obtained interface pointer as though the server object lived in the
client’s location space. All DCOM parts and interfaces must acquire from IUnknown, the base
DCOM interface. IUnknown comprises of the methods like AddRef (), Release () and
QueryInterface (). AddRef () and Release () which are utilized for reference counting and memory
management. When an object’s reference check ends up zero, it must self-destruct.

2.4 Java RMI -The Recommended Distributed System-:


Remote Method Invocation (RMI) is a technology that permits the sharing of Java objects between
Java Virtual Machines (JVM) over a network. An RMI application comprises of a server that
makes remote objects that complies to predetermined interfaces which are accessible for method
invocation to client applications that get a remote reference to the object. RMI deals with a remote
object uniquely in contrast to a local object when the object is moved from one virtual machine
then onto the next. Instead of duplicating the user object in the virtual receiving device, RMI passes
a remote stub for a remote object. The stub works as the local agent or proxy for the remote object
and essentially is to the caller or the remote reference. The caller invokes a method on the local
stub which is in charge of completing the method call of the remote object. A stub for a remote
object performs a similar arrangement of remote interfaces that the remote object executes. This
enables a stub to be cast to any of the interfaces that the remote object implements. Nonetheless,
this additionally implies just these methods characterized in a remote interface are accessible to be
brought in the receiving virtual machine (Oracle, 2011).

RMI comes with the ability to dynamically stack classes through their bytecodes from one JVM
to the next regardless of whether the class isn't characterized on the receiver’s JVM. This implies
new object types can be added to an application by updating the classes on the server with no other
work being done concerning the receiver. This straightforward loading of new classes using their
bytecodes is one of the benefits of RMI that enormously simplifies adjusting and updating a
program. The initial phase in the making an RMI application is creating a remote interface. A

11
remote interface is a subclass of java.rmi.Remote, which demonstrates that it is a remote object
whose methods can be invoked crosswise over virtual machines. Any object that executes this
interface turns into a remote object.

To indicate dynamic class loading in the real world, an interface that describes an object that can
be serialized and go from JVM to JVM will likewise be made. The interface is a subclass of the
java.io.Serializable interface. RMI utilizes the object serialization mechanism to move objects by
an incentive between Java virtual machines. Implementing Serializable marks, the class as being
fit for transformation into a self-depicting byte stream that can be utilized to recreate an exact copy
of the serialized object when the object is perused once more from the flow. Any element of any
kind can be passed to or from a remote method as long as the component is an instance of a type
that is a primitive information type, a remote object, or an object that executes the interface
java.io.Serializable. Remote objects are passed by reference. A remote object reference is a stub,
which is a client-side proxy that performs the entire set of remote interfaces that the remote object
executes. Local objects are passed by copy, utilizing object serialization. As a matter, of course,
all fields are replicated, except those that are checked static or transient. Default serialization
behavior can be overridden on a class-by-class premise.

Accordingly, clients of the distributed application can dynamically stack objects that execute the
remote interface regardless of whether they are not characterized in the local virtual machine. The
subsequent stage is to implement the remote interface; the execution must mark a constructor for
the remote object and also mark every one of the methods defined in the interface. When the class
is made, the server must have the ability to make and introduce remote objects. The procedure for
introducing the server incorporates; making and installing a security application of a remote object
and enrolling one of the remote objects with the RMI remote object registry. An RMI client works
as a server after installing a security application, the client constructs a name used to look into a
remote object. The client utilizes the naming, lookup method to look into the remote object by
name in the remote host's registry. While doing the name lookup, the code makes a URL that
indicates the host where the server is running.

12
3. ICE technology for DCOMS:
3.1 Overview of ICE:
The Internet Communications Engine, or Ice, is an advanced choice to object middleware such as
CORBA or COM/DCOM/COM+ that enables distributed computing. ZeroC developed it as a free
and open source RPC framework. It uses a proprietary communication protocol known as the Ice
protocols, and they can run over TCP, UPD and Web Socket. As its name implies, ICE can be
appropriate for applications that communicate over the internet and include functionality for
traversing firewalls as well as an efficient and scalable solution. It supports several languages like
C++, NET, Java, Python, Ruby, and PHP and used in many mission-critical projects by big
companies (Henning, 2003).

Unlike CORBA which is quite complex and slow, ICE is easy to learn and provides an excellent
network infrastructure with a vast number of features to make it a fast solution. Even though some
claims that ICE is a client-server model, one machine is not necessary to be a server or a client and
it can connect to a server machine B, and machine B can be a client for another machine server
line machine C. The relationship can be a one-to-one, one-to-many, or many-to-many.

Every client needs to have the proxy to connect with an ICE object, and this proxy would represent
the ICE object for the assigned client. Once the client invokes a method on the proxy, the proxy
connected the ICE object on the server application and invoked the methods there.

3.2 Architecture of ICE:


The Internet Communications Engine is an object-oriented middleware platform. This implies that
ICE provides tools, APIs and various libraries to build object-oriented client-server applications.
ICE applications are mostly used in heterogeneous environments in which client and server can be
written in different programming languages, can run in various operating systems, architectures
and can communicate through various networking technologies. Moreover, the source code of the
application is portable regardless of the deployment environment. Below are the Client and Server
Structure of ICE application.

13
The figure shows the ICE architecture (Henning, 2003)

Both client and server consist of application code, library code, and code generated from Slice
definitions. The ICE core has the client and server-side runtime support for remote
communications, and it focuses on the networking details, threading, byte ordering, and other
issues, and it can be accessed through the ICE API. Then there is the proxy code which is generated
from Slice definition and performs two functions which are providing a down-call interface for the
client and provides marshaling and unmarshaling code which is responsible for the serializing
process. After that, there is the skeleton code which is the server-side equivalent of the client-side
proxy code that provides an up-call interface to allow the ICE runtime to transfer the thread to the
application. Lastly is the object adapter which is part of the ICE API that specific to the server side
to map the incoming requests, associated with one or more transport endpoints and in charge of
creating proxies that can be passed to clients.

14
3.3 Benefits of ICE:
The Internet Communications Engine comes up with several benefits to application developers
(zeroc, 2018)

- Object-oriented semantics:

ICE entirely uses the object-oriented model across the application, and every operation invocation
implements late binding, so the operation implementation is selected based on the runtime type of
the object.

- Synchronous and asynchronous calls:

ICE supports both synchronous and asynchronous operation invocation and dispatch, publish-
subscribe messaging through IceStorm. This enables you to pick a communication model based
on the requirements of your application rather than to take one application to fit one model.

- Multiple interfaces:

ICE provides a feature in which objects can have various and unrelated interfaces while having a
single object identification across these interfaces. Thus, excellent flexibility for application is
provided.

- Machine independence:

Clients and servers are covered from quirks of the underlying machine architecture, so problems
like byte ordering and padding are hidden from the application code.

- Language independence:

ICE allows client and server machine to be designed developed independently and in different
programming languages. This can happen as Slice definition is used by them which establishes the
interface contract.

- Implementation independence:

The client has no idea or aware of how servers implement their objects which allows that the server
implementation to be changed when clients are deployed such as using different programming
language.

15
- Operating system independence:

ICE supports different operating systems since their APIs are entirely portable. Thus, the same
code can be compiled and runs in both Windows and Unix/Linux.

- Threading support:

ICE runtime is entirely threaded. It does not require any effort to develop threads except
synchronizing access to shared data with high-performance for client and servers.

- Transport independence:

ICE provides the support of TCP/IP, UDP, Bluetooth and iAP. Also, Client and server do not know
of the underlying transport, and a design parameter can pick the ideal transport.

- Security:

The communication between server and client is fully secured with SSL encryption, so the use of
public networks is not a threat, and secure communication can take place. Besides, Glacier2 is
used to perform secure forwarding of requests through a firewall, with full support for call-backs.

- Location and server transparency:

ICE runtime concerns about the object locations and managing the transport mechanism like
opening and closing connections and the connection between client and server looks connection-
less. IceGrid is used to manage servers to be established on demand when they are not running,
and the client invokes an operation. Moreover, servers can be moved to different physical locations
without breaking the client’s proxies, and the client does not know how object implementation is
distributed to be processed by the server.

3.4 Alternatives of ICE:


One of the ICE alternatives is Apache Thrift which is an interface definition language and binary
communication protocol that is used to define and create services for various languages. Facebook
developed it for scalable cross-language services development. It uses a code generation engine to
build cross-platform servers to connect application developed in multiple programming languages
and frameworks like C, C++, C#, PHP, Python, and Ruby. After introducing it, Apache Thrift

16
became an open source project under e Apache Software Foundation. What makes Apache Thrift
unique is its simplicity, transparency, consistency, and performance.

Apache Thrift allows building a complete application with clients and servers. The top part is
generated code from the Thrift definition and using this file, the client and processor code is
created, and the protocol and transport layer is part of the runtime library, and Thrift allows to
redefine and change the protocol as well as the transport without compiling the code. Also, Thrift
contains server infrastructure to tie protocols and transports together, like blocking, non-blocking,
and multi-threaded servers. The underlying I/O part of the stack is applied differently for different
languages. Below is the Apache Thrift API client/server architecture (Apache, 2015).

The figure shows the Apache Thrift API client/server architecture (Apache, 2015)

17
4. Virtualization, cloud and grid computing usage in DCOMS:
4.1 Grid Computing:
Grid computing is a network or a process architecture that allows every computer to share its
resources with every other computer in the network and combine these resources from different
domains to reach the primary objective. Authorized users can use all resources like power,
memory, and storage to perform any task. The concept of grid computing was first introduced in
the early 1990s by Carl Kesselman, Ian Foster, and Steve Tuecke. A grid computing network can
be as simple and easy to configure as a network of computers that run on the same operating system
or as complex and difficult to configure as an inter-networked system that consists of a significant
number of computers with various operating systems (Strickland, 2015).

Grid computing is a type of distributed computing concept in which various computers within the
same network share one or more resources. However, in grid computing, each resource is shared
which turns the network into a powerful super network. Accessing a grid computing network is
the same as obtaining a local machine’s resources. A real-world example of grid computing is
when a network administrator stores all logs in one computer and uses it to analyze it for an entire
network of computers.

Grid computing systems follow the principle of pooled resources in which the load is shared
through multiple computers to carry out tasks more efficiently and fast. It connects computer
resources in a way that allows a computer to access and use the collected power of all computers
in the network. Grid computing systems usually consist of three parts. A grid computing network
required at least one computer commonly a server and known as a control node. It is in charge of
the administrative tasks for the network as well as prioritize and schedule tasks across the network.
Besides, different computers that run a specific grid computing network software and they can be
either various computers of the same operating system and known as a homogeneous system or
multiple computers that run on every operating system imaginable and known as a heterogeneous
system. Lastly, a group of computer software called middleware to allow various computers to run
a process or application through the network and without it, communication across the system
would not be possible.

18
Grid operations can be divided into two groups — data Grid which is a system that handles large
distributed data used for data management and controlled user sharing as well as to create virtual
environments that support dispersed and organized research and CPU Scavenging Grids which is
a cycle-scavenging system that moves projects from one PC to another as needed.

Most grid computing systems allow only a few users to access the full features of the network.
Else, the server of the control node will be flooded with processing requests from other computers.
Grid computing would restrict the access through authorization and authentication protocols. Also,
it protects all date with encryption to keep all private data safe and protect the network from
malicious activities like eavesdropping. The middleware and control node of the grid computing
network are in charge of ensuring the system running smoothly. They manage how much access
each computer has to the network's resources and vice versa.

Grid computing is focusing on achieving better performance and throughput by pooling resources
on a local, national, or international level. Overall, it has three main elements which are to share
resources like data and storage, to coordinate problem-solving and help in distributed data analysis
with an aim for dynamic, multi-institutional virtual organizations.

4.2 Cloud Computing:


Cloud computing is a concept that allows hosted services to be delivered over the internet.
Companies can use computer resources like virtual machines, storages or applications based on
their usage instead of building and maintaining a complete computing infrastructure in their
building. Cloud computing was introduced in the early of 1960s, but it did become an ideal solution
till late of 1990s (Microsoft-Azure, 2018).

Cloud computing brings several advantages to any company. First of all is self-service
provisioning in which users can users can utilize any workload on demand without the need for an
administrator to provide and manage compute resources for them. Besides, cloud computing offers
elasticity and scalability for the company when the demands increase or decrease which also
reduces costs in buying local infrastructure and it might or might not be used. Also, cloud
computing allows resources to be measured at a granular level, and users only pay for the resources
they use. Cloud service provider commonly provides redundant resources to confirm resilient
storage and bring a high level of availability. Lastly, companies can migrate their workload to the
cloud directly with various cloud providers like AWS or Azure.

19
Cloud computing services can be classified into three groups which are private, public or hybrid.

- Private cloud services:

When services are provided from a business’s data center to internal clients, it is known as the
private cloud. It is used when an enterprise utilizes a proprietary architecture and runs cloud servers
within its own data center. VMware and OpenStack are common private cloud technologies
providers and vendors.

- Public cloud services:

In the public cloud model, a third-party cloud service provider provides a cloud service over the
internet. It is sold based on the user’s usage either by the minute or hour, and they only pay for the
CPU cycles, storage or bandwidth they use. Amazon Web Services (AWS), Microsoft Azure, IBM,
and Google Cloud Platform are some of the leading public cloud service providers.

- Hybrid cloud:

In the hybrid cloud model, a combination of public cloud services and private cloud are delivered,
with synchronization and automation between them. It used when an enterprise run mission-critical
workloads or essential applications on the private cloud and use the public cloud for the typical
tasks or to handle workload bursts when the demand increases. It takes advantage of the public
could infrastructure while controlling the mission-critical data.

Moreover, the concept of multicloud model is used widely nowadays. It I the usage of multiple
infrastructures as service providers which allow applications to move between various cloud
providers or to work simultaneously through two or more providers. This way reduces the risk of
a cloud service outrage and brings more competitive pricing from the vendors.

Even though cloud computing has evolved over the time, it has been grouped into three broad
groups which are infrastructure as a service (IaaS), platform as a service (PaaS) and software as a
service (SaaS).

20
- Infrastructure as a service (IaaS):

IaaS providers like AWS provides a virtual server instance, storage and APIs to allow users to
move their workloads to a virtual machine and users are allocated storage amount, and they have
full permission to start, stop, access and configure the VM and storage as they want.

- Platform as a service (PaaS):

It is used when a cloud provider host development tools on its infrastructure so that users can
access these tools through the internet with the help of APIs, web portals and gateway software. It
is used for general software development and to host the software once it is developed.
Salesforce's Force.com, AWS Elastic Beanstalk, and Google App Engine are the most common
PaaS vendors.

- Software as a service (SaaS):

SaaS is a cloud model that provides software applications over the internet and these applications
known as web services. Users can access SaaS applications and services from anywhere using
their computers or devices as long as there is internet access. One example of a SaaS application
is Microsoft Office 365 for productivity and email services.

Lastly, Security in cloud computing stays the main worry for businesses to adopt the technology,
particularly in public cloud adoption since the provider shares the hardware infrastructure between
various clients. However, logical isolation has proven to be reliable, and the addition of data
encryption and different identity and access management tools has improved security within the
cloud.

4.3 Differences between Grid and Cloud computing:


Grid computing and cloud computing are theoretically alike, and it can be hard to differentiate
between them since both share the same idea of providing services to the users through sharing
resources among a large number of users and both can give multitasking in which users can access
a single or multiple application instances to complete various tasks. The following table discusses
the significant differences between these two concepts (Khillar, 2018).

21
Grid Computing Cloud Computing
Technology Follows a distributed architecture in which A new class of computing in which
a single task is divided into smaller tasks every user of the cloud has its private
via a distributed system involving multiple resource that is provided by the
computer networks. specific service provider
Terminology A collection of computer resources from a form of computing based on
multiple locations to process a single task virtualized resources which are
and acts as a distributed system for located over multiple locations in
collaborative sharing of resources. clusters.
Computing Resources are distributed among different Computing resources are managed
Resources computing units which are located across centrally which are located over
various sites. multiple servers in clusters.
Research Grouped in the virtual organization with A typical group of system
Community numerous user communities to solve administrators that manage the entire
large-scale problems over the internet. domain.
Function Job scheduling using computing resources It Involves resource pooling through
where a task is divided into independent grouping resources on an as-wanted
sub-tasks and each machine on a grid is basis from groups of servers.
assigned with a task. After all, completed,
they are sent back to the central computer.
Application Used by academic research and can Eliminating the need and difficulty
handle large sets of limited duration jobs of purchasing hardware and software
that involve big data. needed to build the application.
Purpose Application Oriented. Service Oriented.
Owner Managed by an organization within its Managed by infrastructure
premises. providers.
Operation Within a corporate network. Through the internet

A comparison table between grid computing and cloud computing

22
4.4 Virtualization:
Virtualization is defined as the creation of a virtual resource such as a server, desktop, operating
system, file, storage or network. The primary idea of virtualization is too controlling loads by
changing old-style computing to make it more scalable. Virtualization has been in the IT field for
a long time by now, and it can be implemented to a wide range of system layers such as operating
system-level virtualization, hardware-level virtualization and server virtualization (Noor, 2014).

The most widely recognized type of virtualization is the operating system-level virtualization as it
allows to run various operating systems on one hardware. Virtualization includes separating the
physical hardware and software by emulating hardware using software, and when a different
operating system is being used on the top of the primary operating system, it is known as a virtual
machine.

A virtual machine is a data file on a physical computer that can be transferred and copied to another
computer same as a typical file. There are two types of file structure used in the virtual environment
which is one defining the hardware and the other defining the hard drive. Also, there is
virtualization software or the hypervisor which provides caching technology that is used to cache
changes to the virtual hardware or the virtual hard disk. This technology allows a user to ignore
the changes done to the operating system and make it boot from an identified state.

Virtualization can be divided into various layers: desktop, server, file, storage, and network. Every
layer of virtualization has its benefits and difficulties. Virtualization provides numerous
advantages such as low or no-cost deployment, full resource usage, effective cost savings, and
power savings. Installing virtualization technology needs careful planning and skilled technical
experts. As the virtual machines use the same resources to run, it may lead to poor performance.

23
5. Readability of program:

5.1 Comments:

Java comments are declarations that are not executed by the compiler and interpreter. They can be
used to provide information or explanation about the variable, method, class or any statement. It
can also be used to hide program code for a specific time. Using comments in software
development is necessary and considered as one of the best practices for any developer. Thus, the
library information system code has many comments to explain what the function does and why
this code is written. Below are some code screenshots in which the developer used comments
heavily. Please check the code for more comments.

Sending email code comments (Abdurraouf,2018)

Login function code (Abdurraouf,2018)

24
5.2 Naming, files, and folders:

Arranging files and folders in any program is vital as much as writing comments to explain your
code. All variables in the program follow camel Casing approach to read them easily. Clear names
are given to every class and file that match the function of that specific file. Blew are all files in
the library information system with their names.

The figure shows the file and folders in the system (Abdurraouf,2018)

There are three main folders in the system. META-INF holds a file that consists of the database
connection path and port number as well as the address. Lis2 is the system packages, and it consists
of several files that play a pivotal role to run and compile the program such as the server file.
Lastly, the libraries folder which holds all external libraries needed to perform some function in
the program like sending an email and connecting to the database. They are essential files as some
function will not work without its library data.

25
6. Program User guide:
The program was designed to be user-friendly, and it only consists of straightforward steps using
a Graphical User Interface (GUI). GUI brings many advantages to users such as accessibility and
simple interaction. Once users run the library information system, the following page is shown.

The figure shows the home page of the system (Abdurraouf,2018)

Users have two options on the main page. If the user is using the system for the first time, he/she
needs to register in the system to be able to log in and take advantages of what the system provides.
The following details are required to be registered successfully. Otherwise, an error message is
popped up on the screen.

The figure shows the registration page of the system (Abdurraouf,2018)

26
There are three types of validation implemented in the system. The first one is checking if the
username is existing in the database or not and it only successfully register the user if the chosen
username is new and no one has used it before to avoid duplicated data problems. The following
picture shows the popped-up error message when a user tries to use a used username.

The figure shows the registration page of the system if the username is taken (Abdurraouf,2018)

In addition to checking if the user exists, password match validation is implemented to check if
the entered password by the use is same in both fields. If they do not match, the following error
message is displayed.

The figure shows the registration page of the system if the password does not match (Abdurraouf,2018)

27
The last validation is if the provided email is valid or there is no internet connection to send the
acknowledgment email to the user with the details.

The figure shows the last validation in the registration page(Abdurraouf,2018)

If the username is not used before and both passwords field match, the user shall be registered in
the system successfully, and email is sent to the provided email address with the details.

The figure shows a successful registration(Abdurraouf,2018)

28
The figure shows the generated email (abdurraouf,2018)

Once the user has registered successfully in the system, the login page is displayed to start using
the system. If the user enters wrong credentials, an error message is displayed as the following.

The figure shows a false credentials details (Abdurraouf,2018)

29
Once users log in successfully in the system, they need to choose between two options as the
following.

The figure shows the select page (Abdurraouf,2018)

Users should select the first option which views the available book list to know which books the
library currently have and the quantity of every book as well as they need to remember the book
name to use it as ID to perform any transaction.

The figure shows the available book list in the system(Abdurraouf,2018)

30
Users should press the ‘back’ button to complete any transaction if they wish to or log out of the
system. If users click to complete a transaction, the following page is displayed.

The figure shows the transaction page (Abdurraouf,2018)

Users can perform two different transactions using the book name. The first one is to borrow a
book from the library which is done only by entering the book name, and if it is available, the
borrowed book is deducted from the total quantity of the books.

The figure shows the borrow transaction (Abdurraouf,2018)

31
In case the book is not available in the library, the following error shall be displayed to the user.

The figure shows the borrow transaction (Abdurraouf,2018)

When the user has finished the book, he/she may return it merely by entering the book name and
click the return button, and the following message shall be displayed.

The figure shows the return transaction (Abdurraouf,2018)

32
Lastly, when the user has completed all the transactions, he/she can log out to the system by
merely going back to the select page and press log out.

The figure shows the logout process (Abdurraouf,2018)

33
7. Testing:
Software Testing is an assessment of the system against the gathered requirements from users and
system specifications. Testing is conducted at the phase level in software development life cycle
or module level in the program code, and it is usually done when the system development is
completed and before the resale. One of the most popular techniques to test systems is Unit Testing.

During the unit testing process, the system is classified into small parts that can function
independently to confirm that the system meets its requirements and deliverables. The following
table shows the carried-out unit testing of the system to make sure it is operating correctly and fits
the system specifications.

Test Function Description Expected result Actual Result Status Priority


ID
T1 Register It allows the user Successful Successful Closed High
to be registered in registration registration
the system by message message
filling up a form
T1.1 Check if the It checks if the Allows only new Only register Closed High
username username selected username to be username not
exists by the user has registered used before
been used before
or not
T1.2 Password It checks if the Shows error Shows the error Closed High
Match entered password message if the message
by the user is the password not successfully
same in both fields matched
are same
T1.3 Email has It sends an email Email sent, and a Email is Closed High
been sent to the provided message with received by the
email address by acknowledgment user
the user is shown.

34
Test Function Description Expected result Actual Result Status Priority
ID
T2.1 Successful Allows users with Successful login Successful login Closed High
Login correct credentials
access to the
system
T2.2 Unsuccessful Check if the given Shows Unsuccessful Closed High
Login username and unsuccessful login
password not login message
found in the
database
T3 View books Display all books Shows a table of Table of books Closed High
in the system with the available is displayed
a quantity books with
quantity
T4.1 Library Click the It routes the user The transaction Closed High
transaction transaction button to the next window is
window shown
T4.2 Successful Allows a user to Shows the The table of the Closed High
Search for a search for a book required book in needed book
book by ID by the ID and a table format with its quantity
display its name
and quantity
T4.3 Borrow a Borrow the book The book is The message is Closed High
book when it is deducted from returned, and
available the total one book is
quantity, and a subtracted from
message with the database
successful
borrowing is
shown

35
Test Function Description Expected result Actual Result Status Priority
ID
T4.4 Return a book Returns a book The book is The message is Closed High
when the user no added to the total returned, and
longer need it quantity, and a one book is
message with inserted in the
successful database
returning is
shown
T4.5 Unsuccessful Return a ‘not A message of not If the book ID Closed High
Search for a found message’ available is is not found or
book by ID when the book is shown no quantity, the
not found error message is
displayed
T5 Logout Allow users to log A user is The user is Closed High
out from the returned to the successfully
system and return login window returned to the
to the login login window
window
T6 Start the Run the server to Server is running The server is Closed High
Server start the running, and a
communication message is
between the server shown the
and client console
T7 Back buttons This function Return the user The user returns Closed High
returns the user to to the last to the previous
the previous window window
window when successfully
he/she hits the
back button

36
Test Function Description Expected result Actual Result Status Priority
ID
T8.1 Successful The application is The app is Users can Closed High
connection connected to working perform any
establishment DCOMS database correctly transaction they
to the and can retrieve want to
database data
T8.2 Unsuccessful The application is Application The error Closed High
connection not connected to shows message is
establishment DCOMS database ‘something shown
to the and cannot retrieve wrong happened’
database data error message

8. Conclusion:
In summary, APU library information system is used to manage the library resources and allow
natural transaction process. The system was designed and implemented using Java RMI
technology which a concept that involves writing both the server and the client programs. The
system has two types of roles, admin and user. While admin can add book with its quantity and
name, edit or delete it, user can register in the system and receive an email with his/her details, log
in to the system, view list of books, borrow book or return book.

Four different DCOMS technologies have been discussed in the assignment such as COBRA, RPC,
DCOM/COM+ and Java RMI. While each one of them has its own strength and weakness, JAVA
RMI seems the most suitable approach to design and implement distributed systems. In addition,
Grid, Virtualization and Cloud Computing concepts were discussed in detail and how they can be
applied in distributed system.

One of the enhancements of developed system is to connect it with a remote database such as
Firebase to apply cloud computing concept in the distributed system with the help of Platform as
a Service (PaaS).

37
9. References
Apache. (2015). vapache-thrift. Retrieved from https://alternativeto.net/software/apache-thrift/

APU. (2019, 1 19). Retrieved from http://www.apu.edu.my/

Birman. (2013). Introduction to Distributed System Design. Retrieved from


http://www.hpcs.cs.tsukuba.ac.jp/~tatebe/lecture/h23/dsys/dsd-tutorial.html

Eckel. (2014). Thinking in java . NY: Upper Saddle River.

Henning, M. (2003). Distributed Programming with Ice. Retrieved from


https://download.zeroc.com/Ice/3.1/Ice-3.1.1.pdf

Khillar, S. (2018). Difference between Grid Computing and Cloud Computing. Retrieved from
http://www.differencebetween.net/technology/difference-between-grid-computing-and-
cloud-computing/

Kozlovski, S. (2018, 4 28). A Thorough Introduction to Distributed Systems. Retrieved from


https://medium.freecodecamp.org/a-thorough-introduction-to-distributed-systems-
3b91562c9b3c

Microsoft-Azure. (2018). What is cloud computing? Retrieved from


https://azure.microsoft.com/en-in/overview/what-is-cloud-computing/

Noor, M. M. (2014). Cloud Computing & Virtualization. Retrieved from


https://www.researchgate.net/publication/309739794_Cloud_Computing_Virtualization

Obasanjo, D. (2012). Distributed Computing Technologies Explained:. Retrieved from


http://www.25hoursaday.com/DistributedComputingTechnologiesExplained.html

Oracle. (2011). An Overview of RMI Applications. Retrieved from


https://docs.oracle.com/javase/tutorial/rmi/overview.html

Panda, S. (2013, 1 12). quick guide to polymorphism in java. Retrieved from


https://www.sitepoint.com/quick-guide-to-polymorphism-in-java/

Rouse, M. (2012). DCOM (Distributed Component Object Model) . Retrieved from


https://whatis.techtarget.com/definition/DCOM-Distributed-Component-Object-Model

38
Strickland, J. (2015). How Grid Computing Works. Retrieved from
https://computer.howstuffworks.com/grid-computing.htm

zeroc. (2018). Architectural Benefits of Ice. Retrieved from https://doc.zeroc.com/ice/3.6/ice-


overview/architectural-benefits-of-ice

39

View publication stats

You might also like