SlideShare a Scribd company logo
1 of 27
Download to read offline
How do I...use PiCloud for cloud computing?
         Ken Elkabany • February 5, 2010
January 5, 2010 release




• Python 2.6
• 75+ libraries SciPy, NumPy, matplotlib, IPython, Mayavi...
• NumPy 1.4 faster (20-30%) import times, better handling of
  special floating point types

• 64-bit available on all platforms in addition to 32-bit
• PiCloud’s cloud library for cloud computing
Ken Elkabany
Co-Founder & CEO, PiCloud

                 • UC Berkeley

                 • Founded PiCloud in 2008
Presented by
                                           Ken Elkabany, CEO
                                           ken@picloud.com

Feb. 5, 2010   EPD Presentation: How do I use PiCloud?
Who are we?
2


       PiCloud, Inc.
       Founded in 2009, and based in Sunnyvale, CA
       Our mission: Simplify cloud computing
       The PiCloud Cloud-Computing Platform
         Integrated  into the Python programming language
         Partnership with Enthought, Inc. to include our cloud
          library in EPD (Enthought Python Distribution)
         Beta-release




                                                   © Copyright 2010 by PiCloud, Inc.
What is cloud computing?
3


       Cloud computing is a style of computing in which
        dynamically scalable and often virtualized
        resources are provided as a service over the
        Internet.




                                             © Copyright 2010 by PiCloud, Inc.
What does a cloud look like?
4


       Low upfront costs
         Serversare not purchased, only rented (utility
          computing)
       Multi-tenant
         Centralization of infrastructure geographically
         High-levels of utilization and efficiency

       Scalable and Agile
         On-demand    provisioning of resources
       Secure, Reliable, Sustainable

                                                   © Copyright 2010 by PiCloud, Inc.
Cloud Computing Ecosystem
5


       Cloud infrastructures
         Allow  for the provisioning of
          virtualized resources
           Compute:  Boot up and log into
            a Linux or Windows server
           Storage: Specialized services
            like S3
       The PiCloud platform sits on
        top of infrastructure,
        abstracting its details away

                                             © Copyright 2010 by PiCloud, Inc.
The PiCloud Abstraction
6




              Input Output
                              Input      Output



                                  © Copyright 2010 by PiCloud, Inc.
Our motivation
7


                AutoTagger
                  Facebook photo-tagging assistant
                  PiCloud’s First Customer




                          Basic Functionality
                             Detect and extract faces from
                               a single photo
                          Repeatedly apply face detection
                           to all photos in an album


                                           © Copyright 2010 by PiCloud, Inc.
Our motivation
8


    Functional view: I need to detect faces in   Server view: I need 20 high performance virtual servers to
    these photos for the user                    detect faces in these photos in parallel




                                                  Design Objectives:
                                                  •Load balancing
                                                  •Auto-Scaling
                                                  •Performance Monitoring, introspection
                  PiCloud                         •Error detection, reporting, and handling.
                                                                           © Copyright 2010 by PiCloud, Inc.
Roadmap
9


       Brief tour of the website
       Example 1: First steps with PiCloud
         Using   the web and console interface
       Example 2: Monte Carlo PI
       Example 3: Basic twitter analyzer
       Conclusion




                                                  © Copyright 2010 by PiCloud, Inc.
Example 1: First steps
10


        Run a simple function on the cloud
     >>> def func():                             # define the function
     >>>      return 3*3
     >>>
     >>> import cloud                            # import our library
     >>> cloud.setkey(API_KEY, API_SECRET_KEY)   # set your key (can do in cfgs)
     >>> jid = cloud.call(func)                  # returns job id
     >>> cloud.status(jid)                       # returns job status 
     ‘processing’
     >>> cloud.status(jid)                       # returns job status 
     ‘done’
     >>> jid = cloud.result(jid)                 # returns the result
     9




                                                             © Copyright 2010 by PiCloud, Inc.
