+ All Categories
Home > Engineering > Composing Web APIs – State of the art and mobile implications

Composing Web APIs – State of the art and mobile implications

Date post: 19-Aug-2014
Category:
Upload: biplav-srivastava
View: 190 times
Download: 2 times
Share this document with a friend
Description:
This tutorial was given at ICSE 2014 co-located MobiSoft conference. http://mobilesoftconf.org/2014/program/. Same Title: Composing Web APIs – State of the art and mobile implications
Popular Tags:
84
© 2014 IBM Corporation Composing Web APIs: State of the Art and Mobile Implications Biplav Srivastava IBM Research – India 2 nd June, 2014
Transcript
  • 2014 IBM Corporation Composing Web APIs: State of the Art and Mobile Implications Biplav Srivastava IBM Research India 2nd June, 2014
  • MobileSOFT 2014 Tutorial | 2 June 2014 | Composing Web APIs 2014 IBM Corporation What to Expect Tutorial Objectives qThe aim of the tutorial is to Make early and experienced researchers aware of the Web Application Programming Interfaces (APIs) technology area in general and composing them in particular Provide an insightful overview and whet the audiences interest to undertake new efforts in building useful (mobile) applications for fun and profit and push the art on important open issues. Highlight relevant techniques from AI (e.g., planning, semantics, knowledge representation, logic, trust, learning and agents), software (rapid prototyping, quality-of-service, life cycle) and mobile (e.g., location-based, energy-efficiency) qRelation to other tutorials Seems to be the first tutorial of its kind; many web composition surveys available qDisclaimer: we are only providing a sample of techniques intended to match audience profile in the available time.
  • MobileSOFT 2014 Tutorial | 2 June 2014 | Composing Web APIs 2014 IBM Corporation Acknowledgements All our collaborators, and especially those in: qIndustry and clients Telecom - Bharti (Airtel), AT&T, Sprint Public Sector - National and City government agencies around the world (India, Canada, Chicago, Boston, Kenya, ); Emerging Protocols - Open 311 Finance Multiple Banks, qAcademia Prashant Doshi, Jana Koehler, Sheila McIlraith, Amit Sheth qIBM: Many including Web Services and Composition Vikas Agarwal, Girish Chafle, Koustuv Dasgupta, Gautam Das, Sugata Ghoshal, Mangala Gowri, Sunil Goyal, Neeran Karnik, Arun Kumar, Ashish Kundu, Anupam Mediratta, Sumit Mittal, Sougata Mukherjea. APIs Apurva Kumar, Jim Laredo, Shao Chun Li, Florian Pinel, Karthik Visweswariah, Maja Vukovic Mobile Vikas Agarwal, Dipyaman Banerjee, Dipanjan Chakraborty, Sunil Goyal, Arun Kumar, Sumit Mittal, Sougata Mukherjea, Amit Nanavati, Nitendra Rajput 3 For discussions, ideas and contributions. Apologies to anyone unintentionally missed.
  • MobileSOFT 2014 Tutorial | 2 June 2014 | Composing Web APIs 2014 IBM Corporation Outline qBasics Web APIs, Web Services, Services Oriented Architecture Importance of Web APIs for enterprise integration REST v/s Web Services? qComposing services Composition Types Understanding Automatic Composition Choices Semi-automated Composition Case Studies APIs Pattern with Open 311 Web Services Composition Synthy qMobile implications qPractical considerations 4
  • MobileSOFT 2014 Tutorial | 2 June 2014 | Composing Web APIs 2014 IBM Corporation Basics 5
  • MobileSOFT 2014 Tutorial | 2 June 2014 | Composing Web APIs 2014 IBM Corporation Terminology qAPIs Application Programming Interfaces Similar concepts service interfaces, web services (interfaces) qComposition Bringing capabilities of APIs together to build integrated capabilities; Can be client-side, server-side, mixed; can be manual, semi-automatic, automatic Similar concepts - Mashup, Patterns qRegistry A place to record information about APIs Similar concepts UDDI, API registry qCloud Hosted infrastructure to run and manage APIs 6
  • MobileSOFT 2014 Tutorial | 2 June 2014 | Composing Web APIs 2014 IBM Corporation API Example 7 http://www.programmableweb.com/api/sabre-instaflights-search
  • MobileSOFT 2014 Tutorial | 2 June 2014 | Composing Web APIs 2014 IBM Corporation A Composition (Mashup) Example 8
  • MobileSOFT 2014 Tutorial | 2 June 2014 | Composing Web APIs 2014 IBM Corporation Example: API Registry 9
  • MobileSOFT 2014 Tutorial | 2 June 2014 | Composing Web APIs 2014 IBM Corporation Business Web: Service Oriented Architecture qRelies on common service registry service descriptions qEnables dynamic discovery, binding qBased on open standards Service Broker Service Provider Service Requester Web Services: web accessible software components Slide Courtesy: Nirmal Mukhi
  • MobileSOFT 2014 Tutorial | 2 June 2014 | Composing Web APIs 2014 IBM Corporation The Acronyms in Action Service Broker Service Provider Service Requester WSDL Search with UDDI and get WSDL of match Invoke using SOAP Execute BPEL Return Solution
  • MobileSOFT 2014 Tutorial | 2 June 2014 | Composing Web APIs 2014 IBM Corporation Web Services Standards Source: Wil van der Aalst
  • MobileSOFT 2014 Tutorial | 2 June 2014 | Composing Web APIs 2014 IBM Corporation WSDL Example message> message> ... Binding
  • MobileSOFT 2014 Tutorial | 2 June 2014 | Composing Web APIs 2014 IBM Corporation Composite Web Service in BPEL4WS ... ... Partners Flow Description
  • MobileSOFT 2014 Tutorial | 2 June 2014 | Composing Web APIs 2014 IBM Corporation Business Source: Bessemer Venture Partners 2012 Business Capabilities as Services are being via APIs and delivered as-a-service, allowing Businesses to engage with Clients and Partners with speed at Scale
  • MobileSOFT 2014 Tutorial | 2 June 2014 | Composing Web APIs 2014 IBM Corporation REST v/s Web Services? 16 REST support limited integration styles, and involves fewer decisions on architectural alternatives This simplifies client-side integration steps (at the cost of lessening automation in system evolution); more focus on do-it- yourself Source: Pautasso et al, RESTful Web Services vs. Big Web Services: Making the Right Architectural Decision, WWW 2008
  • MobileSOFT 2014 Tutorial | 2 June 2014 | Composing Web APIs 2014 IBM Corporation Outline qBasics Web APIs, Web Services, Services Oriented Architecture Importance of Web APIs for enterprise integration REST v/s Web Services? qComposing services Composition Types Understanding Automatic Composition Choices Semi-automated Composition Case Studies APIs Pattern with Open 311 Web Services Composition Synthy qMobile implications qPractical considerations 17
  • MobileSOFT 2014 Tutorial | 2 June 2014 | Composing Web APIs 2014 IBM Corporation Composing Services 18
  • MobileSOFT 2014 Tutorial | 2 June 2014 | Composing Web APIs 2014 IBM Corporation19 Service Composition High Level View Complexity and Main Issues Scalability of composition solution Level of automation Modeling domain information Leverage industry practices Specify end-user service capability Select service providers Design the flow Deploy the service New service capabilities New service providers Network / environment changes Value Proposition " Quicker reaction to changing market conditions & competitive threats " Faster time to market for new services " Flexible B2B collaboration " Improved runtime performance & scalability for new services " Ability to adapt business processes to meet new customer demands Deliverables " Tool for (semi)-automated value-added service creation via semantically annotated APIs/ services " Infrastructure for metering and charging for composite services
  • MobileSOFT 2014 Tutorial | 2 June 2014 | Composing Web APIs 2014 IBM Corporation Service Composition Styles (Patterns) 20 Source: Change et al, Solving the Service Composition Puzzle, SCC2008 Glass is the easiest to assemble but forces manual composition, Orchestration/ Event allows automation in composition
  • MobileSOFT 2014 Tutorial | 2 June 2014 | Composing Web APIs 2014 IBM Corporation Impact of Composition Style on Performance 21 Source: Change et al, Solving the Service Composition Puzzle, SCC2008 Different relative strengths of different styles
  • MobileSOFT 2014 Tutorial | 2 June 2014 | Composing Web APIs 2014 IBM Corporation Types of Automatic Services Composition 22
  • MobileSOFT 2014 Tutorial | 2 June 2014 | Composing Web APIs 2014 IBM Corporation23 Motivation qAn Overall Web Service Composition and Execution view is important in practice Web Service Composition and Execution Specification of Requirement Available Capabilities [ Templates, Policies ] Execution Trace Today, it is not clear what are fundamentally different possible types of WSCE approaches and which type to use in a given scenario? Events
  • MobileSOFT 2014 Tutorial | 2 June 2014 | Composing Web APIs 2014 IBM Corporation24 Underst anding Basis for WSCE approaches qAre composition and execution separable? No, Yes qWhen does composition happen? Offline, Online qHow does composition happen? Search-based, Template-based qWhat information is used for composition? Service types, Service instances published, Services deployed, Templates/ Policies qHow are external events handled at runtime (adaptation)? On-the-fly, gradual
  • MobileSOFT 2014 Tutorial | 2 June 2014 | Composing Web APIs 2014 IBM Corporation25 July 9, 2005 All-In-One Composition & Execution Specifications I={i1, i2, i!} X={x1,x2,x!} T= {t1,t2,t!} All-in-one Approach Source: Understanding Approaches for Web Service Composition and Execution , V. Agarwal, G. Chafle, S. Mittal, B. Srivastava, In ACM Compute 2008, Bangalore, India Example: ConGolog, Heracles+Theseus
  • MobileSOFT 2014 Tutorial | 2 June 2014 | Composing Web APIs 2014 IBM Corporation26 Monolithic Composition RuntimeSpecifications I={i1, i2, i!} X={x1,x2,x!} W={W1,W2,WL} T= {t1,t2,t!} FRE RIW REW Monolithic Approach Source: Understanding Approaches for Web Service Composition and Execution , V. Agarwal, G. Chafle, S. Mittal, B. Srivastava, In ACM Compute 2008, Bangalore, India Example: SWORD, SHOP-2 based, Petrinet-based, Astro, METEOR-S
  • MobileSOFT 2014 Tutorial | 2 June 2014 | Composing Web APIs 2014 IBM Corporation27 Logical Composition Physical Composition RuntimeSpecifications C={c1,c2,c!} I={i1, i2, i!} X={x1,x2,x!} S={S1,S2,SK} W={W1,W2,WL} T= {t1,t2,t!} FPC FRE RAW RIW REW Staged Approach Source: Understanding Approaches for Web Service Composition and Execution , V. Agarwal, G. Chafle, S. Mittal, B. Srivastava, In ACM Compute 2008, Bangalore, India Example: Synthy, Self-Serv with web communities (but informal modeling)
  • MobileSOFT 2014 Tutorial | 2 June 2014 | Composing Web APIs 2014 IBM Corporation28 July 9, 2005 Replanning-based Composition Runtime I={i1, i2, i!} X={x1,x2,x!} W={W1,W2,WL} T= {t1,t2,t!} FRE RIW REW Template or Replanning-based Approach Specifications Initial Plan [Template] Policies Source: Understanding Approaches for Web Service Composition and Execution , V. Agarwal, G. Chafle, S. Mittal, B. Srivastava, In ACM Compute 2008, Bangalore, India Example: Heracles+Theseus, METEOR-S (Semantic templates, other templates), template-based planning
  • MobileSOFT 2014 Tutorial | 2 June 2014 | Composing Web APIs 2014 IBM Corporation29 Basis for WSCE approaches qAre composition and execution separable? No, Yes qWhen does composition happen? Offline, Online qHow does composition happen? Search-based, Template-based qWhat information is used for composition? Service types, Service instances published, Services deployed, Templates/ Policies qHow are external events handled at runtime (adaptation)? On-the-fly, gradual Separable? When How What How Interleaved No Online Search Services deployed On-the-fly Monolithic Yes Offline Search Services instances published Gradual Staged Yes Offline Search Service types, Service instances published Gradual Template Yes Offline, Online Template Templates/ policies, Services instances published, deployed On-the-fly, Gradual
  • MobileSOFT 2014 Tutorial | 2 June 2014 | Composing Web APIs 2014 IBM Corporation30 Comparing Approaches Interleaved Monolithic Staged Template Composition Effort O(!) O() Min: O(!) O( + M) O(M ) Composition Control None Low: < RIW; FE > High: < RAW;RIW; FC; FE > High: Ability to Handle Composition Failure None Low High Low Adaptation during Execution High Medium Medium Low to Medium Information Modeling Simple (Instances) Simple (Instances) Elaborate (Types and Instances) Elaborate (Templates and Instances) Limitation Search should be dead-end free Always a time-lag between service information offline v/s online Always a time-lag between service information offline v/ s online Search restricted by template can cause INCOMPLETENESS; Any restriction of the underlying composition method
  • MobileSOFT 2014 Tutorial | 2 June 2014 | Composing Web APIs 2014 IBM Corporation31 Example: Selecting an Approach Requirement Scalability with number of services Adaptability to changes Failure Resolution User Interaction control and supervision important Interleaved Monolithic Staged Template Composition Effort O(!) O() Min: O(!) O( + M) O(M ) Composition Control None Low: < RIW; FE > High: < RAW;RIW; FC; FE > High: Composition Failure Resolution None Low High Low Adaptation High Medium Medium Low to Medium Information Modeling Simple (Instances) Simple (Instances) Elaborate (Types and Instances) Elaborate (Templates and Instances) Limitation Search should be dead- end free Always a time-lag between service information offline v/s online Always a time-lag between service information offline v/s online Search restricted by template can cause INCOMPLETENESS; Any restriction of the underlying composition method Source: Understanding Approaches for Web Service Composition and Execution , V. Agarwal, G. Chafle, S. Mittal, B. Srivastava, In ACM Compute 2008, Bangalore, India
  • MobileSOFT 2014 Tutorial | 2 June 2014 | Composing Web APIs 2014 IBM Corporation32 Example: Selecting an Approach q Requirement: Online information services Services are data sources; can be modeled as databases which can be queried with controlled side-effects at the time of purchase Composite service should be responsive but accuracy can be negotiated Services are heterogeneously owned, hence relatively autonomous in choosing specifications Interleaved Monolithic Staged Template Composition Effort O(!) O() Min: O(!) O( + M) O(M ) Composition Control None Low: < RIW; FE > High: < RAW;RIW; FC; FE > High: Composition Failure Resolution None Low High Low Adaptation High Medium Medium Low to Medium Information Modeling Simple (Instances) Simple (Instances) Elaborate (Types and Instances) Elaborate (Templates and Instances) Limitation Search should be dead- end free Always a time-lag between service information offline v/s online Always a time-lag between service information offline v/s online Search restricted by template can cause INCOMPLETENESS; Any restriction of the underlying composition method Source: Understanding Approaches for Web Service Composition and Execution , V. Agarwal, G. Chafle, S. Mittal, B. Srivastava, In ACM Compute 2008, Bangalore, India
  • MobileSOFT 2014 Tutorial | 2 June 2014 | Composing Web APIs 2014 IBM Corporation Key Issues in Composition Performance qRepresentation of services Functional (input/output) but not semantic No way to discover equivalence qReasoning, discovery and composition Plethora of terms (e.g., wage and salary) Limited process model Hard to compose at semantic level Existing approaches at input/output level Detects instance choices but not service type choices qRuntime management and optimization
  • MobileSOFT 2014 Tutorial | 2 June 2014 | Composing Web APIs 2014 IBM Corporation Service Specification: Example with DAML-S Specification Slide Courtesy: DAML-S Coalition
  • MobileSOFT 2014 Tutorial | 2 June 2014 | Composing Web APIs 2014 IBM Corporation ServiceGrounding Example: Airline Reservation ServiceProfile FlightItinerary ServiceModel ... ... ...
  • MobileSOFT 2014 Tutorial | 2 June 2014 | Composing Web APIs 2014 IBM Corporation OWL-S/ DAML-S Vs UDDI/WSDL qDAML-S Vs WSDL Complements WSDL with Semantic Annotations Overlaps with Input and Output definitions DAML-S grounding overlaps with WSDL service implementation Process model v/s function model qDAML-S Vs UDDI Poor Search: UDDI does not support inferencing on taxonomies. Has fixed categories Improved Search: DAML-S complements UDDI service and service provider descriptions with semantics. Slide Courtesy: Richard Goodwin
  • MobileSOFT 2014 Tutorial | 2 June 2014 | Composing Web APIs 2014 IBM Corporation Layering of Semantic Web Languages for Services Source: DAML-S coalition work DAML-S (Services) XML (Extensible Markup Language) RDF (Resource Description Framework) RDFS (RDF Schema) DAML+OIL (Ontology) DAML-L (Logic)
  • MobileSOFT 2014 Tutorial | 2 June 2014 | Composing Web APIs 2014 IBM Corporation38 Case Study: API Composition Template / Pattern Building Pattern with Open Web APIs in E- Governance
  • MobileSOFT 2014 Tutorial | 2 June 2014 | Composing Web APIs 2014 IBM Corporation The Front Office Digitization The Globally Integrated Enterprise Mobile in government supports economic growth through new individual experience & speed of innovation in a services ecosystem (API-centric) Services Ecosystem Public, Open-To-All APIs Protected, Open-To-Partner APIs Private, Internal APIs Universi+es Private Sector Communi+es Other Countries and Governments Ci+zen Government Open data Government employee Individual Ci+zen Private sector employee apps gov- app API Externalization & Mgmt. Define services to be exposed, Map to back-office applications Expose API (internally or externally Define usage and access policies to ensure security and scalability Service Integration Consume APIs through Mobile Reduce integration effort to stitch together APIs in apps Leverage Cloud to deploy and publish apps Analytics Provide analytics service to enhance customer experience Leverage data produced by API services Deliver new business insights to the ecosystem
  • MobileSOFT 2014 Tutorial | 2 June 2014 | Composing Web APIs 2014 IBM Corporation Every citizen is a potential city event sensor Citizen notices 311 event worth reporting Reports event using mobile Launches mobile application Browses recent already-reported events Creates new event report [Is pre-enabled or gets any needed credentials to report event] Identies service type for new event Shares location using mobile device (coordinates) Can add location annotations (road, district, city) and description Get conrmation of submission Get updates on service request Extreme Personalization = Location Intelligence Empowered Citizen + Social Analytics + + 40 ALLGOV SCENARIO: CROWDSOURCING 311* EVENT REPORTING *311 data standard non-emergency events like graffiti, garbage, down trees, abandoned car, ; Not human life threatening 60+ cities support it world-wide; demo works on 4 (Chicago, Boston, Tucson USA; Bonn Germany), and backend test of 10s more.
  • MobileSOFT 2014 Tutorial | 2 June 2014 | Composing Web APIs 2014 IBM Corporation Browsing Services in Ones City: Mary M. can look at the 311 services her city provides On selecting the icon, She sees a small set of categories (health, building, traffic, cityimage, others) around which all the citys services are grouped. She can look at a list of services and check out the agencies involved If there has been a change in agency responsible or new services added for an agency, she can note that directly Browsing Services in Other Cities: Her colleagues from another city are visiting. She may want to bring a window (instantiate an app with browse city pattern) to look at what that city offers to their citizens [Alternatively, if she is travelling to another city, she may be interested to know how that city does compared to hers, by which agency, etc.] On selecting the icon, See sees a small set of familiar categories (health, building, traffic, cityimage, others) regardless of what the city calls its services She can look at a list of services and check out the agencies involved If her city does something different, she can show that to her colleagues in her or other cities.
  • MobileSOFT 2014 Tutorial | 2 June 2014 | Composing Web APIs 2014 IBM Corporation A Demonstration of AllGov Scope Backend pattern setup Mobile based usage of pattern instances
  • MobileSOFT 2014 Tutorial | 2 June 2014 | Composing Web APIs 2014 IBM Corporation Applica+on Pa=ern What is it?: A pa=ern is any applica+on using APIs, with some informa+on generalized (i.e., removed and parameterized) Business Value: A pa=ern standardizes the usage experience by promo+ng similar behavior (for users) simplies applica+on development by templa+zing API interac+ons (for developers) serves as the organiza+ons memory of the best-prac+ces in developing a class-of-applica+ons even when the specic APIs may not be relevant (for business) Key Technical Issue What pa=erns should one build ? Theore+cally, there exists a trivial method to blindly generate a pa=ern from any applica+on. Any pa=ern development process has to do be=er than this baseline. How should the pa=erns be used in prac+ce? Building a tool-enabled process around Pa=ern-based programming
  • MobileSOFT 2014 Tutorial | 2 June 2014 | Composing Web APIs 2014 IBM Corporation Applica+on Pa=ern Approach followed in AllGov Common steps taken by a role player is a candidate pa=ern Common steps that can be executed in the same infrastructure is a candidate pa=ern Pa=ern 1: Browse city services pa=ern [User Role: Govt. Dept Admin; Environment: PRODUCTION system] nd a city's services nd a service's deni+on nd services of a par+cular high-level category (example: building, gra+, ...) Pa=ern 2: Create service request pa=ern [User Role: Developer; Environment: TEST system] Browse city services Browse raised city service requests Create a new service request Pa=ern 3: Create service request pa=ern [User Role: General ci+zen of a par5cular City; Environment: PRODUCTION system] Browse city services Browse raised city service requests Create a new service request
  • MobileSOFT 2014 Tutorial | 2 June 2014 | Composing Web APIs 2014 IBM Corporation AllGov Scenario Deconstruction (flows) Customer Mobile AllGov City Services 1 2 External IBM Client browse events get recent events Request confirmation get service types create request Post location coordinates Post details on Event, location 3 Notify service completed P1, P1+ P2, P3
  • MobileSOFT 2014 Tutorial | 2 June 2014 | Composing Web APIs 2014 IBM Corporation The Government API services economy will evolve a new service Business Model (Value & Revenue chain) with different service providers Individual Consumer API endpoint Business Services Mobile App Revenue Value Revenue Value API Services & Data API endpoint API endpoint Value Revenue Value Revenue API Provider App developer Value Revenue Value Revenue Pattern Provider Pattern Security Revenue Value Revenue Value Assets and Orchestrations BindingConfiguration Sample (Client, UI) Assets Properties Properties Endpoint Dependency Endpoint Dependency Pattern* Security Monitoring & Analytics * Pattern provides a reusable, secure, configurable composition of services template for replicable business scenarios/services.
  • MobileSOFT 2014 Tutorial | 2 June 2014 | Composing Web APIs 2014 IBM Corporation47 Case Study: Web Service Composition Staged Semi-Automatic Synthy
  • MobileSOFT 2014 Tutorial | 2 June 2014 | Composing Web APIs 2014 IBM Corporation48 The Problem q Web Service Composition approaches AI based Semantic Web Services Ontologies, Planning etc. Distributed Programming based Standardized Interfaces and protocol bindings Web Service Description Language (WSDL), Universal Description, Discovery and Integration (UDDI) etc. q A complete view take an end-to-end approach 1. Specification of desired functionality 2. Composition of new service based on specified requirements 3. Creating deployable instance of the newly created composite service q Two staged approach Semantic annotations for functional composition Interface Descriptions and QoS guarantees for non-functional composition q In current semantic web service modeling efforts (specifically OWL-S) services engineering has not been done with scalability in mind the best way of using non-functional requirements (NFRs) is not very clear control flow creation is facilitated but lack of support for data flow construction WWW 2005, AAAI 2006, Web Semantics Journal 2006
  • IBM be or an Ba no m ints For the latest, go to http://w3.ibm.com/ibm/presentations MobileSOFT 2014 Tutorial | 2 June 2014 | Composing Web APIs 2014 IBM Corporation Indications in black = Optional elements 49 Synthy IDE for Web Service Composition
  • MobileSOFT 2014 Tutorial | 2 June 2014 | Composing Web APIs 2014 IBM Corporation Logical Composition what service types to compose? Validator Ontology SNOBASE MatchmakerFilterPlanner4J Service Specs Abstract Workflow Service Capabilities Registry Logical Composer Available Service Types Domain Information Candidate Component Services Domain Information Candidate Component Services Validated Specs AAAI 2006
  • MobileSOFT 2014 Tutorial | 2 June 2014 | Composing Web APIs 2014 IBM Corporation Physical Composition how to select service instances? Instance Selector BPEL Generator Abstract Workflow Deployable Workflow Data Dictionary WSME Matchmaker Service Instances Registry Physical Composer Available Service Instances Selected Instances WSDLs for the selected Instances Matchmaking language/rules Matching Instances AAAI 2006
  • MobileSOFT 2014 Tutorial | 2 June 2014 | Composing Web APIs 2014 IBM Corporation52 Handling Scalability ServiceGrounding ServiceType Service ServiceProfileType ServiceModelType Service Profile anInstanceOf anInstanceOf presents presents support s describedBy q Current OWL-S Approach Each individual running instance is modeled as a service Requires evaluation of all service instances while searching for a desired service Lack of standardization: no information about similarity or dissimilarity Resulting composition prone to small implementation changes q Modified OWL-S Upper Ontology Split the ontology into Service Type Hierarchy and Service Instance Hierarchy q Scalability Only Service Types needs to be matched A composition may replace an instance with another of same type Changes to instance NFCs will not affect the existing functional composition Service Service Profile Service Model Service Grounding presents describedBy supports ISWC 2005
  • MobileSOFT 2014 Tutorial | 2 June 2014 | Composing Web APIs 2014 IBM Corporation53 Issue 1: How to Classify among Types and Instances " Composition valid when instance chosen for a service type " Instances allowed to have minor variations " Preconditions of Type superset of preconditions of all Instances " Effects of Type subset of effects of all Instances ISWC 2005
  • MobileSOFT 2014 Tutorial | 2 June 2014 | Composing Web APIs 2014 IBM Corporation54 Issue 2: Rules for Role Propagation ISWC 2005
  • MobileSOFT 2014 Tutorial | 2 June 2014 | Composing Web APIs 2014 IBM Corporation55 Issue 2: Benefits of Role Association qDisambiguate i/o parameters Assign semantic meaning qCreation of context for data flow generation Role propagation qExtra dimension for parameter matching Looking for a service that uses Name with the role To ISWC 2005
  • MobileSOFT 2014 Tutorial | 2 June 2014 | Composing Web APIs 2014 IBM Corporation56 Issue 3: Functional versus Non-functional Capabilities qFC expresses core functionality through IOPEs qNFCs characterize the service further Cost, QoS, ownership rights qOWL-S represents NFCs using profile attributes qUnclear how to reason with NFCs Logical or physical layer? ISWC 2005
  • MobileSOFT 2014 Tutorial | 2 June 2014 | Composing Web APIs 2014 IBM Corporation57 Issue 3: Breakdown of end-to-end NFR qHandled in physical composition module Breaking composite requirements into individual component requirements Selecting best instance for each component qRules can be specified to resolve conflicts ISWC 2005
  • MobileSOFT 2014 Tutorial | 2 June 2014 | Composing Web APIs 2014 IBM Corporation58 Adaptation of Web Service Composition - Solution Overview qUse of Staged Approach for Service Composition Decompose the specification into functional and non-functional requirements Differentiate between web service types and web service instances Logical Composition: Create the desired functionality using service types Physical Composition: Optimize non-functional requirements and bind service instances qCreate alternatives for adaptation qIntelligently select alternatives at each stage based on operating conditions Details: Adaptation in Web Service Composition and Execution, ICWS 2006, ICWS 2007
  • MobileSOFT 2014 Tutorial | 2 June 2014 | Composing Web APIs 2014 IBM Corporation59 A-WSCE Solution Overview Physical Composition Input Specs Runtime FP W = W1,.., WL RP Logical Composition RL P = P1,, PK I = {I1, I2, , I}S = {S1, S2, , S} FL FR Wopt RR Execution Environment Details: Adaptation in Web Service Composition and Execution, ICWS 2006, ICWS 2007
  • MobileSOFT 2014 Tutorial | 2 June 2014 | Composing Web APIs 2014 IBM Corporation60 A-WSCE System Architecture Workflow Generator Service Developer Execution Environment Service Type Registry Template Generator QoS Registry Instance Registry K Templates L Workflows 1 workflow InstanceType QoS Feedback Feedback Feedback Runtime Selector CALLBACK CALLBACK CALLBACK Physical ManagerLogical Manager Runtime Manager Available InstancesAvailable Types Details: Adaptation in Web Service Composition and Execution, ICWS 2006
  • MobileSOFT 2014 Tutorial | 2 June 2014 | Composing Web APIs 2014 IBM Corporation61 Generation of Multiple Workflows qTemplate Generator Generate abstract workflows using AI Contingent Planning methodology qWorkflow Generator Creation of multiple executable workflows for a single template Formulate as mixed Integer Programming problem Repeatedly invoke Optimization module while Intelligently removing a few instances from consideration O-reuse Strategy K-reuse Strategy Selecting workflows representing each template Formulate as an Integer Programming problem qRuntime Selector Details: Adaptation in Web Service Composition and Execution, ICWS 2006
  • MobileSOFT 2014 Tutorial | 2 June 2014 | Composing Web APIs 2014 IBM Corporation62 Demonstration of Web Service Composition (Synthy): Building User Services Helpline Application for an Electronic Consumer Appliance Company, enabled by a Telco
  • MobileSOFT 2014 Tutorial | 2 June 2014 | Composing Web APIs 2014 IBM Corporation Helpline Automation Scenario q Service Specifications Input Customer Problem Output Status of Problem Resolution q Steps in the workflow Reporting of the problem using a Web-based interface Selection of a helpline agent to resolve the problem Agent should have desired level of expertise Agent could be a desk-based expert, or a field-based expert Notify the appropriate expert with relevant information about the problem Update registry with resolution status q Goal is to create the service using existing component services, in an automated manner if feasible Problem Ticket ID, Field Agent ID Problem Ticket ID, Resolution Status Customer Problem Problem Reporting Service Agent Assignment Service Help Desk Service On Site Service Problem Registry Service Problem Ticket ID Problem Ticket ID, Desk Agent ID Problem Ticket ID, Resolution Status
  • MobileSOFT 2014 Tutorial | 2 June 2014 | Composing Web APIs 2014 IBM Corporation Composed Service: Helpline Automation Problem Reporting Registry Update Call Setup Help Desk Message Delivery On Site Problem Classification Location-based Agent Selection Expert Lookup Agent Assignment Desk-based Expert ID Field Expert ID Problem Ticket Problem Ticket, Problem Ticket, Resolution Status Problem Ticket, Resolution Status Problem Ticket, Customer Interaction Top-down or bottom-up?
  • MobileSOFT 2014 Tutorial | 2 June 2014 | Composing Web APIs 2014 IBM Corporation Composed Service: Location-Based Agent Selection Service Location-based Selection Service Effect: Agent chosen based on proximity to destination Output: Field Agent ID Input: Customer Location, List of Field Agent IDs Expert DB Location Tracker Distance Calculator Optimal Agent Selector List of Agent IDs List of Agent Mobile Nos List of Agent Locations List of Agent Distances, List of Agent IDs Nearest Agent ID Customer Location
  • IBM Research 2014 IBM CorporationMobileSOFT 2014 Tutorial | 2 June 2014 | Composing Web APIs66 Synthy High Level View Complexity and Main Issues Scalability of composition solution Level of automation Modeling domain information Leverage industry practices Specify end-user service capability Select service providers Design the flow Deploy the service New service capabilities New service providers Network / environment changes Value Proposition " Quicker reaction to changing market conditions & competitive threats " Faster time to market for new services " Flexible B2B collaboration " Improved runtime performance & scalability for new services " Ability to adapt business processes to meet new customer demands Deliverables " Tool for (semi)-automated value-added service creation via semantically annotated web services " Infrastructure for metering and charging for composite services Customer: Mobile telecommunications company (Bharti) Description: Develop a tool to (semi)- automatically compose specific user-specified services using semantically-annotated web services, and reconfiguration of orchestration pattern. Computer Science Techniques: Domain (OWL), Functional (OWL-S), Non-functional (Policy, SLAs), Web services (BPEL, WSDL), Semantic matching, AI planning, NFR optimization, Automatic Workflow Metadata Generation Our work proposed a first-of-a-kind staged approach for web service composition, enabling automation, control and optimization at each stage
  • MobileSOFT 2014 Tutorial | 2 June 2014 | Composing Web APIs 2014 IBM Corporation References - Papers q Synthy: A System for End to End Composition of Web Services , V. Agarwal, G. Chafle, K. Dasgupta, N. Karnik, A. Kumar, S. Mittal, B. Srivastava, Journal of Web Semantics, Vol. 3, Issue 4, 2005. A Service Creation Environment based on End to End Composition of Web Services , V. Agarwal, K. Dasgupta, N. Karnik, A. Kumar, A. Kundu, S. Mittal, B. Srivastava, Proceedings of the 14th. WWW Conference (WWW 2005), Japan q The Synthy Approach for End to End Web Services Composition: Planning with Decoupled Causal and Resource Reasoning , B. Srivastava, NECTAR paper in Proceedings of the 21st National Conference on Artificial Intelligence (AAAI-06), Boston, USA. q An Integrated Development Environment for Web Service Composition , G. Chafle, G. Das, K. Dasgupta, A. Kumar, S. Mittal, S. Mukherjea, B. Srivastava, In Proceedings of the IEEE International Conference on Web Services (ICWS 2007), Industrial Track, Salt Lake City, USA. q Improved Adaptation of Web Service Compositions Using Value of Changed Information , G. Chafle, P. Doshi, J. Harney, S. Mittal, B. Srivastava, Industrial Track paper in the Proceedings of the IEEE International Conference on Web Services (ICWS 2007), Salt Lake City, USA. q Adaptation in Web Services Composition and Execution , G. Chafle, K. Dasgupta, A. Kumar, S. Mittal, B. Srivastava, Industrial Track paper in the Proceedings of the IEEE International Conference on Web Services (ICWS 2006), Chicago, USA. Information Modeling for End to End Composition of Semantic Web Services , A. Kumar, S. Mittal, B. Srivastava, Proceedings of the 4th International Semantic Web Conference (ISWC 2005), Galway, Ireland. Also, IBM Research Report RI 06009, November 2006 q Understanding Approaches for Web Service Composition and Execution , V. Agarwal, G. Chafle, S. Mittal, B. Srivastava, In ACM Compute 2008, Bangalore, India. Also in IBM Research Report RI 07005 q Evaluating Planning based Approaches for End to End Composition and Execution of Web Services , V. Agarwal, G. Chafle, K. Dasgupta, S. Mittal, B. Srivastava, In AAAI 2005 Workshop on Exploring Planning and Scheduling for Web Services, Grid and Autonomic Computing, Pittsburgh, US q Applying Planning in Composition of Web Services with a User-Driven Contingent Planner , A. Mediratta, B. Srivastava, In IBM Research Report RI 06002, February 2006. q Metering and Accounting for Service-oriented Computing. A Kumar, V Agarwal, N Karnik E-business models, services, and communications, 275, Information Science Publishing, 2008 q Usage Metering for Service-Oriented Grid Computing, A Kumar, N Karnik, V Agarwal, International Journal of E-Business Research (IJEBR) 2(1), 78--106, IGI Global, 2006. q An information model for metering and accounting, V Agarwal, N Karnik, A Kumar, Network Operations and Management Symposium, 2004. q Metering and accounting for composite e-Services, V Agarwal, N Karnik, A Kumar, E-Commerce, 2003, Published by the IEEE Computer Society, 2003 q Web Service Composition - Current Solutions and Open Problems , B. Srivastava & J. Koehler, 2003. 67
  • MobileSOFT 2014 Tutorial | 2 June 2014 | Composing Web APIs 2014 IBM Corporation Outline qBasics Web APIs, Web Services, Services Oriented Architecture Importance of Web APIs for enterprise integration REST v/s Web Services? qComposing services Composition Types Understanding Automatic Composition Choices Semi-automated Composition Case Studies APIs Pattern with Open 311 Web Services Composition Synthy qMobile implications qPractical considerations 68
  • MobileSOFT 2014 Tutorial | 2 June 2014 | Composing Web APIs 2014 IBM Corporation Mobile Implications 69 In collaboration with Vikas Agarwal, IBM Research - India
  • MobileSOFT 2014 Tutorial | 2 June 2014 | Composing Web APIs 2014 IBM Corporation70 Mobile Phone as a Platform Growing functions and dropping cost make mobile phone capable as an alternative to PC to access information and services Mobile phone information service platform Growing 1 Billion per year through 2011 3x the number of PCs today 2x the number of credit cards today 2x the number of TVs today GPS Sensors Biometrics ID Productivity tool TV Game Email Dictionary Data Storage Voice Recorder Internet Browser Credit Card / Payment Function Business Card Reader Bar Code Reader Radio & Media Player SMS Voice Camera Address Book Smartphone New Functions Enhanced Phone New UI Basic Phone Lower Cost $300 $200 $100 Price User Number 0 0.5 1 1.5 2 2.5 1990 1995 2000 2001 2002 2003 2004 2005 Fixed lines Cellular mobile phones Billions Fixed lines & mobile phones worldwide Source: ITU Information Society Statistics Database. 125 years 21 years 3 years Mobile phone: an alternative to PC Young generation Leading markets (e.g. Japan, Korea) The base of pyramid (e.g. India, Africa) Mobile Web Mashups Slide Courtesy: Vikas Agarwal
  • MobileSOFT 2014 Tutorial | 2 June 2014 | Composing Web APIs 2014 IBM Corporation Example Mobile Platforms 71
  • MobileSOFT 2014 Tutorial | 2 June 2014 | Composing Web APIs 2014 IBM Corporation72 What Composition Can Enable on Mobiles qAccelerate application development on emerging smart phone platforms Apple iPhone, Google Android, Nokia S60, and Blackberry Application must Provide Mobile Device Breadth Provide Consistent User Experience Reduce Cost of development Provide Ease of deployment & update qEnable smarter and richer applications Rich Client Device Features (PIM, Bluetooth, Camera, ) Telecom Infrastructure Services (Location, Presence, 3PCC, ) 3rd party services (Maps, News feeds, ) As the new killer application remains elusivedifferentiation will come from ability to rapidly compose customized services for narrow customer segments News Weather Trac Map Bluetooth SMS Call Control Loca+on Presence Contacts Camera Calendar AndroidiPhone S60 Mobile Browser Platform Telecom Functionality Device Features Third Party Web Services News Weather Trac Map Bluetooth SMS Call Control Loca+on Presence Contacts Camera Calendar AndroidiPhone S60 Mobile Browser Platform Telecom Functionality Device Features Third Party Web Services Slide Courtesy: Vikas Agarwal
  • MobileSOFT 2014 Tutorial | 2 June 2014 | Composing Web APIs 2014 IBM Corporation73 Mobile Applications running on Browser qAdvantages Easy reuse of existing web assets Dynamic delivery of content and services Easy to reconfigure and update the application qDisadvantages Cannot make use of native device services Inconsistency in mobile web browsers No offline model Web applications that maintain long http connections not feasible because of CPU and battery constraints Dont handle network interruption and latency well qAdvantages Full access to local device services User interface richness because of the use of native controls and advanced graphics Can make use of advanced controls like multi touch to enhance user experience qDisadvantages No consistency in programming model from different vendors Fixed function. Very little flexibility in being able to dynamically adapt, re-skin the application Update cycle can be painful Service composition not as easy as web applications Difficult to distribute source form of the app for extension 73 Native Mobile Application Slide Courtesy: Vikas Agarwal
  • MobileSOFT 2014 Tutorial | 2 June 2014 | Composing Web APIs 2014 IBM Corporation74 Hybrid Application Model q Mobile web applications based on browser runtime (both widgets and native apps with browser access) Locally installed with Web connectivity Rich UI without browser frame Access to native functionalities (PIM, Camera, ) Access to 3rd party services (Maps, news feeds, ) Can have a server-side component Dynamic generation of HTML content Device specific scripts for accessing device functionalities q Mobile Web platform is becoming the new rich client platform Generally based on Webkit An open source browser engine with smaller footprint and better performance Provides a Web 2.0 Programming (HTML, XML, JavaScript, AJAX) Can support multiple device platforms including Android, iPhone, Nokia S60 Slide Courtesy: Vikas Agarwal
  • MobileSOFT 2014 Tutorial | 2 June 2014 | Composing Web APIs 2014 IBM Corporation75 Mobile Composition Architecture qProvides Web programming with native integration Using JavaScript Interfaces Uniform API across different mobile platforms qMashup compositions can combine device, telecom and third party services Slide Courtesy: Vikas Agarwal
  • MobileSOFT 2014 Tutorial | 2 June 2014 | Composing Web APIs 2014 IBM Corporation Native Apple XCode Android Dev Tools (ADT) (Eclipse) IDE Hybrid Mix Native and Hybrid code in a single application Web Uses the Browser on the device to access application running on the server. Written in HTML and JS iPhone Application Android Application Hybrid Application iPhone, Android, Web Application iPhone, Android, Native Code Native Code Pladorm API Native Code Native Code Pladorm API HTML5 CSS Java Script Hybrid Device Bridge and pladorm API Native Code HTML HTML Java Script Helper API Build Connect and Run Manage & Analy+cs Secure Transform & Grow Mobile platforms Must Support All Application Models IDE Slide Courtesy: Vikas Agarwal
  • MobileSOFT 2014 Tutorial | 2 June 2014 | Composing Web APIs 2014 IBM Corporation Mobile Issues qPerformance Question whether cpu-intensive work is needed Can work be moved to back-end, result be cached? qResource footprint Reduce HTTP requests Get multiple resources in single requests (e.g., mod_cat library) Eliminate images Avoid redirects, call directly qSecurity Use libraries that check security policy violations (e.g., SafeMash) Verify security violation with 3rd party tools 77 See details: The evolution of web development for mobile devices, Nicholas C Zakas, CACM April 2013 Full Enabling the development of safer mashups for open data Krishna Chaitanya; Venkatesh Choppella, ICSE IWP 2014 TaintDroid: An Information Flow Tracking System for Real-Time Privacy Monitoring on Smartphones by William Enck, Peter Gilbert, Byung-Gon Chun, Landon P. Cox, Jaeyeon Jung, Patrick McDaniel, and Anmol N. Sheth, CACM Mar 2014
  • MobileSOFT 2014 Tutorial | 2 June 2014 | Composing Web APIs 2014 IBM Corporation Outline qBasics Web APIs, Web Services, Services Oriented Architecture Importance of Web APIs for enterprise integration REST v/s Web Services? qComposing services Composition Types Understanding Automatic Composition Choices Semi-automated Composition Case Studies APIs Pattern with Open 311 Web Services Composition Synthy qMobile implications qPractical considerations 78
  • MobileSOFT 2014 Tutorial | 2 June 2014 | Composing Web APIs 2014 IBM Corporation Practical Considerations 79
  • MobileSOFT 2014 Tutorial | 2 June 2014 | Composing Web APIs 2014 IBM Corporation Public Datasets qAPIs Programmable Web (programmableweb.com) Open 311 (open311.org) Government open data sites supporting APIs (data.gov, data.gov.in, ) qWeb Services Xmethod (www.xmethod.com) Webserviceslist.com Soa.com 80
  • MobileSOFT 2014 Tutorial | 2 June 2014 | Composing Web APIs 2014 IBM Corporation Composition Tooling qDo it yourself with favorite environment at application level HTML5 Kimonolabs - Kimonolabs.com TouchDevelop - http://tdev.ly/sykua qPlatform specific development tools MIT AppInventor - http://appinventor.mit.edu/ qCross-platform tools with platform specific tweaking qKey concern while composition concern Model of change that is being handled 81
  • MobileSOFT 2014 Tutorial | 2 June 2014 | Composing Web APIs 2014 IBM Corporation Key Composition Issues to Keep in Mind qRepresentation of services Just input/ output? Need semantics of preconditions/ effects? qModel of change that needs to be handled Only runtime changes, e.g., service instances? Only design time changes, e.g., user reviews compositions? Both design and runtime? Handle new requirements over time, automatically? Others Semantics of current behavior? Do we need to ignore changes? qTooling to create and manage compositions 82
  • MobileSOFT 2014 Tutorial | 2 June 2014 | Composing Web APIs 2014 IBM Corporation References q Nicholas Zakas, The evolution of web development for mobile devices, Communications of the ACM, April 2013. q V. Agarwal, G. Chafle, S. Mittal, B. Srivastava, Understanding Approaches for Web Service Composition and Execution , In ACM Compute 2008, Bangalore, India. q J. Koehler, B. Srivastava: Web Service Composition: q Current Solutions and Open Problems ICAPS 2003 Workshop on Planning for Web Services, pages 28 - 35. q V. Agarwal, G. Chafle, K. Dasgupta, S. Mittal, B. Srivastava, Evaluating Planning based Approaches for End to End Composition and Execution of Web Services, In AAAI 2005 Workshop on Exploring Planning and Scheduling for Web Services, Grid and Autonomic Computing, Pittsburgh, USA. q Pautasso C., Zimmermann O., and Leymann, F. "Restful web services vs. big'web services: making the right architectural decision." Proceedings of the 17th international conference on World Wide Web. ACM, 2008. q DuVander A., 9,000 APIs: Mobile Gets Serious, ProgrammableWeb, http://blog.programmableweb.com/2013/04/30/9000-apis- mobile-gets-serious/, 2013. q B. Srivastava, The Synthy Approach for End to End Web Services Composition: Planning with Decoupled Causal and Resource Reasoning , NECTAR paper in Proceedings of the 21st National Conference on Artificial Intelligence (AAAI-06), Boston, USA. q McIlraith, Sheila, Son, Tran Cao, and Zeng, Honglei (March 2001). "Semantic Web Services" (PDF). Intelligent Systems (IEEE) 16 (2): 4653 q Piergiorgio Bertoli, Marco Pistore, Paolo Traverso. Automated Composition of Web Services via Planning in Asynchronous Domains, Journal of Artificial Intelligence, 316-361, 2009. q A. Kumar, S. Mittal, B. Srivastava, Information Modeling for End to End Composition of Web Services , Proceedings of the 4th International Semantic Web Conference (ISWC 2005), Galway, Ireland. Also, IBM Research Report RI 06009, November 2006. q Keman Huang; Yushun Fan; Wei Tan; Xiang Li, Service Recommendation in an Evolving Ecosystem: A Link Prediction Approach, Web Services (ICWS), 2013 IEEE 20th International Conference on , vol., no., pp.507,514, June 28 2013-July 3 2013 q Torres, R.; Tapia, B.; Astudillo, H., Improving Web API Discovery by Leveraging Social Information, Web Services (ICWS), 2011 IEEE International Conference on , vol., no., pp.744,745, 4-9 July 2011 q Bizer C., Heath T., and Berners-Lee T. "Linked data-the story so far." International Journal on Semantic Web and Information Systems (2009): 1-22. q G. Chafle, S. Chandra, V. Mann, MG Nanda, Decentralized orchestration of composite web services, WWW 2004, Alternate track on Web Services q D. Mukherjee, P. Jalote, MG Nanda, Determining QoS of WS-BPEL compositions, ICSOC 2008 q Decentralizing execution of composite web services, MG Nanda, S Chandra, V Sarkar OOPSLA, 2004 q J. Koehler, R. Hauser, S. Sendall, M. Wahler: Declarative Techniques for Model-Driven Business Process Integration IBM Systems Journal 44(1): 47-65 (2005). q J. Koehler, J. Vanhatalo: Process Anti-Patterns: How to Avoid the Common Traps of Business Process Modeling IBM Websphere Developer Technical Journal, Issues 10.2 and 10.4, 2007. IBM ZRL Research Report 3678. q V. Agarwal, G. Chafle, K. Dasgupta, N. Karnik, A. Kumar, S. Mittal, B. Srivastava, Synthy: A System for End to End Composition of Web Services , Journal of Web Semantics, Vol. 3, Issue 4, 2005. q V. Agarwal, K. Dasgupta, N. Karnik, A. Kumar, A. Kundu, S. Mittal, B. Srivastava, A Service Creation Environment based on End to End Composition of Web Services , Proc. of the 14th. WWW Conference (WWW 2005), Japan q G. Chafle, P. Doshi, J. Harney, S. Mittal, B. Srivastava, Improved Adaptation of Web Service Compositions Using Value of Changed Information , Industrial Track paper in the Proceedings of the IEEE International Conference on Web Services (ICWS 2007), Salt Lake City, USA. q G. Chafle, K. Dasgupta, A. Kumar, S. Mittal, B. Srivastava, Industrial Adaptation in Web Services Composition and Execution , Track paper in the Proceedings of the IEEE International Conference on Web Services (ICWS 2006), Chicago, USA q Panziera, Luca and Comerio, Marco and Palmonari, Matteo and De Paoli, Flavio and Batini, Carlo, Quality-Driven Extraction, Fusion and Matchmaking of Semantic Web API Descriptions , Journal of Web Engineering, 2012 q M. Lanthaler, Creating 3rd Generation Web APIs with Hydra, WWW 2013 83
  • MobileSOFT 2014 Tutorial | 2 June 2014 | Composing Web APIs 2014 IBM Corporation Thank You Merci Grazie Gracias Obrigado Danke Japanese French Russian German Italian Spanish Portuguese Arabic Traditional Chinese Simplified Chinese Hindi Romanian Korean Multumesc Turkish Teekkr ederim English

Recommended