Distributed Computer Systems
Distributed Computer Systems
CT024-3-3-DCOMS
INTAKE CODE: NP3F1801IT
HAND OUT DATE: 12 FEBRURARY 2018
HAND IN DATE: 6 MAY 2018
WEIGHTAGE: 100%
INSTRUCTIONS TO CANDIDATES
1. Submit your assignment to the administration counter.
2. Students are advised to underpin their answers with the use of references (sites
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.
Acknowledgement
This project report is prepared for the partial fulfillment of the requirement for the degree of
[Link] in accordance to the rules and regulations prescribed by APU. So, I would like to express
my heartfelt gratitude to APU for providing me an opportunity to apply my theoretical
knowledge into the practical world enhance my knowledge. Also I want to convey my sincere
gratitude to Lord Buddha Education Foundation (LBEF) for making this project possible by
providing with proper learning environment and facilities.
I extend my special gratitude to my subject teacher Mr. Jay Neupane for his valuable guidance,
suggestions, timely supervision and cooperation in completing this project. Also I would like to
appreciate the support, directly or indirectly of all the members of LBEF family. Also I would
like to extend my sincere gratitude & respect to all friends for their contribution & suggestions at
different step to prepare the report
Sincerely,
Table of Contents
1 Introduction...................................................................................................................................1
1.1 Problem Statement.................................................................................................................2
1.2 Objective.................................................................................................................................2
1.3 Propose new system...............................................................................................................3
1.4 Scope of project......................................................................................................................3
1.5 Limitation................................................................................................................................3
1.6 Object oriented Concepts........................................................................................................4
1.7 Abstraction:............................................................................................................................4
1.8 Encapsulation:.........................................................................................................................4
1.9 Inheritance:.............................................................................................................................4
1.10 Polymorphism.........................................................................................................................4
2 Program correctness.......................................................................................................................5
2.1 Functionalities.........................................................................................................................5
3 Program structure..........................................................................................................................6
3.1 Use case diagram....................................................................................................................6
3.2 Activity Diagram......................................................................................................................8
3.3 Protocols.................................................................................................................................9
3.4 Transaction management.......................................................................................................9
3.5 Execution................................................................................................................................9
4 REPORT.........................................................................................................................................12
4.1 Readability Of program.........................................................................................................12
4.2 Testing..................................................................................................................................13
4.3 User guide for system...........................................................................................................14
4.4 Internet Communication Engine............................................................................................20
4.5 Virtualization and cloud computing......................................................................................21
4.6 Desktop virtualization...........................................................................................................21
4.7 Hardware virtualization........................................................................................................21
4.8 DATA VIRTUALIZATION.........................................................................................................22
4.9 STORAGE VIRTUALIZATION...................................................................................................22
4.10 DCOM and its Technologies...................................................................................................24
4.11 CORBA...................................................................................................................................24
4.12 DCOM/COM+........................................................................................................................25
4.13 Java RMI................................................................................................................................26
5 Conclusion....................................................................................................................................28
6 References....................................................................................................................................29
LIST OF FIGURES
Figure 1: Agile methodology...............................................................................................................10
Figure 2: Readability..........................................................................................................................12
Figure 3: Configuration code..............................................................................................................12
Figure 4: RMI connection...................................................................................................................13
Figure 5: Server page..........................................................................................................................14
Figure 6: Client page...........................................................................................................................14
Figure 7: Login page...........................................................................................................................15
Figure 8: Registration page.................................................................................................................16
Figure 9: Home page...........................................................................................................................16
Figure 10: Change password..............................................................................................................17
Figure 11: Manage book.....................................................................................................................17
Figure 12: Manage user......................................................................................................................18
Figure 13: Manage member................................................................................................................19
Figure 14: Manage report...................................................................................................................20
1 Introduction
Library Management System is the software for library which is developed to manage all the
books in the library based on java RMI technology. A distributed computer system is one of the
computing concepts that consists of multiple software components that are on multiple
computers, but run as a single system. The computers which are in a distributed system can be
physically close together and connected by a local network, or they can be geographically distant
and connected by a wide area network. A distributed system can consist of any number of
possible configurations, such as mainframes, personal computers, workstations, minicomputers,
and so on. The goal of distributed computing is to make such a network work as a single
computer. The RMI (Remote Method Invocation) is an API that provides a mechanism to create
distributed application in java. The RMI allows an object to invoke methods on an object running
in another JVM. The RMI provides remote communication between the applications using two
objects stub and skeleton.
Library Management system has the ability to provide book status (Available or Borrowed),
store records, adding new books, deleting, modifying books information, searching for a book
title, check-in a book, and check-out a book and so on. It is a software application to maintain the
records of a user with their name, address, and number as well as the books they issue or return.
This software has the simple user interface, which can be easily managed by any kind of user.
Basically, It consists of three types of users i.e. administrators, librarians and guests (library
users). This software can be access by only these three types of user. Newly users need to ask
permission to the administrators and should register to be the part of this Library Management
System. The administrator panel has the facility to insert, update and delete the book information
as well as it has the option to create/delete an LMS account. Whereas librarians also have the
similar facility like administrators but it couldn't create/delete an LMS account. Guest (users) can
access the LMS without the need of any credentials with the minimum access privileges such as
book titles, available books.
1|Page
1.1 Problem Statement
We can see in the current library systems, they used to store data and information manually in a
register. And every day numbers of people visit this library and it is difficult to keep records of
every visitors. And maintaining all the visitors' records and every book which they borrow from
the library is not accurate. Recording all details in the register is a difficult task for the librarian.
Also, the cost goes high and high numbers of manpower is required to do the same task. Large
volumes of paper are required. Not only paper pen is also required to write in the copy. Also,
rows and columns need to prepare manually. And different register is required for keeping
different information list such as Check-in and check-out, list of books, list of members and so
on. The information regarding available Books like ISBN number, Access number, Publisher,
Edition, Author, Years would have to maintain in separate file/register. Seeing all these problems
and to make data accurate. Library Management Software has been implemented in order to
make easy for all librarians to record each and every library activities.
1.2 Objective
The main objective of building the Library Management System are:
•To minimize the error and use file handling for insert, update and delete.
2|Page
1.3 Propose new system
1.5 Limitation
Some of the limitation of the developed projects is as follows:
User must have knowledge of basic information about software and how to use it.
Network connection is required.
3|Page
1.6 Object oriented Concepts
Object Oriented concept/programming is one of the programming style which is associated with
the concepts like class, object, Inheritance, Encapsulation, Abstraction, Polymorphism. Most of
the popular programming languages like Java, C++, C#, Ruby, etc. follow an object oriented
programming paradigm. An object oriented based application in Java is based on declaring
classes, creating objects from them and interacting between these objects:
Inheritance
Encapsulation
Abstraction
Polymorphism
1.7 Abstraction:
Abstraction is the method of using simple things to represent complexity. Just for example we all
know how to turn the TV on, but we don’t need to know how it works in order to enjoy it. So,
the abstraction means simple things like objects, classes, and variables represent more complex
underlying code and data. This is important because it lets avoid repeating the same work
multiple times.
1.8 Encapsulation:
Encapsulation is the practice of keeping fields within a class private, then providing access to
them via public methods. It is a protective barrier that keeps the data and code safe within the
class itself. By this way we can re-use objects like code components or variables without
allowing open access to the data system-wide.
1.9 Inheritance:
It is a special feature of Object Oriented Programming in Java. It lets programmers create new
classes that share some of the attributes of existing classes. This lets us build on previous work
without reinventing the wheel.
Polymorphism.
This Java OOP concept lets programmers use the same word to mean different things in different
contexts. One form of polymorphism in Java is method overloading. That’s when different
4|Page
meanings are implied by the code itself. The other form is method overriding. [ CITATION Her02 \l
1033 ]
2 Program correctness
2.1 Functionalities
In the library management system, there are three kind of users. One is guest, librarian and
admin. They all have different roles in this system.
Insert: Insert function can be access to users only. Insert is used for adding new books and
adding new members.
Update: Update can be done by both admin and librarian. Update is for modifying the book
details.
Delete: Delete is for deleting book record as well as deleing the user records. It can be done only
by admin.
View: View is for showing all book records and it can see by all three users’ admin, librarian and
guest.
Search: Search is for finding book records and it can do by all three users’ admin, librarian and
guest.
Report: Report of books shows the total record of books which has been borrowed and all
records of users also.
5|Page
3 Program structure
Login <<exclude>>
Invalid
<<include>>
Password
System
Pannel
Update
Insert
Reporting
Administrator
Check- Out
Delete Librarian
Check- In
View
Guest
Search
<<Actor>>
File Handling
6|Page
The above mentioned figure is the structure of use case diagram. It is a graphic depiction of the
interactions among all the elements in a system software. The pictorial representation is used in
system analysis to identify, clarify and to organize the overall system requirements and its flow.
The term "system" refers to something being developed such as library management system,
online shopping and so on. Use case diagrams are employed in Unified Modeling Language
(UML) which is a standard notation for modeling of real-world objects and the systems. System
objectives can include planning overall requirements, validating a hardware design, testing and
debugging a software product under development, creating an online help reference, or
performing a consumer-service-oriented task. A use case diagram looks something like
flowchart.
In the above use case diagram it has three types of users i.e. Administrators, Librarian, and the
guest. They all have the interaction with Library Management System in different ways. Admin
has the interaction feature with insert book, update book, and delete books, searching book,
issuing book and so on. Whereas Librarians also has similar facility as admin but they couldn’t
have the feature of deleting book, add user and delete user. Guest can interact with only two
elements of the system software i.e. View books and search books.[ CITATION 17ht1 \l 1033 ]
7|Page
3.2 Activity Diagram
In the above diagram, there defines start point where the system would work as per guest so, it
has only three options to show i.e. login option, search books, and view books. If the user is
8|Page
guest, then he/she has the permission to either search books or view books. But if he has become
already the member of LMS then he can login but the password and username must match. The
user will be directed to their account (librarian/Admin). After login, the librarian has logged-in
he will have many actions that can be control by him such as Issue Book, Return Book, Add
Book, Search and Report. The librarian need to log-out to close the system. The Admin has also
some similar actions like the librarians such as Add Book, View Book, Search Book, Add User,
Issue Book, Return Book, and Delete User. Admin also need to log-out in-order to close the
system.
3.3 Protocols
The protocols used in this system is RMI. Java/RMI relies on a protocol called the Java Remote
Method Protocol (JRMP). Java relies heavily on Java Object Serialization, which allows objects
to be marshaled (or transmitted) as a stream. Since Java Object Serialization is specific to Java,
both the Java/RMI server object and the client object have to be written in Java. Each Java/RMI
Server object defines an interface, which can be used to access the server object outside of the
current Java Virtual Machine (JVM) and on another machine's JVM. The interface exposes a set
of methods, which are indicative of the services offered by the server object.
Library management system is build using file handling therefore no transaction management is
involved.
3.5 Execution
For my project “Patient record keeping and mobile alert system “I choose agile software
development methodology. Agile is suitable for small to medium sized developments. As the
9|Page
agile methodology allows to make changes after initial planning I have choose agile
methodology for my project.
The strength of agile methodology is High flexibility of the project. Short cycles and constant
iterations allow you to adapt your project frequently and tailor it to the customer’s needs at
10 | P a g e
any moment. You don’t have to waste your time and resources on delivering a full project
which will be rejected by the customer. This makes development process extremely flexible.
High customer satisfaction over development process. Since agile projects are closely
coordinated with the customer, he/she has a strong impact over the development project.
Software pieces are delivered constantly, in short cycles and customer’s feedback is always
taken into consideration. Agile can result in a more fit-for-purpose end product faster than may
be possible using traditional approaches. This is because of the heavy emphasis on
collaboration and communication, early release, review and feedback on products may result in
far less re-work than might otherwise be the case. It can also produce a far more controlled
process. [ CITATION htt181 \l 1033 ] [ CITATION htt182 \l 1033 ]
11 | P a g e
4 REPORT
Figure 2: Readability
12 | P a g e
Figure 3: Configuration code
4.2 Testing
I have choose black box testing for my software. Black box testing is a method for testing
software without having knowledge about actual code or internal structure of application. It
concentrates on functionality of system under test. As I have built a library management system
there are many section which needs to be tested. For the sections like login part verifying of
email, registration of users we need to test every part so there won’t be any errors in the system.
So, I have tested my system using Black box testing. Error guessing, decision table testing, cause
effect graphing, boundary value analysis are some of the testing methods for black box testing.
Error guessing is one of the method of black box testing. In every system there are fields which
contains many fields that need to be corrected. As the system is based on RMI the biggest
challenge is to test the IP address connection as well as in both client and server side. Black box
testing is done from a user’s point of view, it’s a look into real world use as opposed to the
developer’s idea of perfect user. It is impossible to test every input into a system so a specific
test access must be constructed and sometimes these cases can be difficult to design if the
13 | P a g e
function haven’t been properly satisfied. So, I have choose black box testing for my software
testing.[ CITATION www183 \l 1033 ]
14 | P a g e
At first you have to go to server page. There you can see the server IP. We have to copy the IP
and do setup. Then after setup we have to go to client page and copy server IP and connect. After
the connection it will show login page.
15 | P a g e
So, if you are new to the system, register first and put correct information [Link] only you
will be able to access to system.
16 | P a g e
Figure 9: Home page
Once you log into the system you can see this page. Manage user and generate report can be
accessed by admin only. And you can view borrower, manage books but can’t edit and delete
there if you are librarian.
17 | P a g e
Figure 10: Change password
If you want to change password you can change later here.
18 | P a g e
Figure 11: Manage book
So, here in the manage book, you can search for book in case of librarian. You can view the
books that are available here.
19 | P a g e
Figure 12: Manage user
Here in the manage user session, it can be accessed by admin only. He can add edit, update or
delete the users list.
20 | P a g e
Figure 13: Manage member
21 | P a g e
In the manage user you can manage users. You can put your name, address and contact. So you
are able to insert but can’t delete the users list. Deleting can be done by admin only.
22 | P a g e
Figure 14: Manage report
Manage report is done by admin.
23 | P a g e
4.4 Internet Communication Engine
Ice is a modern alternative to object middleware such as CORBA or COM/DCOM/COM+. It is
easy to learn, yet provides a powerful network infrastructure for demanding technical
applications. It features an object-oriented specification language, easy to use C++ and Java
mappings, a highly efficient protocol (including protocol compression), asynchronous method
invocation and dispatch, dynamic transport plug-ins, TCP/IP and UDP/IP support, SSL-based
security, a firewall solution, and much more.
24 | P a g e
4.5 Virtualization and cloud computing
Virtualization is a method in which if the devices fail or lost user data remains available from
another appliance. There are different methods of virtualization. Desktop virtualization,
Hardware virtualization, software virtualization, network virtualization, data virtualization,
random access memory virtualization, storage virtualization are some of the virtualization types
in cloud computing.
Full: It necessitates thorough server imitation that does not stipulate any modifications to
the software.
Emulation: Under this type, virtual machines imitate hardware and then become
independent. No modification of the operating system is required.
Para virtualization: This type does not involve asset simulation and software alteration,
but simulates and modifies interface functionality.
25 | P a g e
4.8 DATA VIRTUALIZATION
Virtual data is an efficacious tool for companies that require facilitated data handling. Virtualized
information exists as a database- and structure-independent layer, and to manipulate this
information, applications do not require source-related formatting, location and other technical
details. This information is left in place and can be accessed in a real-time manner, which
eliminates data extraction, conversion and loading procedure that often causes format failures
and data entry errors.
A cloud service is seldom comprised of a single virtual machine. Managing the complexity of a
banking app, for example, means more than simple virtualization. A cloud service, such as a
bank app, is usually front-ended by load balancers, clustered on web application servers, and
connected to a highly available database. Often, high transaction databases are kept on bare
metal native hardware for optimum performance.
Other aspects of cloud, that do not come “out-of-the-box” include: self-service, IT automation
and service orchestration.
The cloud model as defined by the US National Institute of Standards and Computing (NIST)
says that the five essential characteristics of cloud are:
26 | P a g e
On demand self-service
Resource pooling
Rapid elasticity
Measured service
27 | P a g e
4.10 DCOM and its Technologies
The explanation on DCOM and its technologies are described below:
4.11 CORBA
A CORBA application usually consists of an Object Request Broker (ORB), a client and a
server. An ORB is responsible for matching a requesting client to the server that will perform the
request, using an object reference to locate the target object. When the ORB examines the object
reference and discovers that the target object is remote, it marshals the arguments and routes the
invocation out over the network to the remote object's ORB. The remote ORB then invokes the
method locally and sends the results back to the client via the network. There are many optional
features that ORBs can implement besides merely sending and receiving remote method
invocations including looking up objects by name, maintaining persistent objects, and supporting
transaction processing. A primary feature of CORBA is its interoperability between various
platforms and programming languages.
The first step in creating a CORBA application is to define the interface for the remote object
using the OMG's interface definition language (IDL). Compiling the IDL file will yield two
forms of stub files; one that implements the client side of the application and another that
implements the server. Stubs and skeletons serve as proxies for clients and servers, respectively.
Because IDL defines interfaces so strictly, the stub on the client side has no interacting with the
skeleton on the server side, even if the two are compiled into different programming languages,
use different ORBs and run on different operating systems.
Then in order to invoke the remote object instance, the client first obtains its object reference via
the Orb. To make the remote invocation, the client uses the same code that it would use in a local
invocation but use an object reference to the remote object instead of an instance of a local
object. When the ORB examines the object reference and discovers that the target object is
remote, it marshals the arguments and routes the invocation out over the network to the remote
object's ORB instead of to another process within the on the same computer.
28 | P a g e
CORBA also supports dynamically discovering information about remote objects at runtime. The
IDL compiler generates type information for each method in an interface and stores it in the
Interface Repository (IR). A client can thus query the IR to get run-time information about a
particular interface and then use that information to create and invoke a method on the remote
CORBA server object dynamically through the Dynamic Invocation Interface (DII). Similarly,
on the server side, the Dynamic Skeleton Interface (DSI) allows a client to invoke an operation
of a remote CORBA Server object that has no compile time knowledge of the type of object it is
implementing.
4.12 DCOM/COM+
Distributed Component Object Model (DCOM)is the distributed version of Microsoft's COM
technology which allows the creation and use of binary objects/components from languages
other than the one they were originally written in, it currently supports Java(J++),C++, Visual
Basic, JScript, and VBScript. DCOM works over the network by using proxy's and stubs. When
the client instantiates a component whose registry entry suggests that it resides outside the
process space, DCOM creates a wrapper for the component and hands the client a pointer to the
wrapper. This wrapper, called a proxy, simply marshals methods calls and routes them across the
network. On the other end, DCOM creates another wrapper, called a stub, which unmarshals
methods calls and routes them to an instance of the component.
DCOM servers object can support multiple interfaces each representing a different behavior of
the object. A DCOM client calls into the exposed methods of a DCOM server by acquiring a
pointer to one of the server object's interfaces. The client object can the invoke the server object's
exposed methods through the acquired interface pointer as if the server object resided in the
client's address space. All DCOM components and interfaces must inherit from IUnknown, the
base DCOM interface. IUnknown consists of the methods AddRef(), Release() and
QueryInterface(). AddRef() and Release() are used to for reference counting and memory
management. Essentially, when an object's reference count becomes zero, it must self-destruct.
29 | P a g e
4.13 Java RMI
Remote Method Invocation (RMI) is a technology that allows the sharing of Java objects
between Java Virtual Machines (JVM) across a network. An RMI application consists of a server
that creates remote objects that conform to a specified interface, which are available for method
invocation to client applications that obtain a remote reference to the object. RMI treats a remote
object differently from a local object when the object is passed from one virtual machine to
another. Rather than making a copy of the implementation object in the receiving virtual
machine, RMI passes a remote stub for a remote object. The stub acts as the local representative,
or proxy, for the remote object and basically is, to the caller, the remote reference. The caller
invokes a method on the local stub, which is responsible for carrying out the method call on the
remote object. A stub for a remote object implements the same set of remote interfaces that the
remote object implements. This allows a stub to be cast to any of the interfaces that the remote
object implements. However, this also means that only those methods defined in a remote
interface are available to be called in the receiving virtual machine.
RMI provides the unique ability to dynamically load classes via their byte codes from one JVM
to the other even if the class is not defined on the receiver's JVM. This means that new object
types can be added to an application simply by upgrading the classes on the server with no other
work being done on the part of the receiver. This transparent loading of new classes via their
byte codes is a unique feature of RMI that greatly simplifies modifying and updating a program.
The first step in creating an RMI application is creating a remote interface. A remote interface is
a subclass of [Link], which indicates that it is a remote object whose methods can be
invoked across virtual machines. Any object that implements this interface becomes a remote
object. To show dynamic class loading at work, an interface describing an object that can be
serialized and passed from JVM to JVM shall also be created. The interface is a subclass of the
[Link] interface. RMI uses the object serialization mechanism to transport objects
by value between Java virtual machines. Implementing Serializable marks the class as being
capable of conversion into a self-describing byte stream that can be used to reconstruct an exact
copy of the serialized object when the object is read back from the stream. Any entity of any type
can be passed to or from a remote method as long as the entity is an instance of a type that is a
30 | P a g e
primitive data type, a remote object, or an object that implements the interface
[Link]. Remote objects are essentially passed by reference. A remote object
reference is a stub, which is a client-side proxy that implements the complete set of remote
interfaces that the remote object implements. Local objects are passed by copy, using object
serialization. By default all fields are copied, except those that are marked static or transient.
Default serialization behavior can be overridden on a class-by-class basis.
31 | P a g e
5 Conclusion
Library information system is one of the complex projects as it is done using RMI and socket
programming using oop concept. Library information system was built using java application as
well as socket programming. So, it is one of the complex yet vast programs I have ever done. It
was new to me as we had to build client and server side and send through TCP/IP. Distributed
computer systems is one the new subject for [Link] the hard work and dedication I am able to
finish it in time. I want to thanks all the persons who helped me as well as my faculty teacher
who helped me to finish my project in time. So, I am glad that I am able to complete my project
in time. Finally, I am able to complete my project using RMI technology.
32 | P a g e
6 References
Anon., 2018. [Link]. [Online]
Available at: [Link]
[Accessed 2018].
33 | P a g e
Workload matrix
34 | P a g e