NCA GTUG 2012 - Cloud is such stuff as dreams are made on

77
Patrick Chanezon Senior Director Developer Relations [email protected] http://twitter.com/chanezon NCA GTUG, January 2012 Cloud is such stuff as dreams are made on Wednesday, February 1, 12

description

There is a profound architecture transition happening in software in 2011, like we see every 15 years: html5 and mobile on the client, cloud on the server.This talk will explain the opportunities and challenges that the Cloud represents for developers, in 4 areas: Infrastructure, Platform, Software and Development.This talk will describe the capabilities, philosophies and issues associated with current Cloud Platform offerings (Google Appengine, Azure, Beanstalk, CloudFoundry, Heroku), for different use cases (public, private, hybrid clouds) and the nascent Cloud Development services (Cloudbees, Exo, Cloud9, Github).We will dive into the code of a sample Cloud Foundry app using Node.js, MongoDb, the Twitter API and Lanyrd Calendar feeds, to show how Cloud Platforms enable a more agile development process.We will also discuss opportunities and risks for developers to move their apps to the Cloud, new skills to learn, and old habits to forget.

Transcript of NCA GTUG 2012 - Cloud is such stuff as dreams are made on

Page 1: NCA GTUG 2012 - Cloud is such stuff as dreams are made on

Patrick ChanezonSenior DirectorDeveloper [email protected]://twitter.com/chanezon NCA GTUG, January 2012

Cloud is such stuff as dreams are made on

Wednesday, February 1, 12

Page 2: NCA GTUG 2012 - Cloud is such stuff as dreams are made on

P@ in a nutshell

• French, based in San Francisco

• Senior Director, Developer Relations, VMware

• Software Plumber, API guy, mix of Enterprise and Consumer

• 18 years writing software, backend guy with a taste for javascript

• 2 y Accenture (Notes guru), 3 y Netscape/AOL (Servers, Portals), 5 y Sun (ecommerce, blogs, Portals, feeds, open source)

• 6 years at Google, API guy (first hired, helped start the team)

• Adwords, Checkout, Social, HTML5, Cloud

Wednesday, February 1, 12

Page 3: NCA GTUG 2012 - Cloud is such stuff as dreams are made on

P@ & Military Software

Wednesday, February 1, 12

Page 4: NCA GTUG 2012 - Cloud is such stuff as dreams are made on

Dreams Of my childhood

4

Wednesday, February 1, 12

Page 5: NCA GTUG 2012 - Cloud is such stuff as dreams are made on

Accelerando / Singularity, in a Galaxy far far away

§ Even if we automate ourselves out of a job every 10 years

§ ...I don’t think the singularity is near!

5

Wednesday, February 1, 12

Page 6: NCA GTUG 2012 - Cloud is such stuff as dreams are made on

Moore's Law is for Hardware Only

§ Does not apply to software

§ Productivity gains not keeping up with hardware and bandwidth

§ Writing software is hard, painful, and still very much a craft

6

Wednesday, February 1, 12

Page 7: NCA GTUG 2012 - Cloud is such stuff as dreams are made on

Moore's Law’s free lunch is over

§ Herb Sutter, Welcome to the Junglehttp://herbsutter.com/welcome-to-the-jungle/

7

Wednesday, February 1, 12

Page 8: NCA GTUG 2012 - Cloud is such stuff as dreams are made on

Predictions

“The future is already here — it's just not very evenly distributed” William Gibson

8

Wednesday, February 1, 12

Page 9: NCA GTUG 2012 - Cloud is such stuff as dreams are made on

Architecture Changes: 60’s Mainframe

Wednesday, February 1, 12

Page 10: NCA GTUG 2012 - Cloud is such stuff as dreams are made on

Architecture Changes: 80’s Client-Server

Wednesday, February 1, 12

Page 11: NCA GTUG 2012 - Cloud is such stuff as dreams are made on

Architecture Changes: 90’s Web

Wednesday, February 1, 12

Page 12: NCA GTUG 2012 - Cloud is such stuff as dreams are made on

Architecture Changes: 2010’s Cloud, HTML5, Mobile

Wednesday, February 1, 12

Page 13: NCA GTUG 2012 - Cloud is such stuff as dreams are made on

Back to Client Server: Groovy Baby!

