Accelerrate your PaaS to the Mobile World

54
Accelerate your PaaS to the Mobile World Ryan Campbell @CloudBees @recampbell

description

CloudBees Mobile Development and Deployment on PaaS

Transcript of Accelerrate your PaaS to the Mobile World

Page 1: Accelerrate your PaaS to the Mobile World

Accelerate your PaaS to the Mobile World

Ryan Campbell

@CloudBees @recampbell

Page 2: Accelerrate your PaaS to the Mobile World

2

Today’s Presenter

Ryan Campbell

Engineer, DEV@cloud

[email protected], TX

Page 3: Accelerrate your PaaS to the Mobile World

3

Resources

http://bit.ly/17Km8QC

Page 4: Accelerrate your PaaS to the Mobile World

4

What we’ll cover

• What is a PaaS?• What is CloudBees?–What is WEAVE?

• Demo – Mobile Push for Android• Demo – iOS build in the cloud

Page 5: Accelerrate your PaaS to the Mobile World

©2013 CloudBees, Inc. All Rights Reserved

5

Warm up Jenkins1. Sign up at cloudbees.com/signup

2. Subscribe to Jenkins

Page 6: Accelerrate your PaaS to the Mobile World

6

What’s a Platform?

• Something you can use to – Run your apps– Build your apps– Add services to your apps–Manage your apps

• Plaform-as-a-Service (PaaS) uses elastic, on-demand Cloud resources to do this

Page 7: Accelerrate your PaaS to the Mobile World

7

CloudBees Is a Platform Delivered As A Service

cloudbees.com

JenkinsMaster

Test

Stage

Build

Code

JenkinsExecutor

Forg

e R

ep

osit

ori

es

Git

SVN

mvn

Development Services

(DEV@cloud)

Developer and OperationsInteraction

End User Interaction

Runtime Services

(RUN@cloud)

CloudBees API

Grand Central Web

Console

SDK

SessionClustering

MySQL

Router

Application

PartnerEcosystem

7

©CloudBees, Inc. All Rights Reserved

Page 8: Accelerrate your PaaS to the Mobile World

8

Cloud Terminology

• Infrastructure-as-a-Service (IaaS)– Think: Amazon Web Services–What: Server Instances, Storage

Buckets etc

• Software-as-a-Service (SaaS)– Think: Salesforce.com–What: Packaged Applications (in the

Cloud)

• Plaform-as-a-Service (PaaS)–What: Managed Service for Custom

Apps

Page 9: Accelerrate your PaaS to the Mobile World

9

What is Platform-as-a-Service?

• We run your applications for you• We provide and manage all the

supporting infrastructure needed to run your apps

• We monitor and can scale out your apps

• We provide a full, enterprise-class build environment using Jenkins CI – the world’s #1 OSS continuous integration server

• You write the code and we do all the rest

Page 10: Accelerrate your PaaS to the Mobile World

10

Have You Met Jenkins?

• #1 OSS CI server• Easy to install/use• Extensible via 600+ plugins• Very widely adopted– 47K+ installations

• Very active community– Over 7 years of history, 440+ releases– 600+ plugins, 300+ developers

• CloudBees adds plugins for cloud builds

Page 11: Accelerrate your PaaS to the Mobile World

11

CloudBees Step-by-Stepcloudbees.com

JenkinsMaster

Test

Stage

Build

Code

JenkinsExecutor

Forg

e R

ep

osit

ori

es

Git

SVN

mvn

Development Services

(DEV@cloud)

Developer and OperationsInteraction

End User Interaction

Runtime Services

(RUN@cloud)

CloudBees API

Grand Central Web

Console

SDK

SessionClustering

MySQL

Router

Application

PartnerEcosystem

Multi-Tenanted

Dedicated

Amazon Web Services

11

©CloudBees, Inc. All Rights Reserved

Page 12: Accelerrate your PaaS to the Mobile World

12

What Platform-as-a-Service Is Not

• Commercial, packaged applications don’t usually run on a PaaS

• You don’t need to purchase any hardware or software licenses

• You won’t have to install anything – you just deploy your Java apps to the platform

• If you need to run your applications in your own data center, PaaS is the wrong model

Page 13: Accelerrate your PaaS to the Mobile World

13

How Do You Use CloudBees?

13

CLI/SDK GrandCentral Web Console IDE

©CloudBees, Inc. All Rights Reserved

