Conversing in the Cloud Ryan Kupfer, Scott Wetter, Bryan Welfel, Shekhar Pradhan
Jan 16, 2016
Conversing in the Cloud
Ryan Kupfer, Scott Wetter, Bryan Welfel, Shekhar Pradhan
Outline
MixPool defined The hurdles A prime example of an application
utilizing cloud technology The technologies The architecture of the app and its
deployment on Amazon Web Services
MixPool Defined
The MixPool app consists of two main components: Connect and Decide.
Groups of “friends” are formed in the Connect component.
Groups of “friends” can decide what to do and where to go in the Decide component.
Application Hurdles
Supporting asynchronous chatAWS instances are optimized for their
specific tasksProcessing applications (bots) exist in the
cloud
User count fluctuatesScale up and scale down quickly
System Architecture
Technologies
Amazon Web Services, the “Powered by Amazon Web Services” logo, [and name any other AWS Marks used in such materials] are trademarks of Amazon.com, Inc. or its affiliates in the United States and/or other countries.
Lightweight, high-performance web server and reverse proxy server
Load balancing Serves static content:
ImagesVideoCSSJavascriptFlash (swf)
Most common web server Very stable Great for serving dynamic content Used for CakePHP application
CakePHP
CakePHP is an open source web application framework for producing web applications. It is written in PHP, modeled after the concepts of Ruby on Rails.
MySQL
Open source Great community Good performance Scalable if necessary
ReplicationClustering
Bots
Connect to chat servers and process conversations
We chose Java for our bot developmentOne of the most popular OOP languagesEasy to find programmersMany libraries available to complete our
tasks quickly
NLP Suggestion Bot Chat room messages are analyzed in real time
to identify the needs of users (e.g., “casual place”) and occurrences of restaurant names, cuisines and dishes.
Sentiments expressed in the message regarding these are identified.
Based on these sentiments and user needs, scores are assigned to restaurants, cuisines, and dishes.
A restaurant is suggested based on this score and other data stored in our database.
History Bot Chat rooms are asynchronous
Thus, users may join at different times.A user that joins later needs to be provided
earlier chat messages and related restaurant suggestions.
Chat rooms can be intermittently active/inactiveAn inactive room can become activated.Earlier chat room messages and related
restaurant messages need to be provided to all room users.
InstanceMonitor
• Starts with each bot EC2 instance• Allows us to control the individual bot
applications remotely– XML-RPC API• Statistics that BRICS uses to figure out the best-
fit instance– CPU load– Memory used– Open socket connections
BRICS (Bot Request and Instance Creation System) Central hub for bot requests Load balancing bots between the
instances Requests received from the IRC servers
whenever a room is created and joined Request is processed and given to the
best-fit instance InstanceMonitor on the best-fit instance
handles the task
IRC
Internet Relay Chat Created in 1988 Very simple, well established TCP/IP
based asynchronous chat system Used for our real-time chat system Flash is used on our website to connect
to the IRC servers and interact with the web application
Amazon Web Services (AWS)
• Pay as you go cloud computing– Simple pricing (hours used, data transferred)
• Use existing infrastructure to rapidly build complicated systems– Run almost anything (you choose the OS,
programming language, etc.)• Scalable
– Add compute capacity and storage immediately• Good for planning
– Ability to test different infrastructure configurations to find optimal setup
Amazon Elastic Compute Cloud (EC2)• Web service that provides resizable
compute capacity in the cloud• Select either a pre-configured instance
template or create one• Configure security/network access• Choose hardware configuration:
– Standard Instances– High-Memory Instances– High-CPU Instances
EC2 Pros
• Start and stop server instances within minutes• Pay only for the time you have your instance up
and for data transfer to and from your instance. • Acts just like a regular remote server
– Connect to it and start using it immediately – Full root access
• Convenient and easy to use web UI for managing instances
• Firewall settings for groups of instances
EC2 Cons Few locations to choose from No control over the specific hardware in use Instance crash/termination: all the data
stored on it is gone
Amazon Relational Database Service (RDS) Simple to deploy Handles database management tasks Easy to port an existing MySql database Scalable, reliable, secure Designed to integrate with other AWS
System Architecture
System Architecture
System Architecture
System Architecture
Questions?