13

Wednesday, February 1, 12

Page 14: NCA GTUG 2012 - Cloud is such stuff as dreams are made on

What is Cloud Computing?

14

Cloud According to my daughter Eliette

Wednesday, February 1, 12

Page 15: NCA GTUG 2012 - Cloud is such stuff as dreams are made on

Cloud Stack - Classic Pyramid

15

Platform As A Service

Infrastructure As A Service

SoftwareAs A Service

Wednesday, February 1, 12

Page 16: NCA GTUG 2012 - Cloud is such stuff as dreams are made on

Cloud Stack - By Number

16

Platform As A Service

InfrastructureAs A Service

SoftwareAs A Service

Wednesday, February 1, 12

Page 17: NCA GTUG 2012 - Cloud is such stuff as dreams are made on

Cloud Stack - By Value

17

InfrastructureAs A Service

SoftwareAs A Service

Platform As A Service

Wednesday, February 1, 12

Page 18: NCA GTUG 2012 - Cloud is such stuff as dreams are made on

Cloud Stack - Neutral

18

Platform As A Service

Infrastructure As A Service

SoftwareAs A Service

Wednesday, February 1, 12

Page 19: NCA GTUG 2012 - Cloud is such stuff as dreams are made on

Crossing the Chasm

§ Build the whole product

§ Cloud getting mainstream: Apple iCloud

§ Opportunities and risks

§ Ecosystems, various platforms

19

Picture from Wikimedia Foundation http://en.wikipedia.org/wiki/File:Technology-Adoption-Lifecycle.png

Wednesday, February 1, 12

Page 20: NCA GTUG 2012 - Cloud is such stuff as dreams are made on

Cloud Stack - History

§ What does cloud mean, 4 main angles• Software 1994 Netscape

• Infrastructure 2002 Amazon AWS

• Platform 2008 Google

• Development now!

§ Industrialization of hardware and software infrastructure• like electricity beginning of 20th century, cf The Big Switch, Nick Carr

§ But software development itself is moving towards craftmanship

20

Wednesday, February 1, 12

Page 21: NCA GTUG 2012 - Cloud is such stuff as dreams are made on

Cloud started at Consumer websites solving their needs

• Google, Amazon, Yahoo, Facebook, Twitter

• Large Data Sets

• Storage Capacity growing faster than Moore’s Law

• Fast Networks

• Horizontal -> Vertical scalability

• Open Source Software

• Virtualization

• Cloud is a productization of these infrastructures

• Public Clouds Services: Google, Amazon

• Open Source Software: Hadoop, Eucalyptus, Ubuntu, Cloud Foundry

Wednesday, February 1, 12

Page 22: NCA GTUG 2012 - Cloud is such stuff as dreams are made on

22

Infrastructure

Wednesday, February 1, 12

Page 23: NCA GTUG 2012 - Cloud is such stuff as dreams are made on

IaaS/Virtualization getting mainstream

§ AWS, Joyent, Rackspace,...

§ Open Source projects: OpenStack, DeltaCloud, Eucalyptus

§ Automation: Chef, Juju

§ Standardization? DMTF

§ Inside the Firewall, Virtualization: VMware, Microsoft, Xen, KVM

§ 50% of workloads are virtualized

§ Easy to provision, manage instance...BUT

§ Still need to manage backups, software stacks, monitor, upgrades

23

Wednesday, February 1, 12

Page 24: NCA GTUG 2012 - Cloud is such stuff as dreams are made on

With Infrastructure, you still need to build your own platform

§ Need to build a distributed platform on top of you infrastructure

§ Story of the AWS meltdown from last summer• http://blog.reddit.com/2011/03/why-reddit-was-down-for-6-of-last-24.html

• http://www.readwriteweb.com/cloud/2010/12/chaos-monkey-how-netflix-uses.php

• http://news.ycombinator.com/item?id=2477296

• http://stu.mp/2011/04/the-cloud-is-not-a-silver-bullet.html

§ Twilio, Smugmug, SimpleGeo survived it because they built their own distributed platform on top of IaaS

§ Enterprise customers want to consider Infrastructure like CDNs• Multi Cloud usage

• Based on Open Source de facto standards, or full standards whenever that happens

24

Wednesday, February 1, 12

