URI web standards, introduced the REST
architecture style in his PhD dissertation (Fielding,
2000). The aim of his thesis was to realise the
architectural aspects that made the Web successful
as a scalable network-based hypermedia system. The
constraints are: a client-server architecture,
statelessness, cache, uniform interface, layered, and
code on demand. These provide scalability,
portability, simple replication of servers, reliability,
efficiency, visibility, decoupling, and reusability.
Developers welcomed REST because it provided a
uniform interface without imposing additional
layers. Many service providers like Google, Yahoo
and Amazon started offering RESTful Web
Services; however this rapid uptake came with the
cost of not adhering to REST. The so-called
RESTful Web Services violate two of REST’s
constraints: the uniform interface and statelessness.
The need for a guide on how to design RESTful
Web Services was met by Richardson and Ruby
(2007), who focus on Resource-Oriented
Architecture (ROA). The main idea in ROA is for
the server to identify the resources and provide a
uniform interface for them, through which a client
can create, read, update and delete the resources.
These actions are mapped respectively to the HTTP
methods, POST, GET, PUT and DELETE. Fielding
criticised ROA for not focusing on the hypermedia
constraint. This entails using media types to specify
not only the resources, but also the controls that
indicate which actions can be performed. An
example in HTML, the <form>, indicates GET or
POST. The difficulty in discussing RESTful Web
Service solutions lies in the fact that existing Web
Service existing Web Service representations focus
on services or messages. In our work we have
sought to develop a resource-oriented modelling
approach using UML Collaboration Diagrams.
3.2 The UML Collaboration Diagrams
for RO Modelling
The UML collaboration diagram is one of the UML
interaction diagrams (Booch et al., 2005) and it
shows the interaction between objects and their
structural organisation. It can model static and
dynamic aspects of the system. When building ROA
and RESTful Web Service, we are creating an
interface not a complete system; therefore our
modelling approach focuses on the interface. The
interface is formed by the resources that the server
exposes to the client. In our modelling approach
resources take the place of objects in collaboration
diagrams. According to ROA, these resources have
a uniform interface: they can be created, read,
updated or deleted.
Sending a POST request to a factory resource, or
a class in UML terms, creates a resource. Figure 2
describes a Web Service for ordering pizzas. The
client reads the menu, and then submits its order.
Figure 1: RO Diagram.
r, c and i on the messages respectively correspond to
read, create and instantiate. The links labelled
Contains are structural links showing how
resources relate to each other.
4 RO MODELLING OF
PROBLEM DOMAINS’
SCENARIOS
We have chosen five scenarios each from a key
problem domain. These domains are: Web mashups,
Enterprise Services, Business to Business (B2B),
Cloud Computing and Grid Computing. In each
domain we present a scenario, and its RO modelling.
Our intention is to provide evidence our technique
works across a range of important domains, and then
in Section 5 show how it facilitates their analysis.
4.1 Yahoo Pipes (Mashups)
Mashups combine APIs and data sources to form
new applications and new data sources. This
scenario is creating a mashup using Yahoo Pipes, an
interactive web application that enables the creation
and execution of mashups. A user can add widgets,
such as data sources, and filters to merge the data.
A user has built a stock quote mashup using
Yahoo Pipes(Donnelly, 2010), it displays last quotes
and chart for stocks. He uses the widgets to retrieve
original stock data from a .csv file at Yahoo Finance
downloads. Then he uses a widget to filter the stock
file for stock quotes. To loop through the obtained
data he uses a widget to display the results as a
chart.
ICE-B 2011 - International Conference on e-Business
114