SlideShare a Scribd company logo
Flow Composition for the Web

      Francisco Curbera, Matt Duftler, Rania
             Khalaf, Douglas Lovell

 Presentation of the paper: Bite: Workflow composition for the web. F Curbera, M Duftler, R Khalaf, D Lovell,
 Service oriented computing: fifth international conference, Springer, 2007.
Outline
•   Services and resources
•   Composition
•   Web flows and flow scenarios
•   What is next
About SOA and the Web
Services and Resources
• SOA is about composition: process or structural (so far)
• SOA assumes:
    – A two level development and execution environment
      (atomic services, composite services)
    – Two standard assembly models, BPEL, SCA
• The Web was NOT built on a composition requirement
    – Assumes HTTP exists, gives clients access to resources
    – And a few shared data types
• REST resources are not compositional
    – Resources are information oriented: Data composition?
    – But many resources have “behavior” - drive processes
• Process composition for the Web?
End-to-end deployment view in SCA
Composite

                         Component/Composite

        Entry                      Component          Component                           External
        Point                      A                  B                                    Service




                Wire                           Wire                                Wire


                             implementation
                                                                  implementation
                       Composite
                                                      Composite
End-to-end business logic in WS-BPEL

                   Process




                             Partner link




                             WSDL porttype
The value of the end-to-end view
  • Beyond component oriented use/reuse, first class SOA
    compositions provide an end-to-end view of composite
    applications

  • Supports end-to-end configuration, validation, management,
    etc.

   – Policy driven configuration
     • Reduce errors in QoS configuration of distributed components,
       ensure correctness of complete configuration
   – End-to-end static analysis, at many levels
     • Tools check “compatibility” of a set of composed components:
       functional and non-functional
   – Runtime monitoring and validation
     • Uses structural/process topology to interpret monitoring information
Some interesting trends

• Web mashups
 – Quickly assemble a new end-user applications by
   reusing existing ones
• Process centric programming
 – Adding the flow perspective to Web apps: Spring Web
   Flows, continuations
• The Web (REST) interaction model making
  inroads as an alternative to enterprise models
 – The SOAP vs POX debate, and other uninteresting
   debates
Mashups
• Mash-up is essentially a form of
  Web application composition
  – Google maps are consumed and
    aggregated with additional
    information
  – Display final result on browser
  – Aggregate in the client or the
    server sides
  – There are security issues but the
    idea is simple
• Data centric
• Composition w/o a component
  model!
SOA capabilities for the Web?
• How lightweight can we make it? Who is going to use it?

• Common data model?
  – But we already have one – XML + mime types
  – XML is already pervasive from the DB to the UI, but it is just one of the relevant data
    types

• Component model?
  – Reuse is nice, when it works.
  – Do we need machine readable component definitions? Or just good documentation?
  – Agree on component interaction primitives based on the resource model (ATOM)

• Resource composition
  – Process oriented – seems unavoidable since processes already run on the Web
  – Data composition – it is data model dependent, so far
  – Structural composition (???) – need good use cases probably because so far Web
    apps usually don’t expand many Web components
Bite – Process Composition
         for the Web
Feed Aggregation

                                              receive




                            fetchYahooFeed               fetchBBCFeed




                                             aggregate




                                               sort

Resource aggregation
Relies on a well defined data
model –ATOM/RSS                                reply
Feed Aggregation
                             receive                           REST interaction
                                              HTTP GET         <GET name=“sort” sortOrder=“…’”/>




           fetchYahooFeed               fetchBBCFeed         HTTP GET

HTTP GET

                                                       Call local code (no overhead):
                                                       <action name=“aggregate” target=“java:com.ibm.Aggregator”
                            aggregate
                                                               operation=“aggregate”>
                                                       <input value=“fetchYahooFeed”/>
                                                       <input value=“fetchBBCFeed”/>
                                                       </action>
                              sort

                                                        Use an extension activity:
                                                        <sort name=“sort” sortOrder=“…’”>
                                                          <input value=“fetchYahooFeed”/>
                                                          <input value=“fetchBBCFeed”/>
                              reply                     </sort>
Feed Aggregation
                                            <process name="sortSample">
                  receive
                                             <GET name="getYahooFeed“
                                                    target="'http://newsrss.bbc.co.uk/etc…'">
                                             </GET>
