bite: workflow composition for the web. presented at the icsoc conference 2007
DESCRIPTION
Presentation with the paper: Bite: Workflow composition for the web. F Curbera, M Duftler, R Khalaf, D Lovell, Service oriented computing: fifth international conference, Springer, 2007.TRANSCRIPT
![Page 1: Bite: Workflow Composition for the Web. Presented at the ICSOC Conference 2007](https://reader033.vdocuments.site/reader033/viewer/2022052900/5560c008d8b42af43b8b5351/html5/thumbnails/1.jpg)
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.
![Page 2: Bite: Workflow Composition for the Web. Presented at the ICSOC Conference 2007](https://reader033.vdocuments.site/reader033/viewer/2022052900/5560c008d8b42af43b8b5351/html5/thumbnails/2.jpg)
Outline
• Services and resources
• Composition
• Web flows and flow scenarios
• What is next
![Page 3: Bite: Workflow Composition for the Web. Presented at the ICSOC Conference 2007](https://reader033.vdocuments.site/reader033/viewer/2022052900/5560c008d8b42af43b8b5351/html5/thumbnails/3.jpg)
About SOA and the Web
![Page 4: Bite: Workflow Composition for the Web. Presented at the ICSOC Conference 2007](https://reader033.vdocuments.site/reader033/viewer/2022052900/5560c008d8b42af43b8b5351/html5/thumbnails/4.jpg)
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?
![Page 5: Bite: Workflow Composition for the Web. Presented at the ICSOC Conference 2007](https://reader033.vdocuments.site/reader033/viewer/2022052900/5560c008d8b42af43b8b5351/html5/thumbnails/5.jpg)
End-to-end deployment view in SCA
Component/Composite
Component
B
Component
A
Composite
Composite
Entry
Point
implementation
implementation
WireWireWire
Composite
External
Service
![Page 6: Bite: Workflow Composition for the Web. Presented at the ICSOC Conference 2007](https://reader033.vdocuments.site/reader033/viewer/2022052900/5560c008d8b42af43b8b5351/html5/thumbnails/6.jpg)
End-to-end business logic in WS-BPEL
Partner link
WSDL porttype
Process
![Page 7: Bite: Workflow Composition for the Web. Presented at the ICSOC Conference 2007](https://reader033.vdocuments.site/reader033/viewer/2022052900/5560c008d8b42af43b8b5351/html5/thumbnails/7.jpg)
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
![Page 8: Bite: Workflow Composition for the Web. Presented at the ICSOC Conference 2007](https://reader033.vdocuments.site/reader033/viewer/2022052900/5560c008d8b42af43b8b5351/html5/thumbnails/8.jpg)
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
![Page 9: Bite: Workflow Composition for the Web. Presented at the ICSOC Conference 2007](https://reader033.vdocuments.site/reader033/viewer/2022052900/5560c008d8b42af43b8b5351/html5/thumbnails/9.jpg)
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!
![Page 10: Bite: Workflow Composition for the Web. Presented at the ICSOC Conference 2007](https://reader033.vdocuments.site/reader033/viewer/2022052900/5560c008d8b42af43b8b5351/html5/thumbnails/10.jpg)
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
![Page 11: Bite: Workflow Composition for the Web. Presented at the ICSOC Conference 2007](https://reader033.vdocuments.site/reader033/viewer/2022052900/5560c008d8b42af43b8b5351/html5/thumbnails/11.jpg)
Bite – Process Composition for the Web
![Page 12: Bite: Workflow Composition for the Web. Presented at the ICSOC Conference 2007](https://reader033.vdocuments.site/reader033/viewer/2022052900/5560c008d8b42af43b8b5351/html5/thumbnails/12.jpg)
Feed Aggregation
receive
fetchYahooFeed fetchBBCFeed
aggregate
sort
reply
Resource aggregationRelies on a well defined data model –ATOM/RSS
![Page 13: Bite: Workflow Composition for the Web. Presented at the ICSOC Conference 2007](https://reader033.vdocuments.site/reader033/viewer/2022052900/5560c008d8b42af43b8b5351/html5/thumbnails/13.jpg)
Feed Aggregation
receive
fetchYahooFeed fetchBBCFeed
aggregate
sort
reply
HTTP GET
HTTP GET
HTTP GET
Call local code (no overhead):<action name=“aggregate” target=“java:com.ibm.Aggregator”
operation=“aggregate”><input value=“fetchYahooFeed”/><input value=“fetchBBCFeed”/>
</action>
Use an extension activity:<sort name=“sort” sortOrder=“…’”>
<input value=“fetchYahooFeed”/><input value=“fetchBBCFeed”/>
</sort>
REST interaction<GET name=“sort” sortOrder=“…’”/>
![Page 14: Bite: Workflow Composition for the Web. Presented at the ICSOC Conference 2007](https://reader033.vdocuments.site/reader033/viewer/2022052900/5560c008d8b42af43b8b5351/html5/thumbnails/14.jpg)
Feed Aggregation
receive
fetchYahooFeed fetchBBCFeed
aggregate
sort
reply
<process name="sortSample">
<GET name="getYahooFeed“target="'http://newsrss.bbc.co.uk/etc…'">
</GET>
<GET name="getBBCFeed"target="'http://rss.news.yahoo.com/rss/etc..'">
</GET>
<aggregate name="aggregate"><input value="getBBCFeed"/><input value="getYahooFeed"/>
</aggregate>
<sort name="sort"><input value="aggregate"/>
</sort>
</process>
![Page 15: Bite: Workflow Composition for the Web. Presented at the ICSOC Conference 2007](https://reader033.vdocuments.site/reader033/viewer/2022052900/5560c008d8b42af43b8b5351/html5/thumbnails/15.jpg)
Operational semantics
• Data links:– Carry single data item by value– Implies control and data
dependency
• BPEL like execution semantics– Graph style– Dead path elimination and
associated restrictions in place
• Control links– When a dependency is not
associated with data passing– E.g. manager approval
requirement– Data variables
• Data variables– Can be combined with data flows
<receivePOST name="orderRcv" url=“initiateCase" />
<sendMail name="sendToManager" >(…)
</sendMail>
<receive-replyGET name=“MgrApproval”><control value=“sendToManager/>
</receive-replyGET/>
<sendMail name="sendToSupplier" address="orderRcv.mfrEmail[0]" …><control value="MgrApproval"/><input value="orderRcv"/>
</sendMail>
![Page 16: Bite: Workflow Composition for the Web. Presented at the ICSOC Conference 2007](https://reader033.vdocuments.site/reader033/viewer/2022052900/5560c008d8b42af43b8b5351/html5/thumbnails/16.jpg)
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.
![Page 17: Bite: Workflow Composition for the Web. Presented at the ICSOC Conference 2007](https://reader033.vdocuments.site/reader033/viewer/2022052900/5560c008d8b42af43b8b5351/html5/thumbnails/17.jpg)
Another feed aggregation
Fetch customized
catalog
Customized catalog
and prices
Fetch price and
availability updates
GET FEEDGET FEED
A document pipeline model
![Page 18: Bite: Workflow Composition for the Web. Presented at the ICSOC Conference 2007](https://reader033.vdocuments.site/reader033/viewer/2022052900/5560c008d8b42af43b8b5351/html5/thumbnails/18.jpg)
Adding interaction capabilities
![Page 19: Bite: Workflow Composition for the Web. Presented at the ICSOC Conference 2007](https://reader033.vdocuments.site/reader033/viewer/2022052900/5560c008d8b42af43b8b5351/html5/thumbnails/19.jpg)
Plus primitives to encode business logic
![Page 20: Bite: Workflow Composition for the Web. Presented at the ICSOC Conference 2007](https://reader033.vdocuments.site/reader033/viewer/2022052900/5560c008d8b42af43b8b5351/html5/thumbnails/20.jpg)
Bite: language constructs
Control primitives
Non interactive steps
Utility activities<wait> <empty> <terminate>
Data dependency that serves as a control link as well if the value is an activity
<input>
Control link. <control>
Iteration<while> <foreach>
Call local code<action>
Sending HTTP requests<GET> <PUT>
<POST> <DELETE>
Also *POST. Receiving and replying to messages coming over HTTP. Contain a relative URL attribute used to match an incoming message.
<receiveGET>, <replyGET>,
<receiveReplyGET>
NotesInteraction activities
![Page 21: Bite: Workflow Composition for the Web. Presented at the ICSOC Conference 2007](https://reader033.vdocuments.site/reader033/viewer/2022052900/5560c008d8b42af43b8b5351/html5/thumbnails/21.jpg)
ATOM Publication Protocol
Atom collection Resources
GET collection�List of resources inATOM envelope
GET resource POST to collection URI �(new) resource, returns resource URIDELETE to resource URI eliminates
![Page 22: Bite: Workflow Composition for the Web. Presented at the ICSOC Conference 2007](https://reader033.vdocuments.site/reader033/viewer/2022052900/5560c008d8b42af43b8b5351/html5/thumbnails/22.jpg)
Bite processes as resources
Deployed Bite process Process instances
[GET collection:Management only]
[GET resourceManagement]
POST to collection ����(new)
process instanceDELETE instance: terminationRegular termination is implicit
Note: many resources may be hierarchically associated to a process instance
Collection is an implicit process instance factory
![Page 23: Bite: Workflow Composition for the Web. Presented at the ICSOC Conference 2007](https://reader033.vdocuments.site/reader033/viewer/2022052900/5560c008d8b42af43b8b5351/html5/thumbnails/23.jpg)
Resource oriented model lifecycle
Deployed model collection Process models
Deployed Bite process
...
...
GET collection:Runtime management
POST to collection:Deploys new model
![Page 24: Bite: Workflow Composition for the Web. Presented at the ICSOC Conference 2007](https://reader033.vdocuments.site/reader033/viewer/2022052900/5560c008d8b42af43b8b5351/html5/thumbnails/24.jpg)
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, …
![Page 25: Bite: Workflow Composition for the Web. Presented at the ICSOC Conference 2007](https://reader033.vdocuments.site/reader033/viewer/2022052900/5560c008d8b42af43b8b5351/html5/thumbnails/25.jpg)
Extensible activity set
• Extensible tag libraries for high-level, highly-reusable primitives:– Community-based– User-defined: binds XML syntax to code.
• Enable new activity types to be defined directly in the syntax– Similar to ‘ant’, JSPs, etc …
• Steps:– Register handler that read/writes/invokes– Optionaly provide human readable description
for users.
• Does NOT require:– Write XML Schemas, fancy tools, etc ..
• Implementation not yet released
<aggregateFeeds> <input name=“feed1”><input name=“feed2”>…
</aggregate>
<email subject=“”><to>…</to> <cc>…</cc><input…/><control …/>
</email>
![Page 26: Bite: Workflow Composition for the Web. Presented at the ICSOC Conference 2007](https://reader033.vdocuments.site/reader033/viewer/2022052900/5560c008d8b42af43b8b5351/html5/thumbnails/26.jpg)
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
![Page 27: Bite: Workflow Composition for the Web. Presented at the ICSOC Conference 2007](https://reader033.vdocuments.site/reader033/viewer/2022052900/5560c008d8b42af43b8b5351/html5/thumbnails/27.jpg)
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/
![Page 28: Bite: Workflow Composition for the Web. Presented at the ICSOC Conference 2007](https://reader033.vdocuments.site/reader033/viewer/2022052900/5560c008d8b42af43b8b5351/html5/thumbnails/28.jpg)
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
![Page 29: Bite: Workflow Composition for the Web. Presented at the ICSOC Conference 2007](https://reader033.vdocuments.site/reader033/viewer/2022052900/5560c008d8b42af43b8b5351/html5/thumbnails/29.jpg)
Summary
![Page 30: Bite: Workflow Composition for the Web. Presented at the ICSOC Conference 2007](https://reader033.vdocuments.site/reader033/viewer/2022052900/5560c008d8b42af43b8b5351/html5/thumbnails/30.jpg)
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
![Page 31: Bite: Workflow Composition for the Web. Presented at the ICSOC Conference 2007](https://reader033.vdocuments.site/reader033/viewer/2022052900/5560c008d8b42af43b8b5351/html5/thumbnails/31.jpg)
Thanks!
Questions?
![Page 32: Bite: Workflow Composition for the Web. Presented at the ICSOC Conference 2007](https://reader033.vdocuments.site/reader033/viewer/2022052900/5560c008d8b42af43b8b5351/html5/thumbnails/32.jpg)
Thanks!
![Page 33: Bite: Workflow Composition for the Web. Presented at the ICSOC Conference 2007](https://reader033.vdocuments.site/reader033/viewer/2022052900/5560c008d8b42af43b8b5351/html5/thumbnails/33.jpg)
Backup slides
![Page 34: Bite: Workflow Composition for the Web. Presented at the ICSOC Conference 2007](https://reader033.vdocuments.site/reader033/viewer/2022052900/5560c008d8b42af43b8b5351/html5/thumbnails/34.jpg)
Composition takes place all over – in different models
Browser
Business
Logic Container
Database
Web Container
HTTP/REST Connectors
Local or remote Calls (IIOP,
SOAP?)
Java/.Net c
omposition
Portal composition
Relational data
composition
![Page 35: Bite: Workflow Composition for the Web. Presented at the ICSOC Conference 2007](https://reader033.vdocuments.site/reader033/viewer/2022052900/5560c008d8b42af43b8b5351/html5/thumbnails/35.jpg)
SOA Composition taking over the middle tiers
Browser
Business
Logic Container
Database
Web Container
HTTP/REST Connectors
Local or remote Calls (IIOP,
SOAP?)
Java/.Net c
omposition
Portal composition
Relational data
composition
![Page 36: Bite: Workflow Composition for the Web. Presented at the ICSOC Conference 2007](https://reader033.vdocuments.site/reader033/viewer/2022052900/5560c008d8b42af43b8b5351/html5/thumbnails/36.jpg)
Composition coming to the browser
Browser(Javascript/XML)
Business
Logic Container
Database
Web Container
HTTP/REST Connectors
Local or remote Calls (IIOP/SOAP?)
Java/PHP/SOA
composition
Portal composition
Relational data
compositionBrowser mash-ups
![Page 37: Bite: Workflow Composition for the Web. Presented at the ICSOC Conference 2007](https://reader033.vdocuments.site/reader033/viewer/2022052900/5560c008d8b42af43b8b5351/html5/thumbnails/37.jpg)
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
![Page 38: Bite: Workflow Composition for the Web. Presented at the ICSOC Conference 2007](https://reader033.vdocuments.site/reader033/viewer/2022052900/5560c008d8b42af43b8b5351/html5/thumbnails/38.jpg)
Successful Web Frameworks focus on data and presentation
Browser
Database
PHP, Rails
HTTP/REST
Language specific Connectors
Composition is
page aggregatio
Relational data
composition
![Page 39: Bite: Workflow Composition for the Web. Presented at the ICSOC Conference 2007](https://reader033.vdocuments.site/reader033/viewer/2022052900/5560c008d8b42af43b8b5351/html5/thumbnails/39.jpg)
Continuations in Cocoon -JavaScript
function sellItem() {(...)
var url = "page/getRateAmt";cocoon.sendPageAndWait(url);rate =
cocoon.request.getParameter("rate"));qty =
cocoon.request.getParameter("qty"));(...)
url="page/getZone";cocoon.sendPageAndWait(url,...);zone=cocoon.request.getParameter("zo
ne");(...)
<form method="post" action="continue.#{$cocoon/continuation/id}">
<para>Enter Rate: <input type="text“name="rate"/></para>
<para>Enter Quantity: <input type="text" name="qty"/></para>
<input type="submit" name="submit" value="Next"/>
</form>Source: http://www-128.ibm.com/developerworks/library/j-contin.html
![Page 40: Bite: Workflow Composition for the Web. Presented at the ICSOC Conference 2007](https://reader033.vdocuments.site/reader033/viewer/2022052900/5560c008d8b42af43b8b5351/html5/thumbnails/40.jpg)
Continuations
• BPEL’s pick is the real thing:<pick>
<onMessage partnerLink="buyer“... >
<!-- activity to add line item to order --></onMessage><onMessage partnerLink="buyer“
... ><!-- activity for order
completion --></onMessage><onAlarm>
<for>'P3DT10H'</for><!-- set an alarm after 3d and 10h
to handle timeout for completion --></onAlarm>
• Also available in:– Cocoon for JavasendPageAndWait(url);
– Rubycallcc {|cont| return cont}cont.call
– Jetty 6
– RIFE
![Page 41: Bite: Workflow Composition for the Web. Presented at the ICSOC Conference 2007](https://reader033.vdocuments.site/reader033/viewer/2022052900/5560c008d8b42af43b8b5351/html5/thumbnails/41.jpg)
Process style applications
• Continuations enable low overhead flow-like programming.– While not assuming thread
programming or consuming resources unnecessarily
– No need to deal with resource contention
• With obvious limitations:– No concurrency– No persistence – Unclear how to guarantee
consistent outcomes – no transactional model
• How much of this is really needed– And how much can we deliver
• Persistent continuations:– Continuations as persistent Web
resources
• Concurrency– Solutions (Java threads for
example) are usually too complex, require managing resource contention
– A native process model – flow or structured- is likely to be much more usable
• Transactional flows– Sure, but who really needs that!
![Page 42: Bite: Workflow Composition for the Web. Presented at the ICSOC Conference 2007](https://reader033.vdocuments.site/reader033/viewer/2022052900/5560c008d8b42af43b8b5351/html5/thumbnails/42.jpg)
Groovy DSL Examplepackage 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")
}
}
}
![Page 43: Bite: Workflow Composition for the Web. Presented at the ICSOC Conference 2007](https://reader033.vdocuments.site/reader033/viewer/2022052900/5560c008d8b42af43b8b5351/html5/thumbnails/43.jpg)
The SCA implicit runtime model
Enterprise Service Bus: Transform, Route, Notify, Augment, Side Effect
Portal Service
WorkflowBusiness Activity
Business-to-Business Interactions
Enterprise Information System
Adapter
Script, POJO, Stateless Session Bean
DistinguishedServices
Information MgmtXML Database