Backend-as-a-Service (BaaS) has become essential technology for mobile developers. By enabling drastically shorter mobile app implementation timelines, BaaS continues to be a developer's best bet to simplify and scale app development.
In our deep-dive technical series, we look at Apigee Edge API BaaS, which enables web and mobile app developers to link their apps to a cloud datastore and provide features including user management, push notifications, geolocation services, and more.
Listen to the podcast version here: http://bit.ly/1BRNKaw
5. 5
(m) obile
B ackend
a s
a
S ervice
Datastore
Performance
Mgmt
Push
Notifications
Connections /
Social
Location
Users
6. Building engaging experiences, powered by APIs
6
Modern apps are built around the user’s context
ü Inherently Mobile
ü Social
ü Location Aware
ü Proactive and Interactive
ü Push Notifications
ü Agile and Iterative
User
7. Building Systems of Engagement with Edge API BaaS
7
Systems of
Record
Apigee Edge: Intelligent API Platform
Systems of
Engagement
Consumer Apps Partner Apps Employee Apps Insights
CRM ERP
Data
Warehouse
Data LakeDatabase
App Developers
8. Apigee Edge Services
App
Developer Services
Security Transformations Optimization
Identity & Social LocationPush & Real-time
Data Shaping
Persistence
Analytics Services
Account Management SupportMonetization
Onboarding Authentication Documentation Community
Monitoring
API Services
API TeamDeveloper
Backend
Users Apps APIs SystemsDevelopers
15. 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
15
User
A
Product
A
User
B
User
C
Likes>>
<<Liking
16. • 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
16
Device
Device
Device
Device
Notification
Preferences User
Application
Notification
Preferences User
Consent
17. 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/MyOrg/MyApp/users?limit=5&ql=status = 'active’
• Cursors
– GET http://api.usergrid.com/MyOrg/MyApp/users?ql=select * where name =
’John*'&limit=50&cursor=LTIxNDg0NDUxNDpnR2tBQVFFQWdITUFDWFJ2YlM1emJXbDBhQUN
BZFFBUUQyMVZneExfRWVLRlV3TG9Hc1doZXdDQWRRQVFIYVdjb0JwREVlS1VCd0xvR3NWT0JRQQ
17
19. 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
19
21. Location Queries
• Latitude / Longitude attributes on all Entities
• Radius search:
– /stores?ql=location within 500 of 40.042016,
-86.900749
• Combine with Push Notifications for targeted campaigns
– /devices;ql=“location within 32186.9 of
34.427514,-118.535013”/notifications
24. 24
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
25. Push Notifications
• Notification Providers
• Narrowcast / Broadcast
– One User’s device
– All Devices
– All Devices in a Geo
– Only iOS / Android
26. Flexible Notification Targeting
Push 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 users
POST https://api.usergrid.com/
jeffreyawest/sandbox/groups/capos/
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
26
28. Integrated Application Performance Management
• Visualize Errors in Real-Time, slice-n-dice by
Version / Device / OS / Carrier
• Detect and diagnose App Crashes
• Research Performance Problems
28
• Visualize and track Network Performance by
Carrier
• Track API Latency
29. Remote Application & SDK Configuration
• Optimize app configuration settings without App
Store update
• Push critical configuration fixes in production to fix
bugs and improve performance
• Configure SDK Settings for each application
– Log Capture
– Log Level
– Device Data Capture
– Location Data Capture
– Configure Sampling
29
30. Beta & A / B Testing Configurations
• Specify distinct device IDs enabled for
Beta Testing Configurations
– Enable configuration profiles for specific
devices
30
• Incrementally roll out new configurations with
A / B testing
• Manage Testing Configurations applied to a
select percentage of Devices/Users