1 / 59

Devilish Web Services Composition and Orchestration Engine

Devilish Web Services Composition and Orchestration Engine. Students: Flavio Palandri antonelli Alessandro Porfiri. “Seminars in Software Engineering” course’s project 2007/2008 Professor Giuseppe De Giacomo. Web Services.

Download Presentation

Devilish Web Services Composition and Orchestration Engine

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. Devilish Web Services Composition and Orchestration Engine Students: • Flavio Palandri antonelli • Alessandro Porfiri “Seminars in Software Engineering” course’s project 2007/2008 Professor Giuseppe De Giacomo

  2. Web Services Software modules designed to support interaction between heterogeneous systems in a network or in internet • public interface description of available operation • Standard communication protocols • Interaction via standard messages • Great diffusion of Web Services systems • Many functionalities already implemented and available

  3. Scenario – Web Services Composition A client requires a TARGET service to be implemented All functionalities are already implemented in other AVAILABLE SERVICES Idea: we could realize the TARGET service combining Availables Service 1 mapping Community Service 2 Service request mapping Client Service n mapping

  4. Objectives • Analyzing Services Composition Problem from a theoretical point of view • Studying Web Services technologies • Understanding tools already implemented to build automatically the composition • WSCE • TLV • Development of a tool able to manage the whole process • Build Composition • Generate and publish Target Service • Manage the orchestration of services

  5. Abstract services rapresentation • We need to abstract from service implementation • We rapresent only the service behavior TRANSTION SYSTEM

  6. Composition actors • Available Services • Existing services • Rapresented by TS • We will consider also non deterministic behavior • Target • Is the service requested by the client • Rapresented by TS • Only deterministic • Orchestrator • The composition manager

  7. Composition

  8. Who is orchestrator?

  9. Build composition 1.Enconding the condition: in a PDL formula and checking its satisfability 2.Via Simulation Can we reproduce Target’s behavior with any one Available Services combination?

  10. Simulation – The Community

  11. Simulation Relation

  12. Simulation Algorithm

  13. Composition via simulation

  14. Composition via simulation Composition exists iff Simulation exists

  15. OG the Orchestrator Generator

  16. Non deterministic behavior

  17. Simulation with nondeterminism

  18. OG with nondeterminism

  19. Target + Community OG or “unrealizable” Comp-inv.pf TLV Synth-inv.tlv TLV A tool for computing composition • Temporal Logic Verifier • LTL based • Computes composition via simulation indirectly • Automatically computes the OG if realizable

  20. TLV / 2 Target + Community file smw

  21. TLV / 3 Simulation constraints:

  22. TLV /4 If composition is realizable TLV’s output is the OG

  23. How to create smw file? WSCE (web service composition engine) it’s like a wrapper for TLV • Creates smw file from target and available services TS descriptions • Execute TLV on smw file • From TLV result produce sql script to store the OG table into a DB WSCE TS descriptions WSTSL OG table Script sql TLV

  24. WSCE /1 - Input TS of target and services are described with the xml language WSTSL

  25. WSCE /2 - Output OG Table – one for each composition case Given in_act, Tstate and Si_states WSCE produce also NEXTSTATE[source, target] table Now, we just need to develop a tool able to manage the orchestration using this table

  26. 0 1 public class Login { int stato = 0; boolean loggedin; public String doLogin(String user)throws Exception{ if(stato != 0){ throw new Exception(“Illegal operation"); } stato = 1; loggedin = true; return “User logged in”; } public String doLogout(String user)throws Exception{ if(stato != 1){ throw new Exception(“Illegal operation"); } stato = 0; loggedin = false; return “User logged out”; } } login logout DIGRESSION – WS technologies • Web services are software systems offering operations to remote clients • Available operations are described through the service interface WSDL • Clients communicate with service via SOAP messages on HTTP protocol Example of a Java Web Service

  27. <deployment xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java"> <service name="urn:Login" provider="java:RPC"> <parameter name="className" value=“servicePackage.Login"/> <parameter name="allowedMethods" value="doLogin, doLogout"/> <parameter name="scope" value="Session"/> </service> </deployment> DIGRESSION - Axis Axis is a open source tool for • publishing web services (in this way software modules become WS) • Managing clients interaction with WS (request/response) It runs in a web container (Tomcat) To publish a service Axis needs Class files and the service’s descriptor file WSDD Service name Service class Service methods Conversation: Session = stateful Request = stateless Application = singleton Publishing using command “java adminClient login.wsdd”

  28. DIGRESSION – Service Interface Publishing the service, axis produce the service interface WSDL with all informations of service needed by clients • Service name and address • Methods • Output parameter • Input parameters • ComplexType (any non standard Object managed by the service, example Person, Product, Order...) WSDL are always accessible, to build the WS Target we will need all Available Services WSDL.

  29. Our part in this project We want to complete the whole composition and orchestration process, developing missing elements • Orchestrator: a tool able to manage requests from Target Service, finding and delegating the operation to the right Available Service, using informations stored in the OG Table produced by WSCE. Basically Target will demand all client requests to the orchestrator • TargetGenerator: a direct extension of WSCE, reading OG and Available Service WSDL produces and publishes the Target Web Service on Axis

  30. Orchestrator /1 General Scenario Implementation of orchestrator program P(h,a) = i, and even more • Client invokes Target operation • Target demands client operation request to the orchestrator • The Orchestrator access OG Table to find the index of the Available Service able to resolve the operation • The Orchestrator invoke the operation to selected service • Result is returned to client through Target Service. To get the index of available service from the OG, the orchestrator needs: • Requested action • Target state • All Available Services states

  31. Orchestrator /3 Services states Is orchestrator able to retrieve the status of services? • Target State: Yes always • Target is deterministic • Orchestrator can get Target initial state from OG Table • At each step the orchestrator can get the new TargetState given “Input Action” and “Orchestrator State” using the NEXTSTATE table • Available Services states: depends • Deterministic: yes it could easily retrieve it from the OG Table • Non deterministic: No, orchestrator must query all AS to retrieve their status • Available Services have to manage their status • They must offer a “int getStatus()” remote operation • Connection with between Orchestrator and all services must be stateful

  32. Orchestrator /2 Architecture - Unique component for every target (reuse) - An instance of orchestrator for each target - Orchestrator must be able to manage requests from Concurrent Clients

  33. Orchestrator /4 Composition infos Orchestrator is indipendent from composition case The component must be usable from any target Target has to initialize his own orchestrator with composition infos: • Name of OG table • List of avalable service • Service index • Service name • Service address • Complex type classes list

  34. Orchestrator /5 Initialization Orchestrator Initialization: • Receives all informations from Target • For each Available Service establish a stateful connection: Call, mantained during the whole conversation with that client • Registers all ComplexType’s classes Operation invocation • Using Calls to retrieve states from services • Using Call to invoke operation to selected service

  35. Orchestrator /6 Concurrency Each Client has a Session with an instance of WS target Each Target has instance of orchestrator Each Orchestrator has a Session with every available services. This way Concurrency is guaranteed

  36. Orchestrator /7 OP invocation Initialization: only for the first invocation Operation invocation

  37. Orchestrator /8 Implementation

  38. Orchestrator /9 Distribution Distributed as library Targets generated automatically are already made to use this library User can also build manually their own Target using Orchestrator’s API

  39. Target Generator /1 • How do we build the Target Service? • User can make the java class, publishing it manually • User can use the TargetGenerator to build it in 1 minute • INPUT • OG script provided by WSCE • WSDL files one for each available service • OUTPUT • Target web service published on Axis ready to receive requests • OG Table stored in Mysql DB

  40. Target Generator /2 Operations To register a service Axis needs class file of target service, wsdd file, class files of ComplexType • Creates java file of target and complextypes (ex person, product) • Compiles all files • Creates wsdd of target • Publishes target service on Axis using “AdminClient”

  41. Target Generator /3 The whole process

  42. Target Generator /4 Class Schema • Target must import orchestrator.jar • Class header, class name is taken from input • Global variable of the Orchestrator • Constructor • Prepare all informations needed for composition • OG tablename • Array of ServiceInfo (name, address) //index is cabled in the array structure • List of ComplexTypes’ classes • Orchestrator = new Orchestrator(tablename, serviceInfos, complexTypes) • Sequence of dummy methods representing remote operations of Service • Method header • Output parameter • Input parameters • Operation demanded to orchestrator, orchestrator.invoke(op) • Result returned to client

  43. Target Generator /5 Architecture All informations needed are retrieved from WSDL files of Available Services using WSDLParser

  44. Target Generator /6 Execution flow

  45. Target Generator /7 init Data Target Generator parses WSDL of Available Services to retrieve composition infos • Services name, address • ComplexTypes • Methods

  46. Running Tools • Example 1 – Test1ND: a Web Service to listen songs • Example 2 – MediaStore: tipical E-Commerce application with interactive client • Other example can be found on the documentation

  47. Example – Test1ND TS

  48. Example – Test1ND Example of WSTSL

  49. Example – Test1ND Java file of service • package test1NDCommunity; • public class SearchByAuthorND{ • int stato = 0; • public String SearchByAuthor(String author) throws Exception{ • if(stato != 0){ • throw new Exception("Service is not able to execute this operation in this state"); • } • String canzone = ""; • if(!author.equals("Paul")){ • stato = 1; • canzone = "yesterday"; • } • else{ • //ND the service doesn't work with input Paul, keep state 0 • canzone = "NOT FOUND"; • } • return canzone; • } • public String Listen(String name)throws Exception{ • if(stato != 1){ • throw new Exception("Service is not able to execute this operation in this state"); • } • stato = 0; • return name+"...yesterday, all my troubles seems so far away..."; • } • public int getStatus(){ • return stato; • } • }

  50. Example – Test1ND Example of WSDD

More Related