SlideShare una empresa de Scribd logo
1 de 26
Descargar para leer sin conexión
8                 build apps
                                     faster and
b                            intro
                                     easier


                              To
    >
                       Google                         K
5                    app engine                      developer
                                                    innovation


                          &
                      Appscale                            Z
                                         x
$             (                       deploy and
                                     scale on any
                                        cloud
                                                     rapid
                                                     releases
        Chris bunch
        chris@appscale.com
•   You have a cool idea

a                           •   To make it into an app, you
                                need to:
common •                          Setup hardware
pattern •                         Configure, deploy app
One of several recurring
problems seen in the real
                                  services

                            •
world today.
                                And you have to do this
                                for every app!
Why not Amazon?

•   You don’t want to deploy and maintain:

    •   Servers

    •   Load balancers

    •   App Servers

    •   Databases

•   And you don’t want to hire people to do it!

                                 www.appscale.com
                    Phone: +1(805) 845 0010 | e-mail: chris@appscale.com
                                                                           PAGE   3
google app engine

•   A web application hosting service

•   Never log into a server

•   Crystallizes web service best practices

•   Share common services between apps

•   Focus on writing your app

                          www.appscale.com
             Phone: +1(805) 845 0010 | e-mail: chris@appscale.com
                                                                    PAGE   4
Supported Languages




Python                                                          Java




                                Go

                      www.appscale.com
         Phone: +1(805) 845 0010 | e-mail: chris@appscale.com
                                                                       PAGE   5
Programming Model

Ñ   Everything is a web request


    Stateless, scalable web server, meaning:

(     •
      •
              No filesystem access
              Persistence via Datastore / memcache
      •       60 second time limit on requests
      •       APIs from whitelist only


                 www.appscale.com
    Phone: +1(805) 845 0010 | e-mail: chris@appscale.com
                                                           PAGE   6
The DATAstore

• Not a relational database, but resembles an
  object database
• You define Kinds of data you want to store
• Each object stored is an Entity
• Entities can be arranged into Groups
                           www.appscale.com
              Phone: +1(805) 845 0010 | e-mail: chris@appscale.com
                                                                     PAGE   7
Defining a kind

class Person(ndb.Model):

    user = ndb.UserProperty()

    balance = ndb.FloatProperty()

    phone = ndb.StringProperty()

    last_login = ndb.DateTimeProperty()




                     www.appscale.com
        Phone: +1(805) 845 0010 | e-mail: chris@appscale.com
                                                               PAGE   8
EXTENDING a kind

class Person(ndb.Model):

    user = ndb.UserProperty()

    balance = ndb.FloatProperty()

    phone = ndb.StringProperty()

    last_login = ndb.DateTimeProperty()

    login_location = ndb.GeoPt()



                     www.appscale.com
        Phone: +1(805) 845 0010 | e-mail: chris@appscale.com
                                                               PAGE   9
Kind, entities

class Person(ndb.Model):

         ...



new_person = Person()

new_person.put()




             www.appscale.com
Phone: +1(805) 845 0010 | e-mail: chris@appscale.com
                                                       PAGE   10
transactions
•   Updating an Entity happens in a Transaction

•   Apps tell App Engine which Entities will be updated together by putting
    them into an Entity Group

•   Transactions can only occur within an Entity Group*

                              def f():

                                 person = db.get(key1)

                                 person.balance = 100.00

                                 person.put()

                              db.run_in_transaction(f)


                                   www.appscale.com
                      Phone: +1(805) 845 0010 | e-mail: chris@appscale.com
                                                                             PAGE   11
memcache

data = memcache.get(‘key’)

if data:

   return data

else:

   data = db.get(‘key’)

   memcache.set(‘key’, data, 300)

   return data

             www.appscale.com
Phone: +1(805) 845 0010 | e-mail: chris@appscale.com
                                                       PAGE   12
users

user = users.get_current_user()

if user:

        return user.nickname()

else:

        return None




              www.appscale.com
 Phone: +1(805) 845 0010 | e-mail: chris@appscale.com
                                                        PAGE   13
mail

from = “Chris Bunch <chris@appscale.com>”

to= “You <foo@bar.com>”

subject = “Try out AppScale!”

body = “http://download.appscale.com”

mail.send_mail(sender=from, to=to, subject=subject,
body=body)




                           www.appscale.com
              Phone: +1(805) 845 0010 | e-mail: chris@appscale.com
                                                                     PAGE   14
task queue

taskqueue.add(url=“/path/to/worker”)


cron:
- description: sends friendly emails
  url: /path/to/worker
  schedule: every 24 hours




                     www.appscale.com
        Phone: +1(805) 845 0010 | e-mail: chris@appscale.com
                                                               PAGE   15
url fetch

r = urlfetch.fetch(“http://www.google.com/”)

if r.status_code == 200:

  do_something_with_result(r.content)

else:

   # retry later




                        www.appscale.com
           Phone: +1(805) 845 0010 | e-mail: chris@appscale.com
                                                                  PAGE   16
xmpp

user = “chris@appscale.com”

msg = “Hello there!”

status = xmpp.send_message(user, msg)

if status != xmpp.NO_ERROR:

    # decide what to do with the failed msg




                       www.appscale.com
          Phone: +1(805) 845 0010 | e-mail: chris@appscale.com
                                                                 PAGE   17
enter appscale

•   But what if you need:

    •   To fail over to a private cloud?

    •   To run your App Engine app in-house?

    •   To use APIs App Engine doesn’t support?

•   Then you need AppScale!


                            www.appscale.com
               Phone: +1(805) 845 0010 | e-mail: chris@appscale.com
                                                                      PAGE   18
run anywhere




             www.appscale.com
Phone: +1(805) 845 0010 | e-mail: chris@appscale.com
                                                       PAGE   19
datastore

•   Supports NoSQL datastores via a database
    agnostic API:

    •   get

    •   put

    •   range_query

    •   delete

                              www.appscale.com
                 Phone: +1(805) 845 0010 | e-mail: chris@appscale.com
                                                                        PAGE   20
we have supported




               www.appscale.com
  Phone: +1(805) 845 0010 | e-mail: chris@appscale.com
                                                         PAGE   21
now focusing on...




               www.appscale.com
  Phone: +1(805) 845 0010 | e-mail: chris@appscale.com
                                                         PAGE   22
load balancing + app servers




                     www.appscale.com
        Phone: +1(805) 845 0010 | e-mail: chris@appscale.com
                                                               PAGE   23
API Services




             www.appscale.com
Phone: +1(805) 845 0010 | e-mail: chris@appscale.com
                                                       PAGE   24
the development cycle

•   App Engine SDK for rapid development

•   Limitations:

    •   Many APIs are stubbed out (XMPP, Mail)

    •   Not designed for production workloads

•   Use AppScale!


                         www.appscale.com
            Phone: +1(805) 845 0010 | e-mail: chris@appscale.com
                                                                   PAGE   25
Demo

Más contenido relacionado

Último

08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
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
 
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
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
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
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
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
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
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
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
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
 
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
 
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
 
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
 
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
 

Último (20)

08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
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
 
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
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
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
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
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
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
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
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
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
 
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
 
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
 
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
 
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
 

Destacado

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Destacado (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Intro to App Engine and AppScale

  • 1. 8 build apps faster and b intro easier To > Google K 5 app engine developer innovation & Appscale Z x $ ( deploy and scale on any cloud rapid releases Chris bunch chris@appscale.com
  • 2. You have a cool idea a • To make it into an app, you need to: common • Setup hardware pattern • Configure, deploy app One of several recurring problems seen in the real services • world today. And you have to do this for every app!
  • 3. Why not Amazon? • You don’t want to deploy and maintain: • Servers • Load balancers • App Servers • Databases • And you don’t want to hire people to do it! www.appscale.com Phone: +1(805) 845 0010 | e-mail: chris@appscale.com PAGE 3
  • 4. google app engine • A web application hosting service • Never log into a server • Crystallizes web service best practices • Share common services between apps • Focus on writing your app www.appscale.com Phone: +1(805) 845 0010 | e-mail: chris@appscale.com PAGE 4
  • 5. Supported Languages Python Java Go www.appscale.com Phone: +1(805) 845 0010 | e-mail: chris@appscale.com PAGE 5
  • 6. Programming Model Ñ Everything is a web request Stateless, scalable web server, meaning: ( • • No filesystem access Persistence via Datastore / memcache • 60 second time limit on requests • APIs from whitelist only www.appscale.com Phone: +1(805) 845 0010 | e-mail: chris@appscale.com PAGE 6
  • 7. The DATAstore • Not a relational database, but resembles an object database • You define Kinds of data you want to store • Each object stored is an Entity • Entities can be arranged into Groups www.appscale.com Phone: +1(805) 845 0010 | e-mail: chris@appscale.com PAGE 7
  • 8. Defining a kind class Person(ndb.Model): user = ndb.UserProperty() balance = ndb.FloatProperty() phone = ndb.StringProperty() last_login = ndb.DateTimeProperty() www.appscale.com Phone: +1(805) 845 0010 | e-mail: chris@appscale.com PAGE 8
  • 9. EXTENDING a kind class Person(ndb.Model): user = ndb.UserProperty() balance = ndb.FloatProperty() phone = ndb.StringProperty() last_login = ndb.DateTimeProperty() login_location = ndb.GeoPt() www.appscale.com Phone: +1(805) 845 0010 | e-mail: chris@appscale.com PAGE 9
  • 10. Kind, entities class Person(ndb.Model): ... new_person = Person() new_person.put() www.appscale.com Phone: +1(805) 845 0010 | e-mail: chris@appscale.com PAGE 10
  • 11. transactions • Updating an Entity happens in a Transaction • Apps tell App Engine which Entities will be updated together by putting them into an Entity Group • Transactions can only occur within an Entity Group* def f(): person = db.get(key1) person.balance = 100.00 person.put() db.run_in_transaction(f) www.appscale.com Phone: +1(805) 845 0010 | e-mail: chris@appscale.com PAGE 11
  • 12. memcache data = memcache.get(‘key’) if data: return data else: data = db.get(‘key’) memcache.set(‘key’, data, 300) return data www.appscale.com Phone: +1(805) 845 0010 | e-mail: chris@appscale.com PAGE 12
  • 13. users user = users.get_current_user() if user: return user.nickname() else: return None www.appscale.com Phone: +1(805) 845 0010 | e-mail: chris@appscale.com PAGE 13
  • 14. mail from = “Chris Bunch <chris@appscale.com>” to= “You <foo@bar.com>” subject = “Try out AppScale!” body = “http://download.appscale.com” mail.send_mail(sender=from, to=to, subject=subject, body=body) www.appscale.com Phone: +1(805) 845 0010 | e-mail: chris@appscale.com PAGE 14
  • 15. task queue taskqueue.add(url=“/path/to/worker”) cron: - description: sends friendly emails url: /path/to/worker schedule: every 24 hours www.appscale.com Phone: +1(805) 845 0010 | e-mail: chris@appscale.com PAGE 15
  • 16. url fetch r = urlfetch.fetch(“http://www.google.com/”) if r.status_code == 200: do_something_with_result(r.content) else: # retry later www.appscale.com Phone: +1(805) 845 0010 | e-mail: chris@appscale.com PAGE 16
  • 17. xmpp user = “chris@appscale.com” msg = “Hello there!” status = xmpp.send_message(user, msg) if status != xmpp.NO_ERROR: # decide what to do with the failed msg www.appscale.com Phone: +1(805) 845 0010 | e-mail: chris@appscale.com PAGE 17
  • 18. enter appscale • But what if you need: • To fail over to a private cloud? • To run your App Engine app in-house? • To use APIs App Engine doesn’t support? • Then you need AppScale! www.appscale.com Phone: +1(805) 845 0010 | e-mail: chris@appscale.com PAGE 18
  • 19. run anywhere www.appscale.com Phone: +1(805) 845 0010 | e-mail: chris@appscale.com PAGE 19
  • 20. datastore • Supports NoSQL datastores via a database agnostic API: • get • put • range_query • delete www.appscale.com Phone: +1(805) 845 0010 | e-mail: chris@appscale.com PAGE 20
  • 21. we have supported www.appscale.com Phone: +1(805) 845 0010 | e-mail: chris@appscale.com PAGE 21
  • 22. now focusing on... www.appscale.com Phone: +1(805) 845 0010 | e-mail: chris@appscale.com PAGE 22
  • 23. load balancing + app servers www.appscale.com Phone: +1(805) 845 0010 | e-mail: chris@appscale.com PAGE 23
  • 24. API Services www.appscale.com Phone: +1(805) 845 0010 | e-mail: chris@appscale.com PAGE 24
  • 25. the development cycle • App Engine SDK for rapid development • Limitations: • Many APIs are stubbed out (XMPP, Mail) • Not designed for production workloads • Use AppScale! www.appscale.com Phone: +1(805) 845 0010 | e-mail: chris@appscale.com PAGE 25
  • 26. Demo