Page 14: Accelerrate your PaaS to the Mobile World

14

What Does It Cost?

• Your app always runs in secure, isolated containers to which only you have access

• We can run those containers for you using shared resources or dedicated resources

• You pay only for what you need: a fixed subscription or “pay as you go” pricing

• FREE and COMPLETE for developers: no credit card required

Page 15: Accelerrate your PaaS to the Mobile World

15

• Lose it!– Mobile application– Millions of users– More than 30,000 transactions per minute, at peak

time

• And… only 4 employees and …2 developers!– No IT, no servers, no DevOps– Complete focus on SOFTWARE DEVELOPMENT– Anything else is handled by CloudBees

• Unmatched productivity level!– This is possible TODAY– Will you wait for your competitors to shoot first?

Example: Lose it!

Page 16: Accelerrate your PaaS to the Mobile World

16

Getting Started: CloudBees ClickStarts

©2012 CloudBees, Inc. All Rights Reserved

The easiest way to get started – and learn new technologies

Page 17: Accelerrate your PaaS to the Mobile World

17

cloudbees.com

What’s up with this new framework!

What Did I Just Do?

17

CloudBeesGit

Repo

Database

Build/Test

db:create

App

PartnerServicePartner

Service

CloudBees API

Grand Centra

l Web

Console

app:creategit clone

Jenkins job create

Bind

Bind

Trigger

Deploy

Wow! At yourservice

©2013 CloudBees, Inc. All rights reserved

Page 18: Accelerrate your PaaS to the Mobile World

18

cloudbees.com

Develop Locally, Build in the Cloud

CloudBeesGit

Repo

Database

Build/Test

App

PartnerServicePartner

Service

Bind

Bind

TriggerDeployI want to make

some changes!

Local GitRepo

git clonegi

t com

mit git push

Chan

ges

Wow! At yourservice

Page 19: Accelerrate your PaaS to the Mobile World

©2013 Cloud Bees, Inc. All Rights Reserved

Gasp! Demo

Mobile Data Sync and Notification Services with PaaS

Page 20: Accelerrate your PaaS to the Mobile World

20©2013 CloudBees, Inc. All Rights Reserved

What is WEAVE@cloud?

On-Premise

A Cloud-Based Data Integration Service

In-Cloud

20

(formerly « FoxWeave »)

Page 21: Accelerrate your PaaS to the Mobile World

21

AppCentric Integration

21©2013 CloudBees, Inc. All rights

reserved

AppLogic

Find Location and Places/Events

ReviewRestaurant

ApplicationRunning on CloudBees

Update Gasp! Database

Update Mobile Device Databases

Create New Prospect in

Salesforce.com

Tweet

Update Marketing

Page 22: Accelerrate your PaaS to the Mobile World

©2013 CloudBees, Inc. All Rights Reserved

22

What am I doing?

Am I interested?

Who am I?

Where am I?

Page 23: Accelerrate your PaaS to the Mobile World

23

Application Architecture

gasp!JPA/JDBC

Database

polls

WEAVE@cloud

Sync Service(gasp-gcm-server)

REST

Google CloudMessaging

notifications

registers

notifications

reviews

Page 24: Accelerrate your PaaS to the Mobile World

©2013 CloudBees, Inc. All Rights Reserved

24

Push Notification: The Details

Send push notifications

DB update triggers async notification

PaaS maps relevant updates to interested users

Push APIs

Register device and user

Register mobile endpoint Push APIs

PaaS manages user-to-device mapping and registration

Page 25: Accelerrate your PaaS to the Mobile World

25©2013 CloudBees, Inc. All Rights Reserved

• One API to handle– Google Cloud Messaging: Android– Apple Push Notification: iOS– Amazon Device Messaging: Kindle

• Gasp SNS Mobile Push example:https://github.com/CloudBees-community/gasp-push-server

• Compare GCM and APNS native versions:https://github.com/CloudBees-community/gasp-gcm-serverhttps://github.com/CloudBees-community/gasp-apns-server

Amazon SNS Mobile Push

Page 26: Accelerrate your PaaS to the Mobile World

26©2013 CloudBees, Inc. All Rights Reserved

Gasp! - Google Cloud Messaging (GCM)

• GCM Push Server (partnerdemo/gasp-gcm-server)– Android devices register for updates– REST API for FoxWeave update via