fetchYahooFeed               fetchBBCFeed
                                             <GET name="getBBCFeed"
                                                 target="'http://rss.news.yahoo.com/rss/etc..'">
                                             </GET>
                 aggregate
                                             <aggregate name="aggregate">
                                                <input value="getBBCFeed"/>
                                                <input value="getYahooFeed"/>
                   sort                      </aggregate>

                                             <sort name="sort">
                                               <input value="aggregate"/>
                   reply
                                             </sort>

                                            </process>
Operational semantics
•   Data links:                           <receivePOST name="orderRcv"
     – Carry single data item by value                  url=“initiateCase" />
     – Implies control and data
       dependency
•   BPEL like execution semantics         <sendMail name="sendToManager" >
     – Graph style                           (…)
     – Dead path elimination and          </sendMail>
       associated restrictions in place
                                          <receive-replyGET name=“MgrApproval”>
•   Control links                             <control value=“sendToManager/>
     – When a dependency is not           </receive-replyGET/>
       associated with data passing
     – E.g. manager approval
       requirement                        <sendMail name="sendToSupplier"
     – Data variables                          address="orderRcv.mfrEmail[0]" …>
•   Data variables                             <control value="MgrApproval"/>
     – Can be combined with data flows         <input value="orderRcv"/>
                                           </sendMail>
A unified flow model
• Bite supports two flow scenarios for the
  Web:

 – Data flows, where aggregation of
   feeds is the main model.

 – Interactive flows, where a flow drives
   a set of Web centric interactions

 – Any combination of the two – we
   believe it does make sense to combine
   data and interaction flows.
Another feed aggregation
      GET FEED                              GET FEED



    Fetch price and                        Fetch customized
   availability updates                         catalog




                      Customized catalog
                          and prices




A document pipeline model
Adding interaction capabilities
Plus primitives to encode
     business logic
Bite: language constructs
Interaction activities        Notes
<receiveGET>, <replyGET>, Also *POST. Receiving and replying to messages coming
<receiveReplyGET>         over HTTP. Contain a relative URL attribute used to match
                          an incoming message.
<GET> <PUT>                   Sending HTTP requests
<POST> <DELETE>
Non interactive steps
<action>                      Call local code
<wait> <empty> <terminate> Utility activities
Control primitives
<while> <foreach>             Iteration
<control>                     Control link.
<input>                       Data dependency that serves as a control link as well if
                              the value is an activity
ATOM Publication Protocol
Atom collection          Resources




                     GET resource    POST to collection URI (new)
GET collection                       resource, returns resource URI
  List of resources in               DELETE to resource URI
ATOM envelope                        eliminates
Bite processes as resources
   Deployed Bite process            Process instances




                            [GET resource     POST to collection (new)
   [GET collection:         Management]       process instance
   Management only]                           DELETE instance: termination
                                              Regular termination is implicit


Collection is an implicit
process instance                                  Note: many resources
factory                                           may be hierarchically
                                                  associated to a process
                                                  instance
Resource oriented model
              lifecycle
              GET collection:                POST to collection:
              Runtime management             Deploys new model

Deployed model collection   Process models




                                                   Deployed Bite process

                                                             ...

                                                                   ...
Data models in Bite
• Feed composition only requires support for one (two) models
  – ATOM (RSS)

• The Web is designed to support an extensible set of data models
  – MIME types
  – HTML, XML, JSON, forms, etc.

• Web flows demand more flexibility: pluggable and dynamically
  adaptable datamodel for supporting different:
  – content types
    • XML, Form content, URL-encoded parameters, JSON, JSON-RPC, text,
      …
  – expression languages for data selection and query
    • Javascript, XPath, …
Extensible activity set
• Extensible tag libraries for high-level,         <aggregateFeeds>
  highly-reusable primitives:                         <input name=“feed1”>
  – Community-based                                   <input name=“feed2”>
  – User-defined: binds XML syntax to code.           …
                                                   </aggregate>
• Enable new activity types to be defined          <email subject=“”>
  directly in the syntax                                  <to>…</to>
  – Similar to ‘ant’, JSPs, etc …                         <cc>…</cc>
                                                          <input…/>
• Steps:                                                 <control …/>
  – Register handler that read/writes/invokes      </email>
  – Optionaly provide human readable description
    for users.
• Does NOT require:
  – Write XML Schemas, fancy tools, etc ..

