SlideShare una empresa de Scribd logo
1 de 21
Telephony Applications
                          with
                    MongoDB,
                    OpenShift,
                     & Twilio

Mark Atwood
Developer Evangelist for Red Hat
OpenShift
me@mark.atwood.name
Twitter @fallenpegasus
What is OpenShift?
   Red Hat cloud Platform as a Service
   Free as in beer, Free as in speech
   Languages: Python, Java, Ruby, Node, PHP, & DIY
   Storage: Filesystem, MySQL, Postgres, MongoDB
   No lock-in, no proprietary APIs


   Sign up at http://openshift.redhat.com
   Promo code SEATTLE



    2
What is Twilio?

   A cloudy API for telephony
   REST interface to the PSTN: Voice & SMS
   Pay by the drink




    3
How Twilio voice works

   Someone calls the number
   Twilio answers the phone
   Twilio does HTTP REST to our app
   Our app replies with some "TwiML"
   Twilio does what the app told it to
   Twilio or the caller hangs up the phone




    4
How Twilio SMS works

   Someone texts to the number
   Twilio receives the text & all metadata
   Twilio does HTTP REST to our app
   Our app replies with some "TwiML"
   Twilio does what the app told it to




    5
What is MongoDB?

   If you have to ask that, you shouldn't be here!
   Easy to use JSONic Document Store




    6
What is Python & What is Bottle?

   My favorite programming language
   My favorite web framework
   Supported by OpenShift
   Drivers for MongoDB & for Twilio




    7
A simple app: SMS Group

   SMS group chat


   http://github.com/fallenpegasus/openshift-smsgroup


   +1-XXX-XXX-XXXX


   SMS .join to join
   SMS .leave to leave



    8
Glue it all together

   Get an OpenShift account
   Get a Twilio account
   Spin up "smsgroup" app in OpenShift
   Attach it to your Twilio account
   Play!




    9
Agenda for Demonstration

   Look at the app at twilio.com
   Look at the app at openshift.com
   SSH into the app
   Port forward from local to remote MongoDB
   Run local MongoDB clients




    10
11
Some useful software design guidelines

   Let the language, the libraries, & remote services do the
    boring work
   Don't keep state in the app, use a data layer
   Use queuing to smooth load




    12
Don't keep state in the app

   Keep it in the data layer instead
   OpenShift might restart or scale the instance at any time
   Don't waste time keeping complex data in the instance
   Don't try to write your own database server




    13
Don't keep state in the app

   Keep it in the data layer instead
   OpenShift might restart or scale the instance at any time
   Don't waste time keeping complex data in the instance
   Don't try to write your own database server


   MongoDB is an excellent solution




    14
Use queuing to smooth the load

   Don't depend on "their" capacity
   Getting local storage quickly is easier than provisioning
    more CPU, IO ops, or network bandwidth




    15
Use queuing to smooth the load

   Don't depend on "their" capacity
   Getting local storage quickly is easier than provisioning
    more CPU, IO ops, or network bandwidth


   And it's cheaper




    16
Some Queue options

   roll your own
   SQS
   AQMP
   RabbitMQ
   etc




    17
Queue options

   roll your own
   SQS
   AQMP
   RabbitMQ
   etc


   MongoDB "find_and_modify"




    18
def worker:
 while True:
  time.sleep(1)
  while True:
    msg = mongo_db.sendq.find_and_modify(remove = True)
    if (msg == None): break
    message = twilio_client.sms.message.create(
            to = msg['To'],
            from_ = twilio_fromnum,
            body = msg['Body'])




  19
Conclusion

   Telephony apps are easy and fun
   You can build your own
   Using OpenShift, Twilio, and MongoDB




    20
Questions?




       21

Más contenido relacionado

La actualidad más candente

OpenShift – the open-source PaaS by Marek Jelen
OpenShift – the open-source PaaS by Marek JelenOpenShift – the open-source PaaS by Marek Jelen
OpenShift – the open-source PaaS by Marek JelenCodemotion
 
DockerDay2015: Docker Security
DockerDay2015: Docker SecurityDockerDay2015: Docker Security
DockerDay2015: Docker SecurityDocker-Hanoi
 
DockerDay2015: Keynote
DockerDay2015: KeynoteDockerDay2015: Keynote
DockerDay2015: KeynoteDocker-Hanoi
 
