Semantics-enabled Web APIs selection patterns

17
Semantics-enabled Web APIs selection patterns Devis Bianchini, Valeria De Antonellis, Michele Melchiori Department of Information Engineering Università di Brescia - Italy 1 Semantics-enabled Web APIs selection patterns

Transcript of Semantics-enabled Web APIs selection patterns

Page 1: Semantics-enabled Web APIs selection patterns

Semantics-enabled Web APIs selection patterns

Devis Bianchini, Valeria De Antonellis, Michele MelchioriDepartment of Information Engineering

Università di Brescia - Italy

1

Semantics-enabled Web APIs selection patterns

Page 2: Semantics-enabled Web APIs selection patterns

Semantics-enabled Web APIs selection patterns

Mashup application: “a situational, short-living Web application withfocus on Web Interface integration that uses data and/or application logics (e.g., Web Services) originated from third partiesand that are made available through Web APIs”

2

Page 3: Semantics-enabled Web APIs selection patterns

Semantics-enabled Web APIs selection patterns

3

Choose some relevant Web APIs

Decide which ones should be connected

(exploratory perspective)

Glue

Web APIs

Registry

Web APIs

Registry

alternative

connected

Fast Web application developmentscenario

Page 4: Semantics-enabled Web APIs selection patterns

Semantics-enabled Web APIs selection patterns

Fast Web application developmentWhich open issues?

4

Huge quantity of Web APIs requires a support for their effective selection and integration (>3k APIs in ProgrammableWeb.com, >20k user-definedmashups in Yahoo! Pipes).

Heterogeneity of Web APIs (I/Os, operations).

Our contributions:

1. A browsable Web API registry built from automated matching techniques to establish semantic links among APIs

2. Semi-automated selection patterns for Web APIs

Page 5: Semantics-enabled Web APIs selection patterns

Semantics-enabled Web APIs selection patterns

Talk Outline

� A semantic framework for Mashup development

� Web API Selection patterns

� The tool prototype implementation

� Conclusions and future work

5

Page 6: Semantics-enabled Web APIs selection patterns

Semantics-enabled Web APIs selection patterns

6

Component APIs

URI 1 URI n

URI 2 URI 3

W2 UR

I 2 W3 UR

I 3

Wn UR

I n

Web application

W1 UR

I 1 W2 U

RI

2

Wn UR

I n W3 U

RI

3Web API Semantic Descriptors (SDs)

W1 UR

I 1 W2 U

RI

2

Wn UR

I n

W3 UR

I 3

Web API Registry

Semantic annotation Matchmaking and linkingof semantic descriptors

Recommendation of Web APIs

Developing & publishingWeb API

componentprovider

Mashupdevelopment

consumer/mashup designer

OB

JEC

TS

AC

TIV

ITIE

SR

OLE

S We rely on existing

technologiesand tools

Focus of thistalk

Mashup development: our vision

Future work

Page 7: Semantics-enabled Web APIs selection patterns

Semantics-enabled Web APIs selection patterns

Web API Annotation

Web APIs are usually described using plain, unstructured HTML- semantic annotation of Web APIs is still a difficult task

Semantic annotation of APIs in our framework is therefore performed according to the steps suggested in the SWEET tool [1]:

(a) identification of elements (that is, operations, inputs, outputs) in the unstructured HTML document which represents the API, to produce an hRESTS description;

(b) search for ontologies suitable for elements annotation and of taxonomies of categories for API classification;

(c) annotation and classification of the API according to the MicroWSMO notation.

[1] M. Maleshkova, C. Pedrinaci, and J. Domingue. Semantic annotation of Web APIs with SWEET. In Proc. of 6th Workshop on Scripting and Development for the Semantic Web, 2010.

7

Page 8: Semantics-enabled Web APIs selection patterns

Semantics-enabled Web APIs selection patterns

Web API Semantic Descriptor8

An abstract representation:

Wi = ⟨urii,CAT(Wi),OP(Wi),EV(Wi)⟩Wi = ⟨urii,CAT(Wi),OP(Wi),EV(Wi)⟩

