1 / 46

Experimenting Event Notification in Web Service Composition

University of Pisa. Experimenting Event Notification in Web Service Composition. Daniele Strollo (IMT Lucca) Roberto Guanciale (IMT Lucca) Dagstuhl Feb 2007. Car repair specification: SAGA. <<saga>> CarRepair. ChargeCreditCard. RevokeCharge. OrderGarage. CancelGarage. <<saga>>

elina
Télécharger la présentation

Experimenting Event Notification in Web Service Composition

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. University of Pisa Experimenting Event Notification in Web Service Composition Daniele Strollo (IMT Lucca) Roberto Guanciale (IMT Lucca) Dagstuhl Feb 2007

  2. Car repair specification: SAGA <<saga>> CarRepair ChargeCreditCard RevokeCharge OrderGarage CancelGarage <<saga>> CarRental OrderTowTruck OrderRentalCar RedirectRentalCar CancelTowTruck

  3. Car repair specification: SAGA <<saga>> CarRepair ChargeCreditCard RevokeCharge OrderGarage CancelGarage <<saga>> CarRental OrderTowTruck OrderRentalCar RedirectRentalCar CancelTowTruck

  4. Car repair specification: SAGA <<saga>> CarRepair ChargeCreditCard RevokeCharge OrderGarage CancelGarage <<saga>> CarRental OrderTowTruck OrderRentalCar RedirectRentalCar CancelTowTruck

  5. Car repair specification: SAGA <<saga>> CarRepair ChargeCreditCard RevokeCharge OrderGarage CancelGarage <<saga>> CarRental OrderTowTruck OrderRentalCar RedirectRentalCar CancelTowTruck

  6. Car repair specification: SAGA AtomicComponent credit = factory.createAtomicComponent( creditUrl, new ChargeCreditCard(), new RevokeCredit() ); ChargeCreditCard RevokeCharge

  7. Car repair specification: SAGA AtomicComponent garage = factory.createAtomicComponent( garageUrl, new OrderGarage(), new CancelGarage() ); . . . ChargeCreditCard RevokeCharge OrderGarage CancelGarage OrderTowTruck OrderRentalCar RedirectRentalCar CancelTowTruck

  8. Car repair specification: SAGA Saga carRental = factory.createSaga(rentalUrl); carRental.addInternalComponent(orderRentalUrl); ChargeCreditCard RevokeCharge OrderGarage CancelGarage <<saga>> CarRental OrderTowTruck OrderRentalCar RedirectRentalCar CancelTowTruck

  9. Car repair specification: SAGA TransactionalParallel par = factory.createParallel(parallelUrl); par.addInternalComponent(truckUrl); par.addInternalComponent(rentalUrl); ChargeCreditCard RevokeCharge OrderGarage CancelGarage <<saga>> CarRental OrderTowTruck OrderRentalCar RedirectRentalCar CancelTowTruck

  10. Car repair specification: SAGA <<saga>> CarRepair ChargeCreditCard RevokeCharge OrderGarage CancelGarage <<saga>> CarRental OrderTowTruck OrderRentalCar RedirectRentalCar CancelTowTruck Saga saga = factory.createSaga(sagaUrl); TransactionalSequence seq = factory.createSequence(sequenceUrl); seq.addInternalComponent(creditUrl); seq.addInternalComponent(garageUrl); seq.addInternalComponent(parallelUrl); saga.addInternalComponent(sequenceUrl);

  11. The lower layer Signal Calculus (SC) • Middleware: collection of Java APIs implementing the SC primitives. • lowerlayer for describing coordination logics on services • Specialized to implement Long Running Transactions Programming Model • Event Notification paradigm • common programming paradigm to model service coordination • distribute the coordination tasks among involved services (choreography) • dynamic interface publication • dynamic topology of service connections • Process Calculus with asynchronouscommunication facilities • Event topics to describe coordinationpolicies Java Signal Core Layer (JSCL)

  12. Signal Calculus: the graphical notation

  13. The main concepts: components R a F • Is uniquely identified by a name. • A component: Component Name

  14. The main concepts: components R a F • Declares event topics for which it is interested to have notifications • The reactions define a binding among signals of a well defined topic to an handling task to execute internally upon a new notification receptionv • A component: • Is uniquely identified by a name. Reaction

  15. The main concepts: components R a F • Declares event topics for which it is interested to have notifications • The reactions define a binding among signals of a well defined topic to an handling task to execute internally upon a new notification reception • A component: • Is uniquely identified by a name. • Defines its outgoing connections through the “Flow” structureF. • The connections among components are realized through signal links, which are tuples of the form (topic, emitter, handler). • F stores all the signal links having a as emitter. Flow

  16. The main concepts: signal emission R a F • Signal Calculus Primitives: • Signal emission • notifies the occurrence of an event • events are classified into schemata identified by their name 1, 2 • signals are uniquely identified by their name s s:

  17. The main concepts: reaction update R a B F • Signal Calculus Primitives: • Signal emission • Reaction Update • adds a new reaction to the component interface • checks the well-formeness of the resulting reaction • defines the behavior “B” to activate at the reception of signals of schema , and the variable binding + 

  18. The main concepts: flow update R a F b  • Signal Calculus Primitives: • Signal emission • Reaction Update • Flow Update • adds a new outgoing connections to the component • defines the set of component names to which deliver signals of schema  • checks the well-formeness of the resulting flow

  19. The main concepts: networks  • Signal Calculus Primitives: • Signal emission • Reaction Update • Flow Update • Network • describes the component distribution • carries envelopes containing signals exchanged among components s: Signal envelop Reaction enabled

  20. JSCL API

  21. JSCL – Architectural overview Inter-Object Communication Layers FGS@FORTE06

  22. IOCL primitives • Each IOCL implements: • the data serialization (e.g. SOAP message envelops for WSs, etc.) and the deployment phase (e.g. stub generation, dynamic proxy binding, etc.). • Moreover each IOCL plugin defines the way components are identified by extending the basic interface ComponentAddress. iocl instantiation IOCLPluginLoader loader = new IOCLPluginLoader( new IOCLAddress ("jscl.core.IOCL.XSoap.IOCLImpl")); IOCLPluginI iocl = loader.getIOCLInstance(); iocl.startup(ioclPort);

  23. IOCL primitives • Each IOCL implements: • the data serialization (e.g. SOAP message envelops for WSs, etc.) and the deployment phase (e.g. stub generation, dynamic proxy binding, etc.). • Moreover each IOCL plugin defines the way components are identified by extending the basic interface ComponentAddress. Component creation // Instantiate a component address = new ServiceAddress ("http://jscl.org:10190/services/Hotel"); component = iocl.createComponent(address); // Publication iocl.registerComponent(address, component);

  24. IOCL primitives • Each IOCL implements: • the data serialization (e.g. SOAP message envelops for WSs, etc.) and the deployment phase (e.g. stub generation, dynamic proxy binding, etc.). • Moreover each IOCL plugin defines the way components are identified by extending the basic interface ComponentAddress. Flow update iocl.createLink(1001, HotelAddress, CarAddress, null);

  25. JSCL primitives • Each JSCL component can: • Declare its reactions • The handling task implements the virtual method • handleSignal (Signal signal) Reaction update component.addReaction (new Reaction (sigT, handlingTask));

  26. JSCL primitives • Each JSCL component can: • Declare its reactions • The handling task implements the virtual method • handleSignal (Signal signal) • Raise an event Signal emission component.emitSignal (new Signal (sigT, data));

  27. Part II How to design JSCL components in Eclipse

  28. Car repair scenario in JSCL

  29. Transactional Layer

  30. Implementation in JSCL Inv Inv Rb • JTWS (BMMFST@WSFM05) • Transactional composition of WSs. • Fixed set of Signal Schemata: • Well defined semantics of components • Structural composition (parallel and sequential) A Successful execution of A Unsuccessful execution of A Executes main activity A B Atomic Component definition AtomicComponent (ComponentAddress addr, AtomicTask A, AtomicTask B) Request for abort. Executes B. Compensation successful executed Compensation failure

  31. Implementation in JSCL Rb Rb Exc • JTWS (BMMFST@wsfm’05) • Transactional composition of WSs. • Fixed set of Signal Schemata: • Well defined semantics of components • Structural composition (parallel and sequential) A B Compensation successful executed Request for abort. Executes B. Compensation failure Atomic Component definition AtomicComponent (ComponentAddress addr, AtomicTask A, AtomicTask B)

  32. sequence Inv P Q Sequence sequence.addInternalComponent (AtomicComponent comp) In Out oCt iCt oRb iRb oEx iEx

  33. sequence Inv P Q In Out A oCt iCt oRb iRb oEx iEx

  34. sequence Inv P Q In Out A oCt iCt oRb iRb oEx iEx

  35. sequence Inv P Q In Out oCt iCt oRb iRb oEx iEx

  36. sequence P Q Rb In Out oCt iCt B oRb iRb oEx iEx

  37. sequence P Q Rb In Out oCt iCt B oRb iRb oEx iEx

  38. sequence P Q Rb In Out oCt iCt oRb iRb oEx iEx

  39. parallel In Out Inv Inv oCt iCt oRb iRb oEx iEx Par (P, Q) ´ P|Q Dispatcher P Q Collector Status = (-,-)

  40. parallel In Out Inv oCt iCt oRb iRb oEx iEx Dispatcher A P A Q Collector Status = (---,---)

  41. parallel In Out Inv oCt iCt oRb iRb oEx iEx Dispatcher A P A Q Collector Status = (Inv,---)

  42. parallel In Out Inv oCt iCt oRb iRb oEx iEx Dispatcher A P A Q Collector Status = (Inv,Inv)

  43. Part III Concluding remarks

  44. JSCL/SC: concluding remarks • Main features: • Basic framework for programming/modeling coordination. • Abstraction from the networkoverlay • Logicalports permit a simple design of the flow diagrams. • The connections (and interfaces) can be dinamically modified. • Session management • Nocentralization • BPEL orchestrations can be mapped and executed in SC/JSCL (straighforward coding)

  45. Future works • JSCL and SC programming model • UML front-end to design SOA • Theoretical based verification tool • SC: • Dynamic type system to model: • Choreographies • SLA • Programming environment • IOCL plugins based on model transformation • Eclipse plugin extensions: • Nested Orchestrations in order to reuse services in several diagrams. • Automatic deploy of the services • Debugger and profiler integration

  46. Thanks for your attention ?

More Related