CONTEXT-ORIENTED PROGRAMMING …pages.di.unipi.it › throughthefog › wp-content › uploads ›...
Transcript of CONTEXT-ORIENTED PROGRAMMING …pages.di.unipi.it › throughthefog › wp-content › uploads ›...
![Page 1: CONTEXT-ORIENTED PROGRAMMING …pages.di.unipi.it › throughthefog › wp-content › uploads › sites › ...CONTEXT-ORIENTED PROGRAMMING ABSTRACTIONS FOR FOG C. BODEI, P. DEGANO,](https://reader035.fdocuments.in/reader035/viewer/2022081407/5f1bda56f08963400e101f23/html5/thumbnails/1.jpg)
1
CONTEXT-ORIENTEDPROGRAMMINGABSTRACTIONSFORFOGC.BODEI,P.DEGANO,G.FERRARI,L.GALLETTA
![Page 2: CONTEXT-ORIENTED PROGRAMMING …pages.di.unipi.it › throughthefog › wp-content › uploads › sites › ...CONTEXT-ORIENTED PROGRAMMING ABSTRACTIONS FOR FOG C. BODEI, P. DEGANO,](https://reader035.fdocuments.in/reader035/viewer/2022081407/5f1bda56f08963400e101f23/html5/thumbnails/2.jpg)
2
ML-CODA:AContext-OrientedProgrammingLanguage
FUNCTIONALLANGUAGE
ML
(KERNEL)
CONTEXT
DATALOGKNOWLEDGE
BASE
ML-CODA
BODEI,CANCIANI,DEGANO,GALLETTA,SALVATORI,FERRARI
![Page 3: CONTEXT-ORIENTED PROGRAMMING …pages.di.unipi.it › throughthefog › wp-content › uploads › sites › ...CONTEXT-ORIENTED PROGRAMMING ABSTRACTIONS FOR FOG C. BODEI, P. DEGANO,](https://reader035.fdocuments.in/reader035/viewer/2022081407/5f1bda56f08963400e101f23/html5/thumbnails/3.jpg)
3
CONTEXT
ML
(KERNEL)
ABSTRACTIONLAYERVIRTUALIZATIONOFTHE
OPERATIONALENVIRONMENT
PHYSICALENV:POSITION
CONNECTIVITY:
APPPREFSPROFILES
:ML-CODA
![Page 4: CONTEXT-ORIENTED PROGRAMMING …pages.di.unipi.it › throughthefog › wp-content › uploads › sites › ...CONTEXT-ORIENTED PROGRAMMING ABSTRACTIONS FOR FOG C. BODEI, P. DEGANO,](https://reader035.fdocuments.in/reader035/viewer/2022081407/5f1bda56f08963400e101f23/html5/thumbnails/4.jpg)
4
ContextDependentBinding
dlet txt=
getTxt ()when only_speech()
in …
(* txt is a parameter: its value depend on the current context *)
CONTEXT
ML-CODA
![Page 5: CONTEXT-ORIENTED PROGRAMMING …pages.di.unipi.it › throughthefog › wp-content › uploads › sites › ...CONTEXT-ORIENTED PROGRAMMING ABSTRACTIONS FOR FOG C. BODEI, P. DEGANO,](https://reader035.fdocuments.in/reader035/viewer/2022081407/5f1bda56f08963400e101f23/html5/thumbnails/5.jpg)
5
BehaviouralVariaEons
fun getData()=let url = (_){<-direct_com(). let c = getChan() in receiveData c,<- use_qrcode(),camera(on). let p = take_picture() in decode_qr p }in getRemoteData:
CONTEXT
ML-CODA
![Page 6: CONTEXT-ORIENTED PROGRAMMING …pages.di.unipi.it › throughthefog › wp-content › uploads › sites › ...CONTEXT-ORIENTED PROGRAMMING ABSTRACTIONS FOR FOG C. BODEI, P. DEGANO,](https://reader035.fdocuments.in/reader035/viewer/2022081407/5f1bda56f08963400e101f23/html5/thumbnails/6.jpg)
6
BehavioralVariaEons
fun getData()=let url = (_){<-direct_com(). let c = getChan() in receiveData c,<- use_qrcode(),camera(on). let p = take_picture() in decode_qr p }in getRemoteData:
CONTEXT
Adap@vity:appcanmodifyitsbehaviouraccordingtochangesinitscontextML-CODA
![Page 7: CONTEXT-ORIENTED PROGRAMMING …pages.di.unipi.it › throughthefog › wp-content › uploads › sites › ...CONTEXT-ORIENTED PROGRAMMING ABSTRACTIONS FOR FOG C. BODEI, P. DEGANO,](https://reader035.fdocuments.in/reader035/viewer/2022081407/5f1bda56f08963400e101f23/html5/thumbnails/7.jpg)
7
ML-CODA
StaEcMachinery(DFG@IEEE-TSE)o verifythatdispatchingmechanismalwayssucceed
SecurityAnalysis(DBGS@JCS)o detectpotenEalunsafemodicaEons PrototypeImplementaEon(CDFG@FOCLASA)o ContextOrientedExtensionofF#
![Page 8: CONTEXT-ORIENTED PROGRAMMING …pages.di.unipi.it › throughthefog › wp-content › uploads › sites › ...CONTEXT-ORIENTED PROGRAMMING ABSTRACTIONS FOR FOG C. BODEI, P. DEGANO,](https://reader035.fdocuments.in/reader035/viewer/2022081407/5f1bda56f08963400e101f23/html5/thumbnails/8.jpg)
8
OURF(r)OGGOAL:PROGRAMMINGABSTRACTIONS
inaContext-Awarefashion
![Page 9: CONTEXT-ORIENTED PROGRAMMING …pages.di.unipi.it › throughthefog › wp-content › uploads › sites › ...CONTEXT-ORIENTED PROGRAMMING ABSTRACTIONS FOR FOG C. BODEI, P. DEGANO,](https://reader035.fdocuments.in/reader035/viewer/2022081407/5f1bda56f08963400e101f23/html5/thumbnails/9.jpg)
9
ProgrammingModel
• HowcanweeasilydevelopapplicaEonsonthefogcompuEnginfrastructure?• Mirko’stalkforfurthermoEvaEons
• Needarightprogrammingmodelthat• Providessuitableprogrammingabstrac@ons• Ensuresdynamicadapta@on• Supportcontext-awareorchestra@ons• Supportshierarchicalresources• Enforcecontext-awaresecurityproper@es• Supportverifica@on
![Page 10: CONTEXT-ORIENTED PROGRAMMING …pages.di.unipi.it › throughthefog › wp-content › uploads › sites › ...CONTEXT-ORIENTED PROGRAMMING ABSTRACTIONS FOR FOG C. BODEI, P. DEGANO,](https://reader035.fdocuments.in/reader035/viewer/2022081407/5f1bda56f08963400e101f23/html5/thumbnails/10.jpg)
10
OurF(r)ROGgoals:byexamples
![Page 11: CONTEXT-ORIENTED PROGRAMMING …pages.di.unipi.it › throughthefog › wp-content › uploads › sites › ...CONTEXT-ORIENTED PROGRAMMING ABSTRACTIONS FOR FOG C. BODEI, P. DEGANO,](https://reader035.fdocuments.in/reader035/viewer/2022081407/5f1bda56f08963400e101f23/html5/thumbnails/11.jpg)
11
<Type,Speed,otherinfo>
![Page 12: CONTEXT-ORIENTED PROGRAMMING …pages.di.unipi.it › throughthefog › wp-content › uploads › sites › ...CONTEXT-ORIENTED PROGRAMMING ABSTRACTIONS FOR FOG C. BODEI, P. DEGANO,](https://reader035.fdocuments.in/reader035/viewer/2022081407/5f1bda56f08963400e101f23/html5/thumbnails/12.jpg)
12
![Page 13: CONTEXT-ORIENTED PROGRAMMING …pages.di.unipi.it › throughthefog › wp-content › uploads › sites › ...CONTEXT-ORIENTED PROGRAMMING ABSTRACTIONS FOR FOG C. BODEI, P. DEGANO,](https://reader035.fdocuments.in/reader035/viewer/2022081407/5f1bda56f08963400e101f23/html5/thumbnails/13.jpg)
13
CONTEXT
TOPOLOGYOFSTLsLOCALSERVICESHIERARCHYINFO
![Page 14: CONTEXT-ORIENTED PROGRAMMING …pages.di.unipi.it › throughthefog › wp-content › uploads › sites › ...CONTEXT-ORIENTED PROGRAMMING ABSTRACTIONS FOR FOG C. BODEI, P. DEGANO,](https://reader035.fdocuments.in/reader035/viewer/2022081407/5f1bda56f08963400e101f23/html5/thumbnails/14.jpg)
14
CONTEXT
TOPOLOGYOFSTLsLOCALSERVICESHIERARCHYINFO
COMPUTING&ORCHESTRATION
PUT_DATA()
LOCAL&NONLOCAL
![Page 15: CONTEXT-ORIENTED PROGRAMMING …pages.di.unipi.it › throughthefog › wp-content › uploads › sites › ...CONTEXT-ORIENTED PROGRAMMING ABSTRACTIONS FOR FOG C. BODEI, P. DEGANO,](https://reader035.fdocuments.in/reader035/viewer/2022081407/5f1bda56f08963400e101f23/html5/thumbnails/15.jpg)
15
CONTEXT
TOPOLOGYOFSTLsLOCALSERVICESHIERARCHYINFO
COMPUTING&ORCHESTRATION
ORCHESTRATE(param)
Slow-downwarning
![Page 16: CONTEXT-ORIENTED PROGRAMMING …pages.di.unipi.it › throughthefog › wp-content › uploads › sites › ...CONTEXT-ORIENTED PROGRAMMING ABSTRACTIONS FOR FOG C. BODEI, P. DEGANO,](https://reader035.fdocuments.in/reader035/viewer/2022081407/5f1bda56f08963400e101f23/html5/thumbnails/16.jpg)
16
CONTEXT
TOPOLOGYOFSTLsLOCALSERVICESHIERARCHYINFO
COMPUTING&ORCHESTRATION
ORCHESTRATE()Slow-downwarning
ORCHESTRATION=LIGHTHOUSE
![Page 17: CONTEXT-ORIENTED PROGRAMMING …pages.di.unipi.it › throughthefog › wp-content › uploads › sites › ...CONTEXT-ORIENTED PROGRAMMING ABSTRACTIONS FOR FOG C. BODEI, P. DEGANO,](https://reader035.fdocuments.in/reader035/viewer/2022081407/5f1bda56f08963400e101f23/html5/thumbnails/17.jpg)
17
CONTEXT
TOPOLOGYOFSTLsLOCALSERVICESHIERARCHYINFO
COMPUTING&ORCHESTRATION
ORCHESTRATE()Slow-downwarning
DYNAMICORCHESTRATION=CONTEXTDEPENDENTADAPTATION
![Page 18: CONTEXT-ORIENTED PROGRAMMING …pages.di.unipi.it › throughthefog › wp-content › uploads › sites › ...CONTEXT-ORIENTED PROGRAMMING ABSTRACTIONS FOR FOG C. BODEI, P. DEGANO,](https://reader035.fdocuments.in/reader035/viewer/2022081407/5f1bda56f08963400e101f23/html5/thumbnails/18.jpg)
18
CONTEXT
LOCALSERVICESHIERARCHYINFO
POLICIES
COMPUTING&ORCHESTRATION
ACTIVATE_SERVICE()
![Page 19: CONTEXT-ORIENTED PROGRAMMING …pages.di.unipi.it › throughthefog › wp-content › uploads › sites › ...CONTEXT-ORIENTED PROGRAMMING ABSTRACTIONS FOR FOG C. BODEI, P. DEGANO,](https://reader035.fdocuments.in/reader035/viewer/2022081407/5f1bda56f08963400e101f23/html5/thumbnails/19.jpg)
19
ARCHITECTURALSTYLE
APPCXT
APPCXT
APPCXT
![Page 20: CONTEXT-ORIENTED PROGRAMMING …pages.di.unipi.it › throughthefog › wp-content › uploads › sites › ...CONTEXT-ORIENTED PROGRAMMING ABSTRACTIONS FOR FOG C. BODEI, P. DEGANO,](https://reader035.fdocuments.in/reader035/viewer/2022081407/5f1bda56f08963400e101f23/html5/thumbnails/20.jpg)
20
Context-awareness:adaptaEon
Adapta@onstep
APPCXT
APPCXT
APPCXT
![Page 21: CONTEXT-ORIENTED PROGRAMMING …pages.di.unipi.it › throughthefog › wp-content › uploads › sites › ...CONTEXT-ORIENTED PROGRAMMING ABSTRACTIONS FOR FOG C. BODEI, P. DEGANO,](https://reader035.fdocuments.in/reader035/viewer/2022081407/5f1bda56f08963400e101f23/html5/thumbnails/21.jpg)
21
Context-awareness:CoordinaEngParallelism
APPCXT
APPCXT
APPCXT
![Page 22: CONTEXT-ORIENTED PROGRAMMING …pages.di.unipi.it › throughthefog › wp-content › uploads › sites › ...CONTEXT-ORIENTED PROGRAMMING ABSTRACTIONS FOR FOG C. BODEI, P. DEGANO,](https://reader035.fdocuments.in/reader035/viewer/2022081407/5f1bda56f08963400e101f23/html5/thumbnails/22.jpg)
22
WEARESTILLLOSTINTHEFOG…