54
The Mashup Component Descrip3on Language Saeed Aghaee and Cesare Pautasso Faculty of Informa3cs University of Lugano (USI) hCp://www.saeedaghaee.info hCp://www.pautasso.info hCp://www.jopera.org 1

The Mashup Component Description Language

Embed Size (px)

DESCRIPTION

My presentation slides on "The Mashup Component Description Language" at iiWAS 2011 conference.

Citation preview

Page 1: The Mashup Component Description Language

The  Mashup  Component  Descrip3on  Language  

Saeed  Aghaee  and  Cesare  Pautasso    

Faculty  of  Informa3cs  University  of  Lugano  (USI)  

         

hCp://www.saeed-­‐aghaee.info  hCp://www.pautasso.info    hCp://www.jopera.org    

       

1  

Page 2: The Mashup Component Description Language

Web  Mashups  

2  

Page 3: The Mashup Component Description Language

Amazon  S3  API    

Google  Custom  Search  

Yahoo  Term  Extrac;on   Twi>er  API  

 Google  Maps  

API  

 YouTube  Player  

Flickr  API   Twilio  SMS   eBay  API  

3  

Page 4: The Mashup Component Description Language

4  

Page 5: The Mashup Component Description Language

5  

Page 6: The Mashup Component Description Language

Twi>er  API    

Google  Maps  API  