Example 1: First steps
11


        3 Simple Steps
          Import our library
          Set your api key (this is how we identify you)

          Pass your function into cloud.call

        That’s all you need to run any function on the cloud!
        Your function can do anything that Python allows
         you to do. (except open listening sockets)




                                                    © Copyright 2010 by PiCloud, Inc.
If you’re trying to following along…
12


        But you don’t have an API Key yet, try this:
             import cloud
             cloud.start_simulator()
             # do not call cloud.setkey




                                                © Copyright 2010 by PiCloud, Inc.
Web interface
13


        http://www.picloud.com/accounts/
        Manage API Keys
        View functions/jobs
          Status(queued, processing, done)
          Resource usage (profiling)

        Track compute usage with analytics
        Python C-extensions support
        Documentation


                                              © Copyright 2010 by PiCloud, Inc.
Example 1: First steps
14


        What if there’s an exception?
     >>> def func():                            # define the function
     >>>      return ‘a’ + 3
     >>>
     >>> import cloud                           # import our library
     >>> cloud.setkey(API_KEY, API_SECRET_KEY) # set your key (can do in cfgs)
     >>> jid = cloud.call(func)                 # returns job id
     >>> cloud.status(jid)                      # returns job status 
     ‘error’
     >>> cloud.result(jid)                      # returns job status 
     cloud.cloud.CloudException: Job 7199: Traceback (most recent call last):
       File "<stdin>", line 2, in func
     TypeError: cannot concatenate 'str' and 'int' objects




                                                           © Copyright 2010 by PiCloud, Inc.
Under the hood
 15




Application                                      Load                   Workers
Using PiCloud                                 balancers,                (compute
                                              schedulers                 servers)



        Cloud Library             PiCloud
 Identifies and Transmits data   Interface
     and source dependencies


                                             Distributed               Distributed
                                             Database                  File System,
  Monitoring                                                               DHT
Analyze workload




                           You
                                                           © Copyright 2010 by PiCloud, Inc.
Under the hood
16


        How does our advanced system translate over to
         tangible benefits for you?
          Robust

          Scalable

          Secure

          Multi-tenant
            Higher   utilization -> cheaper
          Optimized

          Easy   maintenance


                                               © Copyright 2010 by PiCloud, Inc.
Using the simulator
17


        Motivation
          Copying the state of your Python interpreter to PiCloud
           can be costly, and should be optimized to a minimum
            We’ll    warn you automatically if you are sending over 1MB
                of information
          Inmany cases, faster to test things locally (and there
           are no charges!)
        How do I use it?
                cloud.start_simulator()




                                                        © Copyright 2010 by PiCloud, Inc.
Example 2: Monte Carlo π
18


         Estimate PI using the Monte Carlo method
           Randomly             throw darts at the board below

                4 * (num _ darts _ landing _ in _ circle )
         PI 
                         total _ darts _ thrown




            Derived           from
                                       r 2 
            P (dart _ in _ circle )           
                                      (2 r ) 2
                                                 4




                                                             © Copyright 2010 by PiCloud, Inc.
Example 2: Monte Carlo PI
19


         Map a function across a series of data points
     def monteCarlo(num_test):
       """
       Throw num_test darts at a 1x1 rectangle
       Return how many appear within the quarter circle
       """  
       numInCircle = 0
       y = random.random()

         for _ in xrange(num_test):
           x = random.random()
           y = random.random()
           if x*x + y*y < 1.0:
             numInCircle += 1

         return numInCircle




                                                          © Copyright 2010 by PiCloud, Inc.
Example 2: Monte Carlo PI
20


         1 line modification to run this on the cloud
 import random
 import cloud

 numMaps = 6
 numTests = 10000000

 def calcPi():

     """Send off numMaps monteCarlo simulations in parallel"""
     jids = cloud.map(monteCarlo, [numTests for _ in range(numMaps)], _high_cpu=True)
     numInCircleResults = cloud.result(jids)
     numInCircle = sum(numInCircleResults)  

     pi = (4 * numInCircle) / float(numTests* numMaps)
     return pi

 if __name__ == '__main__':
   pi = calcPi()

     print 'Pi determined to be %s' % pi
                                                             © Copyright 2010 by PiCloud, Inc.