Nginx conference 2015
Nginx conference 2015Nginx conference 2015
Nginx conference 2015ING-IT
 
OpenShift Anywhere given at Infrastructure.Next Talk at #Scale12X
OpenShift Anywhere given at Infrastructure.Next Talk at #Scale12XOpenShift Anywhere given at Infrastructure.Next Talk at #Scale12X
OpenShift Anywhere given at Infrastructure.Next Talk at #Scale12XOpenShift Origin
 
Docker @ RelateIQ Presentation
Docker @ RelateIQ PresentationDocker @ RelateIQ Presentation
Docker @ RelateIQ PresentationJohn Fiedler
 
Docker at Spotify - Dockercon14
Docker at Spotify - Dockercon14Docker at Spotify - Dockercon14
Docker at Spotify - Dockercon14dotCloud
 
Shipping NodeJS with Docker and CoreOS
Shipping NodeJS with Docker and CoreOSShipping NodeJS with Docker and CoreOS
Shipping NodeJS with Docker and CoreOSRoss Kukulinski
 
OpenWhisk and IBM cloud functions
OpenWhisk and IBM cloud functionsOpenWhisk and IBM cloud functions
OpenWhisk and IBM cloud functionsMoby Project
 
Immutable infrastructure with Docker and EC2
Immutable infrastructure with Docker and EC2Immutable infrastructure with Docker and EC2
Immutable infrastructure with Docker and EC2dotCloud
 
DockerDay2015: Docker orchestration for sysadmin
DockerDay2015: Docker orchestration for sysadminDockerDay2015: Docker orchestration for sysadmin
DockerDay2015: Docker orchestration for sysadminDocker-Hanoi
 
Your Java Journey into the Serverless World
Your Java Journey into the Serverless WorldYour Java Journey into the Serverless World
Your Java Journey into the Serverless WorldKamesh Sampath
 
Docker for PHP Developers (NomadPHP)
Docker for PHP Developers (NomadPHP)Docker for PHP Developers (NomadPHP)
Docker for PHP Developers (NomadPHP)Chris Tankersley
 
5 Popular Choices for NoSQL on a Microsoft Platform - All Things Open - Octob...
5 Popular Choices for NoSQL on a Microsoft Platform - All Things Open - Octob...5 Popular Choices for NoSQL on a Microsoft Platform - All Things Open - Octob...
5 Popular Choices for NoSQL on a Microsoft Platform - All Things Open - Octob...Matthew Groves
 
Architecting a Cloud Native Internet Archive
Architecting a Cloud Native Internet ArchiveArchitecting a Cloud Native Internet Archive
Architecting a Cloud Native Internet ArchiveRoss Kukulinski
 
Introduction to Containers and Docker for PHP developers
Introduction to Containers and Docker for PHP developersIntroduction to Containers and Docker for PHP developers
Introduction to Containers and Docker for PHP developersRobert McFrazier
 
DockerCon Keynote Ben Golub
DockerCon Keynote Ben GolubDockerCon Keynote Ben Golub
DockerCon Keynote Ben GolubdotCloud
 
Docker worshop @Twitter - How to use your own private registry
Docker worshop @Twitter - How to use your own private registryDocker worshop @Twitter - How to use your own private registry
Docker worshop @Twitter - How to use your own private registrydotCloud
 
Monitoring Docker Environments with Outlyer
Monitoring Docker Environments with OutlyerMonitoring Docker Environments with Outlyer
Monitoring Docker Environments with OutlyerTodd Radel
 

La actualidad más candente (20)

OpenShift – the open-source PaaS by Marek Jelen
OpenShift – the open-source PaaS by Marek JelenOpenShift – the open-source PaaS by Marek Jelen
OpenShift – the open-source PaaS by Marek Jelen
 
DockerDay2015: Docker Security
DockerDay2015: Docker SecurityDockerDay2015: Docker Security
DockerDay2015: Docker Security
 
DockerDay2015: Keynote
DockerDay2015: KeynoteDockerDay2015: Keynote
DockerDay2015: Keynote
 
Nginx conference 2015
Nginx conference 2015Nginx conference 2015
Nginx conference 2015
 