Page 25: NCA GTUG 2012 - Cloud is such stuff as dreams are made on

25

Platforms

Wednesday, February 1, 12

Page 26: NCA GTUG 2012 - Cloud is such stuff as dreams are made on

Platforms

§ Raise the Unit of currency to be application & services instead of infrastructure

§ Google App Engine, Cloud Foundry, Joyent, Heroku, Stax (Cloudbees), Amazon elastic beanstalk, Microsoft Azure, AppFog

§ Single or a few languages, services

§ Start of Multi language Polyglot platforms

§ Enabler for Agile Developers -> Create Business value faster

§ Lack of standards: risk, vendor lock-in

§ Enterprise needs:•Control, customizability

•Private/Hybrid Cloud

•Avoid lock-in

26

Wednesday, February 1, 12

Page 27: NCA GTUG 2012 - Cloud is such stuff as dreams are made on

Agile Development Processes

Wednesday, February 1, 12

Page 28: NCA GTUG 2012 - Cloud is such stuff as dreams are made on

Agility as a survival skill

§ Consumer software is becoming like fashion•Phone apps, social apps, short lifetime, fast lifecycles

•Ab testing

§ Clay shirky situational apps

§ Kent Beck, Usenix 2011 Talk, “Software G-Forces”change in software process when frequency grows

§ Cloud Platforms enables an Agile culture, driver for innovation•Scalability is built in the platforms

•Can iterate faster

•Focus on design

§ Cloud Platforms lets developers focus on driving business value

28

Wednesday, February 1, 12

Page 29: NCA GTUG 2012 - Cloud is such stuff as dreams are made on

Main Risk: Lock-In

29

Welcome to the hotel californiaSuch a lovely placeSuch a lovely facePlenty of room at the hotel californiaAny time of year, you can find it here

Last thing I remember, I wasRunning for the doorI had to find the passage backTo the place I was before’relax,’ said the night man,We are programmed to receive.You can checkout any time you like,But you can never leave!

Wednesday, February 1, 12

Page 30: NCA GTUG 2012 - Cloud is such stuff as dreams are made on

Cloud Foundry: The Open PaaS

30

Clou

d Pr

ovide

r Int

erfa

ce

Application Service Private Clouds

PublicCloud

MicroCloud

Data Services

Other Services

Msg Services

vFabric Postgres

vFabric RabbitMQTM

• Open Source: Apache 2 Licensed

• multi language/frameworks

• multi services

• multi cloud

Wednesday, February 1, 12

Page 31: NCA GTUG 2012 - Cloud is such stuff as dreams are made on

31

Open Source

Wednesday, February 1, 12

Page 32: NCA GTUG 2012 - Cloud is such stuff as dreams are made on

Open Source Advantage

§ http://code.google.com/p/googleappengine/issues/detail?id=13

32

• https://github.com/cloudfoundry/vcap/pull/25

Wednesday, February 1, 12

Page 33: NCA GTUG 2012 - Cloud is such stuff as dreams are made on

33

Multi Cloud

Wednesday, February 1, 12

Page 34: NCA GTUG 2012 - Cloud is such stuff as dreams are made on

34

CloudFoundry.COM

Runtimes & Frameworks

Services

vCenter / vSphere

Cloud Foundry

Infrastructure

Wednesday, February 1, 12

Page 35: NCA GTUG 2012 - Cloud is such stuff as dreams are made on

35

Cloud Foundry.ORG

The Source Code to Compile & Build Cloud Foundry

vCenter / vSphere

Cloud Foundry

DownloadCode

Setup Environment

Deploy Behind Firewall

Setup Scripts

Wednesday, February 1, 12

Page 36: NCA GTUG 2012 - Cloud is such stuff as dreams are made on

Micro Cloud Foundry

36

Micro

Wednesday, February 1, 12

Page 37: NCA GTUG 2012 - Cloud is such stuff as dreams are made on

What is a Micro Cloud?

37

Entire Cloud Running inside of a single VM

Or

Wednesday, February 1, 12

Page 38: NCA GTUG 2012 - Cloud is such stuff as dreams are made on

Micro Cloud Foundry… (BETA)

38

A pre-built Micro (Single VM) version of Cloud Foundry…

Signup @ http://cloudfoundry.com/micro