Example 2: Monte Carlo PI
21


        How much did this cost?
          Use cloud.info to get cpu time used (runtime)
          Cost = (cpu time) * rate

          Cost = 60 seconds * 0.0013 per minute = $0.0013




                                               © Copyright 2010 by PiCloud, Inc.
Example 2: Monte Carlo PI
22


        What was the _high_cpu attribute for?
     jids = cloud.map(monteCarlo, [numTests for _ in range(numMaps)], _high_cpu=True)


        Automatically run your code with more CPU power
        Default is 1 CPU unit (1-1.2ghz Xeon processor)
        _high_cpu is 2.5 CPU units




                                                                  © Copyright 2010 by PiCloud, Inc.
Example 3: Twitter Analyzer
23


        Determine relationships between followers, #
         following, and statuses using linear regression
        We use cloud.map to scrape twitter for user data
        Run linear regressions in parallel using
         cloud.call
        Graph statuses/followers with pylab
        NOTE: To use this example, you will need to modify
         the posted file to use your own Twitter account
         information.

                                              © Copyright 2010 by PiCloud, Inc.
Conclusion
24


        You can now leverage the compute power of a
         cluster of servers with only a couple lines of code!
        We’ve given you a taste of the features PiCloud has
         to offer, but there are many more!
        If you have not already, register at www.picloud.com
        Questions? ken@picloud.com




                                              © Copyright 2010 by PiCloud, Inc.

More Related Content

Similar to February EPD Webinar: How do I...use PiCloud for cloud computing?

SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring Boot
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring BootSpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring Boot
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring BootVMware Tanzu
 
Manchester geek night pcf 101
Manchester geek night   pcf 101Manchester geek night   pcf 101
Manchester geek night pcf 101Sufyaan Kazi
 
RICOH THETA x IoT Developers Contest : Cloud API Seminar
 RICOH THETA x IoT Developers Contest : Cloud API Seminar RICOH THETA x IoT Developers Contest : Cloud API Seminar
RICOH THETA x IoT Developers Contest : Cloud API Seminarcontest-theta360
 
Using Data Science & Serverless Python to find apartment in Toronto
Using Data Science & Serverless Python to find apartment in TorontoUsing Data Science & Serverless Python to find apartment in Toronto
Using Data Science & Serverless Python to find apartment in TorontoDaniel Zivkovic
 
An architect’s guide to leveraging your incumbency
An architect’s guide to leveraging your incumbencyAn architect’s guide to leveraging your incumbency
An architect’s guide to leveraging your incumbencyMichael Elder
 
Integrating Ansible Tower with security orchestration and cloud management
Integrating Ansible Tower with security orchestration and cloud managementIntegrating Ansible Tower with security orchestration and cloud management
Integrating Ansible Tower with security orchestration and cloud managementJoel W. King
 
Gregory Touretsky - Intel IT- Open Cloud Journey
Gregory Touretsky - Intel IT- Open Cloud JourneyGregory Touretsky - Intel IT- Open Cloud Journey
Gregory Touretsky - Intel IT- Open Cloud JourneyCloud Native Day Tel Aviv
 
Iot 1906 - approaches for building applications with the IBM IoT cloud
Iot 1906 - approaches for building applications with the IBM IoT cloudIot 1906 - approaches for building applications with the IBM IoT cloud
Iot 1906 - approaches for building applications with the IBM IoT cloudPeterNiblett
 
Python on Cloud Foundry
Python on Cloud FoundryPython on Cloud Foundry
Python on Cloud FoundryIan Huston
 
Developing and Deploying Microservices to IBM Cloud Private
Developing and Deploying Microservices to IBM Cloud PrivateDeveloping and Deploying Microservices to IBM Cloud Private
Developing and Deploying Microservices to IBM Cloud PrivateShikha Srivastava
 
