SlideShare a Scribd company logo
1 of 42
Download to read offline
Relevance Trilogy:
May DREAM be with you!
Woonsan Ko
December 6, 2017
(By courtesy of Matthias Ripp, licensed by CC BY 2.0)
Find all the resources including this presentation:
● slideshare.net/woonsan
● woonsanko.blogspot.com
Relevance Trilogy Demo Project:
● github.com/WoonsanKo/relevance-trilogy-demo
“I still have a dream.”
3
Prologue
Digital Relevance Experience & Agility Management
4
DAME cycle for DREAM
Digital Relevance Experience & Agility Management
5
business
expert
developer
webmaster
Digital Relevance Experience & Agility Management
6
business
expert
developer
webmaster
Slow, Difficult and Costly
to realize relevant data
collections!
Digital Relevance Experience & Agility Management
7
business
expert
developer
webmaster
How to apply to
Headless Scenarios?
Digital Relevance Experience & Agility Management
8
business
expert
developer
webmaster
A “hacky variation”?
(JSON aggregation
from Page/Components?)
9
● The 3 Questions
Digital Relevance Experience & Agility Management
Chapter 1 on “How to make Define phase faster and more cost-effective?”
Chapter 2 on “How to Apply Relevance to Headless Scenarios?”
Chapter 3 on “A ‘hacky variation’? JSON Aggregation from Page/Components?
Any alternatives?”
DREAM on EIRE*
10
Chapter 1.
* More at https://www.onehippo.org/library/enterprise/services-features/inference-engine/introduction.html
What’s happening today?
11
BloomReach DXP
visitor
business expert
webmaster
developer
Delivery tier
Authoring tier
FooCollector
FooScorer
FooCharacteristicPlugin
FooCollectorPlugin
Targeting
Service
Characteristics
Experience
Optimizer
Alter Ego
What’s going on
with my foo data
collection?
Well, I’ve been
doing my best
to implement
the Classes and
ExtJS stuffs!
Why Expressional Inference Rule Engine?
● Simple “Forward-chaining*” Inference Engine which executes expressions of Rules
to deduce Goal Values from Available Data.
○ Goal Values : Primary Goal Value and optional Extra (Secondary) Goal Value(s).
■ e.g, “news” type is the primary goal value while hit counters can be extra goal values.
( = { “news”: 3, “events”: 2, “unknown”: 1 })
12
Data from Visitor
Available
Data
Data from Environment
Data from
Knowledge Base
IF reads news pages most often,
THEN X is “news”.
IF reads events pages most often,
THEN X is “events”.
ELSE X is “unknown”.
Available
Data
Primary Goal value
(“news”, “events”,
or “unknown”),
and optional
Extra Goal value(s)
Expressional Inference
Rule Engine
Primary Goal value
* More at https://en.wikipedia.org/wiki/Forward_chaining
Why Expressional Inference Rule Engine? (cont.)
13
HTTP vars
Geographic vars
Weather vars
SalesForce / Marketo vars
Variable X, Y, Z, ...
Expressional
Inference
Rule Engine
BloomReach DXP
Rules
Expression
Document
(w/ JEXL*)
business
expert
visitor
<<personalized / relevant content>>
Rule-based
Generic
Collector
Personalized
Content Delivery
Input vars
in the world
Deduced
business
goal vars
AI-powered analytic vars developer
* More at http://commons.apache.org/proper/commons-jexl/
How it works?
14
Define all the
“inference goal” values
to the business.
Those are to be shown
in Characteristics
plugin automatically!
Targeting collector will
be in the same lifecycle
of this document
publication lifecycle!
Configure the collector
plugin’s icon here!
Parameters can be
defined and accessed in
expressions through
$.getParameter() or
$.getParameterValues().
How it works? (cont.)
15
As you defined the
possible “inference
goal” values to
deduce!
How it works? (cont.)
16
Select your
“inference rule”
based
characteristic to
personalize!
Expressional Inference Rule Engine
● Inference Rules Expression Script Engine (black-boxed JEXL Sandbox)
○ Built-in Objects and Built-in Namespace Functions
○ Support Custom POJOs / Custom Namespace Functions
■ You can integrate with any backends!
● Primary Goal Targeting Data Value (from return value)
● Extra (Secondary) Goal Targeting Data Values
○ Via $.collectorContext built-in object
17* More at http://commons.apache.org/proper/commons-jexl/
Expressional Inference Rule Engine - Simple Example
18
// Suppose you need to classify the visitor based on CRM data (rank and industry)
// and visitor’s continent determined by GeoIP service.
//
// Example Classified Primary Goal Values: [ “non-eu-star”, “eu-star” ]
//
var location = geolocation:getLocation($.request.remoteAddr);
var email = $.request.cookies[“email”];
var crmService = $.request.getAttribute(“crmService”);
var lead = crmService.findLeadByEmail(email);
if (lead.rank == “Hot” && lead.industry == “Sports”) {
if (location.continentCode == “AF” && location.continentCode == “AS”) {
return "non-eu-star";
} else if (location.continentCode == “EU”) {
return "eu-star";
}
}
return null;
Built-in Objects
19
Built-in Object Description
$ Root built-in object for anything else
$.logger Logger representation (GenericLoggerModel )
$.request Request-related representation (GenericRequestContextModel )
$.time Date/Time related representation (GenericTimeModel )
$.collectorContext Targeting collector context representation (GenericCollectorContextModel)
Built-in Namespace Functions
20
Built-in Function Description
string: String utilities. e.g, string:split("Hello, World!", ",");
date: Date utilities provided by Commons Lang.
number: Number utilities provided by Commons Lang.
counter: Counting utilities. For example, it provides utilities to increment counter by key in a map.
e.g, var map = counter:newMap(); counter:increment(map, "key1");
regex: Regular expression utilities that provide compiling both regex and glob expressions.
json: JSON utilities providing parsed JSONObject or JSONArray objects.
geolocation: GEO Location utilities to find location by client IP address.
... ...
Custom Object Attribute / Custom Function Support
● Custom Objects
○ Register it in the Add-on Spring Assembly Override XML.
○ Get the attribute in expressions: $.getAttribute(name)
● Custom Namespace Functions
○ Register it in the Add-on Spring Assembly Override XML.
○ Use it like ns1:func(...) in expressions.
21
What’s going to happen now?
22
BloomReach DXP
visitor
business expert
webmaster
developer
Delivery
tier
Authoring
tier
Custom POJO
Objects /
Functions
Targeting
Service
Characteristics
Experience
Optimizer
Alter Ego
business expert
Wow, it’s just working!
We can already apply
and monitor it !!!
Cool! You can even edit,
republish the rules in
CMS at runtime!
WE DID IT!
EIRE
Foo
Inf.
Rules
23
Chapter 2.
ROCK Headless with AC!DC*
(By courtesy of Laurel F,
licensed by CC BY-SA 2.0)
* More at https://www.onehippo.org/library/enterprise/services-features/api-agent-channel/introduction.html
Can we apply Relevance in Headless Scenario?
24
BloomReach DXP
visitor
business expert
webmaster
Delivery
tier
REST API
Mount
Website
Mount
Website
Channel
Frontend App
No REST
Channel!
<<rest>>
What?! There’s no
Channel for REST?
Well, REST API
doesn’t have channel,
components, so what
can I do?
Create AC!DC* Channel for REST API Mount
25* More at https://www.onehippo.org/library/enterprise/services-features/api-agent-channel/introduction.html
Since v12.1, built-in
Swagger API doc
(/swagger.{yaml|json}) is
supported out-of-box!
Personalize Plain JAX-RS Services
● Use @ParametersInfo annotation in JAX-RS.
● Use @Context ParametersInfoProvider to read (personalized) parameters.
26
@Path(“/products/”) // JAX-RS annotation
@Api(value=”Products”) // Swagger annotation
@ParametersInfo(type = ProductParametersInfo.class) // HST-2 annotation
public class ProductResources extends AbstractResource {
@GET
@Path("/search/")
@ApiOperation(value="Finds products", response=ProductRepresentation.class, responseContainer="List")
public List<ProductRepresentation> searchProductResources(
@Context HttpServletRequest servletRequest,
@Context ParametersInfoProvider paramsInfoProvider,
@QueryParam("brand") String brand, ...) {
// read ParametersInfo and personalize query params like you do usually in HstComponents!
ProductParametersInfo paramsInfo = paramsInfoProvider.getParametersInfo();
String scopePath = paramsInfo.getScopePath();
String sortInfo = paramsInfo.getSortInfo();
// ...
}
}
How it works?
27
Built-in Blueprint to
create AC!DC Channel
Application!
How it works? (cont.)
28
Built-in Blueprint to
create AC!DC Channel
Application!
How it works? (cont.)
29
30
BloomReach DXP
business expert
webmaster
Delivery
tier
REST API
Mount
Website
Mount
Website
Channel
Wow, seamless headless!
We can personalize
REST API visitors, too!
WE DID IT! (2)
What’s going to happen now?
visitor
Frontend App
<<rest>>
Awesome! You can even
test with different variant
params with Swagger!
AC!DC
Channel
GREB* on SPA
31
Chapter 3.
* More at https://www.onehippo.org/library/enterprise/services-features/greb-api/introduction.html
Custom JSON Writing in FTL? (“hacky variant”)
32
BloomReach DXP
business expert
webmaster
Delivery
tier
FTL
Templates
writing JSON
Website
Mount
Website
Channel
Well, then can I write
custom JSON output
in templates?
What?! There’s
no Channel for
REST?
<#-- news-list.ftl -->
{
“container”: [
<@hst.include ref=”container” />
]
}
<#-- news-item.ftl -->
{
“title”: “The Medusa News”,
“date”: “2017-12-06”,
“content”: “Lorem Ipsum..."
}
No API
Mount!
visitor
Frontend App
<<rest>>
Custom JSON Writing in FTL? (“hacky variant”)
● Problems with custom JSON writing in templates
○ Error prone in JSON serialization
○ No POJO mapping framework (e.g, Jackson2)
○ More templating work
33
(By courtesy of Dave O,
licensed by CC BY-SA 2.0)
Why GREB (Generic Resource Entity Builder) API?
34
Simply contribute
POJOs, HST Beans,
etc. through GREB in
#doBeforeRender().
Separate GREB API Mount (and
Channel) with GREB Pipeline,
which writes an aggregated
JSON output using Jackson2
(no template rendering)!
JSON Contribution
35
public class MyComponent extends GenericHstComponent {
@Override
public void doBeforeRender(HstRequest request, HstResponse response) throws HstComponentException {
GenericResourceEntityBuilder builder =
GenericResourceEntityBuilder.get(RequestContextProvider.get());
builder.addResourceEntity("title", document.getTitle());
builder.addResourceEntity("timestamp", System.currentTimeMillis());
// ...
}
}
{
"title": "Hello, World!",
"timestamp": 1479249799770,
}
JSON Contribution (cont.)
36
public void doBeforeRender(HstRequest request, HstResponse response) throws HstComponentException {
// ...
builder.addResourceEntity("document", document);
// ...
}
}
{
"title": "Hello, World!",
"timestamp": 1479249799770,
"document": {
"title": "The medusa news",
"introduction": "This is a news article.",
// ...
}
}
List<Object> references = new LinkedList<>();
references.add(referenceDoc1);
references.add(referenceDoc2);
builder.addResourceEntity("references", references);
Map<String, Object> images = new LinkedHashMap<>();
images.put("portrait", portrait);
images.put("landscape", landscape);
builder.addResourceEntity("images", images);
JSON Contribution (cont.)
37
{
"title": "Hello, World!",
"timestamp": 1479249799770,
"document": {
"title": "The medusa news",
"introduction": "This is a news article.",
// ...
},
"references": [{
"title": "Referenced Document 1",
// ...
},{
"title": "Referenced Document 2",
// ...
}],
"images": {
"portrait": {
// ...
}, "landscape": {
// ...
}
}
}
When to Use GREB API*?
● JSON API output based on Page Composition
○ E.g, Just as a glue between SPA and Page Aggregation.
● Quick JSON API Provision
○ Taking advantage of Jackson2 JSON Mapping.
○ When API-First approach is not necessary.
38
(By courtesy of Ferran Pestaña,
licensed by CC BY-SA 2.0)
* More at https://www.onehippo.org/library/enterprise/services-features/greb-api/introduction.html
39
Wow, how simple it is!
We produce a flexible
JSON API easily!
Love Jackson2 mapping!
It’s very easy to expose
JSON API with POJOs,
HST Beans, etc.
WE DID IT! (3)
What’s going to happen now?
BloomReach DXP
business expert
webmaster
Delivery
tier
Website
Mount
Website
Channel
visitor
Frontend App
<<rest>>
GREB API
Mount
“The only one who could ever reach me
Was the son of a DREAMer man.”
40
Epilogue
41
business
expert
Developer
webmaster
EIRE enables
Fast, Agile and
Cost-effective!
DREAM Coming True
API Agent Channel enables
Seamless Relevance Integration in
Headless Scenarios
GREB API provides a
safe, robust alternatives
to the “hacky variation”.
Stay in Touch!
● www.onehippo.org
● slideshare.net/woonsan
● woonsanko.blogspot.com

