Deep Dive: Strategic Importance of BaaS

34
The Strategic Importance of BaaS Jerey West

Transcript of Deep Dive: Strategic Importance of BaaS

Page 1: Deep Dive: Strategic Importance of BaaS

The Strategic Importance of BaaSJeffrey West

Page 2: Deep Dive: Strategic Importance of BaaS

Jeffrey West

Who Am I?

•  BaaS Engineering Coach at Apigee•  10+ years in Middleware

implementation, integration, development & product management

•  Apache Committer

Page 3: Deep Dive: Strategic Importance of BaaS

Context

3

Page 4: Deep Dive: Strategic Importance of BaaS

4

(m) obileB ackend a saS ervice

Datastore

Push Notifications

Connections /Social

Location

Users

…and more

Application

Page 5: Deep Dive: Strategic Importance of BaaS

Building Systems of Engagement with Edge API BaaS

5

Systems of Record

Apigee Edge: Intelligent API Platform

Systems of Engagement

App Developers

DatabaseERPCRM Data �Warehouse Data Lake

Partner AppsConsumer Apps Employee Apps Insights

Page 6: Deep Dive: Strategic Importance of BaaS

Systems of Engagement

6

Page 7: Deep Dive: Strategic Importance of BaaS

7 ©2015 Apigee. All Rights Reserved.

Web Scale�10’s of thousands requests/sec�…across multiple data centers

Page 8: Deep Dive: Strategic Importance of BaaS

Scaling Usergrid to 10,000 Req/s w/ Gatling

•  10k test run:–  35 c3.xlarge Tomcat Nodes–  9 c3.4xlarge C* nodes–  6 m3.large ES nodes

•  Closing test ~7,800/s:–  15 c3.xlarge Tomcat Nodes–  9 c3.4xlarge C* nodes–  6 m3.large ES nodes

8

Page 9: Deep Dive: Strategic Importance of BaaS

Strategic Value

9

Page 10: Deep Dive: Strategic Importance of BaaS

Speed

10

Page 11: Deep Dive: Strategic Importance of BaaS

Speed

…to proof of value…to deploy…to change…to ENGAGE

– Customers– Partners– Employees

11 ©2015 Apigee. All Rights Reserved.

Page 12: Deep Dive: Strategic Importance of BaaS

How?

12

Page 13: Deep Dive: Strategic Importance of BaaS

OrganizationOrganization

Organization

Application

DevicesUsers Groups

Security Roles

CollectionData / Collections

Entity{…}Entity

{…}Entity{…}

Application

DevicesUsers Groups

Security Roles

Entity{…}Entity

{…}Entity{…}

CollectionData / Collections

Entity{…}Entity

{…}Entity{…}

Page 14: Deep Dive: Strategic Importance of BaaS

API BaaS – Users, Roles & Security•  Organization administrator

accounts

•  Registration & Login for your app

•  End user credentials

•  Organization-level client ID and shared secret

•  Application-level client ID and shared secret

•  Hierarchical Groups

•  Fine-Grained User/Group/Role/Permission model

14

Page 15: Deep Dive: Strategic Importance of BaaS

But I just want to store data!

15

REST APIGET / PUT / POST / DELETE

Scalable, Multi-tenant Persistence (Single Cluster)

Page 16: Deep Dive: Strategic Importance of BaaS

Apigee API BaaS:Powered by Apache Usergrid

16

Page 17: Deep Dive: Strategic Importance of BaaS

•  Apache Open Source Mobile Backend as a Service•  REST API for easy interaction from any platform•  SDKs available for iOS / Android / Javascript

17

http://usergrid.apache.org

Page 18: Deep Dive: Strategic Importance of BaaS

The Usergrid Stack

18

Page 19: Deep Dive: Strategic Importance of BaaS

Built on Horizontally Scalable Technologies

Page 20: Deep Dive: Strategic Importance of BaaS

Built on Horizontally Scalable Technologies

20 ©2015 Apigee. All Rights Reserved.

( )

Page 21: Deep Dive: Strategic Importance of BaaS

API-Driven Data Access w/ Query•  REST Semantics

–  GET, PUT, POST, DELETE•  Filtering:

–  GET http://api.usergrid.com/MyOrg/MyApp/books?ql=select * where title contains 'ta*'–  GET http://api.usergrid.com/MyOrg/MyApp/books?ql=select * where title contains 'tale’–  GET http://api.usergrid.com/MyOrg/MyApp/books?ql=select * where title = 'A Tale of Two Cities'