You need a Cloud Foundry.com Account to use Micro Cloud Foundry

Wednesday, February 1, 12

Page 39: NCA GTUG 2012 - Cloud is such stuff as dreams are made on

Micro Cloud Foundry… (BETA)

38

A pre-built Micro (Single VM) version of Cloud Foundry…

Signup @ http://cloudfoundry.com/micro

You need a Cloud Foundry.com Account to use Micro Cloud Foundry

Micro

Wednesday, February 1, 12

Page 40: NCA GTUG 2012 - Cloud is such stuff as dreams are made on

What is in Micro Cloud Foundry?

39

Open source Platform as a Service project

App Instances Services

10.04

Dynamic Updating DNS

.COM

Wednesday, February 1, 12

Page 41: NCA GTUG 2012 - Cloud is such stuff as dreams are made on

Other Cloud Foundry powered PaaS

40

Private PaaS

Added Python and Perl

Public PaaS

Added PHP

Tier3 and Uhuru recently added .NET support

Wednesday, February 1, 12

Page 42: NCA GTUG 2012 - Cloud is such stuff as dreams are made on

41

Development LifeCycle

Wednesday, February 1, 12

Page 43: NCA GTUG 2012 - Cloud is such stuff as dreams are made on

Traditional App Deploy and Request/Response

Web

App

DB

Web

App

DB

Request/AllocateBuild/SetupInstall/ConfigureDeploy/Test

Scale?Upgrade?Update?

Wednesday, February 1, 12

Page 44: NCA GTUG 2012 - Cloud is such stuff as dreams are made on

Web

How Apps are Deployed on Cloud Foundry

Web

App

DB

“vmc push MyApp”

WebApp

DB

“vmc instances MyApp 5”“vmc map MyApp MyApp2”“vmc update MyApp”

Scale?Upgrade?Update?

Wednesday, February 1, 12

Page 45: NCA GTUG 2012 - Cloud is such stuff as dreams are made on

Web

How Apps are Deployed on Cloud Foundry

Web

App

DB

“vmc push MyApp”

WebApp

DB

“vmc instances MyApp 5”“vmc map MyApp MyApp2”“vmc update MyApp”

Scale?Upgrade?Update?

Wednesday, February 1, 12

Page 46: NCA GTUG 2012 - Cloud is such stuff as dreams are made on

How Apps are Accessed on Cloud Foundry

Web

App

DB

App Instance

Service

Request Web InterfaceLoad

Balancingand

Routing

Response

“vmc push MyApp”

Wednesday, February 1, 12

Page 47: NCA GTUG 2012 - Cloud is such stuff as dreams are made on

How Apps are Scaled on Cloud Foundry

Web

App

DB

App Instances

Service

Request

Response

Load

Balancer(s)Load

Balancer(s)

Load Balancing

and Routing

Web

App

Web

App

“vmc instances MyApp 3”

Wednesday, February 1, 12

Page 48: NCA GTUG 2012 - Cloud is such stuff as dreams are made on

How Apps are Updated on Cloud Foundry

Web

App

DB

Service

Web

App

DB

Service

Web

App

Web

App

PreviousVersion

InstanceStopped

UpdatedCode

NewVersion

“vmc update MyApp”

Wednesday, February 1, 12

Page 49: NCA GTUG 2012 - Cloud is such stuff as dreams are made on

47

Services

Wednesday, February 1, 12

Page 50: NCA GTUG 2012 - Cloud is such stuff as dreams are made on

Current Services Available on Cloud Foundry

48

Wednesday, February 1, 12

Page 51: NCA GTUG 2012 - Cloud is such stuff as dreams are made on

Service Creation and Binding

49

VCAP_SERVICES:

