the processing of that code from a service call, usually
via a REST API (Amazon, 2018). This model hides
all the complexity involved in the infrastructure.
However, making use of the FaaS model is not
trivial because it requires the user to know the form
of consumption that each provider offers. In addition,
it is necessary for the developer to build the applica-
tions with the use of this model in mind, or to invest
considerable time adjusting applications already de-
veloped to work with FaaS.
In view of the above, this work presents the
Node2FaaS framework, whose objective is to au-
tomatically and transparently convert applications
written in NodeJS to work with the FaaS service
model using some of these services offered by public
providers. In this article the framework will convert to
Amazon’s AWS Lambda (Amazon, 2018). The use of
the proposed framework abstracts the complexity re-
quired for code publication, for example, in Lambda
and simplifies the service consumption process. This
way, the developer can focus his work on the applica-
tion’s features and not on the provider’s details.
2 FUNCTION AS A SERVICE
Programming models have evolved over time, aim-
ing at optimizing the software, as well as its mainte-
nance, evolution capacity and alignment to the busi-
ness (Basili et al., 2010). Initially, software was de-
veloped in a monolithic way, that is, the entire ap-
plication was contained in a single software block.
This model caused high coupling between the com-
ponents of the application, reducing maintainability.
Nowadays, it is common for system architects to de-
sign their applications in a modular way, separating
the different complexity blocks and grouping sets of
related functionalities (Larrucea et al., 2018).
The microservice architecture has gained evidence
for providing good scalability as well as improv-
ing the software maintenance process (Zimmermann,
2017). In this context, cloud providers have modeled
a type of service appropriate to this approach, using
FaaS.
The term microservices has been used since 2014
in agile development communities (Zimmermann,
2017). The standards and principles that permeate
the concept of microservices include (Zimmermann,
2017):
• Using RestFul API;
• Business-oriented and native cloud-based devel-
opment;
• Application of multiple paradigms of develop-
ment, like functional and imperative;
• Applications running on container light services,
such as Docker;
• Decentralized continuous delivery;
• Use of DevOps culture (development integrated
with the operation).
Therefore, for the construction of software, through
the principles of microservices, it is necessary to seg-
ment the development of the functionalities of the ap-
plication (Lewis J, 2018). Figure 1 shows the compar-
ison of the microservice approach with the monolithic
approach.
Figure 1: Microservices composition (Lewis J, 2018).
While in the monolithic approach the whole ap-
plication is placed within a single process, in the mi-
croservice approach, each functionality is placed in
a different service. Thus, in the monolithic approach
the entire application needs to be scaled up, in the case
of microservices, only those services with higher de-
mand will be scaled (providing greater rationality in
the consumption of resources) (Lewis J, 2018).
Considering that normally the use of the modules
is not uniform, that is, each module has a different
workload, it is possible that the monolithic model is
wasting resources. Although some modules are not
always used, they need to be instantiated to enable
the most overloaded modules to be scaled up. On
the other hand, a different effect occurs in the mi-
croservice oriented model, in which only the most
used modules will be effectively scaled up(Lewis J,
2018).
In order to meet the demand for infrastructure
for applications based on microservices, some cloud
providers have come to offer the Function as a Ser-
vice model. In it the client contracts the execution
of a predefined function, loads the code that wants to
execute, and receives an access address for the ser-
vice. Applications using this type of cloud service
CLOSER 2019 - 9th International Conference on Cloud Computing and Services Science
272