api-first: an agile approach to data management · feasible now:an agile approach to design-limit...
TRANSCRIPT
4 June 2018© MARKLOGIC CORPORATION
ERIK HENNUMPrincipal Engineer, MarkLogic
@ehennum
API-First: An Agile Approach to Data Management
SLIDE: 2 4 June 2018© MARKLOGIC CORPORATION
Stress on the businessExcess inventory levelsCompetitive pressure on priceFraud levels risingRegulatory compliance challenges
Problems with data integration
SLIDE: 3 4 June 2018© MARKLOGIC CORPORATION
“It’s an opportunity.”Now it’s Carla’s problem
SLIDE: 4 4 June 2018© MARKLOGIC CORPORATION
Data First Design
2. MODEL 3. SERVICES1. DATA SOURCES 4. APPLICATIONS2. MODEL
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
SLIDE: 6 4 June 2018© MARKLOGIC CORPORATION
The Enterprise-Wide ModelThing
PhysicalThing NonPhysicalThing
Customer
EmployeeInRole
PriceMore workrequired
Agent ???
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
?
SLIDE: 8 4 June 2018© MARKLOGIC CORPORATION
API First Design
4. MODEL5. DATA SOURCES 3. DATA SERVICES 2. API SERVICES 1. APPLICATIONS1. APPLICATIONS
SLIDE: 9 4 June 2018© MARKLOGIC CORPORATION
Identifying the First Application
value to the business
effort to implement
Replace static pricing with dynamic pricing
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
SLIDE: 11 4 June 2018© MARKLOGIC CORPORATION
Stack for the Price Dynamically Service
API Gateway
API service (Java)
Application
Data Service (SJS)
Partitioned service
Demo
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
SLIDE: 14 4 June 2018© MARKLOGIC CORPORATION
“Great progress.”It’s still Carla’s problem
SLIDE: 15 4 June 2018© MARKLOGIC CORPORATION
Identifying the First Application
value to the business
effort to implement
Fraud detection^
SLIDE: 16 4 June 2018© MARKLOGIC CORPORATION
Developer Roles in Partitioned Services
API service (Java)
Data Service (SJS)
Middle tier generalistJava
Database specialistJavaScript
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
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
SLIDE: 19 4 June 2018© MARKLOGIC CORPORATION
Time to Value
DATA FIRST
API FIRST
firstlaunch
PRICE DYNAMICALLYLAUNCH
CHECK FRAUDLAUNCH
nextlaunches
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
…
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
4 June 2018© MARKLOGIC CORPORATION
Questions?