D-DAY 2015 Hybrid Cloud IBM
D-DAY 2015 Hybrid Cloud IBMD-DAY 2015 Hybrid Cloud IBM
D-DAY 2015 Hybrid Cloud IBMDEVOPS D-DAY
 
AD305: IBM Sametime iWidgets: Extending Connections' Use of Sametime
AD305: IBM Sametime iWidgets: Extending Connections' Use of SametimeAD305: IBM Sametime iWidgets: Extending Connections' Use of Sametime
AD305: IBM Sametime iWidgets: Extending Connections' Use of SametimeJason Cheung
 
Learn how to Leverage Kubernetes to Support 12 Factor for Enterprise Apps
 Learn how to Leverage Kubernetes to Support 12 Factor for Enterprise Apps Learn how to Leverage Kubernetes to Support 12 Factor for Enterprise Apps
Learn how to Leverage Kubernetes to Support 12 Factor for Enterprise AppsMichael Elder
 
Elevating your Continuous Delivery Strategy Above the Rolling Clouds
Elevating your Continuous Delivery Strategy Above the Rolling CloudsElevating your Continuous Delivery Strategy Above the Rolling Clouds
Elevating your Continuous Delivery Strategy Above the Rolling CloudsMichael Elder
 
Track2 -刘希斌----c ie-net-openstack-2012-apac
Track2 -刘希斌----c ie-net-openstack-2012-apacTrack2 -刘希斌----c ie-net-openstack-2012-apac
Track2 -刘希斌----c ie-net-openstack-2012-apacOpenCity Community
 
Platform as a Service - Cloud Foundry and IBM Bluemix
Platform as a Service - Cloud Foundry and IBM BluemixPlatform as a Service - Cloud Foundry and IBM Bluemix
Platform as a Service - Cloud Foundry and IBM BluemixDavid Currie
 
Pivotal Cloud Foundry 2.3: A First Look
Pivotal Cloud Foundry 2.3: A First LookPivotal Cloud Foundry 2.3: A First Look
Pivotal Cloud Foundry 2.3: A First LookVMware Tanzu
 
Build12 factorappusingmp
Build12 factorappusingmpBuild12 factorappusingmp
Build12 factorappusingmpEmily Jiang
 

Similar to February EPD Webinar: How do I...use PiCloud for cloud computing? (20)

SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring Boot
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring BootSpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring Boot
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring Boot
 
Manchester geek night pcf 101
Manchester geek night   pcf 101Manchester geek night   pcf 101
Manchester geek night pcf 101
 
RICOH THETA x IoT Developers Contest : Cloud API Seminar
 RICOH THETA x IoT Developers Contest : Cloud API Seminar RICOH THETA x IoT Developers Contest : Cloud API Seminar
RICOH THETA x IoT Developers Contest : Cloud API Seminar
 
Using Data Science & Serverless Python to find apartment in Toronto
Using Data Science & Serverless Python to find apartment in TorontoUsing Data Science & Serverless Python to find apartment in Toronto
Using Data Science & Serverless Python to find apartment in Toronto
 
Sjug aug 2010_cloud
Sjug aug 2010_cloudSjug aug 2010_cloud
Sjug aug 2010_cloud
 
An architect’s guide to leveraging your incumbency
An architect’s guide to leveraging your incumbencyAn architect’s guide to leveraging your incumbency
An architect’s guide to leveraging your incumbency
 
Integrating Ansible Tower with security orchestration and cloud management
Integrating Ansible Tower with security orchestration and cloud managementIntegrating Ansible Tower with security orchestration and cloud management
Integrating Ansible Tower with security orchestration and cloud management
 
Gregory Touretsky - Intel IT- Open Cloud Journey
Gregory Touretsky - Intel IT- Open Cloud JourneyGregory Touretsky - Intel IT- Open Cloud Journey
Gregory Touretsky - Intel IT- Open Cloud Journey
 
Iot 1906 - approaches for building applications with the IBM IoT cloud
Iot 1906 - approaches for building applications with the IBM IoT cloudIot 1906 - approaches for building applications with the IBM IoT cloud
Iot 1906 - approaches for building applications with the IBM IoT cloud
 