OpenShift Anywhere given at Infrastructure.Next Talk at #Scale12X
OpenShift Anywhere given at Infrastructure.Next Talk at #Scale12XOpenShift Anywhere given at Infrastructure.Next Talk at #Scale12X
OpenShift Anywhere given at Infrastructure.Next Talk at #Scale12X
 
Docker @ RelateIQ Presentation
Docker @ RelateIQ PresentationDocker @ RelateIQ Presentation
Docker @ RelateIQ Presentation
 
Docker at Spotify - Dockercon14
Docker at Spotify - Dockercon14Docker at Spotify - Dockercon14
Docker at Spotify - Dockercon14
 
Shipping NodeJS with Docker and CoreOS
Shipping NodeJS with Docker and CoreOSShipping NodeJS with Docker and CoreOS
Shipping NodeJS with Docker and CoreOS
 
OpenWhisk and IBM cloud functions
OpenWhisk and IBM cloud functionsOpenWhisk and IBM cloud functions
OpenWhisk and IBM cloud functions
 
Immutable infrastructure with Docker and EC2
Immutable infrastructure with Docker and EC2Immutable infrastructure with Docker and EC2
Immutable infrastructure with Docker and EC2
 
DockerDay2015: Docker orchestration for sysadmin
DockerDay2015: Docker orchestration for sysadminDockerDay2015: Docker orchestration for sysadmin
DockerDay2015: Docker orchestration for sysadmin
 
Your Java Journey into the Serverless World
Your Java Journey into the Serverless WorldYour Java Journey into the Serverless World
Your Java Journey into the Serverless World
 
Docker for PHP Developers (NomadPHP)
Docker for PHP Developers (NomadPHP)Docker for PHP Developers (NomadPHP)
Docker for PHP Developers (NomadPHP)
 
5 Popular Choices for NoSQL on a Microsoft Platform - All Things Open - Octob...
5 Popular Choices for NoSQL on a Microsoft Platform - All Things Open - Octob...5 Popular Choices for NoSQL on a Microsoft Platform - All Things Open - Octob...
5 Popular Choices for NoSQL on a Microsoft Platform - All Things Open - Octob...
 
Architecting a Cloud Native Internet Archive
Architecting a Cloud Native Internet ArchiveArchitecting a Cloud Native Internet Archive
Architecting a Cloud Native Internet Archive
 
Introduction to Containers and Docker for PHP developers
Introduction to Containers and Docker for PHP developersIntroduction to Containers and Docker for PHP developers
Introduction to Containers and Docker for PHP developers
 
DockerCon Keynote Ben Golub
DockerCon Keynote Ben GolubDockerCon Keynote Ben Golub
DockerCon Keynote Ben Golub
 
Docker for Developers
Docker for DevelopersDocker for Developers
Docker for Developers
 
Docker worshop @Twitter - How to use your own private registry
Docker worshop @Twitter - How to use your own private registryDocker worshop @Twitter - How to use your own private registry
Docker worshop @Twitter - How to use your own private registry
 
Monitoring Docker Environments with Outlyer
Monitoring Docker Environments with OutlyerMonitoring Docker Environments with Outlyer
Monitoring Docker Environments with Outlyer
 

Destacado

A SOA approximation on symfony
A SOA approximation on symfonyA SOA approximation on symfony
A SOA approximation on symfonyJoseluis Laso
 
Theres a rabbit on my symfony
Theres a rabbit on my symfonyTheres a rabbit on my symfony
Theres a rabbit on my symfonyAlvaro Videla
 
PHP is the King, nodejs the prince and python the fool
PHP is the King, nodejs the prince and python the foolPHP is the King, nodejs the prince and python the fool
PHP is the King, nodejs the prince and python the foolAlessandro Cinelli (cirpo)
 
Asynchronous processing with PHP and Symfony2. Do it simple
Asynchronous processing with PHP and Symfony2. Do it simpleAsynchronous processing with PHP and Symfony2. Do it simple
Asynchronous processing with PHP and Symfony2. Do it simpleKirill Chebunin
 
Scaling applications with RabbitMQ at SunshinePHP
Scaling applications with RabbitMQ   at SunshinePHPScaling applications with RabbitMQ   at SunshinePHP
Scaling applications with RabbitMQ at SunshinePHPAlvaro Videla
 