opl = ⟨methodl,addrl,IN(opl),OUT(opl)⟩opl = ⟨methodl,addrl,IN(opl),OUT(opl)⟩ evm = ⟨typem,OUTev(evm)⟩evm = ⟨typem,OUTev(evm)⟩

opl ∈OP(Wi) evm ∈EV(Wi)

concept set of concepts set of concepts

Page 9: Semantics-enabled Web APIs selection patterns

Semantics-enabled Web APIs selection patterns

Functional coupling between Web APIs

� A Web API descriptor Wi can be functionally coupledwith another Web API descriptor Wj if:

1. CouplIO(Wi, Wj) ≥ θ ∈ [0..1] (functional coupling degree)

Union set of the outputsof the event evi

9

Page 10: Semantics-enabled Web APIs selection patterns

Semantics-enabled Web APIs selection patterns

A Web API descriptor Wi is functionally similarto another Web API descriptor Wj if:

1. The categories of Wi and Wj are compatible

2. SimIO(Wi, Wj) ≥ δ ∈ [0..1] (functional similarity degree)

Union of the input setsof all the Wj operations

Union of the output setsof all the Wi operations

Concept affinity

Functional similarity between Web APIs10

Page 11: Semantics-enabled Web APIs selection patterns

Semantics-enabled Web APIs selection patterns

Web API Registry

11

The registry design is based on the Web APIs conceptual description:

• semantic descriptor of the API (semantic annotation)

• semantic links between similar and coupled Web APIs

Page 12: Semantics-enabled Web APIs selection patterns

Semantics-enabled Web APIs selection patterns

InternetVideoArchiveComingSoon

MoviesAndTheatres

FindMovieTheatres

GoogleMaps

MapViewer

CouplIO=0.37

CouplIO=0.78

CouplIO=0.83

SimIO=0.60

SimIO=0.86

CouplIO=0.90

Coupl IO=0.8165

CouplIO =0.73

Coupl IO=1.00

CouplIO=0.60

Web API Registry 12

Page 13: Semantics-enabled Web APIs selection patterns

Semantics-enabled Web APIs selection patterns

Web API Selection Patterns13

σGoal = ⟨WGoal, mGoal, δGoal, <Goal⟩σGoal = ⟨WGoal, mGoal, δGoal, <Goal⟩

WGoal = Target semantic descriptor

mGoal = Specific Metrics

δGoal = Threshold

<Goal = Ranking function

Page 14: Semantics-enabled Web APIs selection patterns

Semantics-enabled Web APIs selection patterns

Web API Selection Patterns14

σGoal = ⟨WGoal, mGoal, δGoal, <Goal,⟩σGoal = ⟨WGoal, mGoal, δGoal, <Goal,⟩

Goal = search

Goal = completion

Goal = substitution

Purpose: to provide the designer with APIs matching the request WGoal,

So mGoal is defined on the basis of SimIO()

Purpose: to provide the designer with APIs having high coupling with the WGoal already in the mashup

So mGoal is defined on the basis of CouplIO()

Purpose: to provide the designer with APIs matching the descriptor WGoal, already in the mashup AND having high coupling with descriptors WJ connected to WGoal, in the mashup

So mGoal is defined on the basis of both CouplIO(), SimIO()

Page 15: Semantics-enabled Web APIs selection patterns

Semantics-enabled Web APIs selection patterns

Prototype: Browsing by coupling 15

Page 16: Semantics-enabled Web APIs selection patterns

Semantics-enabled Web APIs selection patterns

Prototype : Browsing by similarity 16

Page 17: Semantics-enabled Web APIs selection patterns

Semantics-enabled Web APIs selection patterns

Conclusions and future work 17

We proposed techniques for mashup development based on:

Organizing Web API descriptors according to similarity and coupling criteria

Exploiting in a semi-automated way this organization by means of selection patterns to support mashup design

Future work:

Developing a complete framework for Web API-based development

Performing experiments on real datasets

Completing the implementation of the tool