Implementing data sync apis for mibile apps @cloudconf
A Step-By-Step Debugging Technique To Facilitate Mashup Development and Maintenance
1. A Step-By-Step Debugging Technique
To Facilitate Mashup Development and
Maintenance
Waldemar Hummer, Philipp Leitner, Schahram Dustdar
Distributed Systems Group, Vienna University of Technology
4th International Workshop on Web APIs and Services Mashups
8th IEEE European Conference on Web Services
December 1, 2010
3. Motivation
Mashups combine data from heterogeneous Web sources
Clear vision of the desired output
Trade-off between abstraction and flexibility [10]
Proposed Simplifications
• Domain-Specific Languages (e.g., [7,15])
• Approaches for non-programmers (e.g., table-based [13,23])
In any case, arbitrarily querying/combining data is complex
• Complexity of mashup programming can pose a barrier [24]
• „The biggest problem of mashup is the data“ [14]
• Further challenge: non-integrity of data, evolution of data sources
Focus on development and debugging process
• SW-Engineering techniques not well-supported for Mashups [10]
• Important aspect: lack of support for interactive debugging [17]
Demand for integrated mashup debugging facilities
3
4. WS-Aggregation
Aggregation of heterogeneous Web services data
Loose coupling
• Data sources stored in registry [16]
Scalable, distributed execution [11]
• Configurable distribution strategies
• Ad-hoc aggregator topologies
Web services Aggregation Query Language (WAQL)
• Based on XQuery
• Integration of non-XML data sources (e.g., CSV, JSON, HTML, ...)
• Expressing data dependencies
• Possibility to generate sub-requests from templates
Mashup Definition
1. Set of inputs for sub-requests {s1, s2, ..., sn}
2. WAQL Queries for transforming results
3. Data dependencies between sub-requests 4
5. Mashup Scenario
Tourist information mashup
• Input: city, date
• Output: visa information, hotel rooms, wheather forecast
5
6. Mashup Scenario (2)
Request Input (HTTP GET):
/getVisaInfo?c=${//country}
Data Source Response:
..<div id="visas">...</div>..
Preparation Query:
<visaInfo>
{//div[@id=’visas’]/node()}
</visaInfo>
Prepared Data Source Result:
<visaInfo>...</visaInfo>
Query Types
Query Type Applied when? Applied to what?
Preparation Query immediately data source response
Intermediate Query before passing data to parent aggregator all prepared DS results
Finalization Query before returning data to client all prepared DS results
6
7. Data Dependencies
Request Input (HTTP GET):
/getVisaInfo?c=${//country}
Data Dependency
resolved
at runtime
Data
Dependency
Graph Explicit Dependency:
/getVisaInfo?
c=$1{//country}
7
8. Generated Inputs
Request Input (HTTP GET):
/getRooms?
h=$(${//hotelName/text()})
&d=${date}
Data Dependency: ${...}
Generated Inputs: $(...)
resolved
at runtime
8
9. Mashup Debugging
Debugging considered a core domain of SW-Engineering
Different goals and purposes [25], e.g.:
• Asserting expectations
• Detecting anomalies
• Tracking origins
Ultimate Goal: Fixing a Defect
• Defects in mashups:
− Data source(s) unavailable
− Data mistakenly dropped
− Data falsely added
− Data improperly transformed
Different stages
• During development
• When underlying data sources change (→ maintenance)
9
10. Asserting expectations
Specify XQuery (or XPath) expressions that need to
evaluate to true.
Apply assertion Evaluate assertion
to response or before or after
total result? applying query?
When should
the assertion
be evaluated?
# Assertion Expression [E]nd / Data [R]esponse / [B]efore /
Source ID [T]otal Result [A]fter
1 count(//div[@id=’hotels’]/div)<=5 E T A
2 //div[@id=’visaInfo’]/b/text() E T A
3 //div[@id=’wheather’][a[1]/text()][a[2]/text()] E T A
4 every $h in //hotelName/text() satisfies E T B
//hotel[name=$h]/rooms
5 string-length(//country/name)>0 1 R B
6 every $r in //row satisfies count($r/col)>=3 4 R A
10
13. GUI Integration
4 views: Design, Debug, Result (source), Preview (HTML)
GUI indicates anomalies and possible origins
Integrated support for top-down development 13
14. Conclusion
Mashup development remains complex
• Demand for enhanced testing and debugging techniques
WS-Aggregation
• Framework for mashup definition and distributed execution
• Query language WAQL
• Integration of non-XML data sources
• Data dependencies, generated inputs
Debugging aspects
• Asserting expectations
• Detecting anomalies
• Tracking origins
Benefits of explicit debugging support
• Detects and locates anomalies
• Enables top-down development
• Facilitates maintenance
14
18. References
[7] F. Curbera, M. Duftler, R. Khalaf, and D. Lovell. Bite: Workflow composition for the web.
In International Conference on Service-Oriented Computing, pages 94–106, Berlin,
Heidelberg, 2007. Springer-Verlag.
[10] L. Grammel and M.-A. Storey. An end user perspective on mashup makers. Technical
Report DCS-324-IR, University of Victoria, 2008.
[11] W. Hummer, P. Leitner, and S. Dustdar. WS-Aggregation: Distributed Aggregation of
Web Services Data. In 26th Symposium On Applied Computing (SAC), March 21-25, 2011.
To appear.
[14] X. Liu, Y. Hui, W. Sun, and H. Liang. Towards Service Composition Based on Mashup.
In IEEE Congress on Services, pages 332 –339, July 2007.
[15] E. M. Maximilien, H. Wilkinson, N. Desai, and S. Tai. A Domain-Specific Language for
Web APIs and Services Mashups. In Int. Conference on Service-Oriented Computing,
pages 13–26. Springer, 2007.
[16] A. Michlmayr, F. Rosenberg, P. Leitner, and S. Dustdar. End-to-End Support for QoS-
Aware Service Selection, Binding and Mediation in VRESCo. IEEE Transactions on
Services Computing, 3(3):193–205, 2010.
[23] G. Wang, S. Yang, and Y. Han. Mashroom: end-user mashup programming using
nested tables. In 18th International Conference on World Wide Web, pages 861–870, New
York, USA. ACM, 2009.
18