More Related Content

What's hot

Engage 2013 - Multi Channel Data Collection
Engage 2013 - Multi Channel Data CollectionEngage 2013 - Multi Channel Data Collection
Engage 2013 - Multi Channel Data Collection
Webtrends
 
ArangoDB – A different approach to NoSQL
ArangoDB – A different approach to NoSQLArangoDB – A different approach to NoSQL
ArangoDB – A different approach to NoSQL
ArangoDB Database
 
Concurrency Patterns with MongoDB
Concurrency Patterns with MongoDBConcurrency Patterns with MongoDB
Concurrency Patterns with MongoDB
Yann Cluchey
 

What's hot (20)

Engage 2013 - Multi Channel Data Collection
Engage 2013 - Multi Channel Data CollectionEngage 2013 - Multi Channel Data Collection
Engage 2013 - Multi Channel Data Collection
 
Presto in Treasure Data (presented at db tech showcase Sapporo 2015)
Presto in Treasure Data (presented at db tech showcase Sapporo 2015)Presto in Treasure Data (presented at db tech showcase Sapporo 2015)
Presto in Treasure Data (presented at db tech showcase Sapporo 2015)
 
Mongo performance tuning: tips and tricks
Mongo performance tuning: tips and tricksMongo performance tuning: tips and tricks
Mongo performance tuning: tips and tricks
 