Twilio  SMS`   eBay  API  

Mashup  Development  

6  

Page 7: The Mashup Component Description Language

Ideal  

7  

Page 8: The Mashup Component Description Language

Reality  

8  

Page 9: The Mashup Component Description Language

   

9  

Page 10: The Mashup Component Description Language

 Data  

 Data  

 Logic  

 User  

Interface  

 Logic  

Logic  

 User  

Interface  

Logic    Data  

10  

Page 11: The Mashup Component Description Language

 REST  

 HTTP  

SOAP  

 JavaScript  

 REST  

REST  

 JavaScript  

HTTP    SOAP  

11  

Page 12: The Mashup Component Description Language

Ideal  

How  to  deal  with  Heterogeneity?    

12  

Page 13: The Mashup Component Description Language

Component  Meta-­‐model  

13  

Page 14: The Mashup Component Description Language

1  

   

14  

Page 15: The Mashup Component Description Language

Abstrac3on    Expressive  power    Extensibility  

15  

Page 16: The Mashup Component Description Language

Abstrac3on    Expressive  power    Extensibility  

16  

Page 17: The Mashup Component Description Language

Abstrac3on    

Expressive  power    Extensibility  

17  

Page 18: The Mashup Component Description Language

Abstrac3on    Expressive  power    

Extensibility  

18  

Page 19: The Mashup Component Description Language

The  Mashup  Component  Descrip3on  Language  (MCDL)  

19  

Page 20: The Mashup Component Description Language

Technology  dependent    

Technology  independent  

20  

Page 21: The Mashup Component Description Language

Component  provider  

Library  

Composer  

Publish  

Compose  

Technology  dependent  

 

Technology  independent  

Execute  Discover  

Mashup  Development  Toolkit  

Execu3on    Engine  

21  

Page 22: The Mashup Component Description Language

Technology  dependent    

Technology  independent  

Composer  

   

22  

Page 23: The Mashup Component Description Language

Technology  dependent    

Composer  

   

23  

Page 24: The Mashup Component Description Language

Tasks  

24  

Page 25: The Mashup Component Description Language

Events  

25  

Page 26: The Mashup Component Description Language

I/O  Parameters  

26  

Page 27: The Mashup Component Description Language

TwiCer  APIs  Interface  

Tasks   Input   Output  Search   query   Tweets  

27  

Page 28: The Mashup Component Description Language

Google  Maps  Interface  

Tasks   Input   Output  ShowMarkers   •  Lat  

•  Lng  -­‐  

GetCoordinates   Address   •  Lat  •  Lng  

Events   Output  OnMapClick   •  Lat  

•  Lng  

28  

Page 29: The Mashup Component Description Language

Technology  dependent    

Technology  independent  

   

Mashup  Execu3on    Engine  

29  

Page 30: The Mashup Component Description Language

Wrapper  Types  

30  

Page 31: The Mashup Component Description Language

Wrapper  Types  

Category   Wrapper  Types  

Widget   IFrame  

DIV  

Data  Source   Database  

Web  feed  

Service   HTTP/REST  

RPC  

31  

Page 32: The Mashup Component Description Language

TwiCer  APIs  Wrapper  Type  

Category   Wrapper  Types  

Widget   IFrame  

DIV  

Data  Source   Database  

Web  feed  

Service   HTTP/REST   TwiCer  APIs  

RPC  

32  

Page 33: The Mashup Component Description Language

Google  Maps  Wrapper  Type  

Category   Wrapper  Types  

Widget   IFrame  

DIV   Google  Maps  

Data  Source   Database  

Web  feed  

Service   HTTP/REST  

RPC  

33  

Page 34: The Mashup Component Description Language

MCDL  Meta-­‐model  

34  

Page 35: The Mashup Component Description Language

MCDL  

JavaScript  Object  Nota3on  (JSON)  

{ "Interface": { "name":"", "property":[ {"name":"", "value":"" }],

"task": [ {"name": "", "description":"", "input": [ {"name": "", "value": "", "type": "" | "mime-type": ""} ], "output": [ {"name": "", "value": "", "type": "" | "mime-type": ""} ] }],

"event": [ {"name": "", "description":"", "output": [ {"name": "", "value": "", "type": "" | "mime-type": ""} ] }] },

"service_wrapper": [ {"type":"", "name":"",

"input": [ {"name": "", "value": ""} ] }],

"datasource_wrapper": [ {"type":"", "name":"", "input": [ {"name": "", "value": ""} ] }],

"widget_wrapper": [ {"type":"", name":"",

"input": [ {"name": "", "value": ""} ] }],

"mapper": [ {"source" : ["ref"], "destination" : [{"name":"ref", "correspond":"ref" | "template":"" | "parser":{ "language":"", "query":""}}] }]}}

35  

Page 36: The Mashup Component Description Language

JSON  Schema   "input": [ {"name": "", "value": ""} ] }],

"datasource_wrapper": [ {"type":"", "name":"", "input": [ {"name": "", "value": ""} ] }],

"widget_wrapper": [ {"type":"", name":"",

"input": [ {"name": "", "value": ""} ] }],

"mapper": [ {"source" : ["ref"], "destination" : [{"name":"ref", "correspond":"ref" | "template":"" | "parser":{ "language":"", "query":""}}] }]}}

{ "Interface": { "name":"", "property":[ {"name":"", "value":"" }],

"task": [ {"name": "", "description":"", "input": [ {"name": "", "value": "", "type": "" | "mime-type": ""} ], "output": [ {"name": "", "value": "", "type": "" | "mime-type": ""} ] }],

"event": [ {"name": "", "description":"", "output": [ {"name": "", "value": "", "type": "" | "mime-type": ""} ] }] },

"input": [ {"name": "", "value": ""} ] }],

"datasource_wrapper": [ {"type":"", "name":"", "input": [ {"name": "", "value": ""} ] }],

"widget_wrapper": [ {"type":"", name":"",

"input": [ {"name": "", "value": ""} ] }],

"mapper": [ {"source" : ["ref"], "destination" : [{"name":"ref", "correspond":"ref" | "template":"" | "parser":{ "language":"", "query":""}}] }]}}

"service_wrapper": [ {"type":"", "name":"", "input": [ {"name": "", "value": ""} ] }],

"datasource_wrapper": [ {"type":"", "name":"", "input": [ {"name": "", "value": ""} ] }],

"widget_wrapper": [ {"type":"", name":"",

"input": [ {"name": "", "value": ""} ] }],

36  

Page 37: The Mashup Component Description Language

Component  Meta-­‐model  -name-description

Event

-name-description

Task

-nameWrapper

+name-value-type/MIME-type

ParameterMapper destination (input)

source (output)

1..*

1..*

source (input)destination (output)

1..*

1..*

destination (output)

1..*

Rule

Rule

+input

+output

+output

0..*

0..*0..*

-nameInterface

0..*

1..*

Rule

37  

Page 38: The Mashup Component Description Language

Technology  Independent  -name-description

Event

-name-description

Task

-nameWrapper

+name-value-type/MIME-type

ParameterMapper destination (input)

source (output)

1..*

1..*

source (input)destination (output)

1..*

1..*

destination (output)

1..*

Rule

Rule

+input

+output

+output

0..*

0..*0..*

-nameInterface

0..*

1..*

Rule

38  

Page 39: The Mashup Component Description Language

Technology  Independent   "service_wrapper": [ {"type":"", "name":"",

"input": [ {"name": "", "value": ""} ] }],

"datasource_wrapper": [ {"type":"", "name":"", "input": [ {"name": "", "value": ""} ] }],

"widget_wrapper": [ {"type":"", name":"",

"input": [ {"name": "", "value": ""} ] }],

"mapper": [ {"source" : ["ref"], "destination" : [{"name":"ref", "correspond":"ref" | "template":"" | "parser":{ "language":"", "query":""}}] }]}}

{ "Interface": { "name":"", "property":[ {"name":"", "value":"" }],

"task": [ {"name": "", "description":"", "input": [ {"name": "", "value": "", "type": "" | "mime-type": ""} ], "output": [ {"name": "", "value": "", "type": "" | "mime-type": ""} ] }],

"event": [ {"name": "", "description":"", "output": [ {"name": "", "value": "", "type": "" | "mime-type": ""} ] }] },

39  

Page 40: The Mashup Component Description Language

Technology  Dependent  -name-description

Event

-name-description

Task

-nameWrapper

+name-value-type/MIME-type

ParameterMapper destination (input)

source (output)

1..*

1..*

source (input)destination (output)

1..*

1..*

destination (output)

1..*

Rule

Rule

+input

+output

+output

0..*

0..*0..*

-nameInterface

0..*

1..*

Rule

40  

Page 41: The Mashup Component Description Language

Technology  Dependent  { "Interface": { "name":"", "property":[ {"name":"", "value":"" }],

"task": [ {"name": "", "description":"", "input": [ {"name": "", "value": "", "type": "" | "mime-type": ""} ], "output": [ {"name": "", "value": "", "type": "" | "mime-type": ""} ] }],

"event": [ {"name": "", "description":"", "output": [ {"name": "", "value": "", "type": "" | "mime-type": ""} ] }] },

"input": [ {"name": "", "value": ""} ] }],

"datasource_wrapper": [ {"type":"", "name":"", "input": [ {"name": "", "value": ""} ] }],

"widget_wrapper": [ {"type":"", name":"",

"input": [ {"name": "", "value": ""} ] }],

"mapper": [ {"source" : ["ref"], "destination" : [{"name":"ref", "correspond":"ref" | "template":"" | "parser":{ "language":"", "query":""}}] }]}}

"input": [ {"name": "", "value": ""} ] }],

"datasource_wrapper": [ {"type":"", "name":"", "input": [ {"name": "", "value": ""} ] }],

"widget_wrapper": [ {"type":"", name":"",

"input": [ {"name": "", "value": ""} ] }],

"mapper": [ {"source" : ["ref"], "destination" : [{"name":"ref", "correspond":"ref" | "template":"" | "parser":{ "language":"", "query":""}}] }]}}

"service_wrapper": [ {"type":"", "name":"", "input": [ {"name": "", "value": ""} ] }],

"datasource_wrapper": [ {"type":"", "name":"", "input": [ {"name": "", "value": ""} ] }],

"widget_wrapper": [ {"type":"", name":"",

"input": [ {"name": "", "value": ""} ] }],

41  

Page 42: The Mashup Component Description Language

-nameWrapper

+styleWidget

+endPoint+mode

Service+streaming

Data Source

+type+inMessage+methodName+outMessage

RPC+ID+extScript+initScript

DIV+cutFrom+cutTo

IFrame

+scriptFunction

+initEvent+callback

Event0..* 0..*

+call+onEvent()

+show()+hide()+restyle()

T

II

III

I

E

III

II

II

IT

+type+server+port+user+pass+database+script+prepare+interval+data

DatabaseIIIIIIII

O

src

1

I : Input O : Output T: Task E: Event

O

+invoke()+stopStreaming()+onUpdate()

TE

+invoke()+onReceive()

TE

+WSDL+portType

SOAPII

+method+requestHeader+request+WADL+responseHeader +response+status

HTTP/RESTIII

OO

I

+frequencyWeb Feed

src 1

I

I

I

O

TT

functionevent

T

Wrapper  Types  Hierarchy  

42  

Page 43: The Mashup Component Description Language

MCDL  for  TwiCer  API   "input": [ {"name": "", "value": ""} ] }],

"datasource_wrapper": [ {"type":"", "name":"", "input": [ {"name": "", "value": ""} ] }],

"widget_wrapper": [ {"type":"", name":"",

"input": [ {"name": "", "value": ""} ] }],

"mapper": [ {"source" : ["ref"], "destination" : [{"name":"ref", "correspond":"ref" | "template":"" | "parser":{ "language":"", "query":""}}] }]}}

{ "Interface": { "name":"Twitter APIs", "property":[ {"version":"1" }],

"task": [ {"name": "search", "description":"Allows you to search for tweets based on a keyword", "input": [ {"name": "query", "value": "USI", "type": "String"} ], "output": [ {"name": "tweets", "mime-type": "JSON"} ] }],

},"mapper": [ {"source" : ["search.query"], "destination" : [{"name":"twitter_wrapper.URL", "template":"http://search.twitter.com/search.json?q={search.query}" | }] }]}}

"service_wrapper": [ {"type":"HTTP/REST", "name":"twitter_wrapper", "input": [ {"name": "method", "value": "GET"} ] }],

43  

Page 44: The Mashup Component Description Language

"input": [ {"name": "", "value": ""} ] }],

"datasource_wrapper": [ {"type":"", "name":"", "input": [ {"name": "", "value": ""} ] }],

"widget_wrapper": [ {"type":"", name":"",

"input": [ {"name": "", "value": ""} ] }],

"mapper": [ {"source" : ["ref"], "destination" : [{"name":"ref", "correspond":"ref" | "template":"" | "parser":{ "language":"", "query":""}}] }]}}

{ "Interface": { "name":"Twitter APIs", "property":[ {"version":"1" }],

"task": [ {"name": "search", "description":"Allows you to search for tweets based on a keyword", "input": [ {"name": "query", "value": "USI", "type": "String"} ], "output": [ {"name": "tweets", "mime-type": "JSON"} ] }],

},"mapper": [ {"source" : ["search.query"], "destination" : [{"name":"twitter_wrapper.URL", "template":"http://search.twitter.com/search.json?q={search.query}" | }] }]}}

"service_wrapper": [ {"type":"HTTP/REST", "name":"twitter_wrapper", "input": [ {"name": "method", "value": "GET"} ] }],

MCDL  for  TwiCer  API  

44  

Page 45: The Mashup Component Description Language

"input": [ {"name": "", "value": ""} ] }],

"datasource_wrapper": [ {"type":"", "name":"", "input": [ {"name": "", "value": ""} ] }],

"widget_wrapper": [ {"type":"", name":"",

"input": [ {"name": "", "value": ""} ] }],

"mapper": [ {"source" : ["ref"], "destination" : [{"name":"ref", "correspond":"ref" | "template":"" | "parser":{ "language":"", "query":""}}] }]}}

{ "Interface": { "name":"Twitter APIs", "property":[ {"version":"1" }],

"task": [ {"name": "search", "description":"Allows you to search for tweets based on a keyword", "input": [ {"name": "query", "value": "USI", "type": "String"} ], "output": [ {"name": "tweets", "mime-type": "JSON"} ] }],

},"mapper": [ {"source" : ["search.query"], "destination" : [{"name":"twitter_wrapper.URL", "template":"http://search.twitter.com/search.json?q={search.query}" | }] }]}}

"service_wrapper": [ {"type":"HTTP/REST", "name":"twitter_wrapper", "input": [ {"name": "method", "value": "GET"} ] }],

MCDL  for  TwiCer  API  

45  

Page 46: The Mashup Component Description Language

"input": [ {"name": "", "value": ""} ] }],

"datasource_wrapper": [ {"type":"", "name":"", "input": [ {"name": "", "value": ""} ] }],

"widget_wrapper": [ {"type":"", name":"",

"input": [ {"name": "", "value": ""} ] }],

"mapper": [ {"source" : ["ref"], "destination" : [{"name":"ref", "correspond":"ref" | "template":"" | "parser":{ "language":"", "query":""}}] }]}}

{ "Interface": { "name":"Twitter APIs", "property":[ {"version":"1" }],

"task": [ {"name": "search", "description":"Allows you to search for tweets based on a keyword", "input": [ {"name": "query", "value": "USI", "type": "String"} ], "output": [ {"name": "tweets", "mime-type": "JSON"} ] }],

},"mapper": [ {"source" : ["search.query"], "destination" : [{"name":"twitter_wrapper.URL", "template":"http://search.twitter.com/search.json?q={search.query}" | }] }]}}

"service_wrapper": [ {"type":"HTTP/REST", "name":"twitter_wrapper", "input": [ {"name": "method", "value": "GET"} ] }],

MCDL  for  TwiCer  API  

46  

Page 47: The Mashup Component Description Language

"input": [ {"name": "", "value": ""} ] }],

"datasource_wrapper": [ {"type":"", "name":"", "input": [ {"name": "", "value": ""} ] }],

"widget_wrapper": [ {"type":"", name":"",

"input": [ {"name": "", "value": ""} ] }],

"mapper": [ {"source" : ["ref"], "destination" : [{"name":"ref", "correspond":"ref" | "template":"" | "parser":{ "language":"", "query":""}}] }]}}

{ "Interface": { "name":"Twitter APIs", "property":[ {"version":"1" }],

"task": [ {"name": "search", "description":"Allows you to search for tweets based on a keyword", "input": [ {"name": "query", "value": "USI", "type": "String"} ], "output": [ {"name": "tweets", "mime-type": "JSON"} ] }],

},"mapper": [ {"source" : ["search.query"], "destination" : [{"name":"twitter_wrapper.URL", "template":"http://search.twitter.com/search.json?q={search.query}" | }] }]}}

"service_wrapper": [ {"type":"HTTP/REST", "name":"twitter_wrapper", "input": [ {"name": "method", "value": "GET"} ] }],

MCDL  for  TwiCer  API  

47  

Page 48: The Mashup Component Description Language

"input": [ {"name": "", "value": ""} ] }],

"datasource_wrapper": [ {"type":"", "name":"", "input": [ {"name": "", "value": ""} ] }],

"widget_wrapper": [ {"type":"", name":"",

"input": [ {"name": "", "value": ""} ] }],

"mapper": [ {"source" : ["ref"], "destination" : [{"name":"ref", "correspond":"ref" | "template":"" | "parser":{ "language":"", "query":""}}] }]}}

{ "Interface": { "name":"Twitter APIs", "property":[ {"version":"1" }],

"task": [ {"name": "search", "description":"Allows you to search for tweets based on a keyword", "input": [ {"name": "query", "value": "USI", "type": "String"} ], "output": [ {"name": "tweets", "mime-type": "JSON"} ] }],

},"mapper": [ {"source" : ["search.query"], "destination" : [{"name":"twitter_wrapper.URL", "template":"http://search.twitter.com/search.json?q={search.query}" | }] }]}}

"service_wrapper": [ {"type":"HTTP/REST", "name":"twitter_wrapper", "input": [ {"name": "method", "value": "GET"} ] }],

MCDL  for  TwiCer  API  

48  

Page 49: The Mashup Component Description Language

"input": [ {"name": "", "value": ""} ] }],

"datasource_wrapper": [ {"type":"", "name":"", "input": [ {"name": "", "value": ""} ] }],

"widget_wrapper": [ {"type":"", name":"",

"input": [ {"name": "", "value": ""} ] }],

"mapper": [ {"source" : ["ref"], "destination" : [{"name":"ref", "correspond":"ref" | "template":"" | "parser":{ "language":"", "query":""}}] }]}}

{ "Interface": { "name":"Twitter APIs", "property":[ {"version":"1" }],

"task": [ {"name": "search", "description":"Allows you to search for tweets based on a keyword", "input": [ {"name": "query", "value": "USI", "type": "String"} ], "output": [ {"name": "tweets", "mime-type": "JSON"} ] }],

},"mapper": [ {"source" : ["search.query"], "destination" : [{"name":"twitter_wrapper.URL", "template":"http://search.twitter.com/search.json?q={search.query}" | }] }]}}

"service_wrapper": [ {"type":"HTTP/REST", "name":"twitter_wrapper", "input": [ {"name": "method", "value": "GET"} ] }],

MCDL  for  TwiCer  API  

49  

Page 50: The Mashup Component Description Language

"input": [ {"name": "", "value": ""} ] }],

"datasource_wrapper": [ {"type":"", "name":"", "input": [ {"name": "", "value": ""} ] }],

"widget_wrapper": [ {"type":"", name":"",

"input": [ {"name": "", "value": ""} ] }],

"mapper": [ {"source" : ["ref"], "destination" : [{"name":"ref", "correspond":"ref" | "template":"" | "parser":{ "language":"", "query":""}}] }]}}

{ "Interface": { "name":"Twitter APIs", "property":[ {"version":"1" }],

"task": [ {"name": "search", "description":"Allows you to search for tweets based on a keyword", "input": [ {"name": "query", "value": "USI", "type": "String"} ], "output": [ {"name": "tweets", "mime-type": "JSON"} ] }],

},"mapper": [ {"source" : ["search.query"], "destination" : [{"name":"twitter_wrapper.URL", "template":"http://search.twitter.com/search.json?q={search.query}" | }] }]}}

"service_wrapper": [ {"type":"HTTP/REST", "name":"twitter_wrapper", "input": [ {"name": "method", "value": "GET"} ] }],

MCDL  for  TwiCer  API  

50  

Page 51: The Mashup Component Description Language

"input": [ {"name": "", "value": ""} ] }],

"datasource_wrapper": [ {"type":"", "name":"", "input": [ {"name": "", "value": ""} ] }],

"widget_wrapper": [ {"type":"", name":"",

"input": [ {"name": "", "value": ""} ] }],

"mapper": [ {"source" : ["ref"], "destination" : [{"name":"ref", "correspond":"ref" | "template":"" | "parser":{ "language":"", "query":""}}] }]}}

{ "Interface": { "name":"Twitter APIs", "property":[ {"version":"1" }],

"task": [ {"name": "search", "description":"Allows you to search for tweets based on a keyword", "input": [ {"name": "query", "value": "USI", "type": "String"} ], "output": [ {"name": "tweets", "mime-type": "JSON"} ] }],

},"mapper": [ {"source" : ["search.query"], "destination" : [{"name":"twitter_wrapper.URL", "template":"http://search.twitter.com/search.json?q={search.query}" | }] }]}}

"service_wrapper": [ {"type":"HTTP/REST", "name":"twitter_wrapper", "input": [ {"name": "method", "value": "GET"} ] }],

MCDL  for  TwiCer  API  

51  

Page 52: The Mashup Component Description Language

"input": [ {"name": "", "value": ""} ] }],

"datasource_wrapper": [ {"type":"", "name":"", "input": [ {"name": "", "value": ""} ] }],

"widget_wrapper": [ {"type":"", name":"",

"input": [ {"name": "", "value": ""} ] }],

"mapper": [ {"source" : ["ref"], "destination" : [{"name":"ref", "correspond":"ref" | "template":"" | "parser":{ "language":"", "query":""}}] }]}}

{ "Interface": { "name":"Twitter APIs", "property":[ {"version":"1" }],

"task": [ {"name": "search", "description":"Allows you to search for tweets based on a keyword", "input": [ {"name": "query", "value": "USI", "type": "String"} ], "output": [ {"name": "tweets", "mime-type": "JSON"} ] }],

},"mapper": [ {"source" : ["search.query"], "destination" : [{"name":"twitter_wrapper.URL", "template":"http://search.twitter.com/search.json?q={search.query}" | }] }]}}

"service_wrapper": [ {"type":"HTTP/REST", "name":"twitter_wrapper", "input": [ {"name": "method", "value": "GET"} ] }],

MCDL  for  TwiCer  API  

52  

Page 53: The Mashup Component Description Language

Mashup  development  requires  a  highly  abstracted,  expressive,  and  

extensible  component  meta-­‐model  

53  

Page 54: The Mashup Component Description Language

The  Mashup  Component  Descrip3on  Language  

Saeed  Aghaee  and  Cesare  Pautasso    

Faculty  of  Informa3cs  University  of  Lugano  (USI)  

         

hCp://www.saeed-­‐aghaee.info  hCp://www.pautasso.info    hCp://www.jopera.org    

       

54