Figure 1: Microservice description framework.
guage (Hadley, 2006) proposes describing RESTful
APIS by defining a WADL, XML-based, file.
All these approaches provide means to describe
every kind of service and process the respective de-
scriptions to automate tasks such as execution or com-
position. They are abstract and flexible enough to al-
low describing every possible service. Whenever a
new service is deployed, a description has to be built
in order to make the service available for automatic
agents to process it. Usually, this implies describing
service’s inputs and outputs semantically, as well as
defining the precise operation the service performs,
which can be a time-consuming task that is sometimes
not carried out.
3 MICROSERVICES
Microservices framework attempts to simplify the
process of defining service descriptions to push auto-
matic service consumption in the semantic web. In
this framework, the description task attempts to be
improved by enabling reusability accross service de-
scriptions.
A microservice description is a list of terms. Each
term represents a feature that the service has. Exam-
ples of features can be “the service performs a re-
trieval operation”, “the service requires user authen-
tication”, “the service performs a storage operation”,
“the service has an image as input”, or “the service
outputs a set of resources”. By describing features
semantically, feature descriptions can be combined to
produce a semantic service description. This allows
reusing feature descriptions in services that are differ-
ent but have one or more features in common. This
feature-based approach is shown in figure 1, and has
four elements of interest:
• A microservice description, which consists of a
list of terms. Each term represents a feature that
the service has.
• An extended service description, which is defined
as a textual description and a set of preconditions
and postconditions that define the operation that
is performed by the service.
• A transformation function that transforms a mi-
croservice description into an extended service
description.
• A set of term definitions that define the semantics
of terms and thus describe service features.
An example of microservice description is
keyword-filtered multiple picture get,
which describes a search service of pictures that are
filtered by keywords. Four terms are used in order
to define the microservice: keyword-filtered,
multiple, picture, and get. Because of following
REST architectural style, at least a term that repre-
sents the underlying HTTP method used has to be
included in the description.
An extended service description is built by com-
bining the appropriate term definitions. Definitions
can be tied to more than one term. For example, there
can be a definition for get, a definition for picture,
but also a definition for altogether picture and get.
The need for definitions that involve sets of terms
can be easily noticed. Term picture should set a
postcondition (i.e. “outputting a picture”) when used
with term get, but should set a precondition (i.e. “a
picture has to be provided as parameter”) when used
with term post. This can be achieved by setting def-
initions for picture and get and for picture and
post.
In this case, the extended microservice description
for the previous example is built by combining the
definition for keyword-filtered, the definition for
multiple and get, the definition for picture and
get, and the definition for get by grouping their re-
spective preconditions, postconditions and textual de-
scriptions. This service’s extended description can be
seen in figure 2.
As a feature-based description framework, the mi-
croservice approach has several advantages over man-
ually defining a service description: (i) it allows the
reuse of feature descriptions among different services,
and (ii) it reduces the description task to selecting a
set of features that describes the considered service,
given a vocabulary of terms.
4 USE CASE: DESCRIBING
SEARCH SERVICES
An environment for the creation of microservices
through the definition of microservice proxies to other
MICROSERVICES - Lightweight Service Descriptions for REST Architectural Style
577