Service Oriented Architecture for Distributed Identity Management System
Service Oriented Architecture for Distributed Identity Management SystemService Oriented Architecture for Distributed Identity Management System
Service Oriented Architecture for Distributed Identity Management Systemadameq
 
Scaling Symfony2 apps with RabbitMQ - Symfony UK Meetup
Scaling Symfony2 apps with RabbitMQ - Symfony UK MeetupScaling Symfony2 apps with RabbitMQ - Symfony UK Meetup
Scaling Symfony2 apps with RabbitMQ - Symfony UK MeetupKacper Gunia
 
Interoperability With RabbitMq
Interoperability With RabbitMqInteroperability With RabbitMq
Interoperability With RabbitMqAlvaro Videla
 
Scalable Event Analytics with MongoDB & Ruby on Rails
Scalable Event Analytics with MongoDB & Ruby on RailsScalable Event Analytics with MongoDB & Ruby on Rails
Scalable Event Analytics with MongoDB & Ruby on RailsJared Rosoff
 
Tips and Tricks for your Service Oriented Architecture @ CakeFest 2013 in San...
Tips and Tricks for your Service Oriented Architecture @ CakeFest 2013 in San...Tips and Tricks for your Service Oriented Architecture @ CakeFest 2013 in San...
Tips and Tricks for your Service Oriented Architecture @ CakeFest 2013 in San...Alessandro Nadalin
 
Services Oriented Architecture with PHP and MySQL
Services Oriented Architecture with PHP and MySQLServices Oriented Architecture with PHP and MySQL
Services Oriented Architecture with PHP and MySQLJoe Stump
 
