Escolar Documentos
Profissional Documentos
Cultura Documentos
Qusay H. Mahmoud
AbstractWith the increased adoption of cloud computing in recent years due to its projected benefits as a
computing-as-a-utility paradigm, the industry has consequently seen a rise in software-as-a-service via Web services. Serving as a safe and valuable interface between the
providers data and outsider parties who have a potential
use for the data, services allow developers to enhance
the value of their applications by integrating with them.
Initially, standardization and research efforts were geared
largely towards enterprise use-cases of Web services. This
resulted in the global Web service vision becoming largely
privatized. But in recent years, the number and diversity
of Web APIs have increased tremendously and developers
have additionally become more open and decentralized.
This poses the interesting problem of aggregating the vast
number of distributed codebases and exposing them as
consumable services for the benefit of all. The existing
enterprise-oriented standards are unable to cater to such
a scenario. We respond to this by presenting an alternative
to the status quo of service registries. We specifically argue
for the feasibility of a RESTful framework for the design
and implementation of an open service registry that serves
a community of Web services that can be contributed to
or consumed by any developer on the Web.
I.
I NTRODUCTION
While standardization and research efforts have understandably been geared largely towards internal/external enterprise integration, a ripe but largely unexplored
area (to the best of our knowledge) is the rapidly
growing eco-system of decentralized and distributed
developers, such as the open source community. An
interesting research problem is how can such vastly
distributed codebases be aggregated and exposed as
easily consumable Web services. For some perspective,
the popular source code version-control service GitHub2
is single-handedly a home to more than 4 million
heterogeneous codebases [5] as of 2012.
We propose a framework for the implementation of
a globally unified registry where 1) any developer can
1 www.programmableweb.com
2 www.github.com
4)
5)
R ELATED W ORK
B. Service Registries
Collaboration efforts of enterprises such as Ariba,
IBM and Microsoft who were interested in B2B
(Business-to-Business) transactions in the late twentieth
century resulted in a standard known as the Universal
Description Discovery and Integration (UDDI) [2]. It
served the role of service discovery within the wellknown WS-* stack. It was created in order to address
the then popular idea of a Universal Business Registry
(UBR). As [2] further notes, the initial goal was to
support service directories all over the world such that
any party could freely publish service descriptions as
well as query such directories for interesting services.
UDDI was much criticized even in its early days due to
the small population of services in such directories [12].
But interestingly enough, [12] defended the criticism by
pointing out that web services were not intended for
public use, but within the restricted enterprise arena.
This has unfortunately turned out to be quite the case,
as recent literature seems to indicate [13], [14]. As the
latter citation observes, the UBR concept has seen more
success in the form of private company registries.
A. RESTful Architecture
Coined by the famous Dr. Fielding (to whom all
of us who enjoy a highly performant Web are eternally
indebted) in his Doctoral dissertation [6], the REpresentational State Transfer (REST) architectural style has
proven to be the cornerstone of the Webs success at
scale.
A summary of the main principles that most of the
literature agrees with is given by [7]:
1)
2)
3)
A. Web Service
The term Web Service has been defined at varying
levels of specificity throughout its time. Arguably the
most specific [2] definition is provided by Webopedia
[21] and is associated very tightly with the traditional
WS-* stack. A more generic one is provided as an
application whose operations can be accessed by other
applications over the Web [2]. We present our own definition of a service within the context of our framework:
A Web service (referred to in short as a service)
is defined as a modular piece of code which, like a
function, accepts certain input arguments, performs its
task based on the inputs, and accordingly produces the
output, if any. A service may call upon other services
to aid in performing its task.
C. Web Intents
Knowing that many diverse remote services are used
on a daily basis, it is quite ideal that web applications
would be able to seamlessly integrate with each other.
As documented above, this has proven to be quite a
challenge largely due to the difficulty of unifying/aggregating new services. In order to address this issue,
a framework for seamless client-side service discovery
and inter-application communication known as Web
Intents [18] was conceived. It is modelled after the
similarly-named system in the Android platform [19].
It can be seen that we have applied certain constraints to our definition of a service. Firstly, we detract
from the notion of a service as an entire self-contained
application consisting of various operations that form
a cohesive whole. Instead, we enforce a service to
focus on a single operation that it performs very well.
Such modularity encourages reuse and is a well-received
software engineering principle. One may observe that
focus on operations instead of applications hearkens
back to the low-level RPC-based middleware protocols.
However, RPC mechanisms are founded on distributed
shared state. This leads us to our next constraint, which
is the RESTful denunciation of maintaining application
state among queries. This is inspired by the functional
programming paradigm of avoiding state, mutable data
and side-effects. The latter is a little more nuanced and
will be touched on in sub-section D. Finally, the concept
of services invoking other services will be explained in
sub-section E.
B. Service as a Resource
In the Resource-Oriented Architecture paradigm, the
data that needs to be exposed via services is modelled
as the resource within the RESTful architecture. But
we face the interesting conundrum of the services themselves being the data that is being exposed to the public.
Thus, we refer to the Web services in our framework as
the resources. This model is key to enjoying the benefits
of REST. We discuss these specifics in the sub-sections
that follow.
C. Addressing Strategy
P ROPOSED F RAMEWORK
D. Cacheing
One of the best explanations for the inherent scalability of the RESTful architecture is its consequent
cacheing mechanism [7]. This has been applied successfully to the Web via the underlying HTTP protocol,
especially the Conditional GET feature [23] coupled
with the entity tag (ETag)5 . Cacheing is an extremely
important feature of our framework as it drastically
reduces the number of service invocations necessary.
G. Service Composition
1)
2)
/services/addnums?num1=2&num2=3
/services/addnums?num1=5&num2=6&num3=7
3 We
B. Platform
Our prototype is based on the NodeJS7 web platform on a Linux machine and consequently enjoys
its benefits. NodeJS employs a single-threaded eventdriven model for handling concurrent requests, as opposed to the more common multi-threaded approach.
Applications in NodeJS are built around handling events
that are emitted due to various triggers. These events
are handled via JavaScript callback functions which
are executed only when the event is actually triggered
and then caught. Until this takes place, the application
effectively sleeps. For example, a simple HTTP web
server can be designed to respond to incoming HTTP
requests from clients. When a client connects to the
server, an event is triggered and if it is designed to be
handled, the respective callback function is executed.
This simple design pattern actually exists throughout
the entire platform. In other words, almost every single
activity emits an event that can only be handled at a
later unspecified time by a callback function.
P ROTOTYPE I MPLEMENTATION
As another example, reading a file on disk conventionally is a sequential operation that blocks a running
process, rendering it idle until the operation is complete.
On NodeJS, when a function is called to read a file,
it begins this activity, assigns the callback function (if
provided) and then immediately returns to the context.
When the file has been read, an event is triggered and
the provided callback function is executed. Note that
these callback functions themselves might perform other
activities which emit events that need to be handled
by callback functions, and so on and so forth. This
7 http://nodejs.org/about/
asynchronous non-blocking model is excellent for I/Ointensive applications as time spent waiting can be
utilized elsewhere. An analysis of our framework reveals
that HTTP requests and responses form the bulk of
operations throughout. As such, the evented singlethreaded model of NodeJS is a perfect fit.
V.
U SAGE S CENARIOS
B. Mobile Code-Offloading
Our system may also be appealing to the mobile sector, where high power consumption, low computing resources and minimal improvements in battery efficiency
[27], [28] have given rise to interesting optimization
and micro-management problems. Mobile applications
that wish to take advantage of the functionality offered
by our participating services would simply invoke a
REST API that interfaces with the services by passing
input and receiving output. The processing of the data
is thus outsourced to these services that are external to
the mobile device, thereby preserving both battery and
computational resources. Note that this is in contrast
with attempts to partition code to execute both remotely
and locally. Instead, all computation would always be
performed remotely. While we see the clear advantage
of being able to focus all local resources on critical
tasks, some peers may disagree in preference of a
partitioning and optimization approach [29], [30].
VI.
[13]
[14]
[15]
Enabling
cross-language
interoperability.
Specifically, allowing developers to contribute
services written in any language of their
choice.
[16]
[17]
Creating strategies for addressing potential conflicts with source code licensing.
[18]
[19]
[20]
R EFERENCES
[1]
[2]
[3]
[4]
[5]
[6]
[7]
[8]
[9]
[10]
[11]
[12]
[21]
C. Ferris and J. Farrell, What are web services? Communications of the ACM, vol. 46, no. 6, p. 31, 2003.
G. Alonso, F. Casati, H. Kuno, and V. Machiraju, Web services:
concepts, architectures and applications. Springer, 2004.
A. Koschmider, E. Wilde, and C. Zirpins, 5th international
workshop on web apis and service mashups (mashups 2011):
introduction by the workshop chairs, in Proceedings of the
5th International Workshop on Web APIs and Service Mashups.
ACM, 2011, p. 1.
ProgrammableWeb - Mashups, APIs, and the Web as Platform, http://www.programmableweb.com/, retrieved on July
7th 2013.
briandoll, The Octoverse in 2012, https://www.github.com/
blog/1359-the-octoverse-in-2012, 2012, retrieved on May 30th
2013.
R. T. Fielding, Architectural styles and the design of networkbased software architectures, Ph.D. dissertation, University of
California, 2000.
C. Davis, What if the web were not restful? in Proceedings
of the Third International Workshop on RESTful Design, ser.
WS-REST 12. New York, NY, USA: ACM, 2012, pp. 310.
L. Richardson and S. Ruby, RESTful web services. OReilly,
2008.
E. Al-Masri and Q. H. Mahmoud, Wsce: A crawler engine for
large-scale discovery of web services, in Web Services, 2007.
ICWS 2007. IEEE International Conference on. IEEE, 2007,
pp. 11041111.
M. Maleshkova, C. Pedrinaci, and J. Domingue, Investigating
web apis on the world wide web, in Web Services (ECOWS),
2010 IEEE 8th European Conference on. IEEE, 2010, pp.
107114.
Y.-J. Lee and J.-H. Kim, Semantically enabled data mashups
using ontology learning method for web apis, in Computing,
Communications and Applications Conference (ComComAp),
2012. IEEE, 2012, pp. 304309.
B. Sleeper, The evolution of uddi, UDDI. org White Paper,
The Stencil Group, Inc, pp. 115, 2002.
[22]
[23]
[24]
[25]
[26]
[27]
[28]
[29]
[30]
[31]
M. Lanthaler and C. Gutl, Towards a restful service ecosystem, in Digital Ecosystems and Technologies (DEST), 2010
4th IEEE International Conference on. IEEE, April 2010, pp.
209214.
T. Pilioura and A. Tsalgatidou, Unified publication and discovery of semantic web services, ACM Trans. Web, vol. 3,
no. 3, pp. 11:111:44, Jul. 2009.
R. Verborgh, S. Coppens, T. Steiner, J. G. Valles,
D. Van Deursen, and R. Van de Walle, Functional descriptions
as the bridge between hypermedia apis and the semantic web,
in Proceedings of the Third International Workshop on RESTful
Design. ACM, 2012, pp. 3340.
K. Gomadam, A. Ranabahu, M. Nagarajan, A. P. Sheth, and
K. Verma, A faceted classification based approach to search
and rank web apis, in Web Services, 2008. ICWS08. IEEE
International Conference on. IEEE, 2008, pp. 177184.
Y.-J. Lee and J.-S. Kim, Automatic web api composition for
semantic data mashups, in Computational Intelligence and
Communication Networks (CICN), 2012 Fourth International
Conference on. IEEE, 2012, pp. 953957.
Web Intents, http://www.webintents.org/#introduction, retrieved on June 25th 2013.
P. Kinlan, PaulKinlan/WebIntents GitHub, https://github.
com/PaulKinlan/WebIntents#web-intents, 2012, retrieved on
June 25th 2013.
G. Billock, J. Hawkins, and P. Kinlan, Web Intents, http:
//www.w3.org/TR/web-intents/, 2013, retrieved on December
16th 2013.
Web Services, http://www.webopedia.com/TERM/W/Web
Services.html, retrieved on April 3rd 2014.
L. Bao, Q. Li, K. Zhen, W. Xiang, and P. Chen, A functional
flavor of service composition, in Fuzzy Systems and Knowledge Discovery (FSKD), 2011 Eighth International Conference
on, vol. 4, July 2011, pp. 23442348.
J. Kurose and K. Ross, Computer networking: a top-down
approach. Addison-Wesley, Pearson Education Inc., 2010.
R. M. Keller and M. R. Sleep, Applicative caching, ACM
Trans. Program. Lang. Syst., vol. 8, no. 1, pp. 88108, Jan.
1986.
Child process, http://nodejs.org/api/child process.html#
child process child process fork modulepath args options,
retrieved on April 4th 2014.
Eventual Consistency; Apache CouchDB 1.6 Ddocumentation, http://docs.couchdb.org/en/latest/intro/consistency.html,
retrieved on December 17th 2013.
E. Cuervo, A. Balasubramanian, D. Cho, A. Wolman, S. Saroiu,
R. Chandra, and P. Bahl, Maui: Making smartphones last
longer with code offload, in Proceedings of the 8th international conference on Mobile systems, applications, and
services, ser.
MobiSys 10. New York, NY, USA: ACM, 2010, pp. 4962.
N. Fernando, S. W. Loke, and W. Rahayu, Mobile cloud
computing: A survey, Future Generation Computer Systems,
vol. 29, no. 1, pp. 84106, 2012.
B.-G. Chun and P. Maniatis, Dynamically partitioning applications between weak devices and clouds, in Proceedings of the
1st ACM Workshop on Mobile Cloud Computing #38; Services:
Social Networks and Beyond, ser. MCS 10. New York, NY,
USA: ACM, 2010, pp. 7:17:5.
R. Kemp, N. Palmer, T. Kielmann, and H. Bal, Cuckoo: a
computation offloading framework for smartphones, Mobile
Computing, Applications, and Services, pp. 5979, 2012.
S. Parastatidis, J. Webber, G. Silveira, and I. S. Robinson,
The role of hypermedia in distributed system development,
in Proceedings of the First International Workshop on RESTful
Design, ser. WS-REST 10. New York, NY, USA: ACM, 2010,
pp. 1622.