api-first: an agile approach to data management · feasible now:an agile approach to design-limit...

22
4 June 2018 © MARKLOGIC CORPORATION ERIK HENNUM Principal Engineer, MarkLogic @ehennum API-First: An Agile Approach to Data Management

Upload: others

Post on 24-Mar-2020

5 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: API-First: An Agile Approach to Data Management · Feasible now:an agile approach to design-Limit the scope to the minimum requirements for the next application-Execute the business

4 June 2018© MARKLOGIC CORPORATION

ERIK HENNUMPrincipal Engineer, MarkLogic

@ehennum

API-First: An Agile Approach to Data Management

Page 2: API-First: An Agile Approach to Data Management · Feasible now:an agile approach to design-Limit the scope to the minimum requirements for the next application-Execute the business

SLIDE: 2 4 June 2018© MARKLOGIC CORPORATION

Stress on the businessExcess inventory levelsCompetitive pressure on priceFraud levels risingRegulatory compliance challenges

Problems with data integration

Page 3: API-First: An Agile Approach to Data Management · Feasible now:an agile approach to design-Limit the scope to the minimum requirements for the next application-Execute the business

SLIDE: 3 4 June 2018© MARKLOGIC CORPORATION

“It’s an opportunity.”Now it’s Carla’s problem

Page 4: API-First: An Agile Approach to Data Management · Feasible now:an agile approach to design-Limit the scope to the minimum requirements for the next application-Execute the business

SLIDE: 4 4 June 2018© MARKLOGIC CORPORATION

Data First Design

2. MODEL 3. SERVICES1. DATA SOURCES 4. APPLICATIONS2. MODEL

Page 5: API-First: An Agile Approach to Data Management · Feasible now:an agile approach to design-Limit the scope to the minimum requirements for the next application-Execute the business

SLIDE: 5 4 June 2018© MARKLOGIC CORPORATION

A Model for Integration+ Customer in CRM, order, and support systems

+ Product in order and inventory systems

+ Staff in HR and support systems

+ …

= reconcile the semantics, vocabularies, structures, identity, properties, formats, …

Public domain https://commons.wikimedia.org/wiki/File:The_Thinker,_Auguste_Rodin.jpg

Page 6: API-First: An Agile Approach to Data Management · Feasible now:an agile approach to design-Limit the scope to the minimum requirements for the next application-Execute the business

SLIDE: 6 4 June 2018© MARKLOGIC CORPORATION

The Enterprise-Wide ModelThing

PhysicalThing NonPhysicalThing

Customer

EmployeeInRole

PriceMore workrequired

Agent ???

Page 7: API-First: An Agile Approach to Data Management · Feasible now:an agile approach to design-Limit the scope to the minimum requirements for the next application-Execute the business

SLIDE: 7 4 June 2018© MARKLOGIC CORPORATION

Questioning Data FirstIntegrate all of the data before any use?

No feedback or course correction?

Waste of effort on the unused data?

Transport data to clients for joins and grouping?

Transfer domain expertise to app developers?

Designing from implementation – not for use

2. MODEL 3. SERVICES1. DATA SOURCES 4. APPLICATIONS

?

Page 8: API-First: An Agile Approach to Data Management · Feasible now:an agile approach to design-Limit the scope to the minimum requirements for the next application-Execute the business

SLIDE: 8 4 June 2018© MARKLOGIC CORPORATION

API First Design

4. MODEL5. DATA SOURCES 3. DATA SERVICES 2. API SERVICES 1. APPLICATIONS1. APPLICATIONS

Page 9: API-First: An Agile Approach to Data Management · Feasible now:an agile approach to design-Limit the scope to the minimum requirements for the next application-Execute the business

SLIDE: 9 4 June 2018© MARKLOGIC CORPORATION

Identifying the First Application

value to the business

effort to implement

Replace static pricing with dynamic pricing

Page 10: API-First: An Agile Approach to Data Management · Feasible now:an agile approach to design-Limit the scope to the minimum requirements for the next application-Execute the business

SLIDE: 10 4 June 2018© MARKLOGIC CORPORATION

Design for Dynamic Pricing4. MODEL5. DATA SOURCES 3. DATA SERVICES 2. API SERVICES 1. APPLICATIONS

Provide areal-time price to a customer for a product

Take customer and product

identifiers and return the price

Look up the price factors

needed by the pricing engine

Integrate the price data

needed by the data service

Load the source data for the price model

