Chapter 4
Cloud deployment
The previous chapter dealt with the complete development of the NLP pipeline to be applied to provide a Question-Answering system to answer questions about urban infor- mation at a given address. However, all this development has been done locally, testing each implemented module’s scope and performance. Once the solution’s effectiveness has been tested separately, it is time to put all the modules together and upload them to the cloud to offer it to the end-user through the proposed communication channels.
This chapter will therefore address the deployment of the final solution. It will ex- plain the components needed to support the proposed solution for the information re- trieval/question answering system and the different web services required to provide extra functionalities to the user. It will also discuss the creation of the two proposed commu- nication channels for the user to interact with the system and the management platform created to configure and maintain the whole system.
and the service itself will take care of setting up the hardware necessary for it to work optimally. This offers a considerable advantage as it allows you to focus on the designed solution and forget the technical requirements.
To provide a clearer view of the complete architecture, the system has been divided into modules containing elements with similar functions to understand the full functionality of the Cibeles+ project more intuitively.
Therefore, figure 4.1 shows a graphical representation of all the components used to implement this project, classified into different modules depending on the functionality of each element.
Figure 4.1: Complete architecture for Cibeles Plus Project
These are all the main components used within the project. However, as can be seen in figure 4.1, the relationships between each module are shown in a poorly defined way since, in this section, we only want to show a global and general vision of the system as a whole, as well as a concrete definition of each component used. In the following sections, we will proceed to show more concrete interactions between the AWS services for each use case addressed and how these services have been implemented for their correct operation in this system.
4.1.1 Computation module
This module stands for those components that support the logic of the whole project.
They are mainly composed of servers or functions that host mostly all code of the system.
They perform the necessary actions for specific inputs and trigger the appropriate outputs depending on the context where the system is located. These components are mainly the following; AWS EC2 instances, dedicated servers with specific parameters and AWS lambda function, serverless functions that allow us to upload code without worrying about the hardware components of the server running these functions.
• Lambda: Lambdas functions [62] offered by AWS is a serverless computing service that allows code to be run in response to specific events occurring in the system and automatically handle other system resources. Unlike the EC2 service, this type of service does not require specific configurations on the hardware used. This system adapts to the computational needs required at any given time, allowing the user to focus only on the code to be developed. In this case, these functions support the main system logic, controlling the logic of the Alexa skill and the logic of the Dialogflow bot. In addition, this service is used to control the responses of the Deep Learning model implemented in this system.
• EC2: Also known as Elastic Compute Cloud [63], this service offers one of the broad- est compute platforms, with a massive set of choices to personalise your instances relying on your hardware requirements. This service provides excellent versatility, allowing the system to adapt to all use cases. This is possible thanks to many con- figuration options that this type of service offers, such as hard disk size, processor power or operating system, among other possibilities. However, it is precisely this point that makes it a more complicated service to use, as it requires a more profound knowledge of the use of cloud services and the characteristics of the project to be carried out. For the use case of this project, this system will be used to host the web page logic that the system administrators will use to update the dynamic databases with new data.
4.1.2 Interaction module
This module is composed of elements that will be used to create interactions with users.
The interaction that the user will perform with the system will be through two different channels. The main one is the voice, through the development of an Alexa skill that allows us to detect the user’s intentions and respond accordingly. The second channel is through text, through developing a bot using Dialogflow technology. This technology behaves similarly to Alexa but through interaction with the text. This interaction will be integrated with a Twitter account with which users can interact via direct message.
• Alexa: Alexa [64] is Amazon’s cloud-based voice service available on Amazon devices and third-party devices with built-in Alexa. This service offers the ability to create interactions with users through voice. It can capture the user’s intentions and create conversational flows to give the user a natural and fluid experience. For our use case, this service will interact with the user through voice and get the user’s intentions to act accordingly.
• Dialogfllow: Dialogflow [65] a natural language understanding (NLU) platform that makes it easy for you to design a conversational user interface and integrate it into mobile applications, web applications, devices, bots, interactive voice response systems and more. It provides the user with voice and text interaction and the same conversational flow control as the Alexa service. This service has been chosen to integrate the same conversational logic created in Alexa into a textual interaction platform, in our case, through direct twitter messages.
4.1.3 Storage module
This module contains all the elements used to store information in the system. Within this module, you can see storage elements of all types, from non-relational storage elements to non-structural storage elements. In addition, dynamic storage services have been included for search and retrieval tasks that will be used for the system’s primary function.
• OpenSearch: OpenSearch [66] is a distributed, open-source search and analytics suite used for a broad set of use cases like real-time application monitoring, log an- alytics, and website search. Opensearh provides a highly scalable system to provide fast access and response, even with large volumes of data. This service is based on ElasticSearch [67], the open-source distributed analytics engine studied in 3. How- ever, due to a licensing change by the group behind the ElasticSearch software, AWS had to build its search engine based on the latest freely available version of Elastic- Search. Because of this point, the new service offered by AWS is called OpenSearch.
In this use case, Opensearch will be used as a dynamic search engine that will manage the indexes of the processed documents to obtain those most similar to the request made by the user.
• S3: Amazon Simple Storage Service (S3) [68] is an object storage service that offers high scalability, availability, security and performance. This service stores all types of files of any size and origin. For this specific case, this service will be used to store the Deep Learning’s hyper-parameters of the Deep Learning model that will be used for the main functionality of the system.
• DynamoDB: Amazon DynamoDB [69] is a NoSQL database that supports key- value and document data models. This service can be used to store non-relational element tables with information related to the use of the developed system. It allows the service to scale up to millions of reading and write responses per second. For our specific use case, this service will be used to store persistent information for each Alexa Skill user.
4.1.4 Monitoring and access module
The monitoring and access module contains all those elements used for activity monitoring and registering and all identification and access control of multiple elements within this system. Among all elements that compose this module, it is relevant to mention a few of them:
• IAM: AWS identity and Acess Management (IAM) [70] is a service that allows managing access to the different services and resources offered by AWS. Thanks to this service, it is possible to configure different levels of access to the resources implemented in your system, thus increasing the overall system security. For the proposed project, this tool will grant the necessary access permissions to each of the services that make up the system, as well as block all unwanted access.
• API Gateway: API Gateway [71] allows the creation of an access point through the different protocols named to the implemented system. In our case, this service will connect the logic module with the conversational agent created by Google, Di- alogflow. This Google service will be used to connect to the Twitter API to respond to users using direct messages.
• CloudWatch: Amazon Cloudwatch [72] is Amazon’s service used for monitoring and tracking events within the Amazon services workflow. Thanks to this tool, it is possible to identify event peaks or problems that arise during the execution of a routine, helping to improve or fix the system at a specific point in the workflow. In this case, it will be used to monitor and follow all the conversations carried out by users and to detect possible failures in the conversation flow.
• Cognito: Cognito [73] an AWS service that provides authentication, authorisation and user management for websites or mobile apps. Users can log in using third-party systems such as Facebook, Gmail or Apple or by creating a new account with email and password. This service will be used to give access to the system administration website to administrators who will update the dynamic database’s content.
• Route53: Route 53 [74] is a scalable and highly available DNS (Domain Name System) service. It offers a way to redirect web traffic to the website of your choice.
In this case, this system will be used to assign a web domain to the server where the system maintenance system is hosted. In this way, administrators can access the system through a specific domain and using their credentials previously created by the Amazon Cognito service.
4.1.5 Email module
This module sends messages through a specific channel to multiple receivers, whether they are users or system managers. In this case, this module is used for the system to send more information through email if one user requires it. For this purpose, the following services are used:
• SES: Amazon Simple email service (SES) [75] allows you to quickly support a variety of email use cases, including transactional, marketplace or bulk email communica- tions. In our case, it will be used to send further information via the email specified by the user.
Later on, we will delve into the specific use of each of these services; we will explain how each of them works concretely, how they have been used for the particular use case of this project and how they interact with the rest of the system.