•  Limit–  GET http://api.usergrid.com/{org}/{app}/{collection}?limit=5&ql=where status='active’

•  Location:–  GET http://api.usergrid.com/{org}/{app}/{collection}?ql=select * where location within {d} of {x, y}

•  Cursors–  GET http://api.usergrid.com/MyOrg/MyApp/users?ql=select * where name =

’John*'&limit=50&cursor=LTIxNDg0NDUxNDpnR2tBQVFFQWdITUFDWFJ2YlM1emJXbDBhQUNBZFFBUUQyMVZneExfRWVLRlV3TG9Hc1doZXdDQWRRQVFIYVdjb0JwREVlS1VCd0xvR3NWT0JRQQ

21

Page 22: Deep Dive: Strategic Importance of BaaS

Working with Graph & NoSQL Data

22

Page 23: Deep Dive: Strategic Importance of BaaS

Graph Data Persistence: Entities & Connections•  Entities

–  Objects / Documents representing an Entity

•  Collections–  Logical grouping of Entities

•  Connections / Entity Relationships–  Graph Data Structure–  /{collection}/{entityA}/{verb}/{collection}/{entityB}–  /Users/me/likes/Products/iPhone6–  /Recipes/Bread/includes/Ingredients/Flour

23

UserA

ProductA

UserB

UserC

Likes>><<Liking

Page 24: Deep Dive: Strategic Importance of BaaS

•  De-normalization and model the data based on the way you expect to use it. Use connections to reflect relationships (which may or may not be based on “keys”)

•  SDKs for seven languages can simplify app development, or just use “curl”, Apache HTTP Client, or your favorite browser tool.

Designing for Apigee Edge API BaaS

24

Device

Device

Device

Device

Notification�Preferences User

Application

Notification�Preferences User

Consent

Page 25: Deep Dive: Strategic Importance of BaaS

File Storage: Larger JSON Data & Binary Assets•  Purpose: Store binary files such as images, ZIP files and even large JSON

objects which do not need to be indexed

•  Files can be attached to any entity:–  curl -H "Authorization: Bearer ${TOKEN}" -X POST -F name='max.jpg' -F [email protected] 'https://api.usergrid.com/{org}/{app}/{collection}/{entity}'

•  Retrieve your file by specifying a MIME type to accept:–  curl -H "Accept: image/jpeg" -H "Authorization: Bearer ${TOKEN}" -X GET -o max_webcast.jpg 'https://api.usergrid.com/{org}/{app}/{collection}/{entity}'

25

Page 26: Deep Dive: Strategic Importance of BaaS

Engaging with your Users

26

Page 27: Deep Dive: Strategic Importance of BaaS

27

88% of emails are never opened 84% of Facebook posts are never viewed 71% of tweets are never read 98% of SMS/MMS messages are opened and read

Page 28: Deep Dive: Strategic Importance of BaaS

Push Notifications•  Notification Providers

•  Narrowcast / Broadcast–  One User’s device–  All Devices–  All Devices in a Geo–  Only iOS / Android

Page 29: Deep Dive: Strategic Importance of BaaS

Flexible Notification TargetingPush Notification to 20 Miles of a store location

POST https://api.usergrid.com/jeffreyawest/sandbox/devices;ql=“location within 32186.9 of 34.427514,-118.535013”/notifications

Push Notifications to a group of usersPOST https://api.usergrid.com/jeffreyawest/sandbox/groups/capos/notifications

POST https://api.usergrid.com/jeffreyawest/sandbox/groups/soldiers/notifications

Push Notifications to a group of users in a certain location

POST https://api.usergrid.com/jeffreyawest/sandbox/groups/capos/users;ql=/devices;ql=“location within 32186.9 of 034.427514,-118.535013”/notifications

29

Page 30: Deep Dive: Strategic Importance of BaaS

DEMO

30

Page 31: Deep Dive: Strategic Importance of BaaS

Roadmap

31

Page 32: Deep Dive: Strategic Importance of BaaS

What’s Next for Usergrid

•  Grow the community!•  Blueprints Driver Release!•  Service abstraction•  Indexing closer to real-time•  Larger Clusters•  Distributed Work System•  Encryption & Security

32

Page 33: Deep Dive: Strategic Importance of BaaS

Application Performance Monitoring from Apigee

33

Page 34: Deep Dive: Strategic Importance of BaaS

Q & A

34