Dmp hadoop getting_start
Dmp hadoop getting_startDmp hadoop getting_start
Dmp hadoop getting_start
 
CouchDB Mobile - From Couch to 5K in 1 Hour
CouchDB Mobile - From Couch to 5K in 1 HourCouchDB Mobile - From Couch to 5K in 1 Hour
CouchDB Mobile - From Couch to 5K in 1 Hour
 
Search@airbnb
Search@airbnbSearch@airbnb
Search@airbnb
 
Introducing CouchDB
Introducing CouchDBIntroducing CouchDB
Introducing CouchDB
 
ArangoDB – A different approach to NoSQL
ArangoDB – A different approach to NoSQLArangoDB – A different approach to NoSQL
ArangoDB – A different approach to NoSQL
 
Arango DB
Arango DBArango DB
Arango DB
 
Building a spa_in_30min
Building a spa_in_30minBuilding a spa_in_30min
Building a spa_in_30min
 
MongoDB .local Paris 2020: Adéo @MongoDB : MongoDB Atlas & Leroy Merlin : et ...
MongoDB .local Paris 2020: Adéo @MongoDB : MongoDB Atlas & Leroy Merlin : et ...MongoDB .local Paris 2020: Adéo @MongoDB : MongoDB Atlas & Leroy Merlin : et ...
MongoDB .local Paris 2020: Adéo @MongoDB : MongoDB Atlas & Leroy Merlin : et ...
 
