Académique Documents
Professionnel Documents
Culture Documents
INDIVIDUAL ASSIGNMENT
TP NUMBER: TP032137
Table of Contents
Abstract ..................................................................................................................................... 4
Introduction .............................................................................................................................. 5
Problem Statement................................................................................................................... 5
1.1 Aim ............................................................................................................................................... 6
1.2 Objectives .................................................................................................................................... 6
2
CT024-3-3-DCOMS Individual Assignment (TP032137- Chin Jess Nny)
Reference ................................................................................................................................ 48
3
CT024-3-3-DCOMS Individual Assignment (TP032137- Chin Jess Nny)
Abstract
In this project, there are several distributed technologies will be discussed and adapted in the
JACON food delivery system. It also utilizes appropriate language and system facilities to
develop distributed and fault tolerant application. The project future development will also
discuss in the project in distributed system technology and standards. A complete program user
guide will be showed in the project to ensure fully understanding of the online food delivery
system.
4
CT024-3-3-DCOMS Individual Assignment (TP032137- Chin Jess Nny)
Introduction
JACON is one of the most famous online food delivery system in Malaysia. This food system
provides services to the customers by supplying foods in quicker and easier with cheapest rate.
JACON has numerous branches all over the Malaysia. The speciality of JACON covers
northern, southern and western styles of food. The system has both client and server side. The
function of the system is to allow the user to place order by using the food delivery system.
Besides, the system also allows the admin to make changes of the food menu and generate
order report.
Problem Statement
By using the system for JACON, it helps in serving food to customer at any time during
business hour. There might be a problem while the shop has insufficient seat for the customer
which might not satisfy for their services. By using online delivery system, it eliminates
misunderstanding and no frustrations when ordering. While dine in restaurant, there might be
chances the waiter has taking the wrong order due to the crowded environment. An online
menu is cheaper and easier to create and maintain, in the shop itself, there are a lot of printed
menu given to customer to order, therefore while a new food item is released the whole menu
needed to be changed but an online order menu is easier to manage the information. Online
delivery system is one of the best way to promote JACON as everyone is concern on using
mobile every day. For example, Mc Donalds and Domino pizza serve both walk in customer
and online customer which help in increase their sales.
5
CT024-3-3-DCOMS Individual Assignment (TP032137- Chin Jess Nny)
1.1 Aim
The aim of implement of this system is to analyze, design and implement on Food Delivery
System for JACON.
1.2 Objectives
In this assignment, there are several objectives can be found in this system. The purpose of set
objective is to ensure every functionality in the system can be achieved. Therefore, objectives
are listed below:
6
CT024-3-3-DCOMS Individual Assignment (TP032137- Chin Jess Nny)
7
CT024-3-3-DCOMS Individual Assignment (TP032137- Chin Jess Nny)
8
CT024-3-3-DCOMS Individual Assignment (TP032137- Chin Jess Nny)
9
CT024-3-3-DCOMS Individual Assignment (TP032137- Chin Jess Nny)
10
CT024-3-3-DCOMS Individual Assignment (TP032137- Chin Jess Nny)
11
CT024-3-3-DCOMS Individual Assignment (TP032137- Chin Jess Nny)
12
CT024-3-3-DCOMS Individual Assignment (TP032137- Chin Jess Nny)
13
CT024-3-3-DCOMS Individual Assignment (TP032137- Chin Jess Nny)
14
CT024-3-3-DCOMS Individual Assignment (TP032137- Chin Jess Nny)
The stub object on the client machine builds an information block and sends information to the
server and skeleton object required to pass the information from stub object to remote object.
For example, while user log in to the system a log in request will send to server to get
verification of the login details. After verified, the server will return the result to user and allow
the user to log in to the food delivery system. During the passing request from skeleton object
from stub object to remote object, it performs tasks which called the desired method on the real
object present on the server and it forwards the parameters that received from stub object to
the method (Geeksforgeek, 2017). The diagram below showed how RMI working.
(Geeksforgeek, 2017)
15
CT024-3-3-DCOMS Individual Assignment (TP032137- Chin Jess Nny)
import java.rmi.NotBoundException;
import java.rmi.RemoteException;
import java.rmi.registry.LocateRegistry;
import java.rmi.registry.Registry;
import com.interf.test.Constant;
import com.interf.test.TestRMI;
Registry registry =
LocateRegistry.getRegistry("localhost",Constant.RMI_PORT);
System.out.println(remote.isLoginValid("ok"));
System.out.println(remote.isLoginValid("test"));
16
CT024-3-3-DCOMS Individual Assignment (TP032137- Chin Jess Nny)
import java.io.IOException;
import java.rmi.AlreadyBoundException;
import java.rmi.RemoteException;
import java.rmi.registry.LocateRegistry;
import java.rmi.registry.Registry;
import com.interf.test.Constant;
Runtime.getRuntime().exec("rmiregistry 1099");
registry.bind(Constant.RMI_ID,impl);
17
CT024-3-3-DCOMS Individual Assignment (TP032137- Chin Jess Nny)
import java.rmi.*;
import java.rmi.server.UnicastRemoteObject;
import com.interf.test.TestRMI;
super();
@Override
if(username.equals("test")){
return true;
else{return false;}
18
CT024-3-3-DCOMS Individual Assignment (TP032137- Chin Jess Nny)
import java.rmi.*;
19
CT024-3-3-DCOMS Individual Assignment (TP032137- Chin Jess Nny)
3.2 Socket
Socket is one endpoint of two ways communication link between programs. Socket is a
programming abstraction which used to implement low level IPC. Socket is used to exchange
information to other process with a specific condition where both processes must have socket
to perform the transference of information. Socket is divided into two different type which is
client side socket and server side socket. Client side act as the end point of the conversation
which it performs send request and receive response. After the process has completed, the
socket will be destroyed and not activated unless the sending request process are created again
(Badgerati, 2009).
In order to setting up the socket in client side, TCPIP must be set for a socket to connect server
on the port and corresponding to the appropriate protocol. If the connection has been successful
connected with no error, the whole process of setting up in client side is completed and ready
to send request to a specific webpage though socket. In the system, one of the example is new
customer able to register by sending request to system and wait for response, when response is
being processed the socket will receive from system and display the registration page. After
completed, the socket will be discard. On the other side, server side socket will listen the
instruction from host to perform task given by the client side which only wait for command to
perform actions. The food delivery act as server side to wait any command from user to execute
specific process. Usually, the new socket works to exchange information with the client side.
After complete a process, the socket from server will simply goes back to listen for more
connections. To set up a server socket, TCPIP is required and bind the server socket to the host
address and a port. When setting has completed, the server socket will ready to listen
connection and set the maximum number that could be waiting. While the connection is
connected by the server side, two block of information can be gather and ready to process.
Lastly, when the process is finished, client connected socket must be shut down and close and
when the handler has completed and return to the parents (Badgerati, 2009).
20
CT024-3-3-DCOMS Individual Assignment (TP032137- Chin Jess Nny)
3.3 Serialization
Serialization is a process of converting the state form of information into binary or textual form
in order to transport over network. It able to transform a single or group of object into array of
bytes or stream of bits for storing and sending over the network whereas array of bytes and
stream of bits can transform back to the original state of information (docs.oracle.com, 2017).
The process will perform automatically when ObjectInputStream and ObjectOutputStream
classes is used in the system (stackoverflow, 2017). Therefore, the programmer able to decide
to choose implement in the function by implementing the serializable interface. The process of
serialization consists of marshalling and deflating of the object whereas the process of de-
serialization is inflating and un-marshalling. There are several benefits of using serialization
which is it is easy to use and it is customizable. Besides, the serialized stream can be encrypted,
authenticated and compressed, supporting the needs of secure Java computing. (Seshadri,
2012). By using serialization, it helps to improve secureness of the file to prevent information
leaked. Lastly, serialization can be used to exchange object between different programming
language such as C++ and java library with third part vendor library (Seshadri, 2012).
21
CT024-3-3-DCOMS Individual Assignment (TP032137- Chin Jess Nny)
Stream
Stream is one of the channel to allow every program to store data and ensure every program
read data from the channel. Every stream has the ability to write data with different method
and read from the source which is read method. When the channel is created, all methods need
to be called to execute the process (MrBool, 2017). The diagram below showed how the stream
work on a program.
(MrBool, 2017)
Object Persistence
Object Persistence is the ability to determine how the object are surviving when the application
runs. The collected object will be collected by the JVM garbage collection during runtime when
the object is no longer active. If the object did not collect and the API of persistence is used, it
allowed to access to the application for the following time during the running process. Another
benefit of implement persistence is able to store object in database which able to retrieve data
at any time.
22
CT024-3-3-DCOMS Individual Assignment (TP032137- Chin Jess Nny)
4.0 Testing
4.1 Register Testing
No. Test ID Test Description Expected Actual Result Status
Function Result
23
CT024-3-3-DCOMS Individual Assignment (TP032137- Chin Jess Nny)
24
CT024-3-3-DCOMS Individual Assignment (TP032137- Chin Jess Nny)
25
CT024-3-3-DCOMS Individual Assignment (TP032137- Chin Jess Nny)
26
CT024-3-3-DCOMS Individual Assignment (TP032137- Chin Jess Nny)
There are differences between both virtualization and cloud computing. Virtualization is
different with cloud computing as virtualization is software that manipulate hardware whereas
cloud computing refers to a service that result from manipulation (Angeles, 2014). Besides,
Virtualization can exist without the cloud, but cloud computing cannot exist without
virtualization. The cloud computing is defined as able to share computing resources and deliver
data as a service through internet. In this situation, cloud computing can be implement in the
food delivery system in order to allow user to check the available food menu. System admin
only required to select available food menu to the cloud and cloud are storing the data to display
out to the user. Cloud computing consist of several benefits to for users such as capital
expenditure free, able to work from anywhere without restriction and document control. While
cloud computing able to save cost of hardware, user can just pay and enjoy subscription based
27
CT024-3-3-DCOMS Individual Assignment (TP032137- Chin Jess Nny)
model without setup the computer hardware. Setting up a server could be a difficult task for
user if user did not have any knowledge about it. Therefore, using cloud computing admin able
to work anywhere with internet connection which convenience to work and able to store data.
Cloud computing helps in manage document and store it centrally to avoid document messed
up cause of conflict of file content and format. Besides, it helps to show the document more
visible and user able to work better in the industry environment.
28
CT024-3-3-DCOMS Individual Assignment (TP032137- Chin Jess Nny)
29
CT024-3-3-DCOMS Individual Assignment (TP032137- Chin Jess Nny)
30
CT024-3-3-DCOMS Individual Assignment (TP032137- Chin Jess Nny)
31
CT024-3-3-DCOMS Individual Assignment (TP032137- Chin Jess Nny)
32
CT024-3-3-DCOMS Individual Assignment (TP032137- Chin Jess Nny)
33
CT024-3-3-DCOMS Individual Assignment (TP032137- Chin Jess Nny)
34
CT024-3-3-DCOMS Individual Assignment (TP032137- Chin Jess Nny)
35
CT024-3-3-DCOMS Individual Assignment (TP032137- Chin Jess Nny)
36
CT024-3-3-DCOMS Individual Assignment (TP032137- Chin Jess Nny)
37
CT024-3-3-DCOMS Individual Assignment (TP032137- Chin Jess Nny)
38
CT024-3-3-DCOMS Individual Assignment (TP032137- Chin Jess Nny)
39
CT024-3-3-DCOMS Individual Assignment (TP032137- Chin Jess Nny)
40
CT024-3-3-DCOMS Individual Assignment (TP032137- Chin Jess Nny)
41
CT024-3-3-DCOMS Individual Assignment (TP032137- Chin Jess Nny)
42
CT024-3-3-DCOMS Individual Assignment (TP032137- Chin Jess Nny)
43
CT024-3-3-DCOMS Individual Assignment (TP032137- Chin Jess Nny)
Secure
Ice has good security and suitable to use over insecure public networks because it offers a
powerful and easy manipulation in security feature. It can work with existing firewalls which
a single port is enough to provide secure access for unlimited clients to unlimited servers. The
IceSSL plug in use the operating system to encrypt data and authenticate connection which is
an easy way to use as it just required few line of code to execute (Zeroc, 2017).
Flexible
ICE has a great flexibility as it supports both synchronous and asynchronous invocations.
While using Synchronous invocation, caller thread able to blocks until the RPS has completed
whereas asynchronous invocations allow caller to continue using the thread while RPC is
44
CT024-3-3-DCOMS Individual Assignment (TP032137- Chin Jess Nny)
undergoing process and waiting to be notify. ICE can support both synchronous and
asynchronous on the service side which server side able to read the request and locate it to
execute with synchronous dispatch whereas asynchronous dispatch need callback for
implementation and additional request. ICE is flexible to accommodate even though the most
demanding and mission- critical application (Zeroc, 2017).
There are several alternatives for ICE include Delphi, Java and Python. While Python mapping
is intuitive and client-side Slice-to-Python mapping will define how Slice data type will be
translated to Python type and how clients pass parameter and handle errors
45
CT024-3-3-DCOMS Individual Assignment (TP032137- Chin Jess Nny)
46
CT024-3-3-DCOMS Individual Assignment (TP032137- Chin Jess Nny)
11.0 Conclusion
After implement the Food delivery system, JACON able to provide online supplying food to
customer in a quicker and easier way with a cheapest rate. The implementation with efficiency
technologies, the system process will become more convenient and efficiency to use for the
user and admin which enhance the performance of the system.
Besides, there are several obstacles I met while researching on the technologies concept. The
technology concept was confusing therefore I need to spend more time on understanding the
knowledge of implemented technologies. There are several journal and ebooks helps me to
have better understanding on the theories and also understand how it applied into the food
delivery system.
47
CT024-3-3-DCOMS Individual Assignment (TP032137- Chin Jess Nny)
References
Angeles, S (2014). Virtualization vs. Cloud Computing: What's the Difference?.[online]
Business News Daily. Available at: http://www.businessnewsdaily.com/5791-virtualization-
vs-cloud-computing.html [Accessed 6 Feb. 2017].
Badgerati, (2009). Distributed Systems Socket Level Servers. [Online] Available at:
https://computersciencesource.wordpress.com/2009/09/10/year1-distributed- systems-socket-
level-servers/ [Accessed 3 Feb 2017].
Docs.oracle.com. (2017). Serializable Objects (The Java Tutorials > Java Naming and
Directory Interface > Java Objects in the Directory). [online] Available at:
https://docs.oracle.com/javase/tutorial/jndi/objects/serial.html [Accessed 5 Feb. 2017].
Rouse, M., (2017). Component Object Model (COM). [Online] Available at:
http://searchwindowsserver.techtarget.com/definition/Component-Object-Model-COM
Seshadri, G., (2012). What are the advantages and disadvantags of serialization?. [Online]
Available at: http://www.jguru.com/faq/view.jsp?EID=5068 [Accessed 2 Feb 2017].
48
CT024-3-3-DCOMS Individual Assignment (TP032137- Chin Jess Nny)
TechTarget, (2017). DCOM (Distributed Component Object Model). [Online] Available at:
http://whatis.techtarget.com/definition/DCOM-Distributed-Component-Object-Model
[Accessed 1 Feb 2017].
49