Page 11: API-First: An Agile Approach to Data Management · Feasible now:an agile approach to design-Limit the scope to the minimum requirements for the next application-Execute the business

SLIDE: 11 4 June 2018© MARKLOGIC CORPORATION

Stack for the Price Dynamically Service

API Gateway

API service (Java)

Application

Data Service (SJS)

Partitioned service

Page 12: API-First: An Agile Approach to Data Management · Feasible now:an agile approach to design-Limit the scope to the minimum requirements for the next application-Execute the business

Demo

Page 13: API-First: An Agile Approach to Data Management · Feasible now:an agile approach to design-Limit the scope to the minimum requirements for the next application-Execute the business

SLIDE: 13 4 June 2018© MARKLOGIC CORPORATION

Alternative Stacks

API Gateway

Java service

Application

Data serviceData service Data service

API Gateway

Java service

GraphQL

Node.js service

On

prem

ise

Page 14: API-First: An Agile Approach to Data Management · Feasible now:an agile approach to design-Limit the scope to the minimum requirements for the next application-Execute the business

SLIDE: 14 4 June 2018© MARKLOGIC CORPORATION

“Great progress.”It’s still Carla’s problem

Page 15: API-First: An Agile Approach to Data Management · Feasible now:an agile approach to design-Limit the scope to the minimum requirements for the next application-Execute the business

SLIDE: 15 4 June 2018© MARKLOGIC CORPORATION

Identifying the First Application

value to the business

effort to implement

Fraud detection^

Page 16: API-First: An Agile Approach to Data Management · Feasible now:an agile approach to design-Limit the scope to the minimum requirements for the next application-Execute the business

SLIDE: 16 4 June 2018© MARKLOGIC CORPORATION

Developer Roles in Partitioned Services

API service (Java)

Data Service (SJS)

Middle tier generalistJava

Database specialistJavaScript

Page 17: API-First: An Agile Approach to Data Management · Feasible now:an agile approach to design-Limit the scope to the minimum requirements for the next application-Execute the business

SLIDE: 17 4 June 2018© MARKLOGIC CORPORATION

Design for Check Fraud Service4. MODEL5. DATA SOURCES 3. DATA SERVICES 2. API SERVICES 1. APPLICATIONS

Check for fraudster before

purchase

Take customer identifier and total price and return approval

Match potential fraud signature

and write audit record

Integrate the account data

needed by the data service

Load the source data for

the account model

Page 18: API-First: An Agile Approach to Data Management · Feasible now:an agile approach to design-Limit the scope to the minimum requirements for the next application-Execute the business

SLIDE: 18 4 June 2018© MARKLOGIC CORPORATION

Iterative Expansion of the Solution

Data Source

Data Source

Data Source

Data Source

1. Identify the next application

2. Design the services &

model

3. Load and integrate the

data

Page 19: API-First: An Agile Approach to Data Management · Feasible now:an agile approach to design-Limit the scope to the minimum requirements for the next application-Execute the business

SLIDE: 19 4 June 2018© MARKLOGIC CORPORATION

Time to Value

DATA FIRST

API FIRST

firstlaunch

PRICE DYNAMICALLYLAUNCH

CHECK FRAUDLAUNCH

nextlaunches

Page 20: API-First: An Agile Approach to Data Management · Feasible now:an agile approach to design-Limit the scope to the minimum requirements for the next application-Execute the business

SLIDE: 20 4 June 2018© MARKLOGIC CORPORATION

Evolving the Model and APIs

harmonized customers v2

API Gateway

checkFraud v1

applications

priceDynamically v1

matchSignatures v1

lookupFactors v1.2

independent partitioned services

matchSignaturesOrLookupFactors v1

Page 21: API-First: An Agile Approach to Data Management · Feasible now:an agile approach to design-Limit the scope to the minimum requirements for the next application-Execute the business

SLIDE: 21 4 June 2018© MARKLOGIC CORPORATION

API First Summarized Feasible now: an agile approach to design

- Limit the scope to the minimum requirements for the next application

- Execute the business logic in the middle tier – the data logic close to the persisted data

- Success is iterative expansion of the set of APIs and the integrated model

Coming soon: easier rapid development of partitioned API services

- Declare a database function, generate the Java class, and write the function endpoint

Requested: your feedback

Page 22: API-First: An Agile Approach to Data Management · Feasible now:an agile approach to design-Limit the scope to the minimum requirements for the next application-Execute the business

4 June 2018© MARKLOGIC CORPORATION

Questions?