Web Liquid StreamsMashup ChallengeICWE 2015Masiar Babazadeh@masiarbAndrea Gallidabino@agallidabinoCesare Pautasso@pautasso
University of Lugano Switzerland
[email protected]
1
2
Web Liquid Streams Overview
STREAMING FRAMEWORK
Producer Filter Consumer
Topology
3
STREAMING FRAMEWORK
O1 O2 O3
Operators
4
STREAMING FRAMEWORK
O1 O2 O3
Bindings
5
MASHUP
7
Stream
Operator
MASHUP
Operator Operator
8
Stream Rest
MASHUP
Operator Operator
9
Stream
Operator
Rest
OPERATORS
Operator
10
OPERATORS
Operator
11
OPERATORS
Operator
12
WORKERS
13
Child Process WebWorkers
OPERATOR SCRIPTS - API
var k = require(‘wls.js’)
14
k.createNode(function(msg) { …
})
15
OPERATOR SCRIPTS - API
k.send({ t: tweet, location: {gps}
})
16
OPERATOR SCRIPTS - API
k.createNode(function(msg) { …
http.get(options, function(res){ …
k.send(res) })
)}
17
OPERATOR SCRIPTS - AJAX
BROWSER ONLY - API
18
Operator
Operator
BROWSER ONLY - API
19
Operator
Operator
W WW
W WW
W WW
BROWSER ONLY - API
20
Operator
Operator
W WW
W WW
W WW
DOM
<html>
<div id=“test”></div>
</html>
OPERATOR SCRIPTS - API
21
k.callFunction(name, params, callback)
k.setDOM(selector, value)
BINDINGS
Operator Operator
22
??? ???
BINDINGS
Operator Operator
23
BINDINGS
Operator Operator
24
WebSockets
BINDINGS
Operator Operator
25
TOPOLOGY - JSON
{ “topology”: { “id”: “test”, “operators”: [], “bindings”: []
} }
26
TOPOLOGY - JSON{ “id”: “producer”, “script”: “producer.js”
},
{ “id”: “consumer”, “script”: “consumer.js”, "browser": { "path" : "/consumer", "only" : true
} }
27
TOPOLOGY - JSON
{ “from”: “producer”, “to”: “consumer”, “type”: “round_robin”
}
28
DEPLOYMENT - JSON
29
DEPLOYMENT - JSON
30
DEPLOYMENT - JSON
31
exec topology.js
DEPLOYMENT - JSON
32
Producer Consumer
DYNAMIC DEPLOYMENT
33
Producer Consumer
DYNAMIC DEPLOYMENT
34
Producer Consumer
DYNAMIC DEPLOYMENT
35
Producer Consumer
run script.js [pid]
DYNAMIC DEPLOYMENT
36
Producer Consumer
Operator
Operator
Operator
Operator Operator
DYNAMIC DEPLOYMENT
37
Producer Consumer
Operator
Operator
Operator
Operator Operatorbind [uid] [uid]
DYNAMIC DEPLOYMENT
38
Producer Consumer
Operator
Operator
Operator
Operator Operatorbind [uid] [uid]
DYNAMIC DEPLOYMENT - MIGRATION
Operator Operator Operator
39
DYNAMIC DEPLOYMENT - MIGRATION
Operator Operator Operator
40
DYNAMIC DEPLOYMENT - MIGRATION
Operator Operator Operator
41
migrate [uid] [pid]
DYNAMIC DEPLOYMENT - MIGRATION
Operator Operator
42
Operator
MASHUP TOPOLOGY
Stream
TweetRetriever
TweetGeolocate
MarkerCreator
43
EXTENDED MASHUP TOPOLOGY
TweetRetriever
TweetGeolocate
Stream
MarkerCreator
REST
MarkerClicker
RetweetGatherer &Geolocate
44
EXTENDED MASHUP TOPOLOGY
TweetRetriever
TweetGeolocate
Stream
MarkerCreator
REST
MarkerClicker
RetweetGatherer &Geolocate
45
MarkerViewer
45
neha.inf.unisi.ch:10085/map
47