WebHook– GCM notifications sent to all registered

devices– Async notifications; device pulls the actual

data• Data sync (WEAVE@cloud)

– Updates triggered using ‘where id > ##id’

– Calls gasp-gcm-server REST API– Updates are pushed out to registered

devices and trigger refresh of on-device SQLite database via async REST calls

Page 27: Accelerrate your PaaS to the Mobile World

©2013 CloudBees, Inc. All Rights Reserved

27

GCM Server: Registration and Push

• App/Device automatically registers with OTA service (e.g. GCM) to get device token

• Sends device token to Gasp Push Server (REST API), running on CloudBees PaaS

• Gasp Push Server controls notifications – who gets what

Page 28: Accelerrate your PaaS to the Mobile World

28©2013 CloudBees, Inc. All Rights Reserved

• Event model: cloudbees-app-model.json

• WEAVE filter: web.xml

Weave@cloud Integration

Page 29: Accelerrate your PaaS to the Mobile World

29©2013 CloudBees, Inc. All Rights Reserved

• End-to-end integration from any WEAVE service direct to the app/device via push notification:

• Android client: com/cloudbees/gasp/gcm

Weave@cloud Integration

Page 30: Accelerrate your PaaS to the Mobile World

30©2013 CloudBees, Inc. All Rights Reserved

Gasp! - Android Clients and CI Builds

• Android client application (gasp-gcm-client)– Runs on AVD (Google APIs:18 platform)– Async Intent Services handle

sync/update– GCM notifications handled

asynchronously– Gasp! data stored in Android SQLite

database– Separate demo has Maps activity (needs

device)

Page 31: Accelerrate your PaaS to the Mobile World

31

Application Architecture

gasp!JPA/JDBC

Database

polls

WEAVE@cloud

Sync Service(gasp-gcm-server)

REST

Google CloudMessaging

notifications

registers

notifications

reviews

Page 32: Accelerrate your PaaS to the Mobile World

32

Page 33: Accelerrate your PaaS to the Mobile World

33

cloudbees.com/mobile-paas

Page 34: Accelerrate your PaaS to the Mobile World

34

Vessel.io plugin

Page 35: Accelerrate your PaaS to the Mobile World

35

BlazeMeter plugin

Page 36: Accelerrate your PaaS to the Mobile World

36

App.io plugin

Page 37: Accelerrate your PaaS to the Mobile World

37

SOASTA CloudTest plugin

Page 38: Accelerrate your PaaS to the Mobile World

38

Page 39: Accelerrate your PaaS to the Mobile World

39

Demo

Page 40: Accelerrate your PaaS to the Mobile World

40

Page 41: Accelerrate your PaaS to the Mobile World

41

Fully Elastic

Page 42: Accelerrate your PaaS to the Mobile World

42

XCode plugin improvement

x.developerprofile

Page 43: Accelerrate your PaaS to the Mobile World

43

Page 44: Accelerrate your PaaS to the Mobile World

44

cloudbees.com/osx

Page 45: Accelerrate your PaaS to the Mobile World

45

http://www.flickr.com/photos/66598477@N07/6065295630/

Page 46: Accelerrate your PaaS to the Mobile World

46

Mansion

Slave Slave

Slave Slave

Page 47: Accelerrate your PaaS to the Mobile World

47

Maven

Git

Ant

Mercurial

Gradle

Subversion

Linux Kernel

Hardware

Linux Container = zero cost virtualization

Page 48: Accelerrate your PaaS to the Mobile World

48

For OSX

Maven

Git

XCode

Git

XCode

Subversion

OS X OS X OS X

QEMU QEMU QEMU

Linux Kernel

Apple Hardware

Page 49: Accelerrate your PaaS to the Mobile World

49

Kernel Same-page Merging

OS X OS X OS X

Page 50: Accelerrate your PaaS to the Mobile World

50

Page 51: Accelerrate your PaaS to the Mobile World

51

Mansion

Slave

Slave

Slave

Workspace 1

Workspace 2

Workspace 3

Workspace 4

Page 52: Accelerrate your PaaS to the Mobile World

52

Slave

Slave

Workspace

Workspace’’

Workspace’

Page 53: Accelerrate your PaaS to the Mobile World

53

Slave

Slave

~/.m2/repository

~/.m2/repository

~/.m2/repository

Page 54: Accelerrate your PaaS to the Mobile World

54

Questions?