I Love APIs 2015: The "State" of your API: Common Use Cases for Storing Data
-
Upload
apigee -
Category
Technology
-
view
683 -
download
0
Transcript of I Love APIs 2015: The "State" of your API: Common Use Cases for Storing Data
1
State of your API !Steven Richardson, Carlos Eberhardt,
David Allen
Storing State: So Many Options Options are good, too many can be confusing. How do you decide which store to use for state?
Today we’ll provide guidelines! Why should you trust us?
We are not crackpots! - Steve – 4 years building solutions for enterprise customers. - David – super smart dude who happens to really know Edge. - Carlos – over 3 years talking to customers and prospects across a variety of verticals.
What is State?
3 ©2015 Apigee. All Rights Reserved.
• Pattern of Application Behavior • State is information that is available to your API at a defined moment
Common Reasons for State
• Application Scoped Configuration • Business Rules • Extended Authentication • Performance Tuning • Storing Server Credentials • Support Complex Workflows • Simulate Transactions
4 ©2015 Apigee. All Rights Reserved.
Good reasons to keep state
• Application Scoped Configuration • Extended Authentication and Identification • Performance tuning • Storing Server Credentials
5 ©2015 Apigee. All Rights Reserved.
Common States
• Organization • Environment • Proxy • Developer • Client Application • Product • Request
6 ©2015 Apigee. All Rights Reserved.
Available state stores to Edge
• Custom Properties • Cache • Key Value Map • JS resource • Vault • BaaS
7 ©2015 Apigee. All Rights Reserved.
Combo power - which stores to use when
8 ©2015 Apigee. All Rights Reserved.
KVM Best used when managing Simple Global Properties that will change
Cache Best used for growing state full information
JS Resource Best used for JSON configuration or configuration that doesn’t change often
Vault Best used when using a node container to store credentials
BaaS Data shaping, and enrichment
Common examples
9 ©2015 Apigee. All Rights Reserved.
BaaS Example – Enhanced Retail
10 ©2015 Apigee. All Rights Reserved.
Product System
BaaS
API
- “Like” Product - Recommendations - Social Sharing - Etc.
01001000 01010100 01010100
Users Likes Social Info
CAP Theorem
11 ©2015 Apigee. All Rights Reserved.
RDBMS
JS Resource
KMS / Vault
Cache
Consistency
Fault Tolerance Availability
When to go outside the Edge
• Transactional data-store • If data has a life-cycle outside of Edge • If you need atomic consistency
12 ©2015 Apigee. All Rights Reserved.
Understanding State
13
• State can be useful • Understand what’s available to avoid pitfalls • Leverage the community at community.apigee.com
Questions?
14 ©2015 Apigee. All Rights Reserved.