webcast: api-centric architecture for building context-aware apps
TRANSCRIPT
![Page 1: Webcast: API-Centric Architecture for Building Context-Aware Apps](https://reader033.vdocuments.mx/reader033/viewer/2022051617/55a570cc1a28ab39518b4618/html5/thumbnails/1.jpg)
API Centric Architectures for Context-Aware Apps!Webinar
![Page 2: Webcast: API-Centric Architecture for Building Context-Aware Apps](https://reader033.vdocuments.mx/reader033/viewer/2022051617/55a570cc1a28ab39518b4618/html5/thumbnails/2.jpg)
@karlunho Alan Ho
@gbrail Greg Brail
![Page 3: Webcast: API-Centric Architecture for Building Context-Aware Apps](https://reader033.vdocuments.mx/reader033/viewer/2022051617/55a570cc1a28ab39518b4618/html5/thumbnails/3.jpg)
youtube.com/apigee
![Page 4: Webcast: API-Centric Architecture for Building Context-Aware Apps](https://reader033.vdocuments.mx/reader033/viewer/2022051617/55a570cc1a28ab39518b4618/html5/thumbnails/4.jpg)
slideshare.com/apigee
![Page 5: Webcast: API-Centric Architecture for Building Context-Aware Apps](https://reader033.vdocuments.mx/reader033/viewer/2022051617/55a570cc1a28ab39518b4618/html5/thumbnails/5.jpg)
Agenda!
1. Context-Aware App Overview !
2. Intro to Lambda architecture and microservices !
3. Industry overview on context-aware architecture !
4. Netflix Recommendation Engine Deep Dive !
5. Insights Deep Dive !
5
![Page 6: Webcast: API-Centric Architecture for Building Context-Aware Apps](https://reader033.vdocuments.mx/reader033/viewer/2022051617/55a570cc1a28ab39518b4618/html5/thumbnails/6.jpg)
Context Aware Apps!
6
![Page 7: Webcast: API-Centric Architecture for Building Context-Aware Apps](https://reader033.vdocuments.mx/reader033/viewer/2022051617/55a570cc1a28ab39518b4618/html5/thumbnails/7.jpg)
What is Context ?!
7
Historical !Events!
Recent!Events! Now!
![Page 8: Webcast: API-Centric Architecture for Building Context-Aware Apps](https://reader033.vdocuments.mx/reader033/viewer/2022051617/55a570cc1a28ab39518b4618/html5/thumbnails/8.jpg)
Technology Choices Today!
8
Datawarehouse RDBMS J2EE AppServer
![Page 9: Webcast: API-Centric Architecture for Building Context-Aware Apps](https://reader033.vdocuments.mx/reader033/viewer/2022051617/55a570cc1a28ab39518b4618/html5/thumbnails/9.jpg)
Modern Architectures for Adaptive Apps!
9
Lambda Architecture
Batch Storage
RealTime Storage
Batch Processing
(MR)
RealTime Processing
Microservices Architecture
Micro Service
Micro Service
Micro Service
Micro Service
Micro Service
Micro Service
Query DB
Batch Layer
Serving Layer
Speed Layer
APIs
Direct Mail
Web
Mobile
Outreach
![Page 10: Webcast: API-Centric Architecture for Building Context-Aware Apps](https://reader033.vdocuments.mx/reader033/viewer/2022051617/55a570cc1a28ab39518b4618/html5/thumbnails/10.jpg)
Two Major Context-aware Use Cases!
10
Targeting Recommendations
![Page 11: Webcast: API-Centric Architecture for Building Context-Aware Apps](https://reader033.vdocuments.mx/reader033/viewer/2022051617/55a570cc1a28ab39518b4618/html5/thumbnails/11.jpg)
Industry View!
11
![Page 12: Webcast: API-Centric Architecture for Building Context-Aware Apps](https://reader033.vdocuments.mx/reader033/viewer/2022051617/55a570cc1a28ab39518b4618/html5/thumbnails/12.jpg)
Needle in a Haystack!
![Page 13: Webcast: API-Centric Architecture for Building Context-Aware Apps](https://reader033.vdocuments.mx/reader033/viewer/2022051617/55a570cc1a28ab39518b4618/html5/thumbnails/13.jpg)
Dynamic Decision Brokers!
13
![Page 14: Webcast: API-Centric Architecture for Building Context-Aware Apps](https://reader033.vdocuments.mx/reader033/viewer/2022051617/55a570cc1a28ab39518b4618/html5/thumbnails/14.jpg)
Netflix Deep Dive!
14
![Page 15: Webcast: API-Centric Architecture for Building Context-Aware Apps](https://reader033.vdocuments.mx/reader033/viewer/2022051617/55a570cc1a28ab39518b4618/html5/thumbnails/15.jpg)
• Offline = Batch
• Nearline = Speed Layer
• Online = Serving Layer + Microservices
![Page 16: Webcast: API-Centric Architecture for Building Context-Aware Apps](https://reader033.vdocuments.mx/reader033/viewer/2022051617/55a570cc1a28ab39518b4618/html5/thumbnails/16.jpg)
Batch Layer (Offline)!
• Singular Value Decomposition
• Batch like operations
• High algorithm complexity
• Results Flow into Cassandra
![Page 17: Webcast: API-Centric Architecture for Building Context-Aware Apps](https://reader033.vdocuments.mx/reader033/viewer/2022051617/55a570cc1a28ab39518b4618/html5/thumbnails/17.jpg)
Speed Layer (Near Line)!
17
• Medium request/response!
• Medium data!
• Medium algorithm complexity!
• Intermediate caching, incremental learning algos!
![Page 18: Webcast: API-Centric Architecture for Building Context-Aware Apps](https://reader033.vdocuments.mx/reader033/viewer/2022051617/55a570cc1a28ab39518b4618/html5/thumbnails/18.jpg)
Serving & Microservices layer (Online)!• Fast request/response,
performance is key – high availability/SLA !
• Fallback mechanism to Nearline/Offline operations !
• Low algorithm complexity !
![Page 19: Webcast: API-Centric Architecture for Building Context-Aware Apps](https://reader033.vdocuments.mx/reader033/viewer/2022051617/55a570cc1a28ab39518b4618/html5/thumbnails/19.jpg)
Final Thoughts:!!• Very complete system!
• Very custom and high performance!
• Lots of specialized systems for specialized tasks!
• Not practical for most enterprises!
![Page 20: Webcast: API-Centric Architecture for Building Context-Aware Apps](https://reader033.vdocuments.mx/reader033/viewer/2022051617/55a570cc1a28ab39518b4618/html5/thumbnails/20.jpg)
Insights Deep Dive!
![Page 21: Webcast: API-Centric Architecture for Building Context-Aware Apps](https://reader033.vdocuments.mx/reader033/viewer/2022051617/55a570cc1a28ab39518b4618/html5/thumbnails/21.jpg)
Recommendations Example!
21
![Page 22: Webcast: API-Centric Architecture for Building Context-Aware Apps](https://reader033.vdocuments.mx/reader033/viewer/2022051617/55a570cc1a28ab39518b4618/html5/thumbnails/22.jpg)
Recommendation Architecture!
22
Hadoop
In-Memory
Insights (GRASP)
Node.js
Node.js Node.js
Node.js Node.js
Node.js Node.js
API BaaS
(APIs)
Direct Mail
Web
Mobile
Outreach
(Batch Scores)
(Counters / Activities)
(Query)
Historical Events
Realtime Events
(Context)
Backend
(Mashup)
3
4
5
1
2
6
![Page 23: Webcast: API-Centric Architecture for Building Context-Aware Apps](https://reader033.vdocuments.mx/reader033/viewer/2022051617/55a570cc1a28ab39518b4618/html5/thumbnails/23.jpg)
Batch Layer!
• Uses R for building predictive models !
• Algorithms based on Event Sequences !
• Lots and lots of tooling !
23
HadoopInsights(GRASP)
API BaaS
(Batch Scores)1
Apigee UI
![Page 24: Webcast: API-Centric Architecture for Building Context-Aware Apps](https://reader033.vdocuments.mx/reader033/viewer/2022051617/55a570cc1a28ab39518b4618/html5/thumbnails/24.jpg)
24
R Code!
![Page 25: Webcast: API-Centric Architecture for Building Context-Aware Apps](https://reader033.vdocuments.mx/reader033/viewer/2022051617/55a570cc1a28ab39518b4618/html5/thumbnails/25.jpg)
25
Scored Export to Serving Layer!
![Page 26: Webcast: API-Centric Architecture for Building Context-Aware Apps](https://reader033.vdocuments.mx/reader033/viewer/2022051617/55a570cc1a28ab39518b4618/html5/thumbnails/26.jpg)
Speed Layer!
!• Easy to program via node.js !
• Low algorithm complexity – Storm is overkill for most Apigee customers !
• Simple aggregates via C* counters good enough !
• Good for capturing locations, activity stream, etc. !
26
Node.js
API BaaS
Apigee UI
![Page 27: Webcast: API-Centric Architecture for Building Context-Aware Apps](https://reader033.vdocuments.mx/reader033/viewer/2022051617/55a570cc1a28ab39518b4618/html5/thumbnails/27.jpg)
BaaS Node.js Counter Example!
var event = new Usergrid.Counter(event_options, function (error, result) { … });
// Then we POST the event to increment the countervar counter_options = { name: productName + ’.add_to_cart', value: 1 }event.increment (counter_options, function (error, result)
27
curl -X GET https://api.usergrid.com/my-org/my-app/counters?counter=appleIpad3.add_to_cart
Input code:
Output code:!
![Page 28: Webcast: API-Centric Architecture for Building Context-Aware Apps](https://reader033.vdocuments.mx/reader033/viewer/2022051617/55a570cc1a28ab39518b4618/html5/thumbnails/28.jpg)
Microservices Layer!
• API Layer (Swagger) !
• Context Injection !
• Service Orchestration !
• Fallback logic !
28
Node.js Node.js
Node.js Node.js
Node.js Node.js
API BaaS
Direct Mail
Web
Mobile
Outreach
(Context)
Backend
![Page 29: Webcast: API-Centric Architecture for Building Context-Aware Apps](https://reader033.vdocuments.mx/reader033/viewer/2022051617/55a570cc1a28ab39518b4618/html5/thumbnails/29.jpg)
Swagger Based API Design!
29
![Page 30: Webcast: API-Centric Architecture for Building Context-Aware Apps](https://reader033.vdocuments.mx/reader033/viewer/2022051617/55a570cc1a28ab39518b4618/html5/thumbnails/30.jpg)
Node.js Code!
30
![Page 31: Webcast: API-Centric Architecture for Building Context-Aware Apps](https://reader033.vdocuments.mx/reader033/viewer/2022051617/55a570cc1a28ab39518b4618/html5/thumbnails/31.jpg)
APIs are Everywhere!
31
Hadoop
In-Memory
Insights(GRASP)
Node.js
Node.js Node.js
Node.js Node.js
Node.js Node.js
API BaaS
Direct Mail
Web
Mobile
Outreach
HistoricalEvents
RealtimeEvents
Backend
![Page 32: Webcast: API-Centric Architecture for Building Context-Aware Apps](https://reader033.vdocuments.mx/reader033/viewer/2022051617/55a570cc1a28ab39518b4618/html5/thumbnails/32.jpg)
Summary!• Context-Aware apps are the new experience benchmark • Modern Apps Architecture = Microservices & Lambda
Architecture
• Netflix is an example of a successful company implementing this architectures
• Apigee helps companies implement Lambda and Microservices
architectures
32