{"redis-2.2":[{"name":"redis_sample","label":"redis-2.2","plan":"free",

"tags":["redis","redis-2.2","key-value","nosql"],

"credentials":

{"hostname":"172.30.48.40",

"host":"172.30.48.40",

"port":5023,

"password":"8e9a901f-987d-4544-9a9e-ab0c143b5142",

"name":"de82c4bb-bd08-46c0-a850-af6534f71ca3"}

}],

"mongodb-1.8":[{"name":"mongodb-e7d29","label":"mongodb-1.8","plan":"free","tags”:………………….

Wednesday, February 1, 12

Page 52: NCA GTUG 2012 - Cloud is such stuff as dreams are made on

Service Creation and Binding

50

App Instance

Wednesday, February 1, 12

Page 53: NCA GTUG 2012 - Cloud is such stuff as dreams are made on

Service Creation and Binding

50

App Instance Redis Service

Wednesday, February 1, 12

Page 54: NCA GTUG 2012 - Cloud is such stuff as dreams are made on

Service Creation and Binding

50

App Instance Redis Service

Wednesday, February 1, 12

Page 55: NCA GTUG 2012 - Cloud is such stuff as dreams are made on

Service Creation and Binding

50

App Instance Redis Service

MongoDB

Service

Wednesday, February 1, 12

Page 56: NCA GTUG 2012 - Cloud is such stuff as dreams are made on

51

How it works

Wednesday, February 1, 12

Page 57: NCA GTUG 2012 - Cloud is such stuff as dreams are made on

Logical View

52

VMC client STS plugin Browser(user app access)

Routers

CloudControllers App

Services

App

HealthManager

DEA Pool

Messaging

Wednesday, February 1, 12

Page 58: NCA GTUG 2012 - Cloud is such stuff as dreams are made on

53

Architecture

Wednesday, February 1, 12

Page 59: NCA GTUG 2012 - Cloud is such stuff as dreams are made on

Register today

54

http://cloudfoundry.com/signup

dc2012Use Promo Code

To avoid approval queue waiting time

Wednesday, February 1, 12

Page 60: NCA GTUG 2012 - Cloud is such stuff as dreams are made on

Cloud for Developers: the true path is PaaS!

55

Wednesday, February 1, 12

Page 61: NCA GTUG 2012 - Cloud is such stuff as dreams are made on

BigData Platforms: Hadoop

§ Apache Hadoop, open source version of Google MapReduce, GFS...

§ Cloudera, many others, space heating up

§ EMC, HortonWorks distros

§ Google Bigquery

§ Be your own bitch, today, Cloudera distro

56

Wednesday, February 1, 12

Page 62: NCA GTUG 2012 - Cloud is such stuff as dreams are made on

Services

§ Services

§ Apis, apigee, mashery

§ Telephony, Twilio

§ Geo

§ Social

§ Visualization

57

Wednesday, February 1, 12

Page 63: NCA GTUG 2012 - Cloud is such stuff as dreams are made on

Development

§ Final frontier, happening now

§ Not whole product yet

§ Source: Google code, Github

§ Dev: Cloud9, Exo, Orion

§ Higher level case tools, Wavemaker, Orangescape, Runmyprocess

§ Build: Jenkins, Cloudbees, OpenShift

§ Test: feature of cloud platforms

§ Community Stackoverflow, Github

58

Wednesday, February 1, 12

Page 64: NCA GTUG 2012 - Cloud is such stuff as dreams are made on

59

Lessons for Developers

Wednesday, February 1, 12

Page 65: NCA GTUG 2012 - Cloud is such stuff as dreams are made on

Predictions

§ Software is becoming like fashion, design rules

§ Welcome to Babel, use the best tool for the job, embrace multiple language & heterogeneity

§ Our jobs will change, build yourself out of your current job

§ Sysadmin jobs will disappear, except at large cloud providers

§ Many opportunities open when you embrace change

60

Wednesday, February 1, 12

Page 66: NCA GTUG 2012 - Cloud is such stuff as dreams are made on

Chaos of creativity

§ Proliferation of languages and frameworks

§ Spring, Rails, Grails, Django

§ “Pythons has more web frameworks than language keywords”

§ Javascript, Python, PHP, Java, Groovy, Scala, Clojure, Go

§ Gosling, vm is important, not the language

§ Ability to create DSL important, cf Book

§ Fragmentation of communities

§ Chaotic Darwinian period, fun for the curious, deadly for the ossified

§ Online services replacing a lot of software

§ Mashups, Weaving services together

§ Pick your battles, choose what you need to build yourself to add value

61

Wednesday, February 1, 12

Page 67: NCA GTUG 2012 - Cloud is such stuff as dreams are made on

Things to Forget

§ First normal form

§ Waterfall model

§ Single server deployment

§ Single language skill

62

Wednesday, February 1, 12

Page 68: NCA GTUG 2012 - Cloud is such stuff as dreams are made on

Things to Learn

• Agile, API Design

• UI Design, Javacript, HTML5, CSS3

• A/B Testing

• Open Source, Open Standards

• Architecture, Distributed Computing (CAP theorem, 8 fallacies)

• Cloud Platforms and APIs

• Multiple types of

• languages (imperative, object, functional, logic)

• Learn to live in a box (embrace platform limitations) to think outside the box

63

Wednesday, February 1, 12

Page 69: NCA GTUG 2012 - Cloud is such stuff as dreams are made on

What it means for you

§ Build On the shoulders of giants

§ Take risks, to innovate

§ Learn everyday, try different things

§ learn an api or framework / month

§ Learn a language / year

§ Be fast and agile

§ Make money

§ Social and app stores

64

Wednesday, February 1, 12

Page 70: NCA GTUG 2012 - Cloud is such stuff as dreams are made on

Be your own bitch

“Don’t be a Google Bitch, don’t be a Facebook Bitch, and Don’t be a Twitter Bitch. Be your own Bitch.”Fred Wilson

65

http://techcrunch.com/2011/05/23/fred-wilson-be-your-own-bitch/

Wednesday, February 1, 12

Page 71: NCA GTUG 2012 - Cloud is such stuff as dreams are made on

Such stuff as dreams are made on

§ Like a kid on a candy store: there's never been a better time to be a software developer!

§ Welcome to the Cloud: embrace change and reinvent yourselves

§ “The future is already there, not evenly distributed” Gibson

§ We Developers, invent the future today

66

Wednesday, February 1, 12

Page 72: NCA GTUG 2012 - Cloud is such stuff as dreams are made on

Cloud Foundry Resources

67

Primary Site : cloudfoundry.com

Open Source Site : cloudfoundry.org

Twitter : @cloudfoundry , hash tag #cfoundry

Blog : blog.cloudfoundry.com

FB : facebook.com/cloudfoundry

Support : support.cloudfoundry.com• Documentation

• Knowledge Base

• Q & A / Forums

Wednesday, February 1, 12

Page 73: NCA GTUG 2012 - Cloud is such stuff as dreams are made on

Questions

68

?Wednesday, February 1, 12

Page 74: NCA GTUG 2012 - Cloud is such stuff as dreams are made on

Thank You!@CloudFoundry

@chanezon

Website : www.cloudfoundry.comBlog : blog.cloudfoundry.comForum : support.cloudfoundry.com

t

t

Wednesday, February 1, 12

Page 75: NCA GTUG 2012 - Cloud is such stuff as dreams are made on

Books / Articles

§ Nick Carr, The Big Switch

§ Eric Raymond, The Art of Unix Programming

§ Weinberg, Psychology of Computer Programming

§ Wes python book

§ Mark html5 book

§ Kent Beck XP

§ Hunt, Thomas, The Pragmatic Programmer

§ Ade Oshineye, Apprenticeship Patterns

§ Matt Cutt's Ignite Talk IO 2011, Trying different things

§ Josh Bloch talk about api design

§ Larry and Sergey, Anatomy of a Search Engine

§ Rob Pike, The Practice of Programming

70

Wednesday, February 1, 12

Page 76: NCA GTUG 2012 - Cloud is such stuff as dreams are made on

Papers / Talks

§ Simon Wardley, Oscon 09 “Cloud - Why IT Matters”

§ Tim O’Reilly article on internet os

§ Peter Deutsch’s 8 Fallacies of Distributed Computing

§ Brewer’s CAP Theorem

§ Gregor Hohpe’s Starbucks Does Not Use Two-Phase Commit

§ Stuff I tag http://www.delicious.com/chanezon/

§ More specifically http://www.delicious.com/chanezon/cloudfoundry

§ My previous Talks http://www.slideshare.net/chanezon

§ My list of favorite books http://www.chanezon.com/pat/soft_books.html

71

Wednesday, February 1, 12

Page 77: NCA GTUG 2012 - Cloud is such stuff as dreams are made on

Acknowledgement

§ Drawings from my daughters Eliette

§ Slides from Dave McCrory, Derek Collison, Russell Acton, Alexandre Vasseur

72

Wednesday, February 1, 12