webcast: api-centric architecture for building context-aware apps

Post on 15-Jul-2015

2.450 Views

Category:

Technology

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

API Centric Architectures for Context-Aware Apps!Webinar

@karlunho Alan Ho

@gbrail Greg Brail

youtube.com/apigee

slideshare.com/apigee

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

Context Aware Apps!

6

What is Context ?!

7

Historical !Events!

Recent!Events! Now!

Technology Choices Today!

8

Datawarehouse RDBMS J2EE AppServer

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

Email

Web

Mobile

Outreach

Two Major Context-aware Use Cases!

10

Targeting Recommendations

Industry View!

11

Needle in a Haystack!

Dynamic Decision Brokers!

13

Netflix Deep Dive!

14

•  Offline = Batch

•  Nearline = Speed Layer

•  Online = Serving Layer + Microservices

Batch Layer (Offline)!

•  Singular Value Decomposition

•  Batch like operations

•  High algorithm complexity

•  Results Flow into Cassandra

Speed Layer (Near Line)!

17

•  Medium request/response!

•  Medium data!

•  Medium algorithm complexity!

•  Intermediate caching, incremental learning algos!

Serving & Microservices layer (Online)!•  Fast request/response,

performance is key – high availability/SLA !

•  Fallback mechanism to Nearline/Offline operations !

•  Low algorithm complexity !

Final Thoughts:!!•  Very complete system!

•  Very custom and high performance!

•  Lots of specialized systems for specialized tasks!

•  Not practical for most enterprises!

Insights Deep Dive!

Recommendations Example!

21

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

Email

Web

Mobile

Outreach

(Batch Scores)

(Counters / Activities)

(Query)

Historical Events

Realtime Events

(Context)

Backend

(Mashup)

3

4

5

1

2

6

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

24

R Code!

25

Scored Export to Serving Layer!

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

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:!

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

Email

Web

Mobile

Outreach

(Context)

Backend

Swagger Based API Design!

29

Node.js Code!

30

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

Email

Web

Mobile

Outreach

HistoricalEvents

RealtimeEvents

Backend

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

top related