Introduction to apache nutch
Introduction to apache nutchIntroduction to apache nutch
Introduction to apache nutch
 
Building data flows with Celery and SQLAlchemy
Building data flows with Celery and SQLAlchemyBuilding data flows with Celery and SQLAlchemy
Building data flows with Celery and SQLAlchemy
 
Concurrency Patterns with MongoDB
Concurrency Patterns with MongoDBConcurrency Patterns with MongoDB
Concurrency Patterns with MongoDB
 
MongoDB San Francisco DrupalCon 2010
MongoDB San Francisco DrupalCon 2010MongoDB San Francisco DrupalCon 2010
MongoDB San Francisco DrupalCon 2010
 
Large Scale Crawling with Apache Nutch and Friends
Large Scale Crawling with Apache Nutch and FriendsLarge Scale Crawling with Apache Nutch and Friends
Large Scale Crawling with Apache Nutch and Friends
 
Drupal 8 Cache: Under the hood
Drupal 8 Cache: Under the hoodDrupal 8 Cache: Under the hood
Drupal 8 Cache: Under the hood
 
Class.bluemix.dbaas
Class.bluemix.dbaasClass.bluemix.dbaas
Class.bluemix.dbaas
 
Frontend Servers and NGINX: What, Where and How
Frontend Servers and NGINX: What, Where and HowFrontend Servers and NGINX: What, Where and How
Frontend Servers and NGINX: What, Where and How
 
Google App Engine Developer - Day4
Google App Engine Developer - Day4Google App Engine Developer - Day4
Google App Engine Developer - Day4
 

Similar to Relevance trilogy may dream be with you! (dec17)

WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...
Fabio Franzini
 
After max+phonegap
After max+phonegapAfter max+phonegap
After max+phonegap
yangdj
 
混搭移动开发:PhoneGap+JQurey+Dreamweaver
混搭移动开发:PhoneGap+JQurey+Dreamweaver混搭移动开发:PhoneGap+JQurey+Dreamweaver
混搭移动开发:PhoneGap+JQurey+Dreamweaver
yangdj
 
Developing your first application using FIWARE
Developing your first application using FIWAREDeveloping your first application using FIWARE
Developing your first application using FIWARE
FIWARE
 