Python on Cloud Foundry
Python on Cloud FoundryPython on Cloud Foundry
Python on Cloud Foundry
 
Developing and Deploying Microservices to IBM Cloud Private
Developing and Deploying Microservices to IBM Cloud PrivateDeveloping and Deploying Microservices to IBM Cloud Private
Developing and Deploying Microservices to IBM Cloud Private
 
D-DAY 2015 Hybrid Cloud IBM
D-DAY 2015 Hybrid Cloud IBMD-DAY 2015 Hybrid Cloud IBM
D-DAY 2015 Hybrid Cloud IBM
 
AD305: IBM Sametime iWidgets: Extending Connections' Use of Sametime
AD305: IBM Sametime iWidgets: Extending Connections' Use of SametimeAD305: IBM Sametime iWidgets: Extending Connections' Use of Sametime
AD305: IBM Sametime iWidgets: Extending Connections' Use of Sametime
 
AD305:
AD305: AD305:
AD305:
 
Learn how to Leverage Kubernetes to Support 12 Factor for Enterprise Apps
 Learn how to Leverage Kubernetes to Support 12 Factor for Enterprise Apps Learn how to Leverage Kubernetes to Support 12 Factor for Enterprise Apps
Learn how to Leverage Kubernetes to Support 12 Factor for Enterprise Apps
 
Elevating your Continuous Delivery Strategy Above the Rolling Clouds
Elevating your Continuous Delivery Strategy Above the Rolling CloudsElevating your Continuous Delivery Strategy Above the Rolling Clouds
Elevating your Continuous Delivery Strategy Above the Rolling Clouds
 
Track2 -刘希斌----c ie-net-openstack-2012-apac
Track2 -刘希斌----c ie-net-openstack-2012-apacTrack2 -刘希斌----c ie-net-openstack-2012-apac
Track2 -刘希斌----c ie-net-openstack-2012-apac
 
Platform as a Service - Cloud Foundry and IBM Bluemix
Platform as a Service - Cloud Foundry and IBM BluemixPlatform as a Service - Cloud Foundry and IBM Bluemix
Platform as a Service - Cloud Foundry and IBM Bluemix
 
Pivotal Cloud Foundry 2.3: A First Look
Pivotal Cloud Foundry 2.3: A First LookPivotal Cloud Foundry 2.3: A First Look
Pivotal Cloud Foundry 2.3: A First Look
 
Build12 factorappusingmp
Build12 factorappusingmpBuild12 factorappusingmp
Build12 factorappusingmp
 

More from Enthought, Inc.

Talk at NYC Python Meetup Group
Talk at NYC Python Meetup GroupTalk at NYC Python Meetup Group
Talk at NYC Python Meetup GroupEnthought, Inc.
 
Scientific Applications with Python
Scientific Applications with PythonScientific Applications with Python
Scientific Applications with PythonEnthought, Inc.
 
Scientific Computing with Python Webinar March 19: 3D Visualization with Mayavi
Scientific Computing with Python Webinar March 19: 3D Visualization with MayaviScientific Computing with Python Webinar March 19: 3D Visualization with Mayavi
Scientific Computing with Python Webinar March 19: 3D Visualization with MayaviEnthought, Inc.
 
Parallel Processing with IPython
Parallel Processing with IPythonParallel Processing with IPython
Parallel Processing with IPythonEnthought, Inc.
 
Scientific Computing with Python Webinar: Traits
Scientific Computing with Python Webinar: TraitsScientific Computing with Python Webinar: Traits
Scientific Computing with Python Webinar: TraitsEnthought, Inc.
 
Scientific Computing with Python Webinar 9/18/2009:Curve Fitting
Scientific Computing with Python Webinar 9/18/2009:Curve FittingScientific Computing with Python Webinar 9/18/2009:Curve Fitting
Scientific Computing with Python Webinar 9/18/2009:Curve FittingEnthought, Inc.
 