Enterprise PHP Architecture through Design Patterns and Modularization (Midwe...
Enterprise PHP Architecture through Design Patterns and Modularization (Midwe...Enterprise PHP Architecture through Design Patterns and Modularization (Midwe...
Enterprise PHP Architecture through Design Patterns and Modularization (Midwe...Aaron Saray
 
Speed up your Symfony2 application and build awesome features with Redis
Speed up your Symfony2 application and build awesome features with RedisSpeed up your Symfony2 application and build awesome features with Redis
Speed up your Symfony2 application and build awesome features with RedisRicard Clau
 
KSDG BaaS Intro
KSDG BaaS IntroKSDG BaaS Intro
KSDG BaaS Introericpi Bi
 
SOA with PHP and Symfony
SOA with PHP and SymfonySOA with PHP and Symfony
SOA with PHP and SymfonyMichalSchroeder
 
Thrift vs Protocol Buffers vs Avro - Biased Comparison
Thrift vs Protocol Buffers vs Avro - Biased ComparisonThrift vs Protocol Buffers vs Avro - Biased Comparison
Thrift vs Protocol Buffers vs Avro - Biased ComparisonIgor Anishchenko
 
Clean architecture with ddd layering in php
Clean architecture with ddd layering in phpClean architecture with ddd layering in php
Clean architecture with ddd layering in phpLeonardo Proietti
 
Enterprise PHP (PHP London Conference 2008)
Enterprise PHP (PHP London Conference 2008)Enterprise PHP (PHP London Conference 2008)
Enterprise PHP (PHP London Conference 2008)Ivo Jansch
 

Destacado (20)

A SOA approximation on symfony
A SOA approximation on symfonyA SOA approximation on symfony
A SOA approximation on symfony
 
Working with Asynchronous Events
Working with Asynchronous EventsWorking with Asynchronous Events
Working with Asynchronous Events
 
Theres a rabbit on my symfony
Theres a rabbit on my symfonyTheres a rabbit on my symfony
Theres a rabbit on my symfony
 
Juc boston2014.pptx
Juc boston2014.pptxJuc boston2014.pptx
Juc boston2014.pptx
 
PHP is the King, nodejs the prince and python the fool
PHP is the King, nodejs the prince and python the foolPHP is the King, nodejs the prince and python the fool
PHP is the King, nodejs the prince and python the fool
 
Asynchronous processing with PHP and Symfony2. Do it simple
Asynchronous processing with PHP and Symfony2. Do it simpleAsynchronous processing with PHP and Symfony2. Do it simple
Asynchronous processing with PHP and Symfony2. Do it simple
 
Scaling applications with RabbitMQ at SunshinePHP
Scaling applications with RabbitMQ   at SunshinePHPScaling applications with RabbitMQ   at SunshinePHP
Scaling applications with RabbitMQ at SunshinePHP
 
Service Oriented Architecture for Distributed Identity Management System
Service Oriented Architecture for Distributed Identity Management SystemService Oriented Architecture for Distributed Identity Management System
Service Oriented Architecture for Distributed Identity Management System
 
Scaling Symfony2 apps with RabbitMQ - Symfony UK Meetup
Scaling Symfony2 apps with RabbitMQ - Symfony UK MeetupScaling Symfony2 apps with RabbitMQ - Symfony UK Meetup
Scaling Symfony2 apps with RabbitMQ - Symfony UK Meetup
 
Interoperability With RabbitMq
Interoperability With RabbitMqInteroperability With RabbitMq
Interoperability With RabbitMq
 
Scalable Event Analytics with MongoDB & Ruby on Rails
Scalable Event Analytics with MongoDB & Ruby on RailsScalable Event Analytics with MongoDB & Ruby on Rails
Scalable Event Analytics with MongoDB & Ruby on Rails
 
Tips and Tricks for your Service Oriented Architecture @ CakeFest 2013 in San...
Tips and Tricks for your Service Oriented Architecture @ CakeFest 2013 in San...Tips and Tricks for your Service Oriented Architecture @ CakeFest 2013 in San...
Tips and Tricks for your Service Oriented Architecture @ CakeFest 2013 in San...
 
Services Oriented Architecture with PHP and MySQL
Services Oriented Architecture with PHP and MySQLServices Oriented Architecture with PHP and MySQL
Services Oriented Architecture with PHP and MySQL
 
Enterprise PHP Architecture through Design Patterns and Modularization (Midwe...
Enterprise PHP Architecture through Design Patterns and Modularization (Midwe...Enterprise PHP Architecture through Design Patterns and Modularization (Midwe...
Enterprise PHP Architecture through Design Patterns and Modularization (Midwe...
 
Speed up your Symfony2 application and build awesome features with Redis
Speed up your Symfony2 application and build awesome features with RedisSpeed up your Symfony2 application and build awesome features with Redis
Speed up your Symfony2 application and build awesome features with Redis
 
KSDG BaaS Intro
KSDG BaaS IntroKSDG BaaS Intro
KSDG BaaS Intro
 
SOA with PHP and Symfony
SOA with PHP and SymfonySOA with PHP and Symfony
SOA with PHP and Symfony
 
Thrift vs Protocol Buffers vs Avro - Biased Comparison
Thrift vs Protocol Buffers vs Avro - Biased ComparisonThrift vs Protocol Buffers vs Avro - Biased Comparison
Thrift vs Protocol Buffers vs Avro - Biased Comparison
 
Clean architecture with ddd layering in php
Clean architecture with ddd layering in phpClean architecture with ddd layering in php
Clean architecture with ddd layering in php
 
Enterprise PHP (PHP London Conference 2008)
Enterprise PHP (PHP London Conference 2008)Enterprise PHP (PHP London Conference 2008)
Enterprise PHP (PHP London Conference 2008)
 

Similar a Telephony with OpenShift Twilio and MongoDB

Hands on-intro to Node-RED
Hands on-intro to Node-REDHands on-intro to Node-RED
Hands on-intro to Node-REDPooja Mistry
 
Intalio create and cloudfoudry - short
Intalio create and cloudfoudry - shortIntalio create and cloudfoudry - short
Intalio create and cloudfoudry - shorthmalphettes
 
Enterprise software needs a PaaS
Enterprise software needs a PaaSEnterprise software needs a PaaS
Enterprise software needs a PaaShmalphettes
 
Workshop For pycon13
Workshop For pycon13Workshop For pycon13
Workshop For pycon13Steven Pousty
 
Free Mongo on OpenShift
Free Mongo on OpenShiftFree Mongo on OpenShift
Free Mongo on OpenShiftSteven Pousty
 
Intro to Open Cloud Initiative
Intro to Open Cloud InitiativeIntro to Open Cloud Initiative
Intro to Open Cloud InitiativeJohn Mark Walker
 
Develop modern apps using Spring ecosystem at time of BigData
Develop modern apps using Spring ecosystem at time of BigData Develop modern apps using Spring ecosystem at time of BigData
Develop modern apps using Spring ecosystem at time of BigData Oleg Tsal-Tsalko
 
IBM Bootcamp - Text to Speech API Lab
IBM Bootcamp - Text to Speech API LabIBM Bootcamp - Text to Speech API Lab
IBM Bootcamp - Text to Speech API LabColin McCabe
 
Node.JS Vs PHP: Which Is The Top Server-Side Programming Language?
Node.JS Vs PHP: Which Is The Top Server-Side Programming Language?Node.JS Vs PHP: Which Is The Top Server-Side Programming Language?
Node.JS Vs PHP: Which Is The Top Server-Side Programming Language?Pixel Crayons
 
SpringOne 2016 in a nutshell
SpringOne 2016 in a nutshellSpringOne 2016 in a nutshell
SpringOne 2016 in a nutshellJeroen Resoort
 
Internationalizing The New York Times
Internationalizing The New York TimesInternationalizing The New York Times
Internationalizing The New York TimesScott Taylor
 
Open shift for java(ee) developers
Open shift for java(ee) developersOpen shift for java(ee) developers
Open shift for java(ee) developersShekhar Gulati
 
PHP Vs NodeJS for Backend Web Development.pdf
PHP Vs NodeJS for Backend Web Development.pdfPHP Vs NodeJS for Backend Web Development.pdf
PHP Vs NodeJS for Backend Web Development.pdfSofiaCarter4
 
Node.js and the MEAN Stack Building Full-Stack Web Applications.pdf
Node.js and the MEAN Stack Building Full-Stack Web Applications.pdfNode.js and the MEAN Stack Building Full-Stack Web Applications.pdf
Node.js and the MEAN Stack Building Full-Stack Web Applications.pdflubnayasminsebl
 
IBM Bluemix™ Architecture & Deep Dive
IBM Bluemix™ Architecture & Deep DiveIBM Bluemix™ Architecture & Deep Dive
IBM Bluemix™ Architecture & Deep DiveIBM
 
The New IT - Your Milestone Plan
The New IT -  Your Milestone PlanThe New IT -  Your Milestone Plan
The New IT - Your Milestone PlanWSO2
 
The New IT - Your Milestone Plan
The New IT - Your Milestone Plan The New IT - Your Milestone Plan
The New IT - Your Milestone Plan WSO2
 

Similar a Telephony with OpenShift Twilio and MongoDB (20)

Hands on-intro to Node-RED
Hands on-intro to Node-REDHands on-intro to Node-RED
Hands on-intro to Node-RED
 
Intalio create and cloudfoudry - short
Intalio create and cloudfoudry - shortIntalio create and cloudfoudry - short
Intalio create and cloudfoudry - short
 
Enterprise software needs a PaaS
Enterprise software needs a PaaSEnterprise software needs a PaaS
Enterprise software needs a PaaS
 
Proposal
ProposalProposal
Proposal
 
Workshop For pycon13
Workshop For pycon13Workshop For pycon13
Workshop For pycon13
 
Free Mongo on OpenShift
Free Mongo on OpenShiftFree Mongo on OpenShift
Free Mongo on OpenShift
 
NodeJS
NodeJSNodeJS
NodeJS
 
Intro to Open Cloud Initiative
Intro to Open Cloud InitiativeIntro to Open Cloud Initiative
Intro to Open Cloud Initiative
 
Develop modern apps using Spring ecosystem at time of BigData
Develop modern apps using Spring ecosystem at time of BigData Develop modern apps using Spring ecosystem at time of BigData
Develop modern apps using Spring ecosystem at time of BigData
 
NodeJS vs Python.pptx
NodeJS vs Python.pptxNodeJS vs Python.pptx
NodeJS vs Python.pptx
 
IBM Bootcamp - Text to Speech API Lab
IBM Bootcamp - Text to Speech API LabIBM Bootcamp - Text to Speech API Lab
IBM Bootcamp - Text to Speech API Lab
 
Node.JS Vs PHP: Which Is The Top Server-Side Programming Language?
Node.JS Vs PHP: Which Is The Top Server-Side Programming Language?Node.JS Vs PHP: Which Is The Top Server-Side Programming Language?
Node.JS Vs PHP: Which Is The Top Server-Side Programming Language?
 
SpringOne 2016 in a nutshell
SpringOne 2016 in a nutshellSpringOne 2016 in a nutshell
SpringOne 2016 in a nutshell
 
Internationalizing The New York Times
Internationalizing The New York TimesInternationalizing The New York Times
Internationalizing The New York Times
 
Open shift for java(ee) developers
Open shift for java(ee) developersOpen shift for java(ee) developers
Open shift for java(ee) developers
 
PHP Vs NodeJS for Backend Web Development.pdf
PHP Vs NodeJS for Backend Web Development.pdfPHP Vs NodeJS for Backend Web Development.pdf
PHP Vs NodeJS for Backend Web Development.pdf
 
Node.js and the MEAN Stack Building Full-Stack Web Applications.pdf
Node.js and the MEAN Stack Building Full-Stack Web Applications.pdfNode.js and the MEAN Stack Building Full-Stack Web Applications.pdf
Node.js and the MEAN Stack Building Full-Stack Web Applications.pdf
 
IBM Bluemix™ Architecture & Deep Dive
IBM Bluemix™ Architecture & Deep DiveIBM Bluemix™ Architecture & Deep Dive
IBM Bluemix™ Architecture & Deep Dive
 
The New IT - Your Milestone Plan
The New IT -  Your Milestone PlanThe New IT -  Your Milestone Plan
The New IT - Your Milestone Plan
 
The New IT - Your Milestone Plan
The New IT - Your Milestone Plan The New IT - Your Milestone Plan
The New IT - Your Milestone Plan
 

Más de Mark Atwood

How to get one of those Open Source jobs
How to get one of those Open Source jobsHow to get one of those Open Source jobs
How to get one of those Open Source jobsMark Atwood
 
Why is Open Source so Good: Thirty Years of Lessons Learned
Why is Open Source so Good: Thirty Years of Lessons LearnedWhy is Open Source so Good: Thirty Years of Lessons Learned
Why is Open Source so Good: Thirty Years of Lessons LearnedMark Atwood
 
AMD Fusion12 Developer Summit: Introducing Red Hat OpenShift
AMD Fusion12 Developer Summit: Introducing Red Hat OpenShiftAMD Fusion12 Developer Summit: Introducing Red Hat OpenShift
AMD Fusion12 Developer Summit: Introducing Red Hat OpenShiftMark Atwood
 
Openshift + Openstack + Fedora = Awesome
Openshift + Openstack + Fedora = AwesomeOpenshift + Openstack + Fedora = Awesome
Openshift + Openstack + Fedora = AwesomeMark Atwood
 
NoSQL Part 3, or A Modest Proposal for a Heretical Key Valuestore
NoSQL Part 3, or A Modest Proposal for a Heretical Key ValuestoreNoSQL Part 3, or A Modest Proposal for a Heretical Key Valuestore
NoSQL Part 3, or A Modest Proposal for a Heretical Key ValuestoreMark Atwood
 
Eucalyptus: Our Story. Presented at LCA2011
Eucalyptus: Our Story. Presented at LCA2011Eucalyptus: Our Story. Presented at LCA2011
Eucalyptus: Our Story. Presented at LCA2011Mark Atwood
 
Memcached, presented to LCA2010
Memcached, presented to LCA2010Memcached, presented to LCA2010
Memcached, presented to LCA2010Mark Atwood
 

Más de Mark Atwood (7)

How to get one of those Open Source jobs
How to get one of those Open Source jobsHow to get one of those Open Source jobs
How to get one of those Open Source jobs
 
Why is Open Source so Good: Thirty Years of Lessons Learned
Why is Open Source so Good: Thirty Years of Lessons LearnedWhy is Open Source so Good: Thirty Years of Lessons Learned
Why is Open Source so Good: Thirty Years of Lessons Learned
 
AMD Fusion12 Developer Summit: Introducing Red Hat OpenShift
AMD Fusion12 Developer Summit: Introducing Red Hat OpenShiftAMD Fusion12 Developer Summit: Introducing Red Hat OpenShift
AMD Fusion12 Developer Summit: Introducing Red Hat OpenShift
 
Openshift + Openstack + Fedora = Awesome
Openshift + Openstack + Fedora = AwesomeOpenshift + Openstack + Fedora = Awesome
Openshift + Openstack + Fedora = Awesome
 
NoSQL Part 3, or A Modest Proposal for a Heretical Key Valuestore
NoSQL Part 3, or A Modest Proposal for a Heretical Key ValuestoreNoSQL Part 3, or A Modest Proposal for a Heretical Key Valuestore
NoSQL Part 3, or A Modest Proposal for a Heretical Key Valuestore
 
Eucalyptus: Our Story. Presented at LCA2011
Eucalyptus: Our Story. Presented at LCA2011Eucalyptus: Our Story. Presented at LCA2011
Eucalyptus: Our Story. Presented at LCA2011
 
Memcached, presented to LCA2010
Memcached, presented to LCA2010Memcached, presented to LCA2010
Memcached, presented to LCA2010
 

Último

Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 

Último (20)

Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 

Telephony with OpenShift Twilio and MongoDB

  • 1. Telephony Applications with MongoDB, OpenShift, & Twilio Mark Atwood Developer Evangelist for Red Hat OpenShift me@mark.atwood.name Twitter @fallenpegasus
  • 2. What is OpenShift?  Red Hat cloud Platform as a Service  Free as in beer, Free as in speech  Languages: Python, Java, Ruby, Node, PHP, & DIY  Storage: Filesystem, MySQL, Postgres, MongoDB  No lock-in, no proprietary APIs  Sign up at http://openshift.redhat.com  Promo code SEATTLE 2
  • 3. What is Twilio?  A cloudy API for telephony  REST interface to the PSTN: Voice & SMS  Pay by the drink 3
  • 4. How Twilio voice works  Someone calls the number  Twilio answers the phone  Twilio does HTTP REST to our app  Our app replies with some "TwiML"  Twilio does what the app told it to  Twilio or the caller hangs up the phone 4
  • 5. How Twilio SMS works  Someone texts to the number  Twilio receives the text & all metadata  Twilio does HTTP REST to our app  Our app replies with some "TwiML"  Twilio does what the app told it to 5
  • 6. What is MongoDB?  If you have to ask that, you shouldn't be here!  Easy to use JSONic Document Store 6
  • 7. What is Python & What is Bottle?  My favorite programming language  My favorite web framework  Supported by OpenShift  Drivers for MongoDB & for Twilio 7
  • 8. A simple app: SMS Group  SMS group chat  http://github.com/fallenpegasus/openshift-smsgroup  +1-XXX-XXX-XXXX  SMS .join to join  SMS .leave to leave 8
  • 9. Glue it all together  Get an OpenShift account  Get a Twilio account  Spin up "smsgroup" app in OpenShift  Attach it to your Twilio account  Play! 9
  • 10. Agenda for Demonstration  Look at the app at twilio.com  Look at the app at openshift.com  SSH into the app  Port forward from local to remote MongoDB  Run local MongoDB clients 10
  • 11. 11
  • 12. Some useful software design guidelines  Let the language, the libraries, & remote services do the boring work  Don't keep state in the app, use a data layer  Use queuing to smooth load 12
  • 13. Don't keep state in the app  Keep it in the data layer instead  OpenShift might restart or scale the instance at any time  Don't waste time keeping complex data in the instance  Don't try to write your own database server 13
  • 14. Don't keep state in the app  Keep it in the data layer instead  OpenShift might restart or scale the instance at any time  Don't waste time keeping complex data in the instance  Don't try to write your own database server  MongoDB is an excellent solution 14
  • 15. Use queuing to smooth the load  Don't depend on "their" capacity  Getting local storage quickly is easier than provisioning more CPU, IO ops, or network bandwidth 15
  • 16. Use queuing to smooth the load  Don't depend on "their" capacity  Getting local storage quickly is easier than provisioning more CPU, IO ops, or network bandwidth  And it's cheaper 16
  • 17. Some Queue options  roll your own  SQS  AQMP  RabbitMQ  etc 17
  • 18. Queue options  roll your own  SQS  AQMP  RabbitMQ  etc  MongoDB "find_and_modify" 18
  • 19. def worker: while True: time.sleep(1) while True: msg = mongo_db.sendq.find_and_modify(remove = True) if (msg == None): break message = twilio_client.sms.message.create( to = msg['To'], from_ = twilio_fromnum, body = msg['Body']) 19
  • 20. Conclusion  Telephony apps are easy and fun  You can build your own  Using OpenShift, Twilio, and MongoDB 20

Notas del editor

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n