Practical AngularJS
Practical AngularJSPractical AngularJS
Practical AngularJS
Wei Ru
 
Developing your first application using FI-WARE
Developing your first application using FI-WAREDeveloping your first application using FI-WARE
Developing your first application using FI-WARE
Fermin Galan
 

Similar to Relevance trilogy may dream be with you! (dec17) (20)

WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...
 
Compass Framework
Compass FrameworkCompass Framework
Compass Framework
 
After max+phonegap
After max+phonegapAfter max+phonegap
After max+phonegap
 
混搭移动开发:PhoneGap+JQurey+Dreamweaver
混搭移动开发:PhoneGap+JQurey+Dreamweaver混搭移动开发:PhoneGap+JQurey+Dreamweaver
混搭移动开发:PhoneGap+JQurey+Dreamweaver
 
Developing your first application using FIWARE
Developing your first application using FIWAREDeveloping your first application using FIWARE
Developing your first application using FIWARE
 
droidQuery: The Android port of jQuery
droidQuery: The Android port of jQuerydroidQuery: The Android port of jQuery
droidQuery: The Android port of jQuery
 
Practical AngularJS
Practical AngularJSPractical AngularJS
Practical AngularJS
 
Integrating SAP the Java EE Way - JBoss One Day talk 2012
Integrating SAP the Java EE Way - JBoss One Day talk 2012Integrating SAP the Java EE Way - JBoss One Day talk 2012
Integrating SAP the Java EE Way - JBoss One Day talk 2012
 
Operator SDK for K8s using Go
Operator SDK for K8s using GoOperator SDK for K8s using Go
Operator SDK for K8s using Go
 
ADF Gold Nuggets (Oracle Open World 2011)
ADF Gold Nuggets (Oracle Open World 2011)ADF Gold Nuggets (Oracle Open World 2011)
ADF Gold Nuggets (Oracle Open World 2011)
 
WSO2Con ASIA 2016: WSO2 Analytics Platform: The One Stop Shop for All Your Da...
WSO2Con ASIA 2016: WSO2 Analytics Platform: The One Stop Shop for All Your Da...WSO2Con ASIA 2016: WSO2 Analytics Platform: The One Stop Shop for All Your Da...
WSO2Con ASIA 2016: WSO2 Analytics Platform: The One Stop Shop for All Your Da...
 
Cloud native programming model comparison
Cloud native programming model comparisonCloud native programming model comparison
Cloud native programming model comparison
 
Advanced Web Development
Advanced Web DevelopmentAdvanced Web Development
Advanced Web Development
 
HSC INFORMATION TECHNOLOGY CHAPTER 3 ADVANCED JAVASCRIPT
HSC INFORMATION TECHNOLOGY CHAPTER 3 ADVANCED JAVASCRIPTHSC INFORMATION TECHNOLOGY CHAPTER 3 ADVANCED JAVASCRIPT
HSC INFORMATION TECHNOLOGY CHAPTER 3 ADVANCED JAVASCRIPT
 
Angular.js Primer in Aalto University
Angular.js Primer in Aalto UniversityAngular.js Primer in Aalto University
Angular.js Primer in Aalto University
 
Developing your first application using FI-WARE
Developing your first application using FI-WAREDeveloping your first application using FI-WARE
Developing your first application using FI-WARE
 
REST easy with API Platform
REST easy with API PlatformREST easy with API Platform
REST easy with API Platform
 
From Legacy to Hexagonal (An Unexpected Android Journey)
From Legacy to Hexagonal (An Unexpected Android Journey)From Legacy to Hexagonal (An Unexpected Android Journey)
From Legacy to Hexagonal (An Unexpected Android Journey)
 
بررسی چارچوب جنگو
بررسی چارچوب جنگوبررسی چارچوب جنگو
بررسی چارچوب جنگو
 
Node.js and Parse
Node.js and ParseNode.js and Parse
Node.js and Parse
 

Recently uploaded

Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills KuwaitKuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
jaanualu31
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
MsecMca
 
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
HenryBriggs2
 
DeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesDeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakes
MayuraD1
 

Recently uploaded (20)

Computer Lecture 01.pptxIntroduction to Computers
Computer Lecture 01.pptxIntroduction to ComputersComputer Lecture 01.pptxIntroduction to Computers
Computer Lecture 01.pptxIntroduction to Computers
 
Rums floating Omkareshwar FSPV IM_16112021.pdf
Rums floating Omkareshwar FSPV IM_16112021.pdfRums floating Omkareshwar FSPV IM_16112021.pdf
Rums floating Omkareshwar FSPV IM_16112021.pdf
 
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxS1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
 
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills KuwaitKuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
 
Engineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planesEngineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planes
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS Lambda
 
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
 
Online food ordering system project report.pdf
Online food ordering system project report.pdfOnline food ordering system project report.pdf
Online food ordering system project report.pdf
 
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
 
Online electricity billing project report..pdf
Online electricity billing project report..pdfOnline electricity billing project report..pdf
Online electricity billing project report..pdf
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.
 
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
 
DeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesDeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakes
 
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptxA CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
 
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced LoadsFEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxHOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
 
School management system project Report.pdf
School management system project Report.pdfSchool management system project Report.pdf
School management system project Report.pdf
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 

Relevance trilogy may dream be with you! (dec17)

  • 1. Relevance Trilogy: May DREAM be with you! Woonsan Ko December 6, 2017 (By courtesy of Matthias Ripp, licensed by CC BY 2.0)
  • 2. Find all the resources including this presentation: ● slideshare.net/woonsan ● woonsanko.blogspot.com Relevance Trilogy Demo Project: ● github.com/WoonsanKo/relevance-trilogy-demo
  • 3. “I still have a dream.” 3 Prologue
  • 4. Digital Relevance Experience & Agility Management 4 DAME cycle for DREAM
  • 5. Digital Relevance Experience & Agility Management 5 business expert developer webmaster
  • 6. Digital Relevance Experience & Agility Management 6 business expert developer webmaster Slow, Difficult and Costly to realize relevant data collections!
  • 7. Digital Relevance Experience & Agility Management 7 business expert developer webmaster How to apply to Headless Scenarios?
  • 8. Digital Relevance Experience & Agility Management 8 business expert developer webmaster A “hacky variation”? (JSON aggregation from Page/Components?)
  • 9. 9 ● The 3 Questions Digital Relevance Experience & Agility Management Chapter 1 on “How to make Define phase faster and more cost-effective?” Chapter 2 on “How to Apply Relevance to Headless Scenarios?” Chapter 3 on “A ‘hacky variation’? JSON Aggregation from Page/Components? Any alternatives?”
  • 10. DREAM on EIRE* 10 Chapter 1. * More at https://www.onehippo.org/library/enterprise/services-features/inference-engine/introduction.html
  • 11. What’s happening today? 11 BloomReach DXP visitor business expert webmaster developer Delivery tier Authoring tier FooCollector FooScorer FooCharacteristicPlugin FooCollectorPlugin Targeting Service Characteristics Experience Optimizer Alter Ego What’s going on with my foo data collection? Well, I’ve been doing my best to implement the Classes and ExtJS stuffs!
  • 12. Why Expressional Inference Rule Engine? ● Simple “Forward-chaining*” Inference Engine which executes expressions of Rules to deduce Goal Values from Available Data. ○ Goal Values : Primary Goal Value and optional Extra (Secondary) Goal Value(s). ■ e.g, “news” type is the primary goal value while hit counters can be extra goal values. ( = { “news”: 3, “events”: 2, “unknown”: 1 }) 12 Data from Visitor Available Data Data from Environment Data from Knowledge Base IF reads news pages most often, THEN X is “news”. IF reads events pages most often, THEN X is “events”. ELSE X is “unknown”. Available Data Primary Goal value (“news”, “events”, or “unknown”), and optional Extra Goal value(s) Expressional Inference Rule Engine Primary Goal value * More at https://en.wikipedia.org/wiki/Forward_chaining
  • 13. Why Expressional Inference Rule Engine? (cont.) 13 HTTP vars Geographic vars Weather vars SalesForce / Marketo vars Variable X, Y, Z, ... Expressional Inference Rule Engine BloomReach DXP Rules Expression Document (w/ JEXL*) business expert visitor <<personalized / relevant content>> Rule-based Generic Collector Personalized Content Delivery Input vars in the world Deduced business goal vars AI-powered analytic vars developer * More at http://commons.apache.org/proper/commons-jexl/
  • 14. How it works? 14 Define all the “inference goal” values to the business. Those are to be shown in Characteristics plugin automatically! Targeting collector will be in the same lifecycle of this document publication lifecycle! Configure the collector plugin’s icon here! Parameters can be defined and accessed in expressions through $.getParameter() or $.getParameterValues().
  • 15. How it works? (cont.) 15 As you defined the possible “inference goal” values to deduce!
  • 16. How it works? (cont.) 16 Select your “inference rule” based characteristic to personalize!
  • 17. Expressional Inference Rule Engine ● Inference Rules Expression Script Engine (black-boxed JEXL Sandbox) ○ Built-in Objects and Built-in Namespace Functions ○ Support Custom POJOs / Custom Namespace Functions ■ You can integrate with any backends! ● Primary Goal Targeting Data Value (from return value) ● Extra (Secondary) Goal Targeting Data Values ○ Via $.collectorContext built-in object 17* More at http://commons.apache.org/proper/commons-jexl/
  • 18. Expressional Inference Rule Engine - Simple Example 18 // Suppose you need to classify the visitor based on CRM data (rank and industry) // and visitor’s continent determined by GeoIP service. // // Example Classified Primary Goal Values: [ “non-eu-star”, “eu-star” ] // var location = geolocation:getLocation($.request.remoteAddr); var email = $.request.cookies[“email”]; var crmService = $.request.getAttribute(“crmService”); var lead = crmService.findLeadByEmail(email); if (lead.rank == “Hot” && lead.industry == “Sports”) { if (location.continentCode == “AF” && location.continentCode == “AS”) { return "non-eu-star"; } else if (location.continentCode == “EU”) { return "eu-star"; } } return null;
  • 19. Built-in Objects 19 Built-in Object Description $ Root built-in object for anything else $.logger Logger representation (GenericLoggerModel ) $.request Request-related representation (GenericRequestContextModel ) $.time Date/Time related representation (GenericTimeModel ) $.collectorContext Targeting collector context representation (GenericCollectorContextModel)
  • 20. Built-in Namespace Functions 20 Built-in Function Description string: String utilities. e.g, string:split("Hello, World!", ","); date: Date utilities provided by Commons Lang. number: Number utilities provided by Commons Lang. counter: Counting utilities. For example, it provides utilities to increment counter by key in a map. e.g, var map = counter:newMap(); counter:increment(map, "key1"); regex: Regular expression utilities that provide compiling both regex and glob expressions. json: JSON utilities providing parsed JSONObject or JSONArray objects. geolocation: GEO Location utilities to find location by client IP address. ... ...
  • 21. Custom Object Attribute / Custom Function Support ● Custom Objects ○ Register it in the Add-on Spring Assembly Override XML. ○ Get the attribute in expressions: $.getAttribute(name) ● Custom Namespace Functions ○ Register it in the Add-on Spring Assembly Override XML. ○ Use it like ns1:func(...) in expressions. 21
  • 22. What’s going to happen now? 22 BloomReach DXP visitor business expert webmaster developer Delivery tier Authoring tier Custom POJO Objects / Functions Targeting Service Characteristics Experience Optimizer Alter Ego business expert Wow, it’s just working! We can already apply and monitor it !!! Cool! You can even edit, republish the rules in CMS at runtime! WE DID IT! EIRE Foo Inf. Rules
  • 23. 23 Chapter 2. ROCK Headless with AC!DC* (By courtesy of Laurel F, licensed by CC BY-SA 2.0) * More at https://www.onehippo.org/library/enterprise/services-features/api-agent-channel/introduction.html
  • 24. Can we apply Relevance in Headless Scenario? 24 BloomReach DXP visitor business expert webmaster Delivery tier REST API Mount Website Mount Website Channel Frontend App No REST Channel! <<rest>> What?! There’s no Channel for REST? Well, REST API doesn’t have channel, components, so what can I do?
  • 25. Create AC!DC* Channel for REST API Mount 25* More at https://www.onehippo.org/library/enterprise/services-features/api-agent-channel/introduction.html Since v12.1, built-in Swagger API doc (/swagger.{yaml|json}) is supported out-of-box!
  • 26. Personalize Plain JAX-RS Services ● Use @ParametersInfo annotation in JAX-RS. ● Use @Context ParametersInfoProvider to read (personalized) parameters. 26 @Path(“/products/”) // JAX-RS annotation @Api(value=”Products”) // Swagger annotation @ParametersInfo(type = ProductParametersInfo.class) // HST-2 annotation public class ProductResources extends AbstractResource { @GET @Path("/search/") @ApiOperation(value="Finds products", response=ProductRepresentation.class, responseContainer="List") public List<ProductRepresentation> searchProductResources( @Context HttpServletRequest servletRequest, @Context ParametersInfoProvider paramsInfoProvider, @QueryParam("brand") String brand, ...) { // read ParametersInfo and personalize query params like you do usually in HstComponents! ProductParametersInfo paramsInfo = paramsInfoProvider.getParametersInfo(); String scopePath = paramsInfo.getScopePath(); String sortInfo = paramsInfo.getSortInfo(); // ... } }
  • 27. How it works? 27 Built-in Blueprint to create AC!DC Channel Application!
  • 28. How it works? (cont.) 28 Built-in Blueprint to create AC!DC Channel Application!
  • 29. How it works? (cont.) 29
  • 30. 30 BloomReach DXP business expert webmaster Delivery tier REST API Mount Website Mount Website Channel Wow, seamless headless! We can personalize REST API visitors, too! WE DID IT! (2) What’s going to happen now? visitor Frontend App <<rest>> Awesome! You can even test with different variant params with Swagger! AC!DC Channel
  • 31. GREB* on SPA 31 Chapter 3. * More at https://www.onehippo.org/library/enterprise/services-features/greb-api/introduction.html
  • 32. Custom JSON Writing in FTL? (“hacky variant”) 32 BloomReach DXP business expert webmaster Delivery tier FTL Templates writing JSON Website Mount Website Channel Well, then can I write custom JSON output in templates? What?! There’s no Channel for REST? <#-- news-list.ftl --> { “container”: [ <@hst.include ref=”container” /> ] } <#-- news-item.ftl --> { “title”: “The Medusa News”, “date”: “2017-12-06”, “content”: “Lorem Ipsum..." } No API Mount! visitor Frontend App <<rest>>
  • 33. Custom JSON Writing in FTL? (“hacky variant”) ● Problems with custom JSON writing in templates ○ Error prone in JSON serialization ○ No POJO mapping framework (e.g, Jackson2) ○ More templating work 33 (By courtesy of Dave O, licensed by CC BY-SA 2.0)
  • 34. Why GREB (Generic Resource Entity Builder) API? 34 Simply contribute POJOs, HST Beans, etc. through GREB in #doBeforeRender(). Separate GREB API Mount (and Channel) with GREB Pipeline, which writes an aggregated JSON output using Jackson2 (no template rendering)!
  • 35. JSON Contribution 35 public class MyComponent extends GenericHstComponent { @Override public void doBeforeRender(HstRequest request, HstResponse response) throws HstComponentException { GenericResourceEntityBuilder builder = GenericResourceEntityBuilder.get(RequestContextProvider.get()); builder.addResourceEntity("title", document.getTitle()); builder.addResourceEntity("timestamp", System.currentTimeMillis()); // ... } } { "title": "Hello, World!", "timestamp": 1479249799770, }
  • 36. JSON Contribution (cont.) 36 public void doBeforeRender(HstRequest request, HstResponse response) throws HstComponentException { // ... builder.addResourceEntity("document", document); // ... } } { "title": "Hello, World!", "timestamp": 1479249799770, "document": { "title": "The medusa news", "introduction": "This is a news article.", // ... } }
  • 37. List<Object> references = new LinkedList<>(); references.add(referenceDoc1); references.add(referenceDoc2); builder.addResourceEntity("references", references); Map<String, Object> images = new LinkedHashMap<>(); images.put("portrait", portrait); images.put("landscape", landscape); builder.addResourceEntity("images", images); JSON Contribution (cont.) 37 { "title": "Hello, World!", "timestamp": 1479249799770, "document": { "title": "The medusa news", "introduction": "This is a news article.", // ... }, "references": [{ "title": "Referenced Document 1", // ... },{ "title": "Referenced Document 2", // ... }], "images": { "portrait": { // ... }, "landscape": { // ... } } }
  • 38. When to Use GREB API*? ● JSON API output based on Page Composition ○ E.g, Just as a glue between SPA and Page Aggregation. ● Quick JSON API Provision ○ Taking advantage of Jackson2 JSON Mapping. ○ When API-First approach is not necessary. 38 (By courtesy of Ferran Pestaña, licensed by CC BY-SA 2.0) * More at https://www.onehippo.org/library/enterprise/services-features/greb-api/introduction.html
  • 39. 39 Wow, how simple it is! We produce a flexible JSON API easily! Love Jackson2 mapping! It’s very easy to expose JSON API with POJOs, HST Beans, etc. WE DID IT! (3) What’s going to happen now? BloomReach DXP business expert webmaster Delivery tier Website Mount Website Channel visitor Frontend App <<rest>> GREB API Mount
  • 40. “The only one who could ever reach me Was the son of a DREAMer man.” 40 Epilogue
  • 41. 41 business expert Developer webmaster EIRE enables Fast, Agile and Cost-effective! DREAM Coming True API Agent Channel enables Seamless Relevance Integration in Headless Scenarios GREB API provides a safe, robust alternatives to the “hacky variation”.
  • 42. Stay in Touch! ● www.onehippo.org ● slideshare.net/woonsan ● woonsanko.blogspot.com