Scientific Computing with Python Webinar --- August 28, 2009
Scientific Computing with Python Webinar --- August 28, 2009Scientific Computing with Python Webinar --- August 28, 2009
Scientific Computing with Python Webinar --- August 28, 2009Enthought, Inc.
 
Scientific Computing with Python Webinar --- June 19, 2009
Scientific Computing with Python Webinar --- June 19, 2009Scientific Computing with Python Webinar --- June 19, 2009
Scientific Computing with Python Webinar --- June 19, 2009Enthought, Inc.
 
Scientific Computing with Python Webinar --- May 22, 2009
Scientific Computing with Python Webinar --- May 22, 2009Scientific Computing with Python Webinar --- May 22, 2009
Scientific Computing with Python Webinar --- May 22, 2009Enthought, Inc.
 

More from Enthought, Inc. (14)

Numpy Talk at SIAM
Numpy Talk at SIAMNumpy Talk at SIAM
Numpy Talk at SIAM
 
Talk at NYC Python Meetup Group
Talk at NYC Python Meetup GroupTalk at NYC Python Meetup Group
Talk at NYC Python Meetup Group
 
Scientific Applications with Python
Scientific Applications with PythonScientific Applications with Python
Scientific Applications with Python
 
SciPy 2010 Review
SciPy 2010 ReviewSciPy 2010 Review
SciPy 2010 Review
 
Scientific Computing with Python Webinar March 19: 3D Visualization with Mayavi
Scientific Computing with Python Webinar March 19: 3D Visualization with MayaviScientific Computing with Python Webinar March 19: 3D Visualization with Mayavi
Scientific Computing with Python Webinar March 19: 3D Visualization with Mayavi
 
Chaco Step-by-Step
Chaco Step-by-StepChaco Step-by-Step
Chaco Step-by-Step
 
NumPy/SciPy Statistics
NumPy/SciPy StatisticsNumPy/SciPy Statistics
NumPy/SciPy Statistics
 
SciPy India 2009
SciPy India 2009SciPy India 2009
SciPy India 2009
 
Parallel Processing with IPython
Parallel Processing with IPythonParallel Processing with IPython
Parallel Processing with IPython
 
Scientific Computing with Python Webinar: Traits
Scientific Computing with Python Webinar: TraitsScientific Computing with Python Webinar: Traits
Scientific Computing with Python Webinar: Traits
 
Scientific Computing with Python Webinar 9/18/2009:Curve Fitting
Scientific Computing with Python Webinar 9/18/2009:Curve FittingScientific Computing with Python Webinar 9/18/2009:Curve Fitting
Scientific Computing with Python Webinar 9/18/2009:Curve Fitting
 
Scientific Computing with Python Webinar --- August 28, 2009
Scientific Computing with Python Webinar --- August 28, 2009Scientific Computing with Python Webinar --- August 28, 2009
Scientific Computing with Python Webinar --- August 28, 2009
 
Scientific Computing with Python Webinar --- June 19, 2009
Scientific Computing with Python Webinar --- June 19, 2009Scientific Computing with Python Webinar --- June 19, 2009
Scientific Computing with Python Webinar --- June 19, 2009
 
Scientific Computing with Python Webinar --- May 22, 2009
Scientific Computing with Python Webinar --- May 22, 2009Scientific Computing with Python Webinar --- May 22, 2009
Scientific Computing with Python Webinar --- May 22, 2009
 

Recently uploaded

TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????blackmambaettijean
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 

Recently uploaded (20)

TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 