• Implementation not yet released
The WS-* overhead in Bite
• Not ready to pay the price? Keep it simple

  – Script-like approach to data typing (versus strongly typed
    interfaces)
    • Usage implies definition
    • Errors happen, focus is on short development cycle, typing is optional
  – Standard HTTP interfaces (application defined interfaces)
    • External interactions are resource centric + eMail ☺
  – Single protocol – HTTP (extensible protocol set)
    • All you need – ok, maybe email also.
  – HTTP defines all your interactions QoS (extensible,
    declarative policies)
    • That gets you a long way
  – One tool required: a text editor (many complex tools required
    to manage all required artifacts)
    • Fancier tools are available for the typing challenged
What is available now
1.   Language specification
      Extensive documentation – User Guide, Programming
      Guide
2.   Full runtime implementation
      Currently on ProjectZero.org: tightly architected
      according to Zero principles
      Positions flow model as an extension of the basic Zero
      programming model
3.   Tools:
      Deployment and management interface
      Browser based Delivered with Zero Launch

               http://www.ProjectZero.org/
What is next
• Bite profiles through extensibility
 –     Define new activity sets to capture typical steps in
       focused use cases:
     • Feed manipulation
     • Complex user interaction – full browser support
• Core flow QoS: persistence, recovery
 –     What is the right way to expose these capabilities
• Composite applications beyond flows
Summary
Conclusions
• There is significant value in the PM in the
  large approach
 – Which need not be limited to the enterprise
   application space
• Web application development is slowly
  enabling a “service” approach to
  development
 – Reusing large granularity services
 – How far will it go?
• A challenge and an opportunity for the SOC
  community
Questions?



 Thanks!
Thanks!
Backup slides
Composition takes place all over
    – in different models
                                                                                                                     al data
                                                                                                             Relation
                                                                                                              comp  osition
                                                                       Business
                                              Web Container           Logic Container



          HTTP/REST                                                                   Connectors



                                                        Local or remote
                                                          Calls (IIOP,
                                                           SOAP?)
Browser
          Po                                                                                                     Database
             rta
                   lc                                                                                  ion
                        om                                                                         s it
                                                                                                 po
                             po                                                             om
                                  sit                                                     tc
                                     io                                                 Ne
                                          n                                         a /.
                                                                                 Jav
SOA Composition taking over
     the middle tiers
                                                                                                                     al data
                                                                                                             Relation
                                                                                                              comp  osition
                                                                       Business
                                              Web Container           Logic Container



          HTTP/REST                                                                   Connectors



                                                        Local or remote
                                                          Calls (IIOP,
                                                           SOAP?)
Browser
          Po                                                                                                     Database
             rta
                   lc                                                                                  ion
                        om                                                                         s it
                                                                                                 po
                             po                                                             om
                                  sit                                                     tc
                                     io                                                 Ne
                                          n                                         a /.
                                                                                 Jav
Composition coming to the
           browser
                                                                                                                       al data
                                                                                                               Relation
Browser mas
           h-ups                                                                                                comp  osition
                                                                                 Business
                                                       Web Container            Logic Container



                   HTTP/REST                                                                   Connectors



                                                                 Local or remote
                                                                Calls (IIOP/SOAP?)
Browser
(Javascript/XML) Po                                                                                                Database
                      rta
                            lc                                                                            A
                                 om
                                      po                                                              /SO
                                           sit                                                      HP ition
                                                                                                a /P s
                                              io   n                                         Jav mpo
                                                                                               co
Process-centric programming
      is already here
• Method and page oriented programming has dominated the Web
  – And most enterprise programming models
• Result is that end-to-end character of a process is lost
  – Factored out into a set of separate PHP pages, servlets, session beans. Or have to
    go through an MVC framework
  – Business and compositional logic get fragmented
  – It becomes hard to capture the end-to-end logic of an application, hard to track and
    manage
• The focus of successful frameworks and languages has been in easing the
  DB to HTML access
  – PHP, Ruby on Rails
  – Integration is improved across tiers but business logic integration is neglected
• Process centricity is well accepted in the enterprise in the form of WfMSs,
  modeling tools etc.
  – But is has barely made an impact on Web programming
Successful Web Frameworks
focus on data and presentation
                                                            al data
                                                    Relation
                                                     comp  osition


                          PHP, Rails

                                       Language
             HTTP/REST                 specific
                                       Connectors




   Browser
                                                        Database



                    Com
                   pag positi
                      e ag on i
                          gre     s
                              gat
                                 io
Continuations in Cocoon -
             JavaScript
function sellItem() {                   <form method="post"
  (...)                                   action="continue.#{$cocoon/
var url = "page/getRateAmt";              continuation/id}">
cocoon.sendPageAndWait(url);             <para>Enter Rate:
rate =                                          <input type="text“
  cocoon.request.getParameter("rate"));
                                                name="rate"/></para>
