1 / 34

Semantic web services in a transactional context prole 2013 ( madrid )

Semantic web services in a transactional context prole 2013 ( madrid ). Francisco J. galan and ahmed riveras University of seville. Semantic web services in a transactional context. CONTENT 1. Purpose 2. Conceptualization 3. Formalization 4. Service matchmaking

vevina
Download Presentation

Semantic web services in a transactional context prole 2013 ( madrid )

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Semantic web services in a transactionalcontextprole 2013 (madrid) Francisco J. galan and ahmed riveras University of seville

  2. Semantic web services in a transactionalcontext CONTENT 1. Purpose 2. Conceptualization 3. Formalization 4. Servicematchmaking 5. Conclusions

  3. Semantic web services in a transactionalcontext PURPOSE Toformalize a class of semantic web services (SWS) basedonthe concept of executionalentailment. Theformalization(1) integratesfunctional and procedural aspects, (2) facilitatesthedynamicintegration of SWSswithdatabases and (3) solvestheproblem of servicematchmaking in aneffectiveway.

  4. Semantic web services in a transactionalcontext CONCEPTUALIZATION • State = set of propertieswhich are true in thesystemunderconsideration. • Data invariant = set of constraintswhichmustsatisfyanypossiblestate in thelife of asystem. • Canonical state = prototypicalstate.

  5. Semantic web services in a transactionalcontext CONCEPTUALIZATION • Servicerequest = outputs oreffects a web clientwanttoachievebyexecuting a hypotheticalservice. • Semantic web service (SWS)= specification of a servicebya set of possiblesequences of states. • Canonical execution = prototypicalexecution of a semantic web service.

  6. Semantic web services in a transactionalcontext CONCEPTUALIZATION • Itisimportanttoremark: • Bystate, we mean anabstraction of a (real) state in theexecution of a service. • Byexecutionof a SWS, we mean anabstraction of a (real) executionof a service. • Theexecution of a SWS ≠ choreography (i.e. interactionwiththeclient in orderto consume theservice). • Theexecution of a SWS ≠ orchestration (i.e. interactionwithothersevices in ordertoimplementthefunctionality of theservice).

  7. Semantic web services in a transactionalcontext CONCEPTUALIZATION. EXAMPLES • Servicerequest (generic) : //Buy a product in stock withdeliverybeforeinvoicing Servicerequest: buy(p,c) {Pre: product p is in stock } {Int1: product p isdeliveredtocustomer c } {Post: product p isdeliveredtocustomerc and aninvoiceisissued } Servicerequests(concrete): // Someonewanttobuy a PC withdeliverybeforeinvoicing= buy(PC,c) // JN wanttobuy a PC withdeliverybeforeinvoicing= buy(PC,JN)

  8. Semantic web services in a transactionalcontext CONCEPTUALIZATION. EXAMPLES • Semantic web service: //Sell a product in stock to a customerwithdeliverybeforeinvoicing Service: sell(p,c) {Pre: product p is in stock } {Transaction: addcustomer c, deliverproduct p tocustomer c, issueaninvoice and consider p as a soldproduct {Post: product p issoldtocustomer c, p isdeliveredto c and aninvoiceisissuedtoformalizetheselling of p to c}

  9. Semantic web services in a transactionalcontext CONCEPTUALIZATION. EXAMPLES Data invariant: // Foreverysoldproductmustexist a customer, a delivery and aninvoice. // Everyproductwhich has beendeliveredto a customer can not be in // stock. // Customers and products are disjoint sets of individuals. // …

  10. Semantic web services in a transactionalcontext CONCEPTUALIZATION. EXAMPLES State: PC is a product in stock (PC is a concrete individual). Canonical State: p is a product in stock (p is a protoypical individual).

  11. Semantic web services in a transactionalcontext CONCEPTUALIZATION. EXAMPLES Execution: state 1: PC is a product in stock,TVis a product, RB is a customer. state2: PC is a product in stock, TV is a product, JN is a customer, RB is a customer. state 3: PC isdeliveredtoJN, TV is a product, RB is a customer. state 4: product PC isdeliveredtoJN, aninvoiceisissuedto JN in ordertoformalizetheselling of PC, TV is a product, RB is a customer.

  12. Semantic web services in a transactionalcontext CONCEPTUALIZATION. EXAMPLES Canonical execution: state 1: p is a product in stock. state 2: p is a product in stock, c is a customer. state 3: p is a product in stock, c is a customer, p isdeliveredto c. state 4: p is a product in stock, c is a customer, p isdeliveredto c, aninvoiceisissued in ordertoformalizetheselling of p to c.

  13. Semantic web services in a transactionalcontext FORMALISM state: a set of groundatoms. e.g. state = { product(PC), stock(PC) } canonical state: a set of atomswithlabellednulls, e.g. state = { product(p), stock(p) } beingp a labellednull (protoypical individual). A formula Y(X,Y) where  is a conjunction of atomscan be translatedto a canonical statebyreplacingeach variable in Y(X,Y) by a labellednull. eg. canonical(s(supplies(s,p)  product(p)))  { supplies(s,p), product(p)}.

  14. Semantic web services in a transactionalcontext FORMALISM Similaritybetween canonical state and state: Given a canonical state s1 and a (concrete) state s2, wesaythat s2is similar to s1, s1s2, iffthereisa substitution suchthat s1  s2. e.g.: canonical state:s1 = { product(p), stock(p) } state: s2= { product(PC), stock(PC), product(TV), customer(RB) } s1s2with = { p/PC }

  15. Semantic web services in a transactionalcontext FORMALISM Data invariant: a (finite) set of formulas of theform X((X)  Y(X,Y))orX((X)  false) inv1: // Foreverysoldproductmustexist a customer, a delivery and aninvoice. p(product(p) sold(p)  c(customer(c) delivery(p,c)  invoice(p,c)) // Everyproductwhichisdelivered can not be in stock. p,c(product(p) delivery(p,c)  stock(p) false) // Customers and products are disjoint sets of individuals. p,c(product(p) delivery(p,c)  stock(p) false)

  16. Semantic web services in a transactionalcontext FORMALISM Execution: (finite) sequence of statessatisfyinganinvariant. Itisdenoted as <state1, …, staten>inv e.g. <s1,s2,s3,s4>inv1, being s1 = { product(PC), stock(PC), product(TV), customer(RB) } s2 = { product(PC), stock(PC), customer(JN), product(TV), customer(RB) } s3 = { product(PC), delivery(PC,JN), customer(JN), product(TV), customer(RB) } s4 = { product(PC), delivery(PC,JN), customer(JN), invoice(PC,JN), sold(PC), product(TV), customer(RB) } Notationalconventions: <state1, …>inv denotes anexecutionwhichstartsfrom state1. <…,staten>invdenotes anexecutionwhichends in staten.

  17. Semantic web services in a transactionalcontext FORMALISM Canonical execution: executioncomposed of canonical statesonly. e.g.: <state1,state2,state3,state4>inv1, where state1= { product(p), stock(p) } state2= { product(p), stock(p), customer(c) } state3= {product(p), customer(c), delivery(p,c) } state4= {product(p), customer(c), delivery(p,c), invoice(p,c), sold(p) }

  18. Semantic web services in a transactionalcontext FORMALISM Givena canonical execution e1and anexecution e2, wesaythate2issimilartoe1, e1 e2, iff | e1 |=| e2 | and thereisa substitution suchthat, foreachsi in e1and tiin e2,siti. E.g. : e1 e2with ={p/PC,c/JN} and being e2 : s1= {product(PC), stock(PC), product(TV), customer(RB) } s2= { product(PC), stock(PC), customer(JN), product(TV), customer(RB) } s3= { product(PC), delivery(PC,JN), customer(JN), product(TV), customer(RB) } s4= { product(PC), delivery(PC,JN), customer(JN), invoice(PC,JN), sold(PC), product(TV), customer(RB) } e1 : state1= { product(p), stock(p) } state2= { product(p), stock(p), customer(c) } state3= {product(p), customer(c), delivery(p,c) } state4= {product(p), customer(c), delivery(p,c), invoice(p,c), sold(p) }

  19. Semantic web services in a transactionalcontext FORMALISM Transaction: a set of formulas of theform: r(X)Y((X,Y))where r is a relation symbol and  a formula recursivelywrittenfromthefollowingelements: (a) primitiveconsult (consult), (b) primitiveupdate (add, del), (c) (restricted) paralellconjunction (), (d) serial conjunction (), (e) (restricted) transactioninvocation, (f) (restricted) existentialquantification () and (h) negation (). e.g.productInStock(p)  consult(product(p)) sell2(p,c)productInStock(p)  s(consult(provider(s)) (add(provision(p,s)) add(stock(p))) sell1(p,c))

  20. Semantic web services in a transactionalcontext FORMALISM Thesemantics of a transactionisformalizedbyexecutionalentailments of form <state1,… ,staten>inv |= . <state>inv|= consult(r(C)) iff r(C)  state. <state>inv |= consult(r(X)) iffthereis C suchthat r(C)  state. r(C)  state1  <state1,state2>inv|= del(r(C)) iff state2 = state1 – {r(C)}. r(C)  state  <state>inv|= del(r(C)) r(C)  state1 < state1, state2>inv|= add(r(C)) iffstate2= state1  {r(C)}. r(C)  state <state>inv |= add(r(C))

  21. Semantic web services in a transactionalcontext FORMALISM <state1,… ,staten+1>inv|= 1  …  niff < state1, state2 >inv|= 1 and < state2,…, staten+1 >inv|= 2 …  n <state1,staten+1>inv|= 1… niff forevery serial conjunction of 1,…, n, , wehavethat < state1,…>inv|=  and <…, staten+1>inv|=  <state1,… ,staten>inv |= r(C) iffr(X)Y((X,Y)) and <state1,… ,staten>inv|= Y((C,Y))

  22. Semantic web services in a transactionalcontext FORMALISM <state1,… ,staten>inv|= X((X)) iff <state1,… ,staten>inv|= (C) where C satisfiesthesafenesscondition (C iscomputedby a consult). <state1,… ,staten>inv|=  iff<state1,… ,staten>inv | 

  23. Semantic web services in a transactionalcontext FORMALISM Servicerequest:sequence of formulas {Pre} {Int1}, …, {Intn} {Post} whereeach formula is of theformY(X,Y), being is a conjunction of atoms. e.g.//Buy a product in stock withdeliverybeforeinvoincing Servicerequest: buy(p,c) {Pre: product(p)  stock(p)} {Int1: product(p) customer(c) delivery(p,c)} {Post: product(p) customer(c) delivery(p,c) invoice(p,c)}

  24. Semantic web services in a transactionalcontext FORMALISM Servicerequest: g {Pre} {Int1}… {IntJ} {Post} SEM(g) = the canonical execution of g + allexecutionssimilar tothe canonical one. (the canonical execution of g) state1 = canonical(Pre), state2 = canonical(Int1), … stateJ+1= canonical(IntJ), stateJ+2 =canonical(Post)

  25. Semantic web services in a transactionalcontext FORMALISM • Semantic web service: pre/post specification extended with a transaction of theform r 1, …, r nwhereprecondition and postcondition are formulas of theformY((X,Y)) and eachi, with i=1..n,is a transactional formula. • e.g.: //Sell a product in stock withdeliverybeforeinvoincing • Service: sell1(p,c) {Pre: product(p) and stock(p)} {Transaction: sell1(p,c) add(customer(c))  (add(delivery(p,c)) del(stock(p)))  (add(invoice(p,c)) del(sold(p))) {Post: product(p) sold(p) customer(c) delivery(p,c) invoice(p,c)}

  26. Semantic web services in a transactionalcontext FORMALISM Service: r {Pre} {Transaction: r 1, …, r k} {Post} SEM(r) = k canonical executionsof r + allexecutions similar tosomecanonical execution of r suchthat <state1,… ,staten>inv |= j, with j=1..k, suchthat state1 |= Pre and staten|= Post

  27. Semantic web services in a transactionalcontext SERVICE MATCHMAKING ItisthemechanismwhichmapsappropriateSWSstoservicerequests. Wepropose a matchmakingmethodbasedontwophases: (phase 1) prototypicalmatchmaking and (phase 2) concrete matchmaking. Thepurpose of theprototypicalmatchmakingistoselectthoseSWSswhichmaysatisfytheservicerequest. Thisselectionisbasedon canonical executions. Thepurpose of theconcrete matchmakingistoselectthoseSWSswhich can satisfytheservicerequest. Thisselectionisbasedon (concrete) executions. Ifevery canonical state in a servicerequestisincluded in anstate of the canonical execution of the SWS thenwe can concludethatthe SWS maysatisfytheservicerequest.

  28. Semantic web services in a transactionalcontext PROTOTYPICAL SERVICE MATCHMAKING In ordertoknowwhichSWSsmaysatisfya servicerequest, weproposetheconstruction of a matrix in orderto compare the canonical execution of theservicerequestwiththe canonical execution of the SWS. As we can see, every canonical state in theservicerequestiscontaned in somestate of the canonical execution of the SWS. Therefore, we can concludethatthe SWS maysatisfytheservicerequest.

  29. Semantic web services in a transactionalcontext CONCRETE SERVICE MATCHMAKING Thesecondphase of thematchmakingfocusesontheselection of thoseSWSswhich can satisfytheservicerequest. A SWS can satisfy a servicerequestifit can developsomeexecution similar tothe canonical execution of theservicerequest. Problem: theconstruction of (concrete) executions are expensivebecausewehavetoaccesstothe web forextractingthecurrentstate of thesystem.

  30. Semantic web services in a transactionalcontext CONCRETE SERVICE MATCHMAKING Weassumethattheexecution of a SWS doesnotaffectthewholestate of thesystem. Therefore, weproposetoaccesstothe web forextractingtheaffectedsubstateonly. Tocheckaninvariantisusuallyanexpensivetask. A waytopalliatethiscostisbyfollowing a solutioninspiredbythe RETE algorithm. Duetotheform of the rules in aninvariant, wemustonlycheckthose rules whoseantecedents are satisfied in eachstate of theexecution of the SWS. X((X)  Y(X,Y)) or X((X)  false)

  31. Semantic web services in a transactionalcontext CONCRETE SERVICE MATCHMAKING Supposethat a clientwanttoachievetheservicerequestbuy(PC,JN) and theprototypicalmatchmaking has selectedbuy(p,c) as a SWS whichmaysatisfyit. Weaccesstothe web in ordertoextractthecurrentstate of thesystembutrestrictedtothesubstateaffectedbytheexecution of buy(PC,JN). (scenario 1) state1 = { product(PC), customer(JN), delivery(PC,JN) } Theprecondition of buy(PC,JN) is { product(PC), stock(PC) } As we can verify, state1 | Pre (conclusion: servicematchmakingfails)

  32. Semantic web services in a transactionalcontext CONCRETE SERVICE MATCHMAKING (scenario 2) state1 = { product(PC), customer(JN), stock(PC) } Theexecution of , thetransaction in buy, can beginfromstate 1 because state1|=Pre Let< state1, state2, state3, state4 > be theexecution of buy(PC,JN), being state2= { product(PC), stock(PC), customer(JN) } state3 = { product(PC), delivery(PC,JN), customer(JN) } state4 = { product(PC), delivery(PC,JN), customer(JN), invoice(PC,JN), sold(PC) } As we can verify, < state1, state2, state3, state4 > |=  and state4|=Post (conclusion: servicematchmakingissuccessful)

  33. Semantic web services in a transactionalcontext CONCLUSIONS Wehaveproposed a formalismforspecifying and executingsemantic web servicesbasedonthe concept of executionalentailment. Theformalism has beendesignedhaving in mindthreemainrequirements: (1) integrationof functional and procedural aspects, (2) dynamicintegration of SWSswithdatabases and (3) effectivesolutiontotheproblem of servicematchmaking.

  34. Semantic web services in a transactionalcontextprole 2013 (madrid) Francisco J. galan and ahmed riveras University of seville

More Related