February EPD Webinar: How do I...use PiCloud for cloud computing?

  • 1. How do I...use PiCloud for cloud computing? Ken Elkabany • February 5, 2010
  • 2. January 5, 2010 release • Python 2.6 • 75+ libraries SciPy, NumPy, matplotlib, IPython, Mayavi... • NumPy 1.4 faster (20-30%) import times, better handling of special floating point types • 64-bit available on all platforms in addition to 32-bit • PiCloud’s cloud library for cloud computing
  • 3. Ken Elkabany Co-Founder & CEO, PiCloud • UC Berkeley • Founded PiCloud in 2008
  • 4. Presented by Ken Elkabany, CEO ken@picloud.com Feb. 5, 2010 EPD Presentation: How do I use PiCloud?
  • 5. Who are we? 2  PiCloud, Inc.  Founded in 2009, and based in Sunnyvale, CA  Our mission: Simplify cloud computing  The PiCloud Cloud-Computing Platform  Integrated into the Python programming language  Partnership with Enthought, Inc. to include our cloud library in EPD (Enthought Python Distribution)  Beta-release © Copyright 2010 by PiCloud, Inc.
  • 6. What is cloud computing? 3  Cloud computing is a style of computing in which dynamically scalable and often virtualized resources are provided as a service over the Internet. © Copyright 2010 by PiCloud, Inc.
  • 7. What does a cloud look like? 4  Low upfront costs  Serversare not purchased, only rented (utility computing)  Multi-tenant  Centralization of infrastructure geographically  High-levels of utilization and efficiency  Scalable and Agile  On-demand provisioning of resources  Secure, Reliable, Sustainable © Copyright 2010 by PiCloud, Inc.
  • 8. Cloud Computing Ecosystem 5  Cloud infrastructures  Allow for the provisioning of virtualized resources  Compute: Boot up and log into a Linux or Windows server  Storage: Specialized services like S3  The PiCloud platform sits on top of infrastructure, abstracting its details away © Copyright 2010 by PiCloud, Inc.
  • 9. The PiCloud Abstraction 6 Input Output Input Output © Copyright 2010 by PiCloud, Inc.
  • 10. Our motivation 7  AutoTagger  Facebook photo-tagging assistant  PiCloud’s First Customer  Basic Functionality  Detect and extract faces from a single photo  Repeatedly apply face detection to all photos in an album © Copyright 2010 by PiCloud, Inc.
  • 11. Our motivation 8 Functional view: I need to detect faces in Server view: I need 20 high performance virtual servers to these photos for the user detect faces in these photos in parallel Design Objectives: •Load balancing •Auto-Scaling •Performance Monitoring, introspection PiCloud •Error detection, reporting, and handling. © Copyright 2010 by PiCloud, Inc.
  • 12. Roadmap 9  Brief tour of the website  Example 1: First steps with PiCloud  Using the web and console interface  Example 2: Monte Carlo PI  Example 3: Basic twitter analyzer  Conclusion © Copyright 2010 by PiCloud, Inc.
  • 13. Example 1: First steps 10  Run a simple function on the cloud >>> def func(): # define the function >>>  return 3*3 >>> >>> import cloud # import our library >>> cloud.setkey(API_KEY, API_SECRET_KEY) # set your key (can do in cfgs) >>> jid = cloud.call(func) # returns job id >>> cloud.status(jid) # returns job status  ‘processing’ >>> cloud.status(jid) # returns job status  ‘done’ >>> jid = cloud.result(jid) # returns the result 9 © Copyright 2010 by PiCloud, Inc.
  • 14. Example 1: First steps 11  3 Simple Steps  Import our library  Set your api key (this is how we identify you)  Pass your function into cloud.call  That’s all you need to run any function on the cloud!  Your function can do anything that Python allows you to do. (except open listening sockets) © Copyright 2010 by PiCloud, Inc.
  • 15. If you’re trying to following along… 12  But you don’t have an API Key yet, try this: import cloud cloud.start_simulator() # do not call cloud.setkey © Copyright 2010 by PiCloud, Inc.
  • 16. Web interface 13  http://www.picloud.com/accounts/  Manage API Keys  View functions/jobs  Status(queued, processing, done)  Resource usage (profiling)  Track compute usage with analytics  Python C-extensions support  Documentation © Copyright 2010 by PiCloud, Inc.
  • 17. Example 1: First steps 14  What if there’s an exception? >>> def func(): # define the function >>>  return ‘a’ + 3 >>> >>> import cloud # import our library >>> cloud.setkey(API_KEY, API_SECRET_KEY) # set your key (can do in cfgs) >>> jid = cloud.call(func) # returns job id >>> cloud.status(jid) # returns job status  ‘error’ >>> cloud.result(jid) # returns job status  cloud.cloud.CloudException: Job 7199: Traceback (most recent call last): File "<stdin>", line 2, in func TypeError: cannot concatenate 'str' and 'int' objects © Copyright 2010 by PiCloud, Inc.
  • 18. Under the hood 15 Application Load Workers Using PiCloud balancers, (compute schedulers servers) Cloud Library PiCloud Identifies and Transmits data Interface and source dependencies Distributed Distributed Database File System, Monitoring DHT Analyze workload You © Copyright 2010 by PiCloud, Inc.
  • 19. Under the hood 16  How does our advanced system translate over to tangible benefits for you?  Robust  Scalable  Secure  Multi-tenant  Higher utilization -> cheaper  Optimized  Easy maintenance © Copyright 2010 by PiCloud, Inc.
  • 20. Using the simulator 17  Motivation  Copying the state of your Python interpreter to PiCloud can be costly, and should be optimized to a minimum  We’ll warn you automatically if you are sending over 1MB of information  Inmany cases, faster to test things locally (and there are no charges!)  How do I use it? cloud.start_simulator() © Copyright 2010 by PiCloud, Inc.
  • 21. Example 2: Monte Carlo π 18  Estimate PI using the Monte Carlo method  Randomly throw darts at the board below 4 * (num _ darts _ landing _ in _ circle ) PI  total _ darts _ thrown  Derived from r 2  P (dart _ in _ circle )   (2 r ) 2 4 © Copyright 2010 by PiCloud, Inc.
  • 22. Example 2: Monte Carlo PI 19  Map a function across a series of data points def monteCarlo(num_test): """ Throw num_test darts at a 1x1 rectangle Return how many appear within the quarter circle """   numInCircle = 0 y = random.random() for _ in xrange(num_test): x = random.random() y = random.random() if x*x + y*y < 1.0: numInCircle += 1 return numInCircle © Copyright 2010 by PiCloud, Inc.
  • 23. Example 2: Monte Carlo PI 20  1 line modification to run this on the cloud import random import cloud numMaps = 6 numTests = 10000000 def calcPi(): """Send off numMaps monteCarlo simulations in parallel""" jids = cloud.map(monteCarlo, [numTests for _ in range(numMaps)], _high_cpu=True) numInCircleResults = cloud.result(jids) numInCircle = sum(numInCircleResults)   pi = (4 * numInCircle) / float(numTests* numMaps) return pi if __name__ == '__main__': pi = calcPi() print 'Pi determined to be %s' % pi © Copyright 2010 by PiCloud, Inc.
  • 24. Example 2: Monte Carlo PI 21  How much did this cost?  Use cloud.info to get cpu time used (runtime)  Cost = (cpu time) * rate  Cost = 60 seconds * 0.0013 per minute = $0.0013 © Copyright 2010 by PiCloud, Inc.
  • 25. Example 2: Monte Carlo PI 22  What was the _high_cpu attribute for? jids = cloud.map(monteCarlo, [numTests for _ in range(numMaps)], _high_cpu=True)  Automatically run your code with more CPU power  Default is 1 CPU unit (1-1.2ghz Xeon processor)  _high_cpu is 2.5 CPU units © Copyright 2010 by PiCloud, Inc.
  • 26. Example 3: Twitter Analyzer 23  Determine relationships between followers, # following, and statuses using linear regression  We use cloud.map to scrape twitter for user data  Run linear regressions in parallel using cloud.call  Graph statuses/followers with pylab  NOTE: To use this example, you will need to modify the posted file to use your own Twitter account information. © Copyright 2010 by PiCloud, Inc.
  • 27. Conclusion 24  You can now leverage the compute power of a cluster of servers with only a couple lines of code!  We’ve given you a taste of the features PiCloud has to offer, but there are many more!  If you have not already, register at www.picloud.com  Questions? ken@picloud.com © Copyright 2010 by PiCloud, Inc.