qty =
  cocoon.request.getParameter("qty"));   <para>Enter Quantity:
  (...)                                         <input type="text"
url="page/getZone";                             name="qty"/></para>
cocoon.sendPageAndWait(url,...);          <input type="submit"
zone=cocoon.request.getParameter("zo            name="submit"
  ne");                                         value="Next"/>
  (...)
                                        </form>
Source: http://www-128.ibm.com/developerworks/library/j-contin.html
Continuations
• Also available in:            • BPEL’s pick is the real thing:
 – Cocoon for Java              <pick>
 sendPageAndWait(url);              <onMessage partnerLink="buyer“
                                 ... >
 – Ruby                                <!-- activity to add line item to
  callcc {|cont| return cont}    order -->
  cont.call                        </onMessage>
                                   <onMessage partnerLink="buyer“
 – Jetty 6                       ... >
                                       <!-- activity for order
 – RIFE                          completion -->
                                   </onMessage>
                                   <onAlarm>
                                     <for>'P3DT10H'</for>
                                     <!-- set an alarm after 3d and 10h
                                        to handle timeout for
                                 completion -->
                                   </onAlarm>
Process style applications
• Continuations enable low          • Persistent continuations:
  overhead flow-like                  – Continuations as persistent Web
  programming.                          resources
  – While not assuming thread       • Concurrency
    programming or consuming          – Solutions (Java threads for
    resources unnecessarily             example) are usually too
  – No need to deal with resource       complex, require managing
    contention                          resource contention
• With obvious limitations:           – A native process model – flow or
  – No concurrency                      structured- is likely to be much
  – No persistence                      more usable
  – Unclear how to guarantee        • Transactional flows
    consistent outcomes – no          – Sure, but who really needs that!
    transactional model
• How much of this is really
  needed
  – And how much can we deliver
Groovy DSL Example
package samples.feedsgroovy;

import com.ibm.splice.scripting.*;

def flow() {
    def builder = new FlowBuilder(writer);
    builder.process( name:"feedGroovyExample") {
       receiveGET( name:"rssRcv", url:"getFeeds")
       GET( name:"getYahooFeed",
       target:"'http://newsrss.bbc.co.uk/rss/newsonline_uk_edition/world/rss.xml'") {
            control( source:"rssRcv")
       }
       GET( name:"getBBCFeed", target:"'http://rss.news.yahoo.com/rss/topstories'") {
            control( source:"rssRcv")
       }
       aggregate3( name:"aggregateFeeds" ) {
            input( value:"getBBCFeed")
            input( value:"getYahooFeed")
       }
       sort3( name:"sortFeeds") {
            input( value:"aggregateFeeds")
            input( value:"rssRcv_Output.sortOrder")
       }
       replyGET( name:"rssRply", url:"getFeeds") {
            input( value:"sortFeeds")
       }
    }
}
The SCA implicit runtime
        model
      Portal Service                                                     Business-to-Business Interactions




                     Enterprise Service Bus:
                     Transform, Route, Notify, Augment, Side Effect




    Workflow                    Enterprise    Script, POJO, Stateless                        Distinguished
 Business Activity         Information System      Session Bean                                Services
                                 Adapter
                                                                        Information Mgmt
                                                                          XML Database

More Related Content

PDF
A Flow Based Approach for End to End Mashups
PDF
Designing a Language and System for REST-oriented service composition,as a se...
PDF
Syer Monitoring Integration And Batch
PDF
Service Oriented Architecture (SOA) [2/5] : Enterprise Service Bus
PDF
Integration of Web Service Stacks in an Esb
PDF
oracle-osb
PDF
Spring 3 - An Introduction
PDF
Tripit Ajaxworld V5
A Flow Based Approach for End to End Mashups
Designing a Language and System for REST-oriented service composition,as a se...
Syer Monitoring Integration And Batch
Service Oriented Architecture (SOA) [2/5] : Enterprise Service Bus
Integration of Web Service Stacks in an Esb
oracle-osb
Spring 3 - An Introduction
Tripit Ajaxworld V5

What's hot (20)

PPTX
Where to use OSB
PDF
Introduction and Advanced Concepts of BPEL
PPT
Soa & Bpel
PPTX
SOA for PL/SQL Developer (OPP 2010)
PPT
Oracle Service Bus vs. Oracle Enterprise Service Bus vs. BPEL
PPTX
SOA Suite 12c - Service Bus new features summary
PDF
Oracle OSB Tutorial 2
PPT
Soa bpel-123
PPT
Soa & Bpel With Web Sphere
PPTX
Where and when to use the Oracle Service Bus (OSB)
PPTX
Exchange 2013 ABC's: Architecture, Best Practices and Client Access
PDF
Enterprise Service Bus and JBI
PPTX
To blob or not to blob
PDF
Dave Carroll Application Services Salesforce
PDF
Sqlsat154 maintain your dbs with help from ola hallengren
PDF
PDF
Frank Mantek Google G Data
PDF
2012 04-06-v2-tdp-1163-java e-evsspringshootout-final
PPTX
PDF
The Java Content Repository
Where to use OSB
Introduction and Advanced Concepts of BPEL
Soa & Bpel
SOA for PL/SQL Developer (OPP 2010)
Oracle Service Bus vs. Oracle Enterprise Service Bus vs. BPEL
SOA Suite 12c - Service Bus new features summary
Oracle OSB Tutorial 2
Soa bpel-123
Soa & Bpel With Web Sphere
Where and when to use the Oracle Service Bus (OSB)
Exchange 2013 ABC's: Architecture, Best Practices and Client Access
Enterprise Service Bus and JBI
To blob or not to blob
Dave Carroll Application Services Salesforce
Sqlsat154 maintain your dbs with help from ola hallengren
Frank Mantek Google G Data
2012 04-06-v2-tdp-1163-java e-evsspringshootout-final
The Java Content Repository
Ad

Similar to Bite: Workflow Composition for the Web. Presented at the ICSOC Conference 2007 (20)

PDF
REST Introduction (PHP London)
PDF
Making Your Perl REST
PDF
Creating an Effective Mobile API
PDF
Ditching the Middleware
PDF
FISL: Content Management Primer
PDF
Scientific Social Objects
PDF
Non techie journey in social internet age noiselessinnovation
PDF
Why Integrate using an API? | MuleSoft
PPTX
Mike Taulty OData (NxtGen User Group UK)
ODP
Large scale crawling with Apache Nutch
PDF
Yahoo Pipes Middleware In The Cloud
PPTX
Documentation 2.0: DIY Content Delivery and Feedback in Real-time
PPTX
Doing More with Less: Mash Your Way to Productivity
PPTX
Doing More with Less: Mash Your Way to Productivity
PPT
Future of Content Platforms
PPTX
Steve Watt Presentation
PPT
Service migration
PDF
So you think you know REST - DPC11
PDF
RESTful OGC Services
PPT
RESTful SOA - 中科院暑期讲座
REST Introduction (PHP London)
Making Your Perl REST
Creating an Effective Mobile API
Ditching the Middleware
FISL: Content Management Primer
Scientific Social Objects
Non techie journey in social internet age noiselessinnovation
Why Integrate using an API? | MuleSoft
Mike Taulty OData (NxtGen User Group UK)
Large scale crawling with Apache Nutch
Yahoo Pipes Middleware In The Cloud
Documentation 2.0: DIY Content Delivery and Feedback in Real-time
Doing More with Less: Mash Your Way to Productivity
Doing More with Less: Mash Your Way to Productivity
Future of Content Platforms
Steve Watt Presentation
Service migration
So you think you know REST - DPC11
RESTful OGC Services
RESTful SOA - 中科院暑期讲座
Ad

Recently uploaded (20)

PDF
KodekX | Application Modernization Development
PDF
Review of recent advances in non-invasive hemoglobin estimation
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Electronic commerce courselecture one. Pdf
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Encapsulation theory and applications.pdf
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Encapsulation_ Review paper, used for researhc scholars
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
KodekX | Application Modernization Development
Review of recent advances in non-invasive hemoglobin estimation
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
MYSQL Presentation for SQL database connectivity
Network Security Unit 5.pdf for BCA BBA.
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Electronic commerce courselecture one. Pdf
20250228 LYD VKU AI Blended-Learning.pptx
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Encapsulation theory and applications.pdf
Diabetes mellitus diagnosis method based random forest with bat algorithm
Encapsulation_ Review paper, used for researhc scholars
“AI and Expert System Decision Support & Business Intelligence Systems”
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Dropbox Q2 2025 Financial Results & Investor Presentation
Agricultural_Statistics_at_a_Glance_2022_0.pdf
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx

Bite: Workflow Composition for the Web. Presented at the ICSOC Conference 2007

  • 1. Flow Composition for the Web Francisco Curbera, Matt Duftler, Rania Khalaf, Douglas Lovell Presentation of the paper: Bite: Workflow composition for the web. F Curbera, M Duftler, R Khalaf, D Lovell, Service oriented computing: fifth international conference, Springer, 2007.
  • 2. Outline • Services and resources • Composition • Web flows and flow scenarios • What is next
  • 3. About SOA and the Web
  • 4. Services and Resources • SOA is about composition: process or structural (so far) • SOA assumes: – A two level development and execution environment (atomic services, composite services) – Two standard assembly models, BPEL, SCA • The Web was NOT built on a composition requirement – Assumes HTTP exists, gives clients access to resources – And a few shared data types • REST resources are not compositional – Resources are information oriented: Data composition? – But many resources have “behavior” - drive processes • Process composition for the Web?
  • 5. End-to-end deployment view in SCA Composite Component/Composite Entry Component Component External Point A B Service Wire Wire Wire implementation implementation Composite Composite
  • 6. End-to-end business logic in WS-BPEL Process Partner link WSDL porttype
  • 7. The value of the end-to-end view • Beyond component oriented use/reuse, first class SOA compositions provide an end-to-end view of composite applications • Supports end-to-end configuration, validation, management, etc. – Policy driven configuration • Reduce errors in QoS configuration of distributed components, ensure correctness of complete configuration – End-to-end static analysis, at many levels • Tools check “compatibility” of a set of composed components: functional and non-functional – Runtime monitoring and validation • Uses structural/process topology to interpret monitoring information
  • 8. Some interesting trends • Web mashups – Quickly assemble a new end-user applications by reusing existing ones • Process centric programming – Adding the flow perspective to Web apps: Spring Web Flows, continuations • The Web (REST) interaction model making inroads as an alternative to enterprise models – The SOAP vs POX debate, and other uninteresting debates
  • 9. Mashups • Mash-up is essentially a form of Web application composition – Google maps are consumed and aggregated with additional information – Display final result on browser – Aggregate in the client or the server sides – There are security issues but the idea is simple • Data centric • Composition w/o a component model!
  • 10. SOA capabilities for the Web? • How lightweight can we make it? Who is going to use it? • Common data model? – But we already have one – XML + mime types – XML is already pervasive from the DB to the UI, but it is just one of the relevant data types • Component model? – Reuse is nice, when it works. – Do we need machine readable component definitions? Or just good documentation? – Agree on component interaction primitives based on the resource model (ATOM) • Resource composition – Process oriented – seems unavoidable since processes already run on the Web – Data composition – it is data model dependent, so far – Structural composition (???) – need good use cases probably because so far Web apps usually don’t expand many Web components
  • 11. Bite – Process Composition for the Web
  • 12. Feed Aggregation receive fetchYahooFeed fetchBBCFeed aggregate sort Resource aggregation Relies on a well defined data model –ATOM/RSS reply
  • 13. Feed Aggregation receive REST interaction HTTP GET <GET name=“sort” sortOrder=“…’”/> fetchYahooFeed fetchBBCFeed HTTP GET HTTP GET Call local code (no overhead): <action name=“aggregate” target=“java:com.ibm.Aggregator” aggregate operation=“aggregate”> <input value=“fetchYahooFeed”/> <input value=“fetchBBCFeed”/> </action> sort Use an extension activity: <sort name=“sort” sortOrder=“…’”> <input value=“fetchYahooFeed”/> <input value=“fetchBBCFeed”/> reply </sort>
  • 14. Feed Aggregation <process name="sortSample"> receive <GET name="getYahooFeed“ target="'http://newsrss.bbc.co.uk/etc…'"> </GET> fetchYahooFeed fetchBBCFeed <GET name="getBBCFeed" target="'http://rss.news.yahoo.com/rss/etc..'"> </GET> aggregate <aggregate name="aggregate"> <input value="getBBCFeed"/> <input value="getYahooFeed"/> sort </aggregate> <sort name="sort"> <input value="aggregate"/> reply </sort> </process>
  • 15. Operational semantics • Data links: <receivePOST name="orderRcv" – Carry single data item by value url=“initiateCase" /> – Implies control and data dependency • BPEL like execution semantics <sendMail name="sendToManager" > – Graph style (…) – Dead path elimination and </sendMail> associated restrictions in place <receive-replyGET name=“MgrApproval”> • Control links <control value=“sendToManager/> – When a dependency is not </receive-replyGET/> associated with data passing – E.g. manager approval requirement <sendMail name="sendToSupplier" – Data variables address="orderRcv.mfrEmail[0]" …> • Data variables <control value="MgrApproval"/> – Can be combined with data flows <input value="orderRcv"/> </sendMail>
  • 16. A unified flow model • Bite supports two flow scenarios for the Web: – Data flows, where aggregation of feeds is the main model. – Interactive flows, where a flow drives a set of Web centric interactions – Any combination of the two – we believe it does make sense to combine data and interaction flows.
  • 17. Another feed aggregation GET FEED GET FEED Fetch price and Fetch customized availability updates catalog Customized catalog and prices A document pipeline model
  • 19. Plus primitives to encode business logic
  • 20. Bite: language constructs Interaction activities Notes <receiveGET>, <replyGET>, Also *POST. Receiving and replying to messages coming <receiveReplyGET> over HTTP. Contain a relative URL attribute used to match an incoming message. <GET> <PUT> Sending HTTP requests <POST> <DELETE> Non interactive steps <action> Call local code <wait> <empty> <terminate> Utility activities Control primitives <while> <foreach> Iteration <control> Control link. <input> Data dependency that serves as a control link as well if the value is an activity
  • 21. ATOM Publication Protocol Atom collection Resources GET resource POST to collection URI (new) GET collection resource, returns resource URI List of resources in DELETE to resource URI ATOM envelope eliminates
  • 22. Bite processes as resources Deployed Bite process Process instances [GET resource POST to collection (new) [GET collection: Management] process instance Management only] DELETE instance: termination Regular termination is implicit Collection is an implicit process instance Note: many resources factory may be hierarchically associated to a process instance
  • 23. Resource oriented model lifecycle GET collection: POST to collection: Runtime management Deploys new model Deployed model collection Process models Deployed Bite process ... ...
  • 24. Data models in Bite • Feed composition only requires support for one (two) models – ATOM (RSS) • The Web is designed to support an extensible set of data models – MIME types – HTML, XML, JSON, forms, etc. • Web flows demand more flexibility: pluggable and dynamically adaptable datamodel for supporting different: – content types • XML, Form content, URL-encoded parameters, JSON, JSON-RPC, text, … – expression languages for data selection and query • Javascript, XPath, …
  • 25. Extensible activity set • Extensible tag libraries for high-level, <aggregateFeeds> highly-reusable primitives: <input name=“feed1”> – Community-based <input name=“feed2”> – User-defined: binds XML syntax to code. … </aggregate> • Enable new activity types to be defined <email subject=“”> directly in the syntax <to>…</to> – Similar to ‘ant’, JSPs, etc … <cc>…</cc> <input…/> • Steps: <control …/> – Register handler that read/writes/invokes </email> – Optionaly provide human readable description for users. • Does NOT require: – Write XML Schemas, fancy tools, etc .. • Implementation not yet released
  • 26. The WS-* overhead in Bite • Not ready to pay the price? Keep it simple – Script-like approach to data typing (versus strongly typed interfaces) • Usage implies definition • Errors happen, focus is on short development cycle, typing is optional – Standard HTTP interfaces (application defined interfaces) • External interactions are resource centric + eMail ☺ – Single protocol – HTTP (extensible protocol set) • All you need – ok, maybe email also. – HTTP defines all your interactions QoS (extensible, declarative policies) • That gets you a long way – One tool required: a text editor (many complex tools required to manage all required artifacts) • Fancier tools are available for the typing challenged
  • 27. What is available now 1. Language specification Extensive documentation – User Guide, Programming Guide 2. Full runtime implementation Currently on ProjectZero.org: tightly architected according to Zero principles Positions flow model as an extension of the basic Zero programming model 3. Tools: Deployment and management interface Browser based Delivered with Zero Launch http://www.ProjectZero.org/
  • 28. What is next • Bite profiles through extensibility – Define new activity sets to capture typical steps in focused use cases: • Feed manipulation • Complex user interaction – full browser support • Core flow QoS: persistence, recovery – What is the right way to expose these capabilities • Composite applications beyond flows
  • 30. Conclusions • There is significant value in the PM in the large approach – Which need not be limited to the enterprise application space • Web application development is slowly enabling a “service” approach to development – Reusing large granularity services – How far will it go? • A challenge and an opportunity for the SOC community
  • 34. Composition takes place all over – in different models al data Relation comp osition Business Web Container Logic Container HTTP/REST Connectors Local or remote Calls (IIOP, SOAP?) Browser Po Database rta lc ion om s it po po om sit tc io Ne n a /. Jav
  • 35. SOA Composition taking over the middle tiers al data Relation comp osition Business Web Container Logic Container HTTP/REST Connectors Local or remote Calls (IIOP, SOAP?) Browser Po Database rta lc ion om s it po po om sit tc io Ne n a /. Jav
  • 36. Composition coming to the browser al data Relation Browser mas h-ups comp osition Business Web Container Logic Container HTTP/REST Connectors Local or remote Calls (IIOP/SOAP?) Browser (Javascript/XML) Po Database rta lc A om po /SO sit HP ition a /P s io n Jav mpo co
  • 37. Process-centric programming is already here • Method and page oriented programming has dominated the Web – And most enterprise programming models • Result is that end-to-end character of a process is lost – Factored out into a set of separate PHP pages, servlets, session beans. Or have to go through an MVC framework – Business and compositional logic get fragmented – It becomes hard to capture the end-to-end logic of an application, hard to track and manage • The focus of successful frameworks and languages has been in easing the DB to HTML access – PHP, Ruby on Rails – Integration is improved across tiers but business logic integration is neglected • Process centricity is well accepted in the enterprise in the form of WfMSs, modeling tools etc. – But is has barely made an impact on Web programming
  • 38. Successful Web Frameworks focus on data and presentation al data Relation comp osition PHP, Rails Language HTTP/REST specific Connectors Browser Database Com pag positi e ag on i gre s gat io
  • 39. Continuations in Cocoon - JavaScript function sellItem() { <form method="post" (...) action="continue.#{$cocoon/ var url = "page/getRateAmt"; continuation/id}"> cocoon.sendPageAndWait(url); <para>Enter Rate: rate = <input type="text“ cocoon.request.getParameter("rate")); name="rate"/></para> qty = cocoon.request.getParameter("qty")); <para>Enter Quantity: (...) <input type="text" url="page/getZone"; name="qty"/></para> cocoon.sendPageAndWait(url,...); <input type="submit" zone=cocoon.request.getParameter("zo name="submit" ne"); value="Next"/> (...) </form> Source: http://www-128.ibm.com/developerworks/library/j-contin.html
  • 40. Continuations • Also available in: • BPEL’s pick is the real thing: – Cocoon for Java <pick> sendPageAndWait(url); <onMessage partnerLink="buyer“ ... > – Ruby <!-- activity to add line item to callcc {|cont| return cont} order --> cont.call </onMessage> <onMessage partnerLink="buyer“ – Jetty 6 ... > <!-- activity for order – RIFE completion --> </onMessage> <onAlarm> <for>'P3DT10H'</for> <!-- set an alarm after 3d and 10h to handle timeout for completion --> </onAlarm>
  • 41. Process style applications • Continuations enable low • Persistent continuations: overhead flow-like – Continuations as persistent Web programming. resources – While not assuming thread • Concurrency programming or consuming – Solutions (Java threads for resources unnecessarily example) are usually too – No need to deal with resource complex, require managing contention resource contention • With obvious limitations: – A native process model – flow or – No concurrency structured- is likely to be much – No persistence more usable – Unclear how to guarantee • Transactional flows consistent outcomes – no – Sure, but who really needs that! transactional model • How much of this is really needed – And how much can we deliver
  • 42. Groovy DSL Example package samples.feedsgroovy; import com.ibm.splice.scripting.*; def flow() { def builder = new FlowBuilder(writer); builder.process( name:"feedGroovyExample") { receiveGET( name:"rssRcv", url:"getFeeds") GET( name:"getYahooFeed", target:"'http://newsrss.bbc.co.uk/rss/newsonline_uk_edition/world/rss.xml'") { control( source:"rssRcv") } GET( name:"getBBCFeed", target:"'http://rss.news.yahoo.com/rss/topstories'") { control( source:"rssRcv") } aggregate3( name:"aggregateFeeds" ) { input( value:"getBBCFeed") input( value:"getYahooFeed") } sort3( name:"sortFeeds") { input( value:"aggregateFeeds") input( value:"rssRcv_Output.sortOrder") } replyGET( name:"rssRply", url:"getFeeds") { input( value:"sortFeeds") } } }
  • 43. The SCA implicit runtime model Portal Service Business-to-Business Interactions Enterprise Service Bus: Transform, Route, Notify, Augment, Side Effect Workflow Enterprise Script, POJO, Stateless Distinguished Business Activity Information System Session Bean Services Adapter Information Mgmt XML Database