Country/region [ select ]
Home Business solutions IT services Products Support & downloads My IBM
CAS Worldwide Homepage
Overview Technology Showcase Technical Papers Workshops Schedule at a Glance Speakers by Day
CASCON technology showcase CASCON technical papers An amazing range of technology innovations as The technical papers program features experience well as a showcase of research results. Come to reports and original research papers. Best Paper browse the displays and talk to developers and and Best Student Paper awards will be presented Registration is now closed. CASCON 2009 will take place researchers from industry and academia. at Tuesday morning's keynote session. on November 2-5. Learn more Learn more CASCON 2008 Highlights
Highlights and video on CASCON speakers ITWorldCanada CASCON workshops Keynote and Frontiers of Software Practice More info From hands-on learning to tutorials to panel presentations by innovators and thought-leaders discussions, CASCON workshops give you a great on topics of world-changing impact. Don't miss Read the highlights article opportunity to acquire new skills and participate in them! View (28kb) lively discussions. Learn more Get Adobe® Reader® Learn more
Navigation and resources
CASCON 2008 Resources Related links CASCON events CASCON 2008 Videos Registration & sign-in Hotel information IBM University Relations CASCONcamp demo camp Watch full-length videos from Full papers Sponsors Programming Contest High school competition the conference CASCON 2008 Program Contacts Central Click here Committee
CASCON Proceedings CASCON Proceedings are available on the
ACM Digital Library
Related information CASCON archives
CASCON mailing list Subscribe/Unsubscribe to CASCON mailing list
About IBM Privacy Contact Terms of use Country/region [ select ]
Home Business solutions IT services Products Support & downloads My IBM
CAS Worldwide Homepage
Overview Technology Showcase Technical Papers Workshops Schedule at a Glance Speakers by Day
CASCON technology showcase CASCON technical papers An amazing range of technology innovations as The technical papers program features experience well as a showcase of research results. Come to reports and original research papers. Best Paper browse the displays and talk to developers and and Best Student Paper awards will be presented Registration is now closed. CASCON 2009 will take place researchers from industry and academia. at Tuesday morning's keynote session. on November 2-5. Learn more Learn more CASCON 2008 Highlights
Highlights and video on CASCON speakers ITWorldCanada CASCON workshops Keynote and Frontiers of Software Practice More info From hands-on learning to tutorials to panel presentations by innovators and thought-leaders discussions, CASCON workshops give you a great on topics of world-changing impact. Don't miss Read the highlights article opportunity to acquire new skills and participate in them! View (28kb) lively discussions. Learn more Get Adobe® Reader® Learn more
Navigation and resources
CASCON 2008 Resources Related links CASCON events CASCON 2008 Videos Registration & sign-in Hotel information IBM University Relations CASCONcamp demo camp Watch full-length videos from Full papers Sponsors Programming Contest High school competition the conference CASCON 2008 Program Contacts Central Click here Committee
CASCON Proceedings CASCON Proceedings are available on the
ACM Digital Library
Related information CASCON archives
CASCON mailing list Subscribe/Unsubscribe to CASCON mailing list
About IBM Privacy Contact Terms of use Country/region [ select ]
Home Business solutions IT services Products Support & downloads My IBM
CAS Worldwide Homepage
Overview Technology Showcase Technical Papers Workshops Schedule at a Glance Speakers by Day
CASCON Technology Showcase Database Technologies Education and Information Registration is now closed. Middleware Technologies CASCON 2009 will take place Services Science and SOA on November 2-5. User Technologies CASCON 2008 Highlights Highlights and video on ITWorldCanada
Database technologies More info An XML Index Advisor for DB2 Read the highlights article XML indexes can significantly improve workload execution performance. We have developed an XML Index Advisor for DB2 that View (28kb) helps in choosing the best indexes configuration for a given workload. In this demonstration, we showcase two new DB2 optimizer modes, the index recommendation process, and the effectiveness of the recommended indexes. Get Adobe® Reader®
http://www.cs.uwaterloo.ca/~ielghand/
Cost-Aware Dynamic Provisioning for Performance and Power Management We introduce a novel cost-aware dynamic provisioning approach for the database tier of a dynamic content site. Our approach CASCON 2008 Videos employs SVM regression for learning an adaptive system model. We leverage this model for a cost-aware provisioning technique Watch full-length videos from using a utility function expressing monetary costs for both performance and power. the conference
madalin@cs.toronto.edu Click here
DescribeX: Pattern Discovery in Large XML Collections Where an XML collection's structure is not represented by its schema, structural summaries are coarse partitions that can be CASCON Proceedings refined to reveal substructures. DescribeX is an interactive Eclipse-based tool for creating and refining structural summaries CASCON Proceedings are formulated using "axis path regular expressions" (AxPREs) that is capable of handling multi-gigabyte XML collections. available on the
[email protected] ACM Digital Library Dynamic Load Balancing using DB2 9.5 for Linux, UNIX, Windows (LUW) Data Servers and WebSphere Edge Components Related information Edge components, part of the WAS Network Deployment (ND) offering, are typically used to control client access to Web servers. CASCON archives In this exhibit, we demonstrate how Edge components can be used for availability, to load balance DB2 Clients among multiple DB2 Servers based on performance metrics, or using access control rules. CASCON mailing list adesilva@ca.ibm.com Subscribe/Unsubscribe to Enforcement of Performance Objectives for Database Workload Classes CASCON mailing list Competing workloads in a database management system need differentiated levels of service for a better performance. We present an external mechanism, which, in conjunction with DB2's comprehensive workload management features (WLM), will control the throttling provided by WLM to achieve customer-specified performance objectives for different classes of work. [email protected]
Index Structures for XML Databases Survey of the available XML data indexing schemes advantages and disadvantages in terms of size and scalability, query answering power, and updatability. We present areas of potential future research in this technology, as well as the challenges of indexing XML data.
Lightweight Problem Determination for DB2 In our project, we explore the feasibility and performance of lightweight problem determination based on stream mining techniques. We have developed a problem determination tool based on these techniques to minimize the expensive consumption of system resources and frequent interference with observed systems.
Meta-Heuristic Based Tests of DB2 Optimizer This project aims to define and implement the process of SQL test case generation by using meta-heuristics. Different evolutionary approaches like ant colony or genetic algorithm will be also considered. The selection and design of test cases to be generated will be addressed in the context of static analysis of source languages, static analysis, grammar analysis, and impact analysis.
Back to top
Education and Information IBM Academic Initiative The IBM Academic Initiative is an innovative program to partner with colleges and universities worldwide to better educate students for a more competitive information technology workforce. The Academic Initiative provides a broad range of offerings and benefits to professors and students, including the latest technologies in IBM software, hardware, course materials, training, technical support, and other resources.
www.ibm.com/university/academicinitiative/
IBM High School Programming Contest Central Student-run initiative to promote computer science and encourage high school students to get involved in programming contests.
Lessons Learned: Database Applications as Learning Vehicles for College Students Seneca College students in a Computer Engineering database course have built simple applications in small teams to enhance and demonstrate their SQL, process, I/F and team work skills. About fifty such projects have been reviewed and some insights have been gained into how these experiential learning experiences contribute towards graduates' IT careers.
www.senecac.on.ca/cms/
Leveraging Diversity: A Solution to the Labour and Skills Shortages in the ICT & IT Sectors The exhibit is based on a report that offers solutions to the labour shortage and critical skills shortage problems that the IT & ICT sectors face. This is important for CASCON audience members who are interested in their companies' long-term survival in the 'competition for global talent'.
Managing DITA Relationship Tables DITA relationship tables are both one of the clearest strengths of authoring in DITA, as well as one of the most common points of frustration. A new tool being designed and developed by the WebSphere Business Modeler Information Development team aims to simplify the creation and maintenance of relationship table information for technical writers and other people using DITA to store information.
Scientific Software, Silent Errors, and Mutation Testing Scientific software needs to be carefully tested for accuracy. Assessing accuracy is a complex problem, but one of the components of highly accurate software is highly correct code. We have applied mutation testing techniques to scientific codes to help us understand how to approach testing of these codes.
Back to top Middleware Technologies
A Fast, Scalable Optimization Procedure for Configuring Service Systems with Cost and Quality of Service Constraints A scalable hybrid optimization procedure for deploying services on nodes in large-scale service systems. The approach can be used in three ways: (1) to search for a feasible solution which meets both cost and performance constraints (related to contracts for QoS), (2) to minimize cost subject to meeting a set of performance constraints, or (3) to optimize some combined measure of quality of service subject to cost constraints.
A Modular Event-Based Architecture for Workflow Systems Workflow is considered as an essential technique to integrate distributed applications. Two conflicting goals are important in the workflow systems: flexibility and simplicity. We address these two issues by introducing a novel architecture for workflow systems. Modules and templates provide simplicity while events and event handlers make workflow systems flexible.
www.cas.mcmaster.ca/~najafm/
A Policy-Based Negotiation Broker Middleware for Automated SLA Negotiation for Web Services Negotiation of SLAs is very important for maintaining QoS of composite Web services-based business processes. We present a Negotiation Broker (NB) middleware framework to facilitate automated negotiations of SLAs for Web services as a trusted broker using time-based cost-benefit negotiation strategy models.
research.cs.queensu.ca/home/farhana
ACC: www.AspeCtC.net AspeCt-oriented C (ACC) is a research project at the University of Toronto that enables aspect-oriented software development with the C programming language. The ACC compiler translates ACC code into standard ANSI-C code which can then be compiled by any ANSI-C compiler such as gcc. ACC lets developers modularize crosscutting concerns in C programs.
Architecture Related Defects Analysis in a Complex Software System This poster concerns defects originating in architecture. Initial empirical studies will be illustrated, and may help researchers to better understand the role of architecture in maintenance, as well as help maintainers and developers to make defect fixing and module repairing more targeted.
Automating SLA Modeling A configurable, reusable, extensible and inheritable SLA model that provides great flexibility in constructing complex SLAs. As well, artifacts can be automatically generated to monitor an executing business process at runtime against an SLA. The approach is designed to require minimal human intervention.
Autonomic Computing System in Virtual Environment This project applies the IBM Autonomic Computing architecture to virtual environment on system resource management. A web- based service system has been built from virtual images of IBM HTTP Server, WebSphere Application Server (WAS), DB2 Server and Tivoli Provisioning Manager (TPM) Server. The system is able to grow and shrink dynamically according to the service level agreements (SLA) and the current workloads. If the resources (i.e. WAS in this case) are shared by different applications, they will be reallocated properly as well. The autonomic manager consists of a queuing performance model and a tracking filter. It is able to update the system status and predict the future behavior more precisely.
Coconut Coconut (COde CONstructing User Tool) is a platform for experimenting with novel ideas in reliable and high performance code generation currently targeting the Cell Broadband Engine. Both SIMD level and multicore level parallelism are targeted for optimization and the latest performance results from each are presented.
www.cas.mcmaster.ca/~anand
Comparing Policy-Based Management Approaches for Distributed Systems Policy-Based Management aims to simplify the management of systems by specifying rules that govern the system, it can be classified according to the framework with which they are built. We compare the Policy-Based Management approaches for Distributed Systems according to an evaluation that we define. We also talk about our future work in the area of Policy-Based Management for Distributed Systems.
research.cs.queensu.ca/home/cords
Computer Assisted Root Cause Analysis This project helps to discover the root cause of failures in complex enterprise application software. One issue is balancing information overload against tunnel vision while investigating alerts. We present a search-based workflow based on several analysis techniques, including goal models, trace analysis, fault trees, and fish-bone diagrams.
www.cs.ualberta.ca/~kenw/
Discovering Faulty Function from Field Traces Corrective maintenance takes up approximately 20 to 36% of software maintenance activities. Identification of the origin of defect - fault origin (component, function) - takes approximately 20 to 40% of the time of the corrective maintenance. We demonstrate a tool/technique to automatically identify faulty function from method level traces captured in the field.
Gutsy: A Service-Oriented Open Source Project Monitoring Application Tool/Device Gutsy (Guide Tool for System) is a service-oriented remote, continuous analysis, quality assurance system designed to help developers effectively cope with software evolution. Gutsy is currently monitoring the open source software application GRASS geographical information system. We are also beta testing the C++ GDAL library.
web.soccerlab.polymtl.ca
IBM Desktop Management Toolkit The Desktop Management Toolkit is being researched and developed by IBM to help our enterprise customers to manage the installed software on their systems.
Identifying Failures in a Large-Scale Software System using Pattern-Discovery Methods and other Machine Learning Techniques It is critical to quickly locate and solve the cause of failures and performance-defects in an enterprise software system to avoid significant losses. We use pattern-discovery methods to locate anomalies by comparing transaction data obtained from a fault-free state and an abnormal state of the system, and then apply other machine-learning techniques to learn about and identify recurrent problems. We evaluate this approach using ARM traces obtained from clustered IBM WebSphere instances.
Intelligent Monitoring of Large-Scale Software Systems Software systems are critical to business success, and thus require continuous monitoring. However, detailed monitoring hurts system performance. We have developed adaptive approaches to monitoring and root cause analysis to ensure that complex software systems remain healthy and available at minimal cost. We leverage log files, management metrics (e.g., JMX), and trace data (e.g., ARM).
J2C Connector Tools, Rational® Application Developer A new technology of how the J2EE applications can communicate to the back end enterprise systems like SAP, Siebel, PeopleSoft, JDS Edwards via inbound and outbound processing. We will also present the differences between inbound and outbound processing.
JSCOOP: A Framework Toward Fair Concurrency in Java SCOOP is a concurrent language with the idea of extending O-O in a minimal way to add concurrency support. We have developed JSCOOP, an equivalent solution for Java. JSCOOP is an Eclipse plug-in that introduces new annotations (modeled after SCOOP keywords) and a core library providing support for SCOOP semantics.
www.cse.yorku.ca/~faraz
Monitoring and Diagnosing Software Requirements A framework for monitoring and diagnosing the satisfaction of software requirements. The monitoring component generates log data based on the requirement model. The diagnostic component analyzes the log data and diagnoses denials of software requirements. Monitoring and diagnostic capabilities are essential to the design of self-adaptive, autonomic systems.
Mutation-Based Testing of Buffer Overflows, SQL Injections, and Format String Bugs The application of the idea of mutation-based adequate testing to perform vulnerability testing of buffer overflows, SQL injections, and format string bugs. This approach complements traditional techniques for fixing software vulnerabilities early and enhances software quality.
research.cs.queensu.ca/~qrst/
Performance Management for IT Infrastructure Automated resource provisioning for clusters under mixed workload consists of interactive and batch jobs. We present algorithms to dynamically allocate computing resources to each cluster such that SLAs of all job classes are met, and the cost is kept to a minimum.
Quality Engineering for Large Scale Enterprise Systems Large scale enterprise systems must support a large number of users. However, ensuring the scalability of these systems is not easy, due to limited research efforts in the following areas: (pre-release) load testing, (field-deployment) capacity planning, and (post-release) customer issue resolution. In this poster, we showcase our research efforts in the aforementioned areas.
Rational Enterprise Reporting A new reporting solution from IBM Rational the pulls data from disparate systems, normalizes it, and allows for reports to be generated from it. This solution targets software development projects.
Runtime Monitoring of Web Service Conversations This CAS project involves the development of an monitoring framework for web applications, where errors are reported as they are detected. However, at runtime, is it satisfactory to just report the error? In this poster, we discuss how to add recovery and compensation mechanisms to our framework.
www.cs.toronto.edu/~jsimmond
SE-ADVISOR The SE-ADVISOR tool presents a novel approach to support software evolution, by integrating maintenance relevant knowledge resources, processes, and their constituents. We demonstrate how our SE-ADVISOR environment can provide contextual guidance during typical maintenance tasks through the use of ontological queries and reasoning services.
www.cse.concordia.ca/~rilling
Servus: Model-Based Generation and Evolution of Web Services Servus is proposed as a platform to provide support for modeling, generation and evolution of Web Services. It defines a profile for Eclipse Modeling Framework's Ecore and implements bi-directional mappings between such models and Web Services artifacts, such as WSDL documents and Java code. Furthermore, a library allows services described by Servus models to be dynamically deployed and accessed. Servus is part of a CAS PhD Fellowship, developed under EMFT.
Supporting Dynamic Publish and Subscribe in a Service Oriented Architecture A framework for supporting dynamic publish/subscribe in a service oriented architecture using a policy-based message broker. We applied this model to a palliative health care scenario to provide a dynamic data sharing platform for real-time monitoring of a patient's health status with health care providers operating in various domains. Declarative policies provide the flexibility for data sharing, transformation, reporting, and collaboration.
The Application of Data Mining Techniques in Software Fault Localization Automated fault localization is the process of automatically inferring likely code locations of faults from data about test case failures. We exhibit the results of research that explores the possibility of doing fault localization by using data mining techniques to mine program execution data.
Toward an Interoperable e-Health Environment We are currently involved in a real-world project to integrate two legacy healthcare systems using HL7 v3. Our poster will outline the various challenges faced during the project, processes, frameworks and formalizations we developed to address those and work-in-progress of a user friendly tool to support the HL7 integration process.
Using Umple for Rapid Prototyping The Umple languages allow rapid textual entry of models. Jumple allows rapid entry and modification of UML class diagrams with integrated Java code, while Bumple allows textual entry of BPEL. We will demonstrate the use of these on substantial problems. In particular, we will show how easy it is to textually edit the models and see the changed diagrams in IBM Rational and WebSphere tools.
www.site.uottawa.ca/~tcl
Variability Pre-Processing in Model-Driven Testing for a Domain Proposed is a framework to build variability knowledge for a domain, and then to extract and merge specific variabilities from it into the domain's testable model, where the latter one leads to generate tests for the domain. The objective is to enable the ongoing research on model-driven testing for a domain: to apply requirements' changes on the relevant parts of the model, and to reuse variability knowledge for other new testable models of the domain. [email protected]
www.scs.carleton.ca/~sbtajali
Workload Consolidation in Virtualized Environments A novel technique for modeling virtual machine resource demands in a shared data center. By leveraging expert knowledge and analytical optimization techniques, we are able to train the model with a small number of samples. Thus, our model can adapt swiftly to unexpected changes in workloads.
Back to top
Services Science and SOA A Peer-to-Peer Desktop Cloud The goal of this research is to create a stable, predictable, peer-to-peer cloud infrastructure which leverages idle CPU cycles. This system aims to provide a business model for desktop users who volunteer spare CPU cycles and for organizations which are in need of massive computing power.
www.csd.uwo.ca/~kramach
Beacon Cloud: Mobile Blood Donation Registration Service The Mobile Blood Donation Registration Service (MBDRS) is part of a cloud computing technology designed to support blood transfusion services. The system is built on the mobile model of services oriented architecture (SOA) and XML security technologies.
www.hrl.uoit.ca/~ckphung/
BPM Repository: Bring People Together, Propel Business Forward This exhibit will show integration of BPM tools such as WebSphere Business Modeler, WebSphere Integration Developer and WebSphere Business Monitor on Rational Asset Manager (RAM). The BPM repository promotes the reuse of assets while supporting governance policies of an organization. Attendees will gain valuable insight into an SOA management solution.
Business Rules Recovery from Legacy Applications The understanding and discovery of business rules play a major role in the maintenance and modernization of legacy software systems. According to a recent survey, about half of the companies who reported difficulties in modernizing their legacy systems said that "a major issue was the fact that hard-coded and closed business rules" make it difficult to adapt their systems to new requirements and migrate to more modern environments.
Enabling Best Practices for IBM Global Services (GBS) A successful GBS initiative has been enabling practitioners who support multiple lines of business. We enhance practitioners' tool kits with modern practices for solution delivery. View a showcase of success stories and services which have been developed, including best practices for Agile methods, Project, Requirements, Architecture, Change and Configuration Management.
Green Transformation Workbench for Data Centers Green transformation is a key management initiative that attempts to align the people, process and technology of an enterprise more closely with its strategy and vision for green business. The Green Transformation Workbench is a practitioner's tool which implements a methodical approach devised to analyze green transformation opportunities and make business cases for transformation initiatives.
domino.research.ibm.com/comm/rese
HR in Virtual Worlds: A Real Corporate App for the 3D Internet? In this exhibit, we will present and discuss results of studies on speed mentoring, where, a la speed dating, mentors provide advice to rotating groups of mentees. The speed mentoring occurred both face-to-face and also in Second Life. This exhibit will analyze one very promising corporate use of Virtual Worlds.
www.yorku.ca/hmkim
Incremental Change Propagation across Web Services Artifacts A novel methodology to incrementally synchronize generated software artifacts with their sources and vice versa, without the need to re-engineer the transformation into an incremental one. We utilized our proposed technique in Eclipse WTP for efficient synchronization of Java source code with web services artifacts in both directions. [email protected]
Intelligent Service Selection and Composition Service composition selects and weaves services to achieve a goal under the guidance of business processes. Existing service composition methods are inefficient and ineffective due to the complexity of workflows and the large amount of services available. In this work, we demonstrate an approach for intelligently searching and invoking services to achieve a user's goal.
OpenOME - A Tool for Early Requirements Modeling and Analysis OpenOME is a GMF-based requirements-modeling environment that supports several requirements-modeling notations, requirements management, and model analysis. The tool demonstrates some potential uses of the Eclipse GMF framework, as well as ongoing research with early requirements analysis.
se.cs.toronto.edu/trac/ome
Software Defect Redisoveries: Causes and Their Significance Software defect rediscoveries account for 50-90% of the total failures of a software product. We believe it would be a great initiative for software providers to understand the phenomenon of rediscoveries to ultimately reduce the cost due to rediscoveries and thus the cost, by a significant degree, of software product maintenance.
Back to top
User Technologies 3-D Internet: Capturing Visitor Insights with Best Practices in Virtual Worlds This demonstration will provide an overview of the ibm.com 3D Internet, the techniques used to capture visitor insights and the strengths, weaknesses, and opportunities for this virtual channel. Viewers will be able to apply the key points to their work in virtual or real worlds.
A Business-Process-Driven Approach for Generating User Interfaces User interfaces (UIs) of business applications and business processes rarely evolve consistently due to fast market changes. Moreover, studies show that the majority of the UIs of business applications suffer from usability problems. In this work, we demonstrate an approach for automatically generating UIs with satisfactory usability from business processes.
CnP: Supporting Copy-and-Paste Programming in Modern IDEs The CnP project, short for 'Copy and Paste', aims at providing tool support for copy-and-paste programming. Three Eclipse plugins will be demonstrated (1) CReN: Consistent ReNaming of identifiers in code clones, (2) CSeR: Support for Class SEgment Reuse via copy-paste, (3) Clone-Importer: Importing clone information from a clone detection tool.
www.clarkson.edu/~dhou
Designing for the Mobile Experience Mobile devices are now commonplace for business and technical end users. But what are the best ways to design for these diverse end users? How does the mobile experience link into their computer software easily and what are the differences from one mobile device to another? With the help of emulators and simulators, testing and prototyping, we can ensure a seamless user experience from desktop to mobile.
Development of Visual Interfaces for Mashups Visualization is a key element of information mashups - rapidly-developed applications that remix data and services. Limited resources and a lack of information visualization knowledge challenge the developers in choosing and configuring the best visualization for the available data. Providing guidance and visual interfaces addresses that challenge.
Drupal: A Platform for Effective Team Collaboration Looking to deploy a flexible collaborative solution that is part wiki, part blog and is fully customizable? Drupal is an open source content management solution that's deployed on a LAMP infrastructure. It is fully functional out of the box, and is customizable using community-contributed modules or through custom PHP code.
Model-Driven Content Connectors and Web Intelligence: Consider the Source A first-of-a-kind approach to linking of content types via meta-tags within unified modeling (UML) and applying this approach when building large-scale global web experiences for clients. Architects, designers, and developers working on transformational processes, modeling, and traditional and intelligent web experience will find this poster of interest. [email protected]
PUMP (Partner Usability Milestone Program) A new development-driven process that has been created for the Rational Application Developer product. The purpose is to get more feedback from customers early and often in the product cycle. This will engage the customer, while giving development teams more time to incorporate user feedback into the product at different stages.
radical.rtp.raleigh.ibm.com/rad
Tag Clouds for Semi-Structured Documents TagSync is a novel tool based on multiple tag clouds to explore semi-structured documents. Features include support query refinement and filtering, and summarization of search results. Two implementations will be exhibited; the first to explore medical publications, and the second to explore Jazz work items.
www.thechiselgroup.org/
The Way to the Holographic Desktop Printer New developments in 3D hardcopy have made possible bright, clear, full colour images. They may be tiled to form large murals. Future development of this technology will bring full-parallax deep-scene holographic images that are virtually indistinguishable from real world objects. However, this new generation of auto-stereoscopic printers will present several computational challenges, which will be discussed.
www.photoniximaging.com
Adaptive Context-Aware Social Networks This project introduces a generic context-aware development framework for analysis and visualization of mobile and spontaneous social networks. An embedded inference engine is capable of scoring and analyzing social nodes and provides decision support to users in the form of semantics-based social graphs. The same framework has been used to deploy largescale context-aware deployments for airports and railway stations in order to help passengers navigate their way during transit time in unfamiliar environments.
Back to top
About IBM Privacy Contact Terms of use Country/region [ select ]
Home Business solutions IT services Products Support & downloads My IBM
CAS Worldwide Homepage
Overview Technology Showcase Technical Papers Workshops Schedule at a Glance Speakers by Day
Tuesday, Oct 28 Wednesday, Oct 29 Thursday, Oct 30
Tuesday, October 28 paper presentations
Session 1: Databases Registration is now closed. Richmond Ballroom A/B CASCON 2009 will take place on November 2-5. DBMS Workload Control Using Throttling: Experimental Insights 10:00am CASCON 2008 Highlights Best Paper Highlights and video on Wendy Powley and Pat Martin, Queen's University; Paul Bird, IBM Toronto Lab ITWorldCanada
Efficient XPath Query Processing More info 10:30am Read the highlights article P. Mark Pettovello and Farshad Fotouhi, Department of Computer Science, Wayne State University View (28kb) Autonomic Tuning Expert - A Framework for Best-Practice Oriented Autonomic Database Tuning Get Adobe® Reader® 11:00am David Wiese and Gennadi Rabinovitch, Friedrich-Schiller-University Jena; Michael Reichert and Stephan Arenswald, IBM Deutschland Research & Development GmbH
Session 2: Web Applications Richmond Ballroom C CASCON 2008 Videos Synchronized Tag Clouds for Exploring Semi-Structured Clinical Trial Data Watch full-length videos from 10:00am the conference Maria-Elena Hernandez, Sean M. Falconer and Margaret-Anne Storey, University of Victoria; Simona Carini and Ida Sim, University of California San Francisco Click here
Personalized Recommendation of Related Content Based on Automatic Metadata Extraction 10:30am CASCON Proceedings Andreas Nauerz, IBM Research and Development; Fedor Bakalov and Birgitta König-Ries, University of Jena; Martin Welsch, IBM CASCON Proceedings are Germany Research and Development available on the
Online Stroke Modeling for Handwriting Recognition ACM Digital Library 11:00am Oleg Golubitsky and Stephen M. Watt, University of Western Ontario Related information Session 3: Software Engineering I CASCON archives Richmond Ballroom D
Flexible Verification of User-Defined Semantic Constraints in Modelling Tools CASCON mailing list 10:00am Subscribe/Unsubscribe to Daniel Amyot and Jun Biao Yan, University of Ottawa CASCON mailing list
Towards a UML Virtual Machine: Implementing an Interpreter for UML 2 Actions and Activities 10:30am Michelle L. Crane and Juergen Dingel, Queen's University
An Empirical Study of the Design and Implementation of Object Equality in Java 11:00am Chandan R. Rupakheti and Daqing Hou, Clarkson University
Back to top
Wednesday, October 29 paper presentations Session 4: Systems I Richmond Ballroom A/B
Automating SLA Modeling 10:00am Tony Chau, Vinod Muthusamy, and Hans-Arno Jacobsen, University of Toronto; Elena Litani, Allen Chan, Phil Coulthard, IBM Canada Ltd.
Capacity Planning for Service-Oriented Architectures 10:30am Michael Smit, Andrew Nisbet, and Eleni Stroulia, University of Alberta; Andrew Edgar and Gabriel Iszlai, IBM Toronto Lab; Marin Litoiu, York University
A Reliability Estimation for Large Distributed Software Systems 11:00am Alberto Avritzer and Flávio P. Duarte, Siemens Corporate Research; Rosa Maria Meri Leão and Edmundo de Souza e Silva, Universidade Federal do Rio de Janeiro, Brazil; Michal Cohen and David Costello, Siemens Transportation Systems
Session 5: Software Engineering II Richmond Ballroom C
A Methodological Leg to Stand On: Discoveries Using Grounded Theory to Study Software Development 10:00am Steve Adolph, Wendy Hall, and Philippe Kruchten, University of British Columbia
A Taxonomy of Software Types to Facilitate Search and Evidence-Based Software Engineering 10:30am Andrew Forward and Timothy C. Lethbridge, University of Ottawa
Building Highly-Interactive, Data-Intensive, REST Applications: The Invenio Experience 11:00am Michelle Annett and Eleni Stroulia, University of Alberta
Session 6: Compilers Richmond: Ballroom D
OpenMP Tasks in IBM XL compilers 10:00am Xavier Teruel, Barcelona Supercomputing Center - Universitat Politècnica de Catalunya; Priya Unnikrishnan, IBM Toronto Laboratory; Xavier Martorell and Eduard Ayguadé, Barcelona Supercomputing Center - Universitat Politècnica de Catalunya; Raul Silvera, Guansong Zhang and Ettore Tiotto, IBM Toronto Laboratory
High Performance XML Parsing Using Parallel Bit Stream Technology 10:30am Robert D. Cameron, Kenneth S. Herdy, and Dan Lin, Simon Fraser University
Back to top
Thursday, October 30 paper presentations Session 7: Systems II Richmond Ballroom A/B
Information-Theoretic Modeling for Tracking the Health of Complex Software Systems 10:00am Miao Jiang, Mohammad A. Munawar, Thomas Reidemeister and Paul A. S. Ward, University of Waterloo
Using Economic Models to Allocate Resources in Database Management Systems 10:30am Mingyi Zhang, Patrick Martin, and Wendy Powley, Queen's University; Paul Bird, IBM Toronto Lab NetPal: A Dynamic Network Administration Knowledge Base 11:00am Ashley George, Adetokunbo Makanju, Evangelos Milios and Nur Zincir-Heywood, Dalhousie University; Markus Latzel and Sotirios Stergiopoulos, Palomino System Innovations Inc.
Session 8: Software Engineering III Richmond Ballroom C
SIFT: A Scalable Iterative-Unfolding Technique for Filtering Execution Traces 10:00am Best Student Paper A. V. Miranskyy and N. H. Madhavji, University of Western Ontario; M. S. Gittens, University of the West Indies; M. Davison, University of Western Ontario; M. Wilding, D. Godwin and C. A.Taylor, IBM Canada Ltd.
An Architecture for Providing Context in WS-BPEL Processes 10:30am Allen Ajit George and Paul A.S. Ward, University of Waterloo
Is it a Bug or Enhancement? A Text-Based Approach to Classify Change Requests 11:00am Giuliano Antoniol and Kamel Ayari, École Polytechnique de Montréal; Massimiliano Di Penta, University of Sannio; Foutse Khomh and Yann-Gaël Guéhéneuc, Université de Montréal
Back to top
Navigation and Resources
CASCON 2008 Resources Related Links CASCON Events Registration & Sign-in Hotel information IBM University Relations CASCONcamp demo camp Full Papers Sponsors Programming Contest High school competition CASCON 2008 Program Contacts Central Committee
About IBM Privacy Contact Terms of use Country/region [ select ]
Home Business solutions IT services Products Support & downloads My IBM
CAS Worldwide Homepage
Overview Technology Showcase Technical Papers Workshops Schedule at a Glance Speakers by Day
Monday, Oct 27 Tuesday, Oct 28 Wednesday, Oct 29 Thursday, Oct 30
Monday, October 27 Workshops Morning Session - 9 a.m.
Challenges of Model-Driven Engineering Registration is now closed. Location: Richmond E CASCON 2009 will take place Co-Chairs: Jo Atlee, University of Waterloo; Tom Maibaum, McMaster University; Marin Litoiu, York University; Daniel Leroux, IBM on November 2-5. Canada Ltd. CASCON 2008 Highlights Model-driven engineering (MDE) promises dramatic improvements in software quality and developer productivity by using high- Highlights and video on level models of system designs and deriving other artifacts (such as analyses, code, and test suites) from the models. However, ITWorldCanada the current generation of MDE approaches and tools are brittle, poorly integrated, and will not scale to the level of complexity More info expected in the software-intensive systems of the near future. This workshop will focus on identifying some of the key open problems that, if solved, will help MDE to fulfill its promise. Attendees will also consider how to scope and prioritize these Read the highlights article problems. The latter discussions will be influenced by Canada's unique strengths in software engineering research, software View (28kb) development tools, and human factors, and will help to identify those problems where Canadian researchers will be most likely to make significant advances. Get Adobe® Reader®
Afternoon Session - 1 p.m. Hands-On: Project Zero Location: Markham A Co-Chairs: Bart Stanczyk and Kalvin Misquith, IBM Canada Ltd. CASCON 2008 Videos Project Zero is a community-driven commercially developed incubation project from IBM that allows simple, quick, and agile development of Web applications. A commercial and stable version of Project Zero is WebSphere sMash. This workshop will focus Watch full-length videos from on a hands-on approach to developing a simple Web application using the Web-based application builder, AppBuilder. The tutorial the conference will cover a number of sMash features including authentication, data store, flow, and the drag-and-drop Dojo front end. By using a Click here step-up approach to introduce each feature, the workshop will give participants practical and thorough knowledge about developing Web applications quickly and effectively. CASCON Proceedings Slides and exercise booklet (1.15mb) CASCON Proceedings are ProjectZeroWorkshopResources.zip (0.05mb) available on the
Architecture for Web Applications ACM Digital Library Location: Richmond D Co-Chairs: Yelena Yesha, University of Maryland; Joanna Ng, IBM Canada Ltd.; Weidong Kou, IBM China; Chris Mitchell, IBM Corp. Related information
In recent years there has been tremendous growth in the demand for, and the use and development of, Web applications. This CASCON archives workshop will provide an international forum for developers, scientists, and engineers for addressing research results and discussing their experiences and sharing ideas pertaining to the practice and theory of architecting Web applications. The CASCON mailing list workshop will focus on the following topics: architecture patterns for Web applications; architecture tools for Web application design; bridging conceptual design and implementation; development methodologies and domain-specific languages; integration Subscribe/Unsubscribe to CASCON mailing list of context sources and context models; integration of legacy applications; semantic Web technologies; usability; security and privacy for data interchange; and evaluation metrics and criteria. Cell BE and heterogeneous multicore systems: architectures and applications Location: Richmond A/B Co-Chairs: Robert Enenkel, IBM Canada Ltd.; Christopher Anand, McMaster University; James Green, Carleton University Speakers: Michael McCool , RapidMind, Inc. and University of Waterloo; Kevin Browne, McMaster University
The Cell BE architecture is an innovative heterogeneous multicore single instruction, multiple data (SIMD) processor that addresses physical power and frequency limitations through the inclusion of multiple processor cores in a single package. Alternative multicore technologies include field-programmable gate arrays (FPGAs), where the processing architecture is often customized to the application, and graphics processing units (GPUs), which are currently promising up to 1 TFLOP of processing power per board. What is the difference between these approaches to high-performance computing, and which types of applications are best suited to each technology? Looking at implementation experiences from different application areas, and related theoretical topics, this workshop will provide attendees insight into these issues.
Full Day Session - 9.a.m. Hands-On: Service Oriented Architecture (SOA) in a Day Location: Aurora Chair: Gary Bist, IBM Canada Ltd.
This workshop will start with a definition of SOA, and then provide a one-day experience working with IBM's key SOA development environment, WebSphere Integration Developer. CASCON participants will develop and test an SOA application, which is one that is a composite of other applications. Standard SOA elements such as modules, components, business objects, interfaces, business rules, human tasks, imports, exports, data maps, and business processes will be covered. The tools will generate code compliant with SOA standards such as Web Services Description Language (WSDL) and Business Process Execution Language (BPEL), which are XML-based and platform- and language-independent. These SOA standards will also be discussed in the workshop.
Hands-On: Introduction to Ajax Technologies Location: Vaughn East Co-Chairs: Jen Hawkins, Jeffrey Liu, Lawrence Mandel, and Aron Wallaker, IBM Canada Ltd.
Asynchronous JavaScript and XML (Ajax) programming is currently at the forefront of rich Internet application (RIA) technology and is commonly cited as a major driver of Web 2.0. The rapid growth in the popularity of Ajax has highlighted the need for toolkits to support common functionality and speed development. This workshop will introduce the technologies behind Ajax from the basics of handling asynchronous requests through to an examination of some of the popular Ajax toolkits now available. Following a general introduction to the topics, this workshop will focus on the ibm-backed toolkit, Dojo, an open source DHTML toolkit written in JavaScript that assists in the construction of dynamic Web pages. Through a series of labs, participants will receive hands-on experience authoring a RIA with Dojo
Issues and Topics on SOA Programming Models Location: Richmond C Co-Chairs: Kostas Kontogiannis, University of Waterloo; Chris Brealey, IBM Canada Ltd.
This workshop will identify critical SOA research challenges that need to be addressed by the research community for SOA to fulfill its promise. The workshop will present a taxonomy of SOA research issues that will be used to frame the rest of the discussion. The workshop will focus on research needs that are currently causing the greatest pain for SOA practitioners. Topics will include "hard problems", tooling issues, governance challenges, monitoring through the life cycle, and the longer-term evolution of SOA. The workshop will include presentations by practitioners and the research community in addressing critical unmet issues.
Download PowerPoint© slides (3.22mb)
Workshop on Cybersecurity: Research and Use Cases in Internet Applications Security and Privacy Location: Vaughn West Co-Chairs: Miguel Vargas Martin, Patrick Hung, and Shahram Heydari, University of Ontario Institute of Technology; Marsha Chechik and David Lie, University of Toronto; Walid Rjaibi, IBM Canada Ltd.; Jacob Slonim, Dalhousie University Speakers:Amin Ibrahim, Farzad Kanani, Khalil El-Khatib, and Xiaodong Lin, University of Ontario Institute of Technology; Jacob Slonim, Dalhousie University; Tao Wan, Cactus Commerce Inc.; Peter Mason, Defence Research & Development Canada
As computers, especially networked computer systems, permeate our lives, security and privacy will be critical to the development and effective usage of those systems, thus becoming a crucial aspect of information technology. There is an emerging interest among Canadian research community in various aspects of cybersecurity. However, it is a broad topic that combines the facets of operating systems, data networks, programming languages, compilers, algorithms, cryptography, databases, computer architecture, formal methods, economics, and law, to name a few. This workshop will focus on the issues related to security and privacy in Internet applications.
Back to top
Tuesday, October 28 Workshops Afternoon Session - 1 p.m. Hands-On: The Cell BE application programming experience! Location: Aurora Co-Chairs: Robert Enenkel, IBM Canada Ltd.; Christopher Anand, McMaster University; James Green, Carleton University
Attendees will get actual hands-on experience implementing a fun physics simulation on the Cell BE with three different programming tools! Starting with an overview of the Cell BE heterogeneous multiprocessor computer, the developers of RapidMind and Coconut will then demonstrate their Cell software development tools, as well as the Cell BE SDK. Next will be an interesting physical simulation problem (interacting Nerf balls), and implementing a solution with each of the tools. Participants will then experiment and further improve the solution themselves in a tutorial setting. This workshop is ideal for those interested in high-performance application programming on Cell BE and who want to learn about powerful productivity-enhancing programming tools that are available for the platform.
Hands-On: Web 2.0 meets SOA with Apache Tuscany SCA Location: Vaughn East Chair: Luciano Resende and Haleh Mahbod, IBM Corp.
An essential characteristic of SOA is the ability to isolate business functionality into reusable services. However, in a world where businesses need to look beyond their immediate departments, the technology choices that need to work with one another creates a complex problem. This can easily lead to brittle applications that mix business logic with code to handle infrastructure differences. A higher level of abstraction is needed to enable SOA solutions to be flexible and adoptable to change at a lower development cost. This tutorial will explore how to use SCA and Tuscany to build a Web 2.0 store application that consumes multiple distributed SCA components via Web Services and JSON-RPC and Atom. A real-world scenario will be used to help demonstrate how to build and evolve the store application using Tuscany SCA as the business grows over time.
Web 2.0 meets SOA with Apache Tuscany SCA part 1 PDF (1.45mb) Web 2.0 meets SOA with Apache Tuscany SCA part 2 PDF(0.36mb)
Hands-On: Introduction to Web Services Development with Rational Application Developer 7.5 Location: Markham A Co-Chairs: Yen Lu, Rakan Khalid, Zina Mostafia, and Gilbert Andrews, IBM Canada Ltd.
Rational Application Developer 7.5 is equipped with the newest release of IBM's Web Services suite. New standards were introduced in conjunction with improved productivity aids. This workshop will present an in-depth look at the new Web services tools and runtime environment. New standards such as Web Services for Java EE (JSR-109 1.2), Java API for XML Web Services (JAX-WS 2.1) and WS-I Reliable Secure Profile (RSP) will be emphasized from the point of view of their business value to an organization. Hands-on exercises will be performed by attendees to reinforce the presented material.
Business Process Management in a Service-Oriented World Location: Richmond A/B Co-Chairs: Vinod Muthusamy, University of Toronto; Phil Coulthard, Allen Chan, Elena Litani, and Tony Chau, IBM Canada Ltd. Speakers: Pablo Irassar, Dorian Birsan, Suzette Samoojh, and Polina Gohshtein; IBM Canada Ltd.
Business Process Management (BPM) is a discipline that combines software capabilities and business expertise to manage and, if necessary, improve business processes. This workshop will give an introduction to BPM and provide an overview of the key WebSphere BPM products. Attendees will learn why it is critically important to combine BPM with service-oriented architecture principles, enabling the composition of business processes from services and exposing them in turn as business services. Discussion will also include ongoing research in the BPM field, including ways in which Service Level Agreements (SLA) can be exploited to simplify various BPM tasks.
Data Stream Management Location: Richmond D Co-Chairs: Pat Martin, Queen's University; Calisto Zuzarte, IBM Canada Ltd. Speakers: Qiang Zhu, University of Michigan; Yingying Tao, University of Waterloo; Nick Koudas, University of Toronto
Stream data management systems support a new class of applications, including sensor data, Internet traffic monitoring and financial tickers, in which the data occurs in the form of a continuous stream of items. The workshop will focus on the new challenges faced by these systems, such as the need to support continuous queries or queries over streams and historical data. Invited speakers, including leading researchers and industry practitioners, will present advances on these and related topics.
DataStreamManagement_1.pdf (0.26mb) DataStreamManagement_1.pdf (2.86mb) DataStreamManagement_1.pdf (0.33mb) DataStreamManagement_1.pdf (0.75mb)
Research Progress in Service Science, Management, and Engineering Location: York B Co-Chairs: Kelly Lyons, University of Toronto; Eleni Stroulia, and Paul Messinger, University of Alberta; Stephen Perelgut, IBM Canada Ltd. Speakers: Paul Sorenson, University of Alberta; Sacha Chua, IBM Canada Ltd.
This workshop will present research in the area of service science, management, and engineering with a goal of finding connections and interaction opportunities. Speakers will present research results in the broad area of service science, management, and engineering with a particular focus on virtual worlds and emerging service business models.
Best Practices for Developing High-Performance Java™ Applications: A Java Virtual Machine Perspective Location: Thornhill Co-Chairs: Daryl Maier and Vijay Sundaresan, IBM Canada Ltd. Speakers: Nikola Grcevski, Ryan Sciampacone, and Patrick Doyle
Developing scalable, high-performance Java code is an important challenge for all Java developers. This workshop will offer a unique perspective on Java performance tuning from the point of view of leveraging the underlying IBM J9 Java virtual machine (JVM). The recommendations presented will be based on experience gained in analyzing and tuning large Java applications by IBM J9 JVM developers with a deep understanding of the underlying runtime technology. The JVM developers will present techniques for identifying common application performance problems, describe Java programming practices that facilitate and hinder runtime optimizations, provide insight into how and when garbage collection tuning is necessary, and present techniques to allow an application to scale.
Part 1 (0.37mb) Part 2 (4.89mb) Part 3 (0.20mb) Part 4 (0.12mb)
End User Development of Enterprise Mashups Location: Richmond C Co-Chairs: Lars Grammel and Margaret-Anne Storey, University of Victoria; Leho Nigul, IBM Canada Ltd.
Applying mashups in an enterprise context is a unique chance to exploit the power of service-oriented architectures for business users. The ability to modify and create flexible, task-specific mashups enables users to evolve parts of the IT infrastructure to provide the information that will help increase business value. This workshop will address the following topics: How are enterprise mashups used currently? How are they supported by current tools? What research on mashups and end user development is available? What recommendations can be given based on this research? What are the technical aspects of enterprise mashups?
Fifth International Workshop on Engineering Autonomic Software Systems - Day 1 Location: Vaughn West Co-Chairs: Paul Ward, University of Waterloo; Marin Litoiu, York University
The goal of this workshop is to bring together researchers and practitioners who investigate concepts, methods, techniques, and tools to engineer autonomic software systems. Autonomic computing aims to reduce the ever-increasing complexity of managing software/system components. This workshop will focus on issues critical for the proliferation of autonomic applications. Selected topics will include requirements engineering for autonomic software, analysis and evolution of autonomic architectures and systems, systems' monitoring, performance modeling, and optimization.
An Innovative Solution for Automated Software Testing Location: Richmond E Co-Chairs: Sudarsha Wijenayake, IBM Canada Ltd.
The complexity and scale of the current software products are rapidly increasing. The resources and manpower that are dedicated for testing software are, however, not increasing and in some cases are being reduced. Automated testing has become crucial in the software industry to address this gap and therefore has been adopted more widely than ever before. This workshop will discuss an innovative design for developing automated test frameworks by overcoming traditional challenges in the particular field. Furthermore, this workshop will present strategies for automating all types of tests such as artifact-level tests, GUI tests, and API- level tests.
Back to top
Wednesday, October 29 Workshops Afternoon Session - 1 p.m. Hands-On: Real-time data integration through change data capture Location: Aurora Co-Chairs: Kris Kobylinski, Dan Snoddy, and Mike Jory, IBM Canada Ltd.
In this workshop, participants will learn about real-time data integration - how it works and how customers are using this technology to solve business problems. IBM InfoSphere™ Change Data Capture (from IBM's acquisition of DataMirror in 2007) is now part of the IBM replication family and provides scalable, high performance, heterogeneous data movement with minimal impact to source systems. This workshop will provide a basic explanation of how the technology works, and lay the groundwork for an appreciation of the wide scope of business problems that can be solved. There will also be an opportunity for hands-on experience with the product including configuring it for various scenarios.
Hands-On: Hacking Web Applications 101 Location: Stouffville Chair: Daniel Cappon, IBM Canada Ltd.
Many security individuals believe that firewalls and intrusion detection systems are sufficient to protect their most sensitive data from attack. This workshop will focus on the actual attacks against software that have been seen across the Internet, and the current techniques being exploited. Attendees will receiv hands-on experience with several aspects of Web application security, from reconnaissance and profiling, to using a vulnerability to exploit. This presentation will end with a focus on how to address these software issues and prevent such problems from continuing to occur.
Software Engineering for Science Location: Richmond E Co-Chairs: Janice Singer, and Mark Vigder, National Research Council Canada; Greg Wilson and Steve Easterbrook, University of Toronto
Increasingly, scientific discovery is linked to utilization of software resources, including high-performance computing, modeling, collaboration, and beyond. However, little research in software engineering or its related disciplines has focused on the specific needs of scientists, which can be quite different from a more general end-user audience. In this workshop, participants will explore the software engineering needs of scientists and propose both processes as well as additional research to meet those needs. By working together, software engineers, software engineering researchers and scientists are in a unique position to collaborate in defining how science is conducted and how discoveries will be made in the future.
Business Event Processing Location: Richmond D Co-Chairs: Hans-Arno Jacobsen, University of Toronto; Opher Etzion, IBM Research, Haifa Speakers: Chris Ferris and J.J. Jeng, IBM Corp.
Business event processing (BEP) is an emerging discipline that aims to exploit the event-based nature of many applications and software systems with the imperative nature of these systems to offer synergetic benefits. Benefits are real-time access to critical performance indicators, improved root cause understanding, and more timely delivery of business information. BEP develops paradigms, concepts, and techniques to complement existing approaches and develop new products. This workshop will give an introduction to BEP, provide an overview of event processing foundations, survey current WebSphere BEP products and strategy, and raise challenges for research and market. Attendees will learn why it is critical to combine BEP with service-oriented architecture principles, when to resort to BEP, and the open challenges that exist.
Exploring the full capabilities of Project Zero (IBM WebSphere sMash) Location: Thornhill Co-Chairs: Todd Kaplinger and Brandon Smith, IBM Corp.
Developing Web applications for the enterprise is one of the key strengths of the WebSphere portfolio, but the learning curve for JEE applications is too steep for a certain class of developers. This workshop will focus on how Project Zero can be used to build Java and PHP-based applications using a lightweight application-centric development platform without the steep learning curve.
Fourth Workshop on Challenges for Parallel Computing Location: Richmond A/B Co-Chairs: Priya Unnikrishnan, Kit Barton, and Guansong Zhang, IBM Canada Ltd. Speakers: Xavier Martorell, Technical University of Catalunya (UPC); Jim Xia and Michael Wong, IBM Canada Ltd.; Yunlian Jiang, The College of William and Mary; Cheng Ding, University of Rochester
Parallel computing has evolved significantly over the past few years and is now being used in many non-traditional environments. This workshop will explore some of the current challenges facing parallel computing. Members of the parallel computing user community will present problems they have found in new parallel computing systems. Representatives from research and industry will also discuss the challenges they have identified and the work they are pursuing to address these challenges.
Requirements-Driven Business Process Modelling and Performance Management Location: Richmond C Co-Chairs: Daniel Amyot and Liam Peyton, University of Ottawa; Alireza Pourshahid, Cognos, an IBM company; Eric Yu, University of Toronto Speakers: Alexei Lapouchnian, University of Toronto
Business processes and their management have always introduced difficult challenges for organizations. This workshop will present how recent notations and tools developed in the requirements engineering community can address these challenges. Languages such as i* and ITU-T's User Requirements Notation, supported by Eclipse-based editors such as jUCMNav and OpenOME, can help model, analyze, configure, and adapt business goals and processes/workflows. In addition, it will be shown how integration between these tools and IBM Cognos® 8 (business intelligence tool) and DOORS (requirements management) can help monitor and align processes and goals, as well as manage compliance with legislation, even as processes and laws evolve.
Intro (0.10mb) Danial Amyot (0.72mb) Alireza Pourshahid (2.83mb) Eric Yu, Jennifer Harkoff, Reza Samavi (1.90mb) Liam Peyton (0.85mb) Alexei Lapouchnian (1.03mb)
Fifth International Workshop on Engineering Autonomic Software Systems - Day 2 Location: Vaughn West Co-Chairs: Paul Ward, University of Waterloo; Marin Litoiu, York University
The goal of this workshop is to bring together researchers and practitioners who investigate concepts, methods, techniques, and tools to engineer autonomic software systems. Autonomic computing aims to reduce the ever-increasing complexity of managing software/system components. This workshop will focus on issues critical for the proliferation of autonomic applications. Selected topics include requirements engineering for autonomic software, analysis and evolution of autonomic architectures and systems, systems' monitoring, performance modeling and optimization.
Women in Technology: Attract, Retain, Excel Location: York B Co-Chairs: Joanna Ng, Karen Hunt and Kelly Ryan, IBM Canada Ltd.
This workshop covers three major themes of importance to women working in or studying computer science and IT: Attract: Why does the IT industry need more women, and how can we attract them to the field? Retain: What fosters fulfillment in females who pursue a career in IT? Excel: How can women in IT reach their full potential?
Through breakout discussion groups about each theme and keynote speeches, attendees will discuss and learn about the challenges posed to women in IT and avenues for success. The breakout groups' discussions will culminate in a Best Practices report. By bringing together women from various career stages in industry and academia, the workshop will provide a great networking opportunity for attendees. On the day of the workshop, you will have an opportunity to decide which breakout group - Attract, Retain, or Excel - you would like to join. Posters including each breakout group's discussion questions will be posted near the York B room on the day of the workshop to help you decide.
Full Day Session - 10 a.m. Hands-On: CASCON High School Programming Competition 2008 & Teachers' Workshops Location: Vaughn East Co-Chairs: Brenda Chow, IBM Canada Ltd; Lauren Gordon, Queen's University Speakers: Jennifer Schachter, Deirdre Athaide, and Tim DeBoer, IBM Canada Ltd.; Lisa Rubini, Toronto District School Board
The CASCON High School Programming Competition is a Java-based challenge that encourages high school students to discover the fun in computer science and information technology. Now in its fourth year, the CASCON High School Programming Competition attracts many schools from across the Greater Toronto region. In addition to the competition, two workshops will be held concurrently for high school computer science educators. Attendees will develop and implement interesting exercises that they can take with them for classroom use.
Back to top
Thursday, October 30 Workshops
Afternoon Session - 1 p.m.
Hands-On: Business and IT Collaboration using WebSphere Business Modeler & WebSphere Integration Developer Location: Markham A Co-Chairs: Rick Goldberg and Diana Lau, IBM Canada Ltd.
An overarching desire in the industry today is for the business to take back control of their projects from the IT teams. One powerful methodology for achieving this can be the use of business process management (BPM) techniques to foster better collaboration between these two groups. This workshop will introduce WebSphere Integration Developer and WebSphere Business Modeler to demonstrate how they can be used together for a business analyst and developer to jointly create a business-level application.
Hands-On: Service Component Architecture - A Simpler Architecture for SOAs Location: Markham A Chair: Doug Tidwell, IBM Corp.
SCA brings a modern approach to building composite applications by adding dependency injection to the development process. By moving more details from the application to the middleware, changes to the infrastructure do not involve the code of the application at all. This workshop will start with a discussion of SCA's key principles, and then illustrate them with a series of hands-on exercises.
Hands-On: Developing FLEX applications Location: Vaughn East Co-Chairs: Mihnea Galeteanu, Polina Gohshtein, and Irum Godil, IBM Canada Ltd.
Flex is becoming more and more mainstream when it comes to developing applications for the Web and the desktop. This workshop will introduce the audience to Flex as a means to achieve improved consumability, agility, and reuse of desktop development skills on the Web.
Hands-On: Rapid web development with Grails and Groovy Location: Aurora Chair: Aron Wallaker, IBM Canada Ltd.
Grails is a Web development framework that builds on existing Java Web and database technologies and the Groovy scripting language to create a rapid development platform for Web applications. Following a general introduction to Groovy and Grails, the workshop will focus on using Grails to rapidly develop Web applications with database functionality. Through a series of labs, participants will receive hand-on experience to create a Web application with Groovy and Grails.
Technology Curriculum for the Information Society Location: Richmond E Co-Chairs: Kelly Lyons, and Eric Yu, University of Toronto; Ross McKegney, Fadow; Ernst Grundke, Dalhousie University; Barry Lunt, Brigham Young University Speakers: Richard McDonald, IBM Canada Ltd.; Jennifer Laidlaw, Ontario Public Service; Radu Campeanu, York University
Many university programs are emerging that aim to bring balance and perspective from a broader social context to technology education for knowledge workers in the information society. Through a panel discussion of educators, employers, and students, this workshop will present and critique curricula at various stages of implementation from different institutions and academic faculties. Participants will receive descriptions of a variety of curricula prior to the workshop. At the workshop, brief presentations will be given outlining each of the curricula, then a panel of educators, students, and employers will provide feedback and critique. Participants will also engage in the discussion.
An Open Roundtable on "Technopreneurship" - The new corporate skills imperative or Computer science is dead. Long live computer science. Location: York C Co-Chairs: Ray Cao, Impact Canada & GEW Canada; Chris Paterson, IBM Canada
The Technology enterprise of the day - hardware or software, large or small - and going forward will produce ideas in the form of value-added services. Everywhere, multidisciplanary technopreneurs are needed but nowhere are they developed. A transformation is required in terms of how we approach research, education and corporate training. In effect, for technopreneurs to flourish, our traditional approach to research and education that focuses on disciplinary expertise must decline - including computer science. We want know what you think. Join senior representatives from SSHRC, the Ontario government, UW, IBM and others in an open roundtable. Help define the technopreneurship skills challenge for further debate by leaders in government, research, education and business.
SOA Research Challenges: Current Progress and Future Challenges Location: Richmond D Co-Chairs: Dennis Smith and Grace Lewis, Software Engineering Institute; Kostas Kontogiannis, University of Waterloo; Marin Litoiu, York University Speakers: David Ing and Chris Brealey, IBM Canada Ltd.; Hausi Muller, University of Victoria; Scott Tilley, Florida Institute of Technology
This workshop will identify critical SOA research challenges that need to be addressed by the research community for SOA to fulfill its promise. The workshop will present a taxonomy of SOA research issues that will be used to frame the rest of the discussion. The workshop will focus on research needs that are currently causing the greatest pain for SOA practitioners. Topics will include "hard problems", tooling issues, governance challenges, monitoring through the life cycle, and the longer-term evolution of SOA. The workshop will include presentations by practitioners and the research community in addressing critical unmet issues.
Download PowerPoint© slides (3.05mb)
User interfaces for visualizing complex data Location: Richmond A/B Co-Chairs: Igor Jurisica, Ontario Cancer Institute; Michael McGuffin, ETS Montreal Speakers: Gord Davison, IBM Canada Ltd.; Douglas J. Moseley, Princess Margaret Hospital; Thomas Kapler, Oculus Info Inc; Kevin Brown, D. Otasek, and A. Muhammad, Ontario Cancer Institute
This workshop will provide glimpses into current practices and state-of-the-art developments in user interfaces for visualizing, analyzing, and interpreting complex data. Reviewed will be the challenges in specific application domains, as well as available graphical user interface approaches, with the goal of identifying directions for future research and applications. Novel and special strategies for visualization, such as alternate representations, multiple views, use of color, layers, animation, zooming, and interaction techniques will be discussed. Applications areas will include 2D and 3D visualization, business intelligence, databases, bioinformatics, biomedical visualization, the Web, collaborative visualization, and others.
Cloud Computing Location: Vaughn West Co-Chairs: Johnny Wong, University of Waterloo; Marin Litoiu, York University; Gabriel Iszlai, IBM Canada - Toronto Lab
This workshop will focus on several complementary areas of research that enable cloud computing: (a) Software as a Service (SaaS); (b) platform virtualization technologies; and (c) the business model for the cloud. Virtualization and SaaS hide the highly inflexible and technology-specific nature of the underlying computing technology, thereby greatly simplifying the tasks of software development and evolution as well as its provisioning and operation. However, to be successful, cloud computing should prove that is a sustainable and profitable business model.
Web based tools: Challenges and opportunities Location: Richmond C Co-Chairs: Leho Nigul, Joanna Ng, and Elena Litani, IBM Canada Ltd.
This workshop will give a brief introduction to rich Internet application (RIA) technology focusing on Web-based tools. Discussions will include technologies and reference architectures for designing and implementing Web-based tools, and, in particular, challenges and opportunities in modeling and application development tools will be highlighted.
Seventh Workshop on Compiler-Driven Performance Location: Thornhill Chair: Greg Steffan, University of Toronto Speakers: Clark Verbrugge, University of McGill; Kirk Kelsey and Ian Christopher, University of Rochester; Pramod Ramarao, Nikola Grcevski, Amy Wang, Kenneth Ma, Marius Pirvu, Ian Mcintosh, and Ivan Sham, IBM Canada Ltd.; Xipeng Shen, The College of William and Mary; Borys J. Bradel, University of Toronto; Christopher Kumar Anand, McMaster University
The compiler-driven performance workshop will consist of the presentation of reports on research progress at various academic and industrial sites across Canada and in the United States. Topics discussed in the workshop will include, but will not be limited to: innovative analysis, transformation, and optimization techniques; languages, compilers, and optimization techniques for multicore processors and other parallel architectures; compiling for streaming or heterogeneous hardware; dynamic compilation for high-performance and real-time environments; compilation techniques for reducing power; and tools and infrastructure for compiler research.
Back to top
About IBM Privacy Contact Terms of use Country/region [ select ]
Home Business solutions IT services Products Support & downloads My IBM
CAS Worldwide Homepage
Overview Technology Showcase Technical Papers Workshops Schedule at a Glance Speakers by Day
Monday, Oct 27 Tuesday, Oct 28 Wednesday, Oct 29 Thursday, Oct 30
Registration opens at 8:00 am.
Time Scheduled Events / Activities
8:00am Registration is now closed. CASCON 2009 will take place on November 2-5.
CASCON 2008 Highlights 9:00am Highlights and video on ITWorldCanada
More info 10:00am 9:00 a.m. - 12:00 p.m. Workshops Read the highlights article See 'Workshops' section for details View (28kb) 11:00am Get Adobe® Reader®
12:00pm
CASCON 2008 Videos 1:00pm Watch full-length videos from the conference
2:00pm Click here
1:00 p.m. - 4:45 p.m. Workshops CASCON Proceedings 3:00pm See 'Workshops' section for details CASCON Proceedings are available on the
ACM Digital Library 4:00pm
Related information CASCON archives 5:00pm 5:00 p.m. - 7:00 p.m. CASCON 2008 Technology Showcase Reception CASCON mailing list Open to all CASCON participants 6:00pm Subscribe/Unsubscribe to Location: Grand York Ballroom A CASCON mailing list 7:00pm
About IBM Privacy Contact Terms of use Country/region [ select ]
Home Business solutions IT services Products Support & downloads My IBM
CAS Worldwide Homepage
Overview Technology Showcase Technical Papers Workshops Schedule at a Glance Speakers by Day
Tuesday, Oct 28 Wednesday, Oct 29 Thursday, Oct 30
Location: Grand Richmond Ballroom
Joint Topic: Medical Research Breakthroughs - Enabled by Technology Current research into disease prevention and treatment involves innovative methods of investigation using tools, which are Registration is now closed. enabling faster and more accurate findings. In these two talks, followed by a question and answer period, two leading Canadian CASCON 2009 will take place scientists discuss their work. on November 2-5. CASCON 2008 Highlights Highlights and video on 8:30 a.m. - Keynote presentation: ITWorldCanada
Igor Jurisica More info Senior Scientist, Ontario Cancer Institute Topic: Toward an intelligent molecular medicine: Fusion of obtrusion, illusion, confusion and integrative Read the highlights article computational biology View (28kb)
Abstract Get Adobe® Reader® Despite the introduction of diverse and powerful chemotherapeutic agents over the past two decades, many cancers still carry devastating mortality rates. The accumulation of data from systematic high-throughput experiments has brought the potential to construct models of how biological systems work at the cell or whole organism level. How to integrate multiple information levels to achieve this task is not trivial, and Dr. Jurisica will discuss some of the possible approaches, as well as focus on the high resolution, interactive visualization of large networks of interacting proteins. CASCON 2008 Videos John MacDonald Scientific Director, Robarts Research Institute Watch full-length videos from Topic: Investigation into the cellular basis of neurological conditions such as stroke and Alzheimer's the conference disease Click here Abstract Strokes are characterized by a delayed loss of brain function that occurs days or even weeks after the initial event, likely because CASCON Proceedings of the delayed death of brain cells. Until recently, the entry of toxic levels of calcium (Ca2+) was accepted as the major trigger for delayed cell death, but all potential attempts to design a new therapeutic drug based on this information have failed. Dr. CASCON Proceedings are available on the MacDonald and his colleagues discovered an alternative mechanism whereby cell death is caused in stroke. ACM Digital Library In this talk, Dr. MacDonald will briefly discuss how Robarts laboratories use "off the shelf" software to acquire and analyze data, and how better tools may be able to help researchers find ways to prevent or predict the indicators of stroke. Related information CASCON archives 12:00 p.m. - Frontiers of Software Practice Speaker Joanna Ng CASCON mailing list Program Director, CAS Toronto, IBM Topic: CAS: From Research Program to Research Commercialization -- The Complete Cycle Subscribe/Unsubscribe to Location: York Ballroom C CASCON mailing list
Abstract Joanna Ng will discuss how CAS Toronto's collaborative research program will focus on five technology themes. An overview of the five technology themes and their integration will also be covered. As of this 2008, CAS has grown beyond its research program and has extended to include a model for research commercialization. Ng will share the various benefits of this model.
5:00 p.m. - Frontiers of Software Practice Speaker John Ponzo Distinguished Engineer, Research Client Technologies, IBM T.J. Watson Research Center Topic: The Extreme Makeover of the Web Experience and the Transformation of the Web Application Architecture to Enable it Location: York Ballroom B Abstract John Ponzo will share his insights into the major transformations that have occurred in the evolution of the web and its user experiences: how end users have more control in the interface, how web interactions are seamless across various context, how resulting content is more relevant and personalized, and more. Ponzo will also cover the programming models and architectures of the web applications that enable such "extreme makeovers" of the web experience.
About IBM Privacy Contact Terms of use Canada [ change ] English - Français
Home Business solutions IT services Products Support & downloads My IBM
CAS main page CASCON 2008 CASCON 2008
Hotel information Registration and Login Sign in & Submissions Sponsors
Contacts Registration and Login Full Papers The registration process has two steps: Already registered? Registration & Sign-in Step 1. Email address validation. High school competition Sign in below to access your workshop Step 2. Creating your account. schedule and account information.
Register now! Sign in Related links There is no charge to attend CASCON! IBM University Relations Programming Contest Central IBM alphaWorks Sign in to CASCON 2008 to access the workshop and exhibit submission site. IBM developerWorks DB2 for Academics WebSphere for Academics CASCON 2008 Submissions Workshops CASCON 2008 Workshops provide a forum to present, discuss, and debate issues, problems, ideas, emerging technologies, work-in-progress, or directions on topics of interest listed in the Call for Papers. Interdisciplinary workshops are particularly encouraged. The workshop format may include position papers, expert panels, hands-on exercises, and discussions. The Workshop Committee will review each workshop proposal. Acceptance will be based on an evaluation of the workshop's potential for generating useful results, the timeliness and expected interest in the topic, and the organizers' ability to lead a successful workshop. Workshop proceedings will be published on the CASCON website.
Exhibits We invite researchers and developers from IBM, universities, government agencies, and our industry partners to present their latest technological undertakings in CASCON's Technology Showcase, an interactive forum which allows researchers and developers to meet and interact in a friendly atmosphere. CASCON will provide to exhibitors, at no cost, demo booth, signage, and power.
Registration help If you encounter problems during the registration process, please email [email protected] with a description that includes any error message you received.
About IBM Privacy Contact Terms of use Canada [ change ] English - Français
Home Business solutions IT services Products Support & downloads My IBM
CAS Worldwide Homepage CASCON 2008 CASCON 2008 Hotel information Hotel information Sponsors
Contacts CASCON 2008 venue Full Papers Sheraton Parkway Toronto North Hotel and Convention Centre Registration & Sign-in 600 Highway 7 East (at Highways 404 & 7) Richmond Hill, Ontario L4B 1B2 Canada High school competition Phone: (905) 881 2121 Or 1-800-668-0101
Related links Directions Room rates are $139 at the Sheraton Parkway Toronto North Hotel and Convention IBM University Relations Centre. Programming Contest Central Room rates are $109 at the Best Western Parkway Hotel which is attached to the Sheraton. IBM alphaWorks IBM developerWorks DB2 for Academics Other Accommodations WebSphere for Academics Hilton Suites Toronto/Markham Conference Center & Spa 8500 Warden Avenue, Markham, ON CA L6G 1A5 Phone: (905) 470-8500
Comfort Inn 8330 Woodbine Ave Phone: (905) 477-6077
Howard Johnson Toronto-Markham 555 Cochrane Dr (Woodbine south of Hwy 7) Phone: (905) 479-5000
Monte Carlo Inn 8900 Woodbine Ave Phone: (905) 513-8100
Hilton Garden Inn 30 Commerce Valley Drive East, Markham Phone: (905) 709-8008
For information about bus transit in Markham, visit http://www.yorkregiontransit.com/.
About IBM Privacy Contact Terms of use Canada [ change ] English - Français
Home Business solutions IT services Products Support & downloads My IBM
CAS Worldwide Homepage CASCON 2008 CASCON 2008 Hotel information Sponsors Sponsors
Contacts CASCON Proceedings Full Papers CASCON Proceedings are available on the Registration & Sign-in
High school competition ACM Digital Library
IBM Centers for Advanced Studies http://ibm.com/ibm/cas Related information Related links CASCON archives IBM University Relations Programming Contest Central IBM alphaWorks CASCON mailing list IBM Toronto Software Lab IBM developerWorks Subscribe/Unsubscribe to http://www-03.ibm.com/software/ca/en/torontolab/ DB2 for Academics CASCON mailing list WebSphere for Academics
Ontario Centres of Excellence http://www.oce-ontario.org/default.aspx
In partnership with
National Research Council Canada http://www.nrc-cnrc.gc.ca/
About IBM Privacy Contact Terms of use Canada [ change ] English - Français
Home Business solutions IT services Products Support & downloads My IBM
CAS Worldwide Homepage CASCON 2008 CASCON 2008 Hotel information Contacts Sponsors
Contacts If you have any questions or require more information about CASCON 2008, please forward your CASCON Proceedings Full Papers inquiries to [email protected]. CASCON Proceedings are available on the Registration & Sign-in
High school competition ACM Digital Library
Related information Related links CASCON archives IBM University Relations Programming Contest Central IBM alphaWorks CASCON mailing list IBM developerWorks Subscribe/Unsubscribe to DB2 for Academics CASCON mailing list WebSphere for Academics
About IBM Privacy Contact Terms of use Canada [ change ] English - Français
Home Business solutions IT services Products Support & downloads My IBM
CAS Worldwide Homepage CASCON 2008 CASCON 2008 HSPC
Competition results High School Programming Contest Central
Registration PCC Archive PCC 2007 Schedule PCC 2006 Download PCC 2005 Q&A Session
Teachers tech workshop Related Information CASCON Programming Competition 2007 Related links A rundown of last year's IBM University Relations competition, including winners Programming Contest Central and participating schools. IBM alphaWorks More info IBM developerWorks DB2 for Academics WebSphere for Academics Mailing list Subscribe/Unsubscribe to PCC mailing list
This year your Java challenge is "I Have a Code"! "I Have a Code" is a gaming simulator challenge, created by university students here at IBM. "I Have a Code" is loosely based on the trials and tribulations of cell colonies in the human body. Code super-cold cells to work in unison and form a colony that will grow, expand, split, specialize, and attack other cell colonies. You will be strategizing and programming in Java to compete for the highest score.
You will be competing in teams of two, with teams coming from local Ontario high school. The "I Have a Code" Challenge allows direct, real-time competition between teams. After three rounds of a round-robin tournament, the top winners will be determined during a tournament consisting of several rounds and eliminations.
Details are as follows:
Date: Wednesday, October 29, 2008 Place: Sheraton Parkway Toronto North Hotel and Convention Centre, 600 Highway 7 East (at Highways 404 & 7), Richmond Hill, Ontario Time: 8:30 am to 4:00 pm. What To Bring: One piece of printed resource material like a textbook. NO PRINTED OR WRITTEN PAPERS ARE ALLOWED. Breakfast and lunch will be provided at no cost.
As for "I Have a Code", there are a couple of things you will need to do to get it running on your computer.
Instructions I. Download a Java Runtime Environment (JRE). Version 6.0 or higher is recommended to run "I Have a Code" (if you see 1.6.0 on the "I Have a Code" site, don't worry, it's the same thing).
Get JRE 6.0
II. Download Eclipse. Version 3.4 or higher is recommended. Extract into an accessible folder (like on your desktop).
Get Eclipse IDE
III. Download "I Have a Code". The latest version. Installation instructions are on the site.
Get "I Have a Code"
IV. Read the Explanation. It's useful, so take advantage of it! It's quite long, but it really helps to clear up the game. (Right- click and choose 'Save Target As...')
Download manual
Prepare as much as possible beforehand. You will be permitted one book or other published resource but no other programs or written material of any kind will be permitted. There is a multi- part scoring system in place (found in the "I Have a Code" manual). When developing your strategy, make sure you take this into account!
If installed properly, a running game should look like this:
The Start of an "I Have a Code" Game
And as the game progresses...
The Middle of an "I Have a Code" Game
Number of cells, types of cells, and elimination of other cells contribute to your final score. Do what you will, but the colony with the highest score after a full day (or approximately a minute in real time), shall be declared the winner.
Your next steps A guide to information about registration. Competition Itinerary A schedule of what will happen on the competition day. Subscribe to e-mail notification Make sure you register to receive registration information and competition updates! CASCON Programming Competition 2008 The student's competition page. Pass this link on to any students interested in participating in the competition.
About IBM Privacy Contact Terms of use Highlights from CASCON 2008
The IBM Centers for Advanced Studies’ (CAS) CAS conference (CASCON) may have started out relatively small, but its growth has been remarkable. The first conference, held in 1991, was attended by 650 people. It featured 32 demonstrations and 26 paper presentations. Just two years later, the number of demonstrations at CASCON had grown to 70. By 2006, approximately 110 demos were presented to more than 1500 CASCON attendees.
Since its inception, the conference has focused on computer science and software engineering with the intent of providing academics and industry members the opportunity to explore new research and technology.
CASCON 2008, held from October 27-30 at the Sheraton Parkway Toronto North Hotel Suites & Conference Centre, was host to over 1200 attendees. It boasted an impressive portfolio of events, including 39 workshops, 23 technical paper presentations, keynote speakers from a variety of backgrounds, and 70 exhibits and posters in the Technology Showcase.
While the conference didn’t officially kick off until the morning of Tuesday, October 28, a number of popular workshops and the CASCON 2008 Technology Showcase Reception were held on Monday, October 27.
Tuesday’s opening remarks by the Head of CAS Toronto, Joanna Ng, set the tone for the rest of the conference. Following the Best Paper Awards presentation, the keynote presenters, Dr. Igor Jurisica and Dr. John MacDonald spoke about how innovative technology has enabled breakthroughs in cancer and stroke research respectively.
This was just the beginning of the exciting and informative events at CASCON. Highlights from the four day conference included:
• Thirty-nine workshops gave attendees an opportunity to learn about and discuss up-and- coming technologies. Of these workshops, thirteen were hands-on, allowing attendees to use hot technologies like Ajax. CASCON workshops tend to be a barometer for emerging technologies and topics. Twelve workshops were categorized as Enterprise Web 2.0, and eight were Service Oriented Architecture 2.0. • The Best Student Paper Award was given to former CAS student and now IBM employee Andriy Miranskyy. Co-authors were Nazim Madhavji and Matt Davison from University of Western Ontario, Mechelle Gittens from the University of the West Indies, and IBM developers Mark Wilding, Dave Godwin, and Colin Taylor for their work “SIFT: A Scalable Iterative-Unfolding Technique for Filtering Execution Traces.” • The Best Paper Award was granted to Wendy Powley and Pat Martin from Queen’s University, and Paul Bird of the IBM Canada Lab, Toronto for their paper “DBMS Workload Control Using Throttling: Experimental Insights.” • A Women in Technology luncheon and workshop focused on the themes “Attract,” “Retain,” and “Excel.” Keynote speakers were Dr. Pat Selinger, retired IBM Fellow and VP of Database technology and current advisory board member of Women in Technology International, and Dr. Margaret-Anne “Peggy” Storey, an associate professor at University of Victoria and a CAS Visiting Scientist. • Keynote and Frontiers of Software Practice speakers’ topics were diverse. In addition to Tuesday’s speeches from Dr. Jurisica and Dr. McDonald, Joanna Ng spoke about recent changes at CAS Toronto, including the five technology themes that are the focus of its collaborative research program. Tuesday evening, John Ponzo of the IBM T.J. Watson Research Center spoke about changes that have occurred in the web experience and the transformation of the web application architecture to enable them. • Wednesday morning, Google’s Alex Nicolaou was on hand to speak about the company’s web browser, Chrome. Wednesday afternoon, Brent Hailpern, also of IBM T.J. Watson Research Center, spoke about technology and social trends in software development. • Thursday, Paul Kedrosky of the Kauffman Foundation spoke about commercialization on a dollar a day. Later, Nagui Halim, also of IBM T.J. Watson Research Center, gave a speech about Data Streaming. • The Fourth Annual CASCON High School Programming Contest took place on Wednesday, October 29. Working with Tim Deboer, RAD Release Architect in the WebSphere Tools team, this year's Java/Eclipse-based challenge was designed by CAS Summer High School Internship students. Sixty-eight (Grade 10 - 12) students from twenty-four high schools across the GTA competed in the “I Have a Code" competition. While the student competitors worked on the programming challenge, their teachers participated in a full-day workshop. As in past years, this education session for the teachers provided new material and teaching materials for them to use in the classroom, and provided an opportunity for them to share ideas and insights on how to make computer science more interesting to students.
CASCON 2008 continued the conference’s tradition of showcasing new research and technology. It would not have been possible without the academics, IBM employees, and other industry members who submitted content for consideration. CAS would like to thank everyone who participated in and volunteered for CASCON.
Videos of the keynote speeches are currently available for viewing online. Workshop, speaker, and paper presentation abstracts are currently available at the CASCON 2008 website, and will later be archived at https://www.ibm.com/ibm/cas/archives/index.shtml.
Canada [ change ] English - Français
Home Business solutions IT services Products Support & downloads My IBM
CAS Worldwide Homepage CASCON 2008 CASCON 2008 Hotel information CASCON 2008 Videos Sponsors
Contacts Tuesday, October 28th CASCON Proceedings Full Papers CASCON Proceedings are available on the Registration & Sign-in ACM Digital Library High school competition
Related information Related links CASCON archives IBM University Relations Programming Contest Central IBM alphaWorks CASCON mailing list IBM developerWorks Subscribe/Unsubscribe to DB2 for Academics CASCON mailing list WebSphere for Academics
Opening Remarks Joanna Ng & Christian Couturier
Best Paper Awards Dr. Mark Vigder
Keynotes John MacDonald & Igor Jurisica
Frontiers of Software Practice Joanna Ng, IBM Centers for Advanced Studies
Back to top
Wednesday, October 29th
'Pat Selinger PhD Fellowship' award presentation
Keynote Alex Nicolaou, Google Inc.
Frontiers of Software Practice Brent Hailpern, IBM T.J. Watson Research Center
Back to top
Thursday, October 30th
Special Presentation Levon Stepanian, IBM Canada Inc.
Keynote Paul Kedrosky, Kauffman Foundation
Back to top
About IBM Privacy Contact Terms of use
Country/region [ select ]
Home Business solutions IT services Products Support & downloads My IBM
CAS Worldwide Homepage
Overview Technology Showcase Technical Papers Workshops Schedule at a Glance Speakers by Day
Tuesday, Oct 28 Wednesday, Oct 29 Thursday, Oct 30
Tuesday, October 28 paper presentations
Registration is now closed. Session 1: Databases CASCON 2009 will take place DBMS Workload Control Using Throttling: Experimental Insights on November 2-5. Best Paper Wendy Powley and Pat Martin, Queen's University; Paul Bird, IBM Toronto Lab CASCON 2008 Highlights Highlights and video on Today's Database Management Systems (DBMSs) are required to handle diverse, mixed workloads and to provide differentiated ITWorldCanada levels of service to ensure that critical work takes priority. In order to meet these needs it is necessary for a DBMS to have control over the workload executing in the system. Lower priority workloads should be limited to allow higher priority workloads to More info complete in a timely fashion. In this paper we examine query throttling techniques as a method of workload control. In our Read the highlights article approach, a workload class may be slowed down during execution, thus releasing system resources that can be used by higher View (28kb) priority workloads. We examine two methods of throttling; constant throttling throughout query execution, and query interruption in which a query is paused for a period of time. A set of experiments using Postresql 8.1 provides insights regarding the performance Get Adobe® Reader® of these different throttling techniques under different workload conditions and how they compare to using operating system process priority control as a throttling mechanism.
Efficient XPath Query Processing P. Mark Pettovello and Farshad Fotouhi, Wayne State University
We propose improved XPath query processing algorithms for the MTree navigational XML database index on schema-less XML CASCON 2008 Videos documents. Our algorithms efficiently resolve element name specific XPath navigational queries without a need for sorting or for Watch full-length videos from qualified name filtering on intermediate sequences. The optimization methods are applicable for all axes but are presented for the the conference four major XPath axes: descendant, ancestor, following and preceding. Experimental results are included that show substantial performance improvements over other methods. Click here
Autonomic Tuning Expert - A Framework for Best-Practice Oriented Autonomic Database Tuning David Wiese and Gennadi Rabinovitch, Friedrich-Schiller-University Jena; Michael Reichert and Stephan Arenswald, IBM CASCON Proceedings Deutschland Research & Development GmbH CASCON Proceedings are available on the A prototype called Autonomic Tuning Expert (ATE) was developed, following the ideas of autonomic computing. It is a feedback control loop based infrastructure for automating typical tuning tasks requiring minimal human intervention. ATE enables DBAs to ACM Digital Library store, maintain, exchange, and adapt their best-practice tuning methods and correlate them with problem-indicating events. Related information Back to top CASCON archives Session 2: Web Applications Synchronized Tag Clouds for Exploring Semi-Structured Clinical Trial Data Maria-Elena Hernandez, Sean M. Falconer and Margaret-Anne Storey, University of Victoria; Simona Carini and Ida Sim, CASCON mailing list University of California San Francisco Subscribe/Unsubscribe to CASCON mailing list Searching and comparing information from semi-structured repositories is an important, but cognitively complex activity for internet users. The typical web interface displays a list of results as a textual list which is limited in helping the user compare or gain an overview of the results from a series of iterative queries. In this paper, we propose a new interactive, lightweight technique that uses multiple synchronized tag clouds to support iterative visual analysis and filtering of query results. Although tag clouds are frequently available in web interfaces, they are typically used for providing an overview of key terms in a set of results, but thus far have not been used for presenting semi-structured information to support iterative queries. We evaluated our proposed design in a user study that presents typical search and comparison scenarios to users trying to understand heterogeneous clinical trials from a leading repository of scientific information. The study gave us valuable insights regarding the challenges that semi- structured data collections pose, and indicated that our design may ease cognitively demanding browsing activities of semi- structured information.
Personalized Recommendation of Related Content Based on Automatic Metadata Extraction Andreas Nauerz, IBM Research and Development; Fedor Bakalov and Birgitta König-Ries, University of Jena; Martin Welsch, IBM Germany Research and Development
In order to efficiently use information, users often need access to additional background information. This additional information might be stored at various places, such as news websites, company directories, geographic information systems, etc. Oftentimes, in order to access these different pieces of information, the user has to launch new browser windows and direct them to appropriate resources. In our today's Web 2.0, the problem of accessing background information becomes even more prominent: Due to the large number of different users contributing, Web 2.0 sites grow quickly and, most often, in a more uncoordinated way regarding, e.g., structure and vocabulary used, than centrally controlled sites. In such an environment, finding relevant information can become a tedious task.
This paper proposes a framework allowing for automated, user-specific annotation of content which enables provisioning of related information. The approach is being implemented within IBM's WebSphere Portal.
Online Stroke Modeling for Handwriting Recognition Oleg Golubitsky and Stephen M. Watt, University of Western Ontario
The process of recognizing individual hand-written characters is one of classifying curves. Typically, handwriting recognition systems---even ''online'' systems---require entire characters be completed before recognition is attempted. This paper presents a better approach for real-time recognition: certain characteristics of a curve can be computed as the curve is being written, and these characteristics are used to classify the character in constant time when the pen is lifted. We adapt an earlier approach of representing curves in a functional basis and reduce real-time stroke modelling to the Hausdorff moment problem.
Back to top
Session 3: Software Engineering I Flexible Verification of User-Defined Semantic Constraints in Modelling Tools Daniel Amyot and Jun Biao Yan, University of Ottawa
Many modelling tools embed verification rules that are checked against user-defined models to ensure they satisfy the static semantic constraints of the modelling language. However, there are many other contexts where required constraints vary with the intended purpose of the model, and not just the modelling language used. In this paper, we propose a flexible and practical approach for users to define, select, store, group, exchange, enable, and verify custom semantic constraints expressed in the Object Constraint Language. We illustrate the benefits of this approach with exten-sions to an Eclipse-based modelling tool, called jUCMNav, and applications to various contexts such as style compliance, analysis, and transfor-mations that involve chains of tools. We believe this approach to be easily adaptable to other Eclipse-based modelling tools, which could then enjoy similar benefits.
Towards a UML Virtual Machine: Implementing an Interpreter for UML 2 Actions and Activities Michelle L. Crane and Juergen Dingel, Queen's University
An interpreter for UML 2 actions and activities is presented. It is based on two novel features in UML 2: the three-layer semantics architecture and the new token offer semantics for activities, which is intended to generalize the token flow semantics of Petri nets. The interpreter offers an array of analysis capabilities, ranging from random execution to reachability properties and assertion and deadlock checking. The design of the interpreter makes it suitable as the basis for a more comprehensive UML virtual machine.
An Empirical Study of the Design and Implementation of Object Equality in Java Chandan R.Rupakheti and Daqing Hou, Clarkson University
Applications which are built on top of an existing design and implementation are in general expected to collaborate well with the existing design and respect all of its intent. Failure in achieving this may result in buggy, fragile, and less maintainable code in the applications. When the dependence on an existing design becomes more wide-spread, this requirement on proper extension becomes even more critical. As an instance of this general problem, the object equivalence design in Java as well as its extensions is examined in detail and empirically. By examining how object equivalence is extended in a large amount of Java code, a set of typical problems associated with extending the object equivalence design are detected and their root causes analyzed. A set of design guidelines for object equivalence are proposed, which, if followed, will help programmers systematically design and evolve rather than hack on a solution. Examples are drawn from a case study of multiple industrial and open source projects to illustrate the identified problems and demonstrate how the proposed guidelines help solve these problems.
Back to top
Wednesday, October 29 paper presentations Session 4: Systems I Automating SLA Modeling Tony Chau, Vinod Muthusamy, and Hans-Arno Jacobsen, University of Toronto; Elena Litani, Allen Chan,Phil Coulthard, IBM Canada Ltd.
Service Level Agreements (SLA) define the level of service that a service provider must deliver. An SLA forms a contract between service provider and consumer, and includes appropriate actions to be taken upon violation of the contractual obligations. However, the process of implementing an SLA using the existing IT infrastructure is difficult, as it requires a lot of manual effort to translate an SLA into code, model it with the given programming language, and ensure the required monitoring support is available to ensure efficient monitoring and tracking of the SLAs.
In this paper, we present a solution for modeling an SLA contract. It is designed to be configurable, reusable, extensible and inheritable thus providing great flexibility to construct complex SLAs. We also introduce an algorithmic generation pattern to create the necessary artifacts to implement an SLA presented in this paper. The resulting artifacts automatically monitor a business process and evaluate whether the SLA is violated during runtime execution. The proposed approach is designed to require minimal human intervention.
Capacity Planning for Service-Oriented Architectures Michael Smit, Andrew Nisbet, and Eleni Stroulia, University of Alberta; Andrew Edgar and Gabriel Iszlai, IBM Toronto Lab; Marin Litoiu, York University
Service-oriented architectures (SOAs) are being increasingly adopted for the development of distributed applications that involve multiple partner organizations. The main challenge in configuring such applications - whether autonomously or manually - is meeting the service quality expected by the consumers.
In this paper, we describe a methodology and corresponding tool implementation for estimating the capacity of alternative configurations of complex service-oriented applications. We use a sophisticated enterprise application with many possible configurations as our test application. The current tool prototype simulates the behavior of the application for a given configuration on an existing network topology. This simulation is relatively coarse-grained, but is capable of tracking several performance indicators. We evaluate this simulation output against actual performance data.
A Reliability Estimation for Large Distributed Software Systems Alberto Avritzer and Flávio P. Duarte, Siemens Corporate Research; Rosa Maria Meri Leão and Edmundo de Souza e Silva, Universidade Federal do Rio de Janeiro, Brazil; Michal Cohen and David Costello, Siemens Transportation Systems
In this paper we present our experience to estimate the reliability of a large distributed system composed of several hundred points of presence for which we were required by contract to estimate its reliability. We present a simple approach that accurately approximates the reliability of this very large system.
Back to top
Session 5: Software Engineering II A Methodological Leg to Stand On: Discoveries Using Grounded Theory to Study Software Development Steve Adolph, Wendy Hall, and Philippe Kruchten, University of British Columbia
We are engaged in qualitative research projects to understand how people manage the process of software development. This study uses grounded theory as its method of inquiry and we have learned much about what is and what is not a grounded theory. We, like many researchers have claimed to follow grounded theory methods and even to produce a substantive theory. In reality, we often only borrow a few grounded theory practices to categorize our data. At best, making claims about methods which cannot be substantiated creates theories that can be challenged, and at worst we may be claiming theory status for what constitutes journalistic description illustrated by anecdotes. Using such findings as evidence can have serious consequences for our industry if the purpose of the research is to inform software development policy. Yet, if we believe agile is about people, then the grounded theory method offers us an opportunity to observe and understand the behaviour of people which affects our understanding of software engineering phenomena. This paper presents lessons learned about using grounded theory so that both researchers and reviewers can critically evaluate investigators' claims to be producing grounded theory as opposed to what is sometimes referred to as journalistic description.
A Taxonomy of Software Types to Facilitate Search and Evidence-Based Software Engineering Andrew Forward and Timothy C. Lethbridge, University of Ottawa
Empirical software research could be improved if there was a systematic way to identify the types of software for which empirical evidence applies. This is because results are unlikely to be globally applicable, but are more likely to apply only in certain contexts such as the type of software on which the evidence has been tested. We present a software taxonomy that should help researchers to apply their research systematically to particular types of software. The taxonomy was generated using existing partial taxonomies and input from survey participants. If a taxonomy such as ours gains acceptance, it will facilitate comparison and appropriate application of research. In the paper, we present the benefits of such a taxonomy, the process we used to develop it, and the taxonomy itself.
Building Highly-Interactive, Data-Intensive, REST Applications: The Invenio Experience Michelle Annett and Eleni Stroulia, University of Alberta
With the explosion of Web 2.0 ideas and tools, the importance of on-line collaboration and information sharing has never been more prevalent. Many companies have acknowledged this fact by adopting analytics tools to mine the on-line sentiment regarding their products and services and to effectively market these products and services. The music industry, in spite of the multitude of means for media sharing and buying online, does not appear to have gone far enough in exploiting the web for market analysis and communication. In this paper, we discuss Invenio, a geovisualization and trend-analysis REST-based Rich Internet Application for the music industry. Invenio utilizes a variety of different technologies (Yahoo! Maps, Amazon Associates Web Service, REST, and the Flex framework) to deliver a dynamic, innovative service and, in this paper, it is examined as a case study of the relevant technologies and a set of "good practices" for developing such applications.
Back to top
Session 6: Compilers OpenMP Tasks in IBM XL compilers Xavier Teruel, Barcelona Supercomputing Center - Universitat Politècnica de Catalunya; Priya Unnikrishnan, IBM Toronto Laboratory; Xavier Martorell and Eduard Ayguadé, Barcelona Supercomputing Center - Universitat Politècnica de Catalunya; Raul Silvera, Guansong Zhang and Ettore Tiotto, IBM Toronto Laboratory
Tasking is the most significant feature of the OpenMP 3.0 standard. It was introduced to handle unstructured parallelism and broaden the range of applications that can be parallelized by OpenMP. This paper presents the design and implementation of the task model in the IBM XL parallelizing compilers. The task construct is significantly different from other OpenMP constructs and we discuss here some of the unique challenges in implementing the task construct and its associated synchronication constructs. We also present a performance evaluation of our implementation on a set of benchmarks and applications. We identify limitations in the current implentation and propose solutions for further improvement.
High Performance XML Parsing Using Parallel Bit Stream Technology Robert D. Cameron, Kenneth S. Herdy, and Dan Lin, Simon Fraser University
Parabix (parallel bit streams for XML) is an open-source XML parser that employs the SIMD (single-instruction multiple-data) capabilities of modern-day commodity processors to deliver dramatic performance improvements over traditional byte-at-a-time parsing technology. Byte-oriented character data is first transformed to a set of 8 parallel bit streams, each stream comprising one bit per character code unit. Validation, transcoding and lexical item stream formation are all then carried out in parallel using bitwise logic and shifting operations. Byte-at-a-time scanning loops in the parser are replaced by bit scan loops that can advance by as many as 64 positions with a single instruction.
A performance study comparing parabix with other available C or C++ based parsers is carried out using the PAPI toolkit. Total CPU cycle counts as well as other important performance measures including level 2 cache misses and branch mispredictions are measured for various key components of parabix as well as for the other available parsers. Prospects for further performance improvements are also outlined, with a particular emphasis on leveraging the intraregister parallelism of SIMD processing to enable intrachip parallelism on multicore architectures.
Back to top
Thursday, October 30 paper presentations Session 7: Systems II Information-Theoretic Modeling for Tracking the Health of Complex Software Systems Miao Jiang, Mohammad A. Munawar, Thomas Reidemeister and Paul A. S. Ward, University of Waterloo
Stable correlation models are effective in detecting errors in complex software systems. However, most studies assume a specific mathematical form, typically linear, for the underlying correlations. In practice, more complex non-linear relationships exist between metrics. Moreover, most inter-metric correlations form clusters rather than simple pairwise correlations. These clusters provide additional information for error detection and offer the possibility for optimization. We address these issues by adopting the Normalized Mutual Information as a similarity measure. We also employ the entropy of metrics in clusters to monitor system state. Our approach does not require learning specific correlation models, thus reducing computation overhead.
We have implemented the proposed approach and show, through experiments with a multi-tier enterprise software system, that it is effective. Our evaluation shows that (i) stable non-linear correlations exist in practice; (ii) the entropy of system metrics in clusters can efficiently detect anomalies caused by faults and provide information for diagnosis; and (iii) we can detect errors which were not captured by previous linear-correlation approaches.
Using Economic Models to Allocate Resources in Database Management Systems Mingyi Zhang, Patrick Martin, and Wendy Powley, Queen's University; Paul Bird, IBM Toronto Lab
Resource allocation in database management systems is a workload management process in which an autonomic DBMS makes resource allocation decisions based on properties like workload business importance. We propose the use of economic models to guide the resource allocation decisions. An economic model is described in terms of business concepts and has been successfully applied in computer system resource allocation problems. In this paper, we present an approach that uses economic models to allocate multiple resources, such as main memory buffer space and CPU shares, to workloads running concurrently on a DBMS. The economic model enables workloads to meet their service level objectives by allocating resources through partitioning the individual DBMS resources and making system-level resource allocation plans for the workloads. The resource allocation plans can be dynamically changed to respond to changes in workload performance requirements. Experiments are conducted on IBM® DB2® to verify the effectiveness of our approach.
NetPal: A Dynamic Network Administration Knowledge Base Ashley George, Adetokunbo Makanju, Evangelos Milios and Nur Zincir-Heywood, Dalhousie University; Markus Latzel and Sotirios Stergiopoulos, Palomino System Innovations Inc.
NetPal is a web-based dynamic knowledge base solution designed to assist network administrators in their troubleshooting tasks, in recalling and storing experience, and in identifying new failure cases and their symptoms. In the context of web hosting environments, NetPal exposes and summarizes network data and organizational experience for system administrators. The system design draws on a variety of domains including knowledge management, information retrieval, machine learning and network management. The system architecture, user interface design, user software testing and future directions for development are described.
Back to top Session 8: Software Engineering III SIFT: A Scalable Iterative-Unfolding Technique for Filtering Execution Traces Best Student Paper A. V. Miranskyy and N. H. Madhavji, University of Western Ontario; M. S. Gittens, University of the West Indies; M. Davison, University of Western Ontario; M. Wilding, D. Godwin and C. A.Taylor, IBM Canada Ltd.
Comparing program execution traces can be useful for numerous purposes, such as software testing, system security analysis, program comprehension, software evolution and other areas of software development. Unfortunately, trace comparison techniques that operate on execution traces containing full execution details are too slow for use in large-scale production system environments. In order to speed up the comparisons, we propose a technique (called SIFT) for "filtering-out" irrelevant traces from a given set so that only the relevant few, residual, traces are then used in for comparison. Our solution involves multiple levels of trace compression, each with a different degree of abstraction. These traces are compared iteratively while filtering out dissimilar traces. This paper describes the compression and comparison algorithms. Prototype results from a significant case study show that the SIFT approach is efficient and scalable for use in an industrial software development environment.
An Architecture for Providing Context in WS-BPEL Processes Allen Ajit George and Paul A.S. Ward, University of Waterloo
WS-BPEL business processes are increasingly used by organizations to automate their business activities. As the pace of change in an organization increases, these processes will be required to be more flexible; to do so they will have to ac-count for an increasing amount of changing environment state, or context. This poses significant challenges for WS-BPEL programmers, who have to source, track and update context from multiple entities in addition to implementing and maintaining core business logic. In this paper we present a solution to this problem based on the definition and use of context variables. We describe how context variables can be constructed using the WS-BPEL language extension mechanism, and outline standards-compliant ways to represent, source, and propagate context in a web-services environment. We also present additional enhancements to WS-BPEL that will increase the utility of context variables and offer WS-BPEL programmers new ways of interacting with environment state. We have implemented a prototype realizing our approach and present a purchase-and-shipping scenario as an example of its use.
Is it a Bug or Enhancement? A Text-Based Approach to Classify Change Requests Giuliano Antoniol and Kamel Ayari, École Polytechnique de Montréal; Massimiliano Di Penta, University of Sannio; Foutse Khomh and Yann-Gaël Guéhéneuc, Université de Montréal
Bug tracking systems constitute valuable assets for managing maintenance activities. They are widely used in open source projects and also adopted in the industry. Despite their name, however, bug tracking systems collect any kind of issue project contributors and users might need to discuss: requests for enhancements, refactoring/restructuring activities, and even organizational issues. Unfortunately, most of the existing bug tracking systems do not have a specific field to explicitly classify the kind of issue reported. Truly they have fields to indicate issue severity that people should also use to label enhancements; however a manual inspection revealed this is not always the case. This paper investigates whether the text of issues posted on bug tracking system suffices for a classification of issues between corrective maintenance (bug) and other activities. In particular, the paper shows how data mining techniques, and in particular classification trees, naive Bayes classifiers and logistic regression can be used and even combined to perform issue classification. Results from empirical studies performed on issues of Mozilla, Eclipse, and JBoss indicate that both bugs and other issues can be classified with a precision between 70 and 92% and a recall above 60% and up to 98% in almost all cases.
Back to top
Navigation and Resources
CASCON 2008 Resources Related Links CASCON Events Registration & Sign-in Hotel information IBM University Relations CASCONcamp demo camp Full Papers Sponsors Programming Contest High school competition CASCON 2008 Program Contacts Central Committee
About IBM Privacy Contact Terms of use Hands-On: Project Zero Workshop
Hands‐On: Project Zero Workshop
Workshop Chairs: Bart Stanczyk Kalvin Misquith
TABLE of CONTENTS
Agenda ……………………………………………………………………………………….…………………. 2 Presentation Slides ………………………………………………………………………..………….……. 3 Exercise 1 – Introduction to sMash’s Application Builder …………………………...……….. 10 Exercise 2 – Creating the form for Gas Efficiency Calculator ……………………………….… 15 Exercise 3 – Creating the ZRM, Data store and Data grid ……………………………………… 31 Exercise 4 – Assemble flow ………………………………………………………………………………. 39 Exercise 5 – Adding security to the Gas efficiency calculator application ……………….. 51
Page 1 of 54 © Copyright IBM Corporation 1994, 2008. All rights reserved. 11/14/2008 Hands-On: Project Zero Workshop
Agenda
Time (p.m.) Activity
1:00 ‐ 1:20 Introduction
1:20 ‐ 1:45 Exercise 1 Introduction to App builder
1:45 ‐ 2:30 Exercise 2 Creating a form, DOJO
2:30 ‐ 2:45 Break
2:45 ‐ 3:15 Exercise 3 Zero Resource Model, Data store and Data grid
3:15 ‐ 3:30 Break
3:30 ‐ 4:15 Exercise 4 Assemble Flow
4:15 ‐ 4:35 Exercise 5 [if time permits] Security / Authentication
4:35 ‐ 4:45 Conclusion
Page 2 of 54 © Copyright IBM Corporation 1994, 2008. All rights reserved. 11/14/2008 Hands-On: Project Zero Workshop
Presentation Slides
______Project Zero/ WebSphere sMash ______Hands-on workshop ______
______Agenda Time (p.m.) Activity ______1:00 - 1:20 Introduction 1:20 - 1:45 Exercise 1 Introduction to App builder ______1:45 - 2:30 Exercise 2 Creating a form, DOJO 2:30 - 2:45 Break ______2:45 - 3:15 Exercise 3 Zero Resource Model, Data store and Data grid 3:15 - 3:30 Break 3:30 - 4:15 Exercise 4 ______Assemble Flow 4:15 - 4:35 Exercise 5 [if time permits] Security / Authentication ______4:35 - 4:45 Conclusion ______
Page 3 of 54 © Copyright IBM Corporation 1994, 2008. All rights reserved. 11/14/2008 Hands-On: Project Zero Workshop
______Goals ______• Objective: Walk you through some of the fundamental features provided by WebSphere sMash for agile and simple creation of web applications ______
• Part 1: Explore the web-based app builder interface and ______learn the base concepts and file structure of a sMash application ______• Part 2: In-depth look into some of the sMash features with accompanied exercises. ______
______
______What is WebSphere sMash? ______• sMash is Community-Driven Commercial development of IBM’s WebSphere. • Project Zero - development community for WebSphere sMash - ______www.projectzero.org • sMash vs. Tomcat vs. WebSphere App Server vs. others – What you can do ______• Develop and execute entire web applications using a web based environment • Quickly (and easily) expose RESTful services and ______integration mash-ups to the web • Use dynamic scripting languages (PHP, Groovy) to handle events ______• Make use of dojo-aware assembly tools ______
______What does sMash have to offer? ______• Speed – Dynamic Scripting Languages (Groovy and PHP) – An integrated runtime environment (Server + development software) ______– Agile applications that perform and scale (Can be managed by IBM WebSphere Extended Deployment) • Simplicity – REST services expose and leverage pre-existing content ______– Assembly style development produces fast composite applications (by assembling existing services and feeds) • Agility ______– End to end development and run time environment (fewer development roles) – Component style development and delivery (reusable building blocks) – Integrated environment to manage agile applications (cost effective) ______
______
Page 4 of 54 © Copyright IBM Corporation 1994, 2008. All rights reserved. 11/14/2008 Hands-On: Project Zero Workshop
______Benefits ______• Agile, simple and fast development of RESTful applications. ______• Minimum configuration required (dependency resolution) ______• Quick and easy installation • Support for popular dynamic scripting languages like PHP and Groovy. ______• Allows for rapid aggregation of disparate services and feeds ______
______Concepts ______• Global context: central construct to store and retrieve environment information – Shared by ALL threads of an HTTP session for a particular ______application • Security for web applications: examples include basic, form- based, open-id authentication. ______• Response rendering: renders files to the output stream – View, error, JSON, XML – Atom and RSS support ______• Configuration (zero.config) : properties and behaviour of sMash • Dependencies : external modules that an application depends on • Event handling using implicit or explicit script handlers ______
______Developing project zero applications ______• Command Line Interface (CLI) ______
• WebUI Eclipse ______
______
Page 5 of 54 © Copyright IBM Corporation 1994, 2008. All rights reserved. 11/14/2008 Hands-On: Project Zero Workshop
______Technologies ______• Scripting languages – Groovy, PHP • REST ______• Transportation/representation of data – JSON, XML • Frontend – DOJO (AJAX) ______• Database access – IBM pureQuery , JDBC – Derby, DB2, MySQL, Oracle & others ______
______
______World Wide Web Resources ______• Representational State Transfer (REST) – An architectural style of exposing resources over the internet HTTP CRUD ______POST Create, Update, Delete • Principles: GET Read Create, ______– Client-server requests PUT Overwrite/Replace – Stateless requests (applies only DELETE Delete to request, does not necessarily mean there is no state on ______the middle tier) – All resources accessed using HTTP CRUD operations – Resources that are named using a URL, (i.e. HTTP URL) ______
______REST & sMash ______• Conventional access of resources: – /resources/
______
Page 6 of 54 © Copyright IBM Corporation 1994, 2008. All rights reserved. 11/14/2008 Hands-On: Project Zero Workshop
______Exercise 1, 2 ______• 25 min. • 45 min. ______
______Zero Resource Model (ZRM) 1 ______• Resource model definition • CWPZC9212I: Created table -> JSON example ‘persons.json’ PERSONS for Type -> persons using { "fields" : • CREATE TABLE persons ( ______{ first_name VARCHAR(40), "first_name": { age INTEGER, ______"type":"string", "max_length":40 id INTEGER PRIMARY KEY }, GENERATED BY DEFAULT AS “age":{ ______IDENTITY (START WITH 100, "type":"integer" INCREMENT BY 1) NOT NULL, } updated TIMESTAMP NOT NULL } ) ______} ______
______Event Driven Processing ______• Firing event = REST API invocation (GET, POST, etc) ______• Causes sMash to invoke associated handler – Implicit Registration :Naming convention ______– Explicit Registration : Specified in configuration file – Dynamic registration : Special event fired to resolve handlers ______• Handlers can be default or user defined (Groovy, Java, PHP) ______
______
Page 7 of 54 © Copyright IBM Corporation 1994, 2008. All rights reserved. 11/14/2008 Hands-On: Project Zero Workshop
Event lifecycle example for HTTP request ______[show this] ______Request End Request Begin ______Log Secure ______GET/ PUT/ POST / DELETE ______
______
______Exercise 3 ______• 30 min. ______
______Assemble flow ______• Constructing a feed style application that processes and aggregates a set of feeds from different sources. ______• Naming convention
Page 8 of 54 © Copyright IBM Corporation 1994, 2008. All rights reserved. 11/14/2008 Hands-On: Project Zero Workshop
______Exercise 4, 5 ______• 45 min. • 15 min. ______
______Installation ______• Download the zero.zip file and unzip it to any directory ______• JDK 5.0 (or greater) must be installed • Add zero directory to user PATH environment variable ______• Add bin directory of JDK to user PATH environment variable ______• For app builder run the “appbuilder” script ______
______
Page 9 of 54 © Copyright IBM Corporation 1994, 2008. All rights reserved. 11/14/2008 Hands-On: Project Zero Workshop
Exercise 1 – Introduction to sMash’s Application Builder [25min]
This exercise will give you an introduction to the web‐based development environment of sMash called App builder. App builder allows us to develop complete sMash applications using only a web‐browser. It provides various development features like dependency resolution, color‐coded scripting, drag‐and‐drop functionality and application management all in one package.
In this exercise we will also start building our Gas Efficiency Calculator application. This application will calculate for us the cost of gas for a set of user defined criteria such as the number of liters pumped for a given distance travelled. The application will grow as we move through the exercises and in exercise 1 we will mainly concentrate on getting familiar with the environment and application structure of sMash.
Step 1: Starting the app builder
1. Open the Command Prompt – On Windows click on Start, Run… , type cmd and press Enter 2. Navigate to the c:\zero folder by typing cd c:\zero and pressing Enter 3. Start the app builder by typing appbuilder start 4. Launch the app builder in the browser by typing appbuilder open This brings up the app builder web interface and you initially see the Application view.
Page 10 of 54 © Copyright IBM Corporation 1994, 2008. All rights reserved. 11/14/2008 Hands-On: Project Zero Workshop
The application view allows us to manage all the applications within our workspace. From here we can launch, stop, edit, create, delete, or move our applications. We may also import existing applications from the Actions menu (see image above).
Step 2 – Creating a new application
1. In the My Applications view, click Create new application from the Actions menu.
2. Enter Gas Efficiency Calculator in the name field and leave the Root directory default. 3. Click the Create button.
The Gas Efficiency Calculator should now appear on the list of applications on the My Applications page.
Step 3 – Exploring the application structure
1. In the My Applications page, click on the Edit ( ) icon from the application options menu. This will take us into the application development perspective for this particular application. 2. The default tab that you will initially see highlighted is the File editor tab. On this page you can view a list of files or create a new file by clicking the New File ( ) button (all of this is on the left hand pane). 3. You will also initially see 3 generated files in the All Files list
ivy.xml – dependency management/configuration file php.ini – PHP configuration file in case you want to use PHP scripts in your application
Page 11 of 54 © Copyright IBM Corporation 1994, 2008. All rights reserved. 11/14/2008 Hands-On: Project Zero Workshop
zero.config – the main project zero configuration file where you can define settings like security, application port, runtime settings, and others. 4. Click on each file to bring up its content on the editor to the left and briefly inspect its structure. 5. Click on the Dependencies tab (to the right of the File Editor tab) to bring up the dependency management page. Typically, you won’t need to do much configuration here because app builder will prompt you to resolve dependencies when needed. Initially, you should see on the list of current dependencies. This is the core sMash/Project‐zero engine.
Step 4 – Creating the front‐end html page
1. Click on the Explorer tab to bring up the Explorer view. The entire application directory hierarchy can be found on the left‐hand side (see image).
The app folder contains resources used by your application such as scripts, event handlers, views, model definitions and others. The classes folder contains compiled JAVA classes. The config folder contains configuration files (such as the aforementioned ivy.xml, php.ini and zero.config). The java folder contains java source files (ie MyClass.java). The public folder contains your publicly accessible files like html pages, javascript files, css files and others. 2. Select the public directory and on the top menu bar, click on New File. A New File dialog pops up. Enter /public/index.html.
3. Select the new index.html file and click the Edit button from the toolbar menu. This will open up the visual html editor. sMash will prompt you to resolve a dependency (dojo.1.1+) . Click Add. Whenever you see similar dependency resolution prompts in the future, click Add to add them.
Page 12 of 54 © Copyright IBM Corporation 1994, 2008. All rights reserved. 11/14/2008 Hands-On: Project Zero Workshop
The visual html editor allows us to drag and drop various components from the toolbar on the right onto our work area. The components under the Create tab ( ) are various HTML and DOJO components whereas the Data tab ( ) contains data components which can be defined but will not be visible on the page (such as a Data Store). 4. Use the filter ( ) textbox to find the Label html component. Type in label into the textbox. A label ( ) component is instantly filtered out from the group. Drag and drop this label component into the top center of the page. Note: If you are prompted with a message informing you that the front‐end file and the server file are out of sync, click Overwrite. 5. Right‐click on the Label component on the page and select Properties from the menu. This brings up the Properties dialog. 6. Set the ID to titleLabel and change the Text to GAS EFFICIENCY CALCULATOR. Click OK. 7. Right‐click on the component again and this time select Styles. This brings up the Styles dialog where you can specify styling properties for your component. We will increase the font size and change the font weight to bold.
8. Select the text button ( ) and change the font‐weight property to bold and the font‐size property to 14px. Click OK. Note: You do not need to save your progress because it will automatically get saved each time you make a change. 9. Click on the Source tab on the bottom left hand side of the work area ( ) to toggle source view which will allow us inspect the html code that was generated from the last few actions.
Step 5 – Running the application
To see our current application in action, let’s go ahead and run the application and test it in our browser.
1. Click on the Start icon ( ) on the top right‐hand corner to quick‐start our application. Alternatively, you can go to the My Applications view and start the application from there by clicking the Start icon in the application options for our application.
Page 13 of 54 © Copyright IBM Corporation 1994, 2008. All rights reserved. 11/14/2008 Hands-On: Project Zero Workshop
2. Open up a new browser window (or tab) and point it to http://localhost:8080/index.html A blank page with the label GAS EFFICIENCY CALCULATOR should display.
Step 6 – Uploading files
In the next exercise we will create a form for our GAS EFFICIENCY CALCULATOR and validate it using some javascript code. In this step we will upload the javascript source file – formChecker.js – into our application. This works like a file import, but because app builder is a web‐based application we are actually uploading the file.
1. To upload a file, open up the Explorer view by clicking the Explorer tab. Click the Upload File button ( ) to bring up the File Upload dialog. Select the formChecker.js javascript file from the WorkshopResources folder on your workstation file‐system and specify the application directory to be /public (you can select this from the drop‐down menu). Click the Upload button. 2. Once the file is uploaded, its contents are immediately displayed in the explorer view. 3. Open index.html for edit by clicking on it from the All Files list in the File Editor view ( ) or select it from the file hierarchy in the Explorer view and click the Edit button on the top toolbar. 4. Once the file is opened for edit in the design view, right‐click on any white empty space on the page and click Properties (see image on right). 5. Click the Script button and under External Scripts: click the Plus icon ( ) to add a script to our page. An empty textbox will appear. Enter formChecker.js. Click OK.
6. Stop the application by clicking the Stop icon ( ) on the top right‐hand corner (or in My Applications view) to stop our application.
Page 14 of 54 © Copyright IBM Corporation 1994, 2008. All rights reserved. 11/14/2008 Hands-On: Project Zero Workshop
Exercise 2 – Creating the form for Gas Efficiency Calculator [45 minutes]
This exercise focuses on creating the form component of our Gas Efficiency Calculator application. This form will allow the end‐user to insert a new gas efficiency record to the data store which will be created in exercise 3. The form allows the user to specify:
a) The driver of the vehicle b) The make of the vehicle c) The type of gas pumped into the vehicle (Gasoline or Diesel) d) The amount of gas pumped into the vehicle (Liters) e) The total distance traveled by the vehicle (Kilometers) f) The date at which gas was pumped into the vehicle
In exercise 4, with the help of the flow editor, we will use the data specified in points c to f to calculate the total amount of gas pumped into the vehicle and the cost efficiency (cost per 100 km) of the vehicle.
By the end of this exercise, your Gas Efficiency Calculator Application should look like:
Page 15 of 54 © Copyright IBM Corporation 1994, 2008. All rights reserved. 11/14/2008 Hands-On: Project Zero Workshop
By completing this exercise you will:
1) Gain an understanding of how to create the front‐end of a web application by using sMash's drag and drop dojo features. 2) Learn how to customize dojo widgets (properties, style and events) through sMash's application builder.
Step 1: Creating the form widget
1. Browse to sMash's file editor by clicking the File Editor tab. 2. From the Recent Files drop down box, select the index.html (public/index.html) page you created in exercise 1. 3. Ensure that you are in the design view of the file editor. 4. Within the ‘Form’ folder of the Create tab, select the Form widget ( ) and drag it onto the canvas. 5. You can resize the form by dragging its resizing points ( ) located at the centre and end points of it borders. By clicking on the border portion between the form's resizing points, you can reposition the form on the canvas. 6. Let’s manually set the form's position and size, to ensure that you have enough space for widgets inside and outside the form. Right‐click anywhere within the form and click Styles ( ). 7. Set the following attributes on the Position tab leaving the others blank: position: absolute top: 300px left: 70px 8. Set the following attributes on the Size tab leaving the others blank: width: 550px
Page 16 of 54 © Copyright IBM Corporation 1994, 2008. All rights reserved. 11/14/2008 Hands-On: Project Zero Workshop
height: 300px 9. Let’s make the form's border more visible. Set the following attributes on the Border tab: border‐width: 3px border‐style: double 10. Click the 'OK' button of the styles dialog and view the form on the canvas with the newly specified style properties. The space between the form and “GAS EFFIECIENCY CALCULATOR” label is left for the data grid which will be created in exercise 3. 11. Let’s give the form a Name and ID. Right click anyway on the form and click Properties. Specify gasForm in the Name and ID fields and then click OK. 12. Take a look at the source code of the form by browsing to the source section of the file editor (by clicking the source tab). Note the 'dojo.require("dijit.form.Form");' statement within the script tag in the head. Within the body, you will find the dojo form widget with the specified properties and styles attributes.
Step 2: Creating the validation text box widgets
The form will have two fields through which the end‐user can specify the first and last name of a vehicle's driver. Error checking will be enforced by using dojo's validation text box widget.
Part A – Creating the validation text box field for the driver’s first name
1. If you have not already done so, browse to the design section of the file editor for index.html (public/index.html). 2. Drag and drop the Label widget ( ) to the top‐left portion of the form and set the following Properties:
Page 17 of 54 © Copyright IBM Corporation 1994, 2008. All rights reserved. 11/14/2008 Hands-On: Project Zero Workshop
3. Drag and drop the Validation Text Box ( ) widget to the immediate right of the label “Driver's First Name:” If necessary, move the Validation Text Box widget so that it aligns horizontally the label. 4. Right‐click the validation Text Box and click Properties ( ). On the Validation Text Box tab specify the Name and ID as firstNameText. 5. Select Text for the Type attribute. 6. In order to specify a specific order of selection for when the end‐user presses the tab key, set the Tab Index to 1. 7. To remove leading and trailing white spaces, ensure that the Trim check box is checked. 8. To make sure that the first name is always in proper case, ensure that the Proper Case check box is checked. 9. Click on the Validation tab of the properties dialog. 10. In order to make the first name field mandatory, ensure that Required checkbox is checked. So if the end‐user does not specify any characters in this field, the widget will treat it as invalid input. 11. We would like the driver's first name to consist only of English characters from 'a' to 'z' irrespective of case. To set this condition, specify [a‐zA‐Z]* in the Regular Expression field. 12. We will leave the Constraints field with its default value. (The locale will be set to the validation textbox’s default locale.) 13. A ‘Prompt Message’ is the message the end‐user will receive as he/she begins to type into the validation textbox. Set the Prompt Message field to Please enter the first name of the driver. 14. An Error Message is the message the end‐user will receive as he/she types invalid data into the validation text box. (For example, a number does not fit our regular expression and will make the widget display the error message). Set the Error Message field to Please enter a valid name. 15. The widget's prompt and error messages will be displayed in a tooltip. To ensure that this tooltip does not collide with any of the other widgets within the form, type top in the Tooltip Positions field. Click OK. 16. Right‐click the validation textbox and click Styles( ). Limit the size of the textbox by clicking on the Size tab and specifying the Width as 100px. Leave the other style attributes with their default values.
Part B – Use copy‐paste to create the validation text box field for the driver’s Last name
1. Drag and drop another label widget to the immediate right of the first name validation Text Box and set the following properties:
Page 18 of 54 © Copyright IBM Corporation 1994, 2008. All rights reserved. 11/14/2008 Hands-On: Project Zero Workshop
2. Since the validation required for the Last Name Textbox field is similar to the First Name Textbox field, let’s re‐use the First Name validation Text Box widget. Right‐click on the First Name validation Text Box widget and click Copy( ). 3. Right‐click anywhere on the canvas and click Paste( ). The mouse pointer will change to a plus sign in order to symbolize that you need to paste the validation textbox widget at a desired position. Paste the widget by clicking on a point to the immediate right of the Last Name Label widget. 4. If necessary, re‐position the widgets within the form so that they are on the same horizontal plane. If there is not enough space, you can resize the width of the form. 5. The pasted validation Text Box widget is the same as the First Name Validation Text Box widget (has the same properties and style but no id), so the ID and some properties of the pasted validation textbox widget must be changed. Right‐ click the pasted validation textbox and click Properties. On the Validation Text Box tab specify the Name and ID as lastNameText. 6. Set the Tab Index to 2. 7. On the Validation tab, specify the prompt message as Please enter the last name of the driver. Leave the other attributes as‐is. Click OK.
You can view the source code of your changes by clicking the source tab of the File Editor. Run the server (if it’s not already started) and open up a new tab in Firefox. Browse to http://localhost:8080/ to view and test your changes. On clicking a Validation Text Box widget, you should see a prompt message. You should receive no errors on entering alphabets but should receive an error message on entering any other character. If the text fields are left empty, you will see a warning triangle ( ) on the side.
Step 3: Creating the Number Text Box widgets
Page 19 of 54 © Copyright IBM Corporation 1994, 2008. All rights reserved. 11/14/2008 Hands-On: Project Zero Workshop
The form should allow the end‐user to specify the amount of gas pumped into the vehicle and the distance traveled. Error checking will be enforced by using dojo's Number Text Box widgets.
Part A – Creating the Labels for the Number Text Box fields
1. If you have not already done so, browse to the design section of the file editor for index.html (public/index.html). 2. Drag and drop a Label widget ( ) below the “Driver’s first name” label widget and set the following properties:
3. Drag and drop another Label widget ( ) below the gas amount label widget and set the following properties:
Part B – Creating the Number Text Box field for the Amount of Gas Filled
1. Drag and drop a Number Text Box widget ( ) to the right of the “Amount of Gas Filled:” label and set the following Number Text Box properties:
2. Click on the Validation tab of the properties dialog. In order to make this field mandatory, ensure that Required checkbox is checked. 3. The end‐user input should be constrained so that the value entered is not too high or negative. You can add constraints to the Text Box by specifying a JSON
Page 20 of 54 © Copyright IBM Corporation 1994, 2008. All rights reserved. 11/14/2008 Hands-On: Project Zero Workshop
object of constraints in the Constraints field. Specify the maximum and minimum values of the Number Text box by typing {"max":999,"min":0,"locale":""} in the Constraints field. 4. Specify the Prompt Message to be Please enter the amount of gas you filled into the vehicle (L). 5. Specify the Invalid Message to be The value entered is not valid. 6. If the end‐user enters a value not within the max‐min constraints, a ‘Range Message’ is displayed. Specify the Range Message to be This value is out of range. 7. To make sure the tooltip of the Number text box does not collide with any other widget, specify the tooltip position to be after. Click OK. 8. The width of the Number Text box should be set to an appropriate value. Right‐ click on the number text box and click Styles. Click on the Size tab and specify the width to be 70px.
Part C – Creating the Number Text Box field for the Distance Traveled
1. Drag and drop another Number Text Box widget to the right of the gas filled label and set the following Number Text Box Properties:
2. Set the following Validation properties:
Page 21 of 54 © Copyright IBM Corporation 1994, 2008. All rights reserved. 11/14/2008 Hands-On: Project Zero Workshop
3. The width of the Number Text Box should be set to an appropriate value. Right‐ click on the Number Text Box widget and click Styles. Click on the Size tab and specify the width to be 90px.
Part D – Adding Post fix labels
Units for the ‘Amount of Gas Filled’ (L) and the ‘Distance Traveled’ (KM) can be specified by adding labels just after the corresponding number Text box.
1. Drag and drop a label to the left of the Gas filled number text box and set the following Properties to it:
2. Drag and drop a label to the left of the Distance Travelled Number Text Box and set the following Properties to it:
You can view the source code of your changes by clicking the source tab of the file editor. Run the server and open up a new tab in Firefox. Browse to http://localhost:8080/ to view and test your changes. On clicking the number textbox widgets, you should see a prompt message. You should receive no errors on entering positive numbers (below 1000 for the gas filled widget) but should receive an error message on entering negative numbers and any non‐numeric character. If the number text fields are left empty, you will see a warning triangle ( ) on the side.
Step 4: Creating the Date Text Box widgets
Page 22 of 54 © Copyright IBM Corporation 1994, 2008. All rights reserved. 11/14/2008 Hands-On: Project Zero Workshop
The form should allow the end‐user to specify the date when the vehicle was filled with gas. For this purpose, the Date Text Box will be ideal as it allows the end‐user to select a date from a calendar, checks if the date is allowed and is in proper format. 1. Drag and drop a Label widget ( ) beneath the “Distance traveled” label and set the following Properties:
2. Drag and drop the Date Text Box widget ( ) to the right of the “Date of gas fill up” Label and set the following Date Text Box properties:
3. Set the following validation properties:
Page 23 of 54 © Copyright IBM Corporation 1994, 2008. All rights reserved. 11/14/2008 Hands-On: Project Zero Workshop
4. In exercise 4, we’ll be using an RSS feed which only contains dates for a certain period. Thus you will have to constraint the user to select dates within the last four months (excluding today). Since this constraint period is dynamic (i.e. 4 months from the current date), you’ll have to add a page onLoad script which is executed when the page is loaded. This script will set the max and min constraints of the Date Text Box. Right‐click on a portion of the canvas not occupied by the form or any other widget and select Events ( ).
5. On the events dialog box, make sure the Load tab ( ) is selected. Click on the add drop down button ( ) and click script ( ). 6. In the script text box that appears add the following code or copy‐paste it from the solution file(WorkshopResources/Exercise 2 ‐ Step 4 ‐ onLoad Script.txt): var today = new Date; var minDate = dojo.date.add(today, "day", ‐120); var yesterday = dojo.date.add(today, "day", ‐1); dijit.byId("dateText").constraints.min = minDate; dijit.byId("dateText").constraints.max = yesterday;
The above script sets the max constraint to one day before the current date and min constraint to 120 days before the current date.
7. The RSS feed used in exercise 4 specifies dates that fall on Saturday, Sunday and Monday as a period (For example, the date for Sunday, the 26th of October is specified in the RSS feed as “25‐27th October”). To conform to this format, would require some javascript string manipulation which is beyond the scope of this workshop. Let’s add a script that prevents the end‐user from selecting Saturday, Sunday or Monday. This script will be invoked after the user has selected a date. Right‐click on the Date Text Box widget and click Events ( ). 8. On the events dialog box, make sure that the Blur tab ( ) is selected. Click on the add drop down button ( ) and click script ( ). 9. In the script text box that appears add the following code or copy it from the solution file (WorkshopResources/ Exercise2 ‐ Step 4 ‐ onBlur Date Script.txt): var date = dijit.byId("dateText").getValue();
Page 24 of 54 © Copyright IBM Corporation 1994, 2008. All rights reserved. 11/14/2008 Hands-On: Project Zero Workshop
if (date != null) { var day = date.getDay(); if (day == 0 || day == 1 || day == 6) { alert("Sorry, days: sat, sun and mon are not supported, please choose another day"); dijit.byId("dateText").setDisplayedValue(""); } } 10. Set the width of the Date Text box to an appropriate value. Right‐click on the Date text box and click Styles. Click on the Size tab and specify the width to be 90px.
You can view the source code of your changes by clicking the source tab of the file editor. Run the server and open up a new tab in Firefox. Browse to http://localhost:8080/ to view and test your changes. On clicking the Date Text Box widget, you should see a calendar. You should receive no errors on choosing a date (which falls on days Tuesday through Friday) from the calendar but should receive an error message on typing in an invalid date. If the date field is left empty, you will see a warning triangle ( ) on the side.
Step 5: Creating the basic form widgets
Part A – Basic Text Box Widget
Page 25 of 54 © Copyright IBM Corporation 1994, 2008. All rights reserved. 11/14/2008 Hands-On: Project Zero Workshop
The form should allow the end‐user to specify the make of the vehicle. Since no validation is required, a normal text box widget will be used. 1. Drag and drop a Label widget ( ) beneath the “Date of gas fill up” label and set the following Properties:
2. Drag and drop the Text Box widget ( ) to the right of the “Make of vehicle” label and set the following Properties:
Part B – Radio Button Widget
The form should allow the end‐user to specify the type of gas, i.e. Gasoline or Diesel. Radio button widgets can be used to solve this purpose.
1. Drag and drop a Label widget ( ) to the center‐right portion of the form. Right‐click on the Label widget and set the following Properties:
2. Drag and drop another Label widget ( ) beneath the “Type of gas” label and set the following Properties:
Page 26 of 54 © Copyright IBM Corporation 1994, 2008. All rights reserved. 11/14/2008 Hands-On: Project Zero Workshop
3. Drag and drop another Label widget beneath the “Gasoline” label and set the following properties:
4. Drag and drop a Radio Button widget ( ) to the left of the “Gasoline” Label and set the following Properties:
5. Drag and drop another Radio Button widget ( ) to the left of the “Diesel” label and set the following Properties:
Step 6: Creating the form buttons
Page 27 of 54 © Copyright IBM Corporation 1994, 2008. All rights reserved. 11/14/2008 Hands-On: Project Zero Workshop
The form should have two buttons: One for resetting the form and another for sending the form data to a Data Grid which will be created in exercise 3.
Part A – Creating the reset button
1. Drag and drop a Button widget ( ) to the centre – bottom part of the form. Right‐click on the button widget and select Properties. 2. In the properties dialog of the button widget set the ID and Name attributes to resetButton. 3. To make this button automatically reset all fields in the form, change the Type attribute to reset. 4. Set the Tab Index to 10. 5. Set the Label attribute to Reset Form. Make sure the Show Label checkbox is checked. Click OK.
Part B – Creating the “Add to store” button
1. Drag and drop another Button widget ( ) to the left of the Reset button widget. Right‐click on the dropped button widget and select Properties. 2. In the properties dialog of the dropped button widget set the ID and Name attributes to submitFormButton. 3. A button of type ‘submit’, submits the form via a POST multi‐part request. A button of type ‘button’ acts as a normal button where you can specify your action as an onClick event. Since this application does not require a POST multi‐
Page 28 of 54 © Copyright IBM Corporation 1994, 2008. All rights reserved. 11/14/2008 Hands-On: Project Zero Workshop
part request, change the Type attribute to button. 4. Set the Tab Index to 9. 5. Set the Label attribute to Add to store. Make sure the Show Label checkbox is checked. Click OK. 6. An onClick event should be attached to the button. Right‐click on the button and select Events ( ). In the Events Dialog make sure the Click tab
( ) is selected. 7. Click on the drop‐down button and select Script ( ). A script text box should be displayed. 8. In the script Text box type in the following script or copy it from the solution file (WorkshopResources/ Exercise 2 ‐ Step 6 ‐ Part B.txt):
if (!checkIds()) { alert("There is an error in one or more of the id widgets!"); return; } var isFirstNameValid = dijit.byId("firstNameText").isValid(false); var isLastNameValid = dijit.byId("lastNameText").isValid(false); var isGasFilledValid = dijit.byId("gasAmount").isValid(false); var isDateValid = dijit.byId("dateText").isValid(false); var isDistanceValid = dijit.byId("distanceText").isValid(false); var isNameValid = isFirstNameValid && isLastNameValid; var isFeedDataValid = isGasFilledValid && isDateValid && isDistanceValid; var isFormValid = isNameValid && isFeedDataValid; if (!isFormValid) { alert("One or more fields are invalid! Please fill out valid values"); return; } alert(“Congrats, All fields are valid”); //This statement will be removed in the next exercise
Let’s take a brief look at the script:
The checkIds method is defined in formChecker.js and returns true if the ID’s of all the input widgets on the index.html page match those defined in this document. Its use is primarily for debugging.
The dijit.byId(‘widgetId’).isValid(false) returns true if the validation widget with id : widgetId is in a valid state. The validation widgets on the index.html page are in a valid state when the end‐user has entered some non whitespace input and that input abides the constraints defined in the widget’s properties. Since we do not care if the widget is
Page 29 of 54 © Copyright IBM Corporation 1994, 2008. All rights reserved. 11/14/2008 Hands-On: Project Zero Workshop
in focus when the “Add to store” button is clicked, a false attribute is passed to the isValid method.
The isFormValid variable is true, if for all validation widgets : dijit.byId(‘widgetId’).isValid(false) returns true.
9. Click OK.
You can view the source code of your changes by clicking the source tab of the file editor. Run the server and open up a new tab in Firefox. Browse to http://localhost:8080/ to view and test your changes. By clicking the ‘Reset Form’ button, all form widgets will be reset. If any of the validation widgets do not contain a non‐whitespace character or are displaying a warning triangle ( ) on the side, then on clicking the ‘Add to store’ button you will receive the following error message: "One or more fields are invalid! Please fill out valid values”. Otherwise on clicking the “Add to store” button, you will receive the success message: “Congrats, All fields are valid”.
Note: If you receive the error message “There is an error in one or more of the id widgets!” on clicking the ‘Add to store’ button, then one or more of the widget’s IDs do not match those described in the document. Please recheck all the widget’s IDs (You do not have to check the IDs of the labels).
Page 30 of 54 © Copyright IBM Corporation 1994, 2008. All rights reserved. 11/14/2008 Hands-On: Project Zero Workshop
Exercise 3 – Creating the ZRM, Data store and Data grid
This exercise focuses on creating the ZRM (Zero Resource Model), the ZRM data store and data grid for the Gas Efficiency Application. The ZRM acts as a back end database for the web application. The data store is a connector between the front end dojo and back end database (ZRM). In our application, the data store will consists of a collection of gas efficiency records. A gas efficiency record consists of: a) User‐entered information submitted by the form which was created in Exercise 2. b) The total cost of gas pumped into the vehicle. c) The cost efficiency of the vehicle. Cost efficiency is defined as the cost of driving the vehicle for 1 KM.
Since the calculation of total cost and cost efficiency is done in Exercise 4, they will be set to a default value of 0 for the purpose of this exercise. The data grid is a graphical representation of the data store.
After completing this exercise, you application will look like:
By completing this exercise you will:
1) Gain an understanding of how to create and instantiate a ZRM. 2) Learn how to define a ZRM data store based on a model and connect that store to a data grid. 3) Gain a perspective on the REST behavior of sMash by making REST calls to the data model.
Page 31 of 54 © Copyright IBM Corporation 1994, 2008. All rights reserved. 11/14/2008 Hands-On: Project Zero Workshop
4) Gain an understanding of how to utilize the data grid in a web application.
Step 1 : Creating the JSON for the ZRM
Part A – An introduction to the JSON for the ZRM
1. A ZRM data store is defined by a JSON file in the /app/models folder. To create this JSON file, click on the New File drop down button ( ) which is located on the left panel of the File Editor. 2. Select the option “Zero Resource Model in /app/models”. A file create dialog box should appear. 3. On the file create dialog box, specify /app/models/gasRecords.json in the path and file name field. Click the Create button. If sMash prompts you for a dependency click the Add button. 4. Click on the link ‘gasRecords.json’ which should be listed in the recent files section on the left panel of the file editor. The design section of File editor page should display two sections: Fields and Filtered Collections. Filtered Collections can be used to limit the set of members of the ZRM being returned via a REST call. The filtered collection section will not be covered in this workshop. The Fields section contains an empty table with a column of data type buttons to its left. Each row of this table represents a column in ZRM. For the purpose of this exercise, a row must be defined for each field of a gas efficiency record which was defined at the start of this exercise. (For example, one row should be defined for the driver’s first name and another row should be defined for cost efficiency). 5. Browse to the source section of the File Editor. The default template for the ZRM’s JSON is an object with two fields corresponding to the two sections
Page 32 of 54 © Copyright IBM Corporation 1994, 2008. All rights reserved. 11/14/2008 Hands-On: Project Zero Workshop
you saw in the design section, i.e. fields and collections (filtered collections). 6. Switch back to the design view of the file editor. A row can be inserted into the table by clicking a desired data type from the column of data type buttons. Let’s start by adding a row which represents the gas type of a vehicle (i.e. Gasoline or diesel). Click on the String data type button ( ). A row with a name ‘string 1’ should appear on table. 7. Click on the modify row button ( ) which located on the 2nd right most column of the row. An edit field’s properties dialog box should appear. 8. The Name acts as a unique identifier for a column of the data store. In the basic tab of the edit fields dialog box, specify Type_of_gas in the Name field. 9. The Label is the public identifier for a column of the data store. Specify Type of gas in the Label field. 10. To enforce that “Type of gas” is required on the data store, make sure that the Required check box is checked. 11. Set the Default value as Gasoline. Click OK. The field table should look like:
12. Browse to the source section of the file editor. Notice that a “Type_of_gas” object with the above defined properties has been added to the fields object. Navigate back to the design section of the file editor.
Part B – Complete the JSON for the data model
Complete the Fields table by inserting rows for each field of the gas efficiency record. The row for Type of Gas has been repeated over here as an example. Alternatively, you can copy the JSON from the solutions file (WorkshopResources\gasRecords.json) and paste it to the source section of the file editor (overwriting the old JSON).
Data Type Name Label Required Default Value String Type_of_gas Type of gas Yes Gasoline String First_name First Name Yes String Last_name Last Name Yes String Vehicle_make Vehicle Make No Date Date_of_fill_Up Date of Fill Up Yes Float Distance_travelled Distance Yes travelled Float Amount_of_gas_Filled Amount of Gas Yes Filled
Page 33 of 54 © Copyright IBM Corporation 1994, 2008. All rights reserved. 11/14/2008 Hands-On: Project Zero Workshop
Float Total_cost Total Cost No 0 Float Cost_efficiency Cost Efficiency No 0 ($/km)
Step2 – Instantiating the ZRM
Part A – Defining intial_data.json
1. The ZRM can be instantiated with values defined in the JSON file app/models/fixtures/initial_data.json. To create this JSON file, click on the New File drop down button ( ) which is on the left panel of the file editor. 2. Select the option “Other File”. A file create dialog box should appear. 3. On the file create dialog box, specify /app/models/ fixtures/initial_data.json in the path and file name field. Click the Create button. 4. Click the link initial_data.json which should be listed in the Recent Files section on the left panel of the file editor. 5. Type in the following JSON in the file editor or copy‐paste the contents from the solution file (WorkshopResources\initial_data.json): [ { "type":"gasRecords", "fields":{ "First_Name":"Kalvin", "Last_Name":"Misquith", "Vehicle_Make":"Datsun", "Type_of_gas":"Gasoline", "Date_of_Fill_Up":"2008‐10‐01", "Distance_travelled":12 } }, { "type":"gasRecords", "fields":{ "First_Name":"Bart", "Last_Name":"Stanczyk", "Vehicle_Make":"Acura TSX '09", "Type_of_gas":"Gasoline", "Date_of_Fill_Up":"2008‐11‐01",
Page 34 of 54 © Copyright IBM Corporation 1994, 2008. All rights reserved. 11/14/2008 Hands-On: Project Zero Workshop
"Distance_travelled":24 } } ]
Let’s take a brief look at the above JSON. The JSON contains an array of two objects both of which belong to the ZRM ‘gasRecords’. Each object specifies a row of the ZRM. The above JSON specifies two rows for the ZRM: one row has a driver with first name “Kalvin” and last Name “Misquith” while the second row has a driver with first name “Bart” and last Name “Stanczyk”.
Part B – Enable REST calls to ZRM
1. In order to enable RESTful calls to the ZRM, REST handlers must be defined in the groovy file /app/resources/gasRecords.groovy. To create this groovy file, click on the New File drop down button ( ) which is on the left panel of the file editor. 2. Select the option “Resource Handler in /app/resources”. A file create dialog box should appear. 3. On the file create dialog box, specify /app/resources/gasRecords.groovy in the path and file name field. Click the Create button. 4. Click the link gasRecords.groovy which should be listed in the Recent Files section on the left panel of the file editor. 5. In the File editor page, you may see a template of automatically added functions. These functions are the handlers for the REST API (For example, the onList function is a handler for a GET request). 6. By invoking ZRM.delegate(), the REST handling is delegated to the Zero Resource Model REST API’s default rest handlers. Remove all the template handlers that sMash may have automatically added (i.e. Delete all the contents of the file). Then type in one line: ‘ZRM.delegate();’.
Step 3 – Create and Instantiate the ZRM through sMash’s Console.
1. Click on the Console tab located at the top of sMash’s web application. On the left panel make sure ‘Command Prompt’ is selected. 2. To create and instantiate the data store, type in ‘zero model sync’ in the command prompt. You should see the SQL used in creating and instantiating the data store. At the end of the Console display, you should see the message “Command model sync was successful”.
Page 35 of 54 © Copyright IBM Corporation 1994, 2008. All rights reserved. 11/14/2008 Hands-On: Project Zero Workshop
Note: To reset the model, you can type in ‘zero model reset’ in the command prompt. 3. Let’s test the REST API for the ZRM ‘gasRecords’. Run the server if it is not already started. Open up a new tab and browse to the URI: http://localhost:8080/resources/gasRecords . You should receive a JSON file which contains the two gas efficiency records you specified in intitial_data.json.
Step 4 – Creating the ZRM Store
1. Browse to the public/index.html page you created in exercise 2. Switch to the design view in the file editor. 2. Click on the Data tab ( ) located on the right side panel of the file editor. 3. Clic k on the new drop down button ( ) and select ZRM Store ( ). A dialog box should appear. 4. If sMash prompts you to add a dependency, Click OK. 5. A variable name is the unique identifier of the store. In the dialog box that appears, specify gasStore in the Variable Name field and gasRecords in the resource collection field (“gasReco rds” is the model created in part 2). 6. Click OK. The data store icon ( ) should then appear under the Data tab.
Step 5– Creating the data grid
1. Browse to the public/index.html page you created in exercise 2. Switch to the design section of the file editor. 2. Fro m the create tab of the right‐side panel, drag and drop a Data Grid widget ( ) to a point above the form you created in exercise 2. 3. Right‐click the form and select Properties. Type in thegrid in the id and name
Page 36 of 54 © Copyright IBM Corporation 1994, 2008. All rights reserved. 11/14/2008 Hands-On: Project Zero Workshop
fields 4. The end‐user should not be able to modify data once it is on the grid. Make sure that the Read only check box is checked. 5. Specify the grid properties to be gasStore. 6. Specify the data store to be gasStore. By default all the columns of the data store will be displayed on the data grid. Since we do not have a unique key, the data grid will automatically add a new column specifying a unique ID. A “last updated” column which specifies the time stamp at which the row was updated is also automatically added. The ‘Visible fields’ property specifies which columns of the Data Grid should be visible. Due to time constraints, we will make the data grid display all the columns by leaving the Visible fields property blank. Click OK. 7. Manually set the position of the data grid so that the data grid appears above the form. Right‐click anywhere on the grid and select Styles. 8. In the Styles dialog box, click on the Position tab. Set the top and left properties to be 80px and 5px respectively. 9. Manually set the width of the data grid to ensure that there is enough space for all of the data grid fields. In the Styles dialog box, click on the Size tab. Specify the width and height to be 700px and 190px respectively. Click OK.
Step 6 – Add functionality to submit form data to the grid
1. Right click the “add to store” button in the form and click events. 2. In the Script Text box of the Click section, remove the statement: alert(“Congrats, All fields are valid”); 3. Add the following code to end of the Java Script or copy‐paste it from the solution file(WorkshopResources\Exercise 3 ‐ Step 6.txt): var newRow = new Object(); newRow.First_name = dijit.byId("firstNameText").getDisplayedValue(); newRow.Last_name = dijit.byId("lastNameText").getDisplayedValue(); newRow.Vehicle_make = dijit.byId("vehicleMakeTextBox").getDisplayedValue(); newRow.Amount_of_gas_filled = dijit.byId("gasAmount").getValue(); newRow.Distance_travelled = dijit.byId("distanceText").getValue(); var diesel = dijit.byId("diesel"); var gasoline = dijit.byId("gasoline"); if (gasoline.checked) { newRow.Type_of_gas = gasoline.getValue(); } else { newRow.Type_of_gas = diesel.getValue(); } var dateField = dijit.byId("dateText").getValue();
Page 37 of 54 © Copyright IBM Corporation 1994, 2008. All rights reserved. 11/14/2008 Hands-On: Project Zero Workshop newRow.Date_of_fill_up = dateField.getFullYear() + "‐" + (dateField.getMonth() + 1) + "‐" + dateField.getDate(); gasStore.newItem(newRow); gasStore.save({})
Let’s take a brief look at the added script. We define a new object newRow and set its parameters to the values of the form fields. Note that the names of the parameters of newRow object is exactly the same as the ids of the columns specified in the ZRM. For example newRow.Distance_travelled corresponds to the column in the ZRM whose id is Distance_travelled. The newRow.Date_of_fill_up attribute contains the date in a format specified by the ZRM’s Date type (i.e. 2008‐06‐31). The “gasStore.newItem(newRow);” statement adds a new row to the gasStore while the “gasStore.save({})” statement ensures that the modified gasStore is synced with the gasStore on the server.
4. Click OK. The application can now be tested. You should be able to add rows to the data grid by filling out information in the form you created in exercise 2. The two fields: Total Cost and Cost Efficiency will have a default value of 0. The values of these two fields will be calculated in the exercise 4.
Page 38 of 54 © Copyright IBM Corporation 1994, 2008. All rights reserved. 11/14/2008 Hands-On: Project Zero Workshop
Exercise 4 – Assemble Flow [45‐60 minutes]
In this exercise we will use the assemble flow to construct a flow module that will combine data from various sources and use that data to produce some meaningful output.
To demonstrate this, we will use it to calculate the total cost of gas and vehicle efficiency based on the gas prices coming from an RSS feed and return the result in JSON format to the calling page.
What you will do in this exercise: • Start a new assemble flow module using the flow editor • Add handler components for HTTP POST requests • Integrate data coming from an RSS feed • Apply a filter to the data from the RSS feed
Page 39 of 54 © Copyright IBM Corporation 1994, 2008. All rights reserved. 11/14/2008 Hands-On: Project Zero Workshop
• Write a JAVA back‐end program to handle the data coming from HTTP POST and the RSS filter
Note: You can replace any work you have done at any time with completed exercises.
Step 1 ‐ Creating a new assemble flow (.flow) file:
1. Navigate to the explorer view if you already haven’t by clicking the Explorer tab (right) 2. Create a new folder inside the public folder and name it flows. Create a new file in this folder named index.flow (note the extension, it is important as app builder uses this to associate the file with the assemble flow editor). Your directory structure should match the one on pictured on the right. (/public/flows/index.flow) 3. Select index.flow file in the explorer pane and click Edit on the explorer toolbar on top. 4. If you don’t already have it, app builder will prompt you to import the Assemble Flow dependency. Click the Add button.
The assemble flow editor:
The assemble flow editor allows us to access different services and assemble them together into a single Project Zero/sMASH application. We can use it to construct feed‐style applications that process and aggregate feeds from various sources or create conversational applications that coordinate interactions with various services.
For more information see Getting started with Assemble ‐ https://www.projectzero.org/download/doc/zero.doc.M5/zero.assemble.flow/Overview. html
There are a few categories in the right‐hand drag‐and‐drop components toolbar. In this exercise we are primarily concerned with the following two: Built‐in Activities: generic activities for use in our flow applications such as receiveGET, receivePOST, assign, action, replyPOST Feed Activities: components that allow us to gather and interact with feeds. They include feed, filterFeed, sortFeed, retrieveEntry, and others
Page 40 of 54 © Copyright IBM Corporation 1994, 2008. All rights reserved. 11/14/2008 Hands-On: Project Zero Workshop
Step 2 ‐ Creating a receivePOST activity:
The receivePOST activity allows us to consume an HTTP POST request sent to the process. The output is the value of the received message.
1. Drag and drop the receivePOST component (under Built‐in Activities) from the right‐hand side component pane onto the work area. 2. Select the default name text (receivePOST_0), change it to recPost1 and press Enter.
Step 3 ‐ Adding a feed:
In this step we will add a feed component into our flow module. The feed component will read the RSS xml from the URL and output the results.
1. Drag and drop the feed component ( under Feed Activities) from the right‐hand side component pane onto the work area. 2. Edit the feed component properties by clicking the Properties icon on the selected component.
Page 41 of 54 © Copyright IBM Corporation 1994, 2008. All rights reserved. 11/14/2008 Hands-On: Project Zero Workshop
3. Enter gas_price for the name and http://www.mcteague.ca/RSS/GPT_Toronto.xml for the URL. This RSS feed contains entries of gas prices in the greater Toronto region by date. 4. Click OK.
Step 4 ‐ Testing the feed output:
To test the feed output, we can create a replyGET component so that when a browser GET request is issued, the feed output is displayed. 1. Drag and drop the replyGET component ( under Feed Activities) from the right‐hand side component pane onto the work area. 2. Click on the ‘Properties’ icon of the selected replyGET component to bring up the Properties dialog (image below). 3. Add another input parameter by clicking add more inputs below the name label. This will allow us to specify our own property parameter. 4. Change the name of the new parameter from [noname] to body by selecting the [noname] text. 5. Enter ${gas_price} inside the corresponding textbox. This will take the output of the gas_price feed component and send it to the body portion of the current 6. Set the content type to text/xml and click OK.
7. Test the output by starting the application (if it isn’t already running) and pointing any browser to http://localhost:8080/flows/ . The output should be the raw RSS feed itself. 8. Add a link from the gas_price feed component to the replyGET_0 as pictured in the following image below.
Page 42 of 54 © Copyright IBM Corporation 1994, 2008. All rights reserved. 11/14/2008 Hands-On: Project Zero Workshop
Step 5 ‐ Adding a feed filter to our feed:
1. Drag and drop the filterFeed component ( under Feed Activities) from the right‐hand side component pane onto the work area. 2. Edit the filterFeed component properties by clicking the Properties icon on the selected component. 3. Enter gasDateFilter for the name. 4. Change the name of the last parameter from [noname] to feed and enter ${gas_price} inside the textbox. This will tell the feed filter to get its input from the gas_filter feed component defined above. 5. Check the Advanced ( ) checkbox on at the top right corner of the Properties dialog. This will allow us to add a condition to our filter because we want to see the results for a desired date only. 6. Add a new condition ‐ click the Add a condition link. 7. You will be presented with 3 inputs. 1. select ‐ specifies which field/tag inside the RSS feed XML we want to compare our conditional statement against. We will leave it as atom:title 2. operator – The conditional operator to use. Select Contains Ignore Case from the list. 3. value – the value to compare against the value in atom:title. Enter September 18th, 2008 The pseudo‐code equivalent would be something like: if atom:title containsIgnoreCase(“September 18th, 2008”) then print result 1. Click OK inside the Edit Condition dialog to apply the changes. 2. Click OK in the Properties dialog to apply changes and close it.
Page 43 of 54 © Copyright IBM Corporation 1994, 2008. All rights reserved. 11/14/2008 Hands-On: Project Zero Workshop
Step 6 ‐ Testing the feed filter output:
To test the feed filter output, we can modify the flow of the components in our work area so that instead of pointing the output of the raw feed data into replyGET we pass it through the filter first. The result should look similar to the image below.
1. Select the link running from the gas_price feed to replyGET_0 (it should turn orange) and click the x‐shaped delete icon ( ). 2. Select the replyGET_0 component and bring up the Properties dialog by clicking the Properties icon ( ). 3. Change the body parameter value from ${gas_price} to ${gasDateFilter} and ensure the content type is set to text/xml. If the body parameter is not present, add one by clicking add more inputs.
Page 44 of 54 © Copyright IBM Corporation 1994, 2008. All rights reserved. 11/14/2008 Hands-On: Project Zero Workshop
4. Click OK to apply changes and close the Properties dialog. 5. Test the output by starting the application (if it isn’t already running) and pointing any browser to http://localhost:8080/flows/ The output should be the RSS feed displaying only data from September 18th, 2008.
Step 7 ‐ Using POST data for filter parameters:
In this step we will change the hard‐coded date value inside the feed filter (‘September 18th, 2008’) to a value coming from a POST request parameter (remember the receivePOST component we defined earlier ‐ recPost1?). To test this scenario, we will need a Firefox plug‐in Poster (https://addons.mozilla.org/en‐US/firefox/addon/2691).
You can verify if Poster is installed by looking for a small ‘P’ icon at bottom right side of your Firefox browser ( ). Finally, because we are testing a POST request, we will need to redirect output from our filter to a replyPOST instead of a replyGET component.
We will start by modifying the feed filter gasDateFilter to accept a POST parameter date.
1. Select the feed filter component gasDateFilter and click the Properties icon to bring up the Properties dialog. 2. Click on the Edit icon under Actions in the Condition table (see image below).
3. Change the value from September 18th, 2008 to ${recPost1.date[0]} and click on OK to apply changes. 4. Click OK again to close the Properties Dialog.
Page 45 of 54 © Copyright IBM Corporation 1994, 2008. All rights reserved. 11/14/2008 Hands-On: Project Zero Workshop
Before we can test, we need to create a replyPOST component and give it the feed filter output.
1. Drag and drop the replyPOST component ( under Built‐in Activities) from the right‐hand side component pane onto the work area. 2. Modify the properties as shown on the image below. Note that body value is the same as it is in the replyGET component.
Step 8 ‐ Testing the use of POST data for filter parameters:
1. Arrange the flow of the diagram to match the image below. We simply redirected the output from gasDateFilter to replyPOST_0 instead of replyGET_0 and pointed recPost1 to gasDateFilter since we are providing it with a POST parameter date.
2. Delete the replyGET component named replyGET_0 – we don’t need it anymore. Select it and click the x‐shaped delete icon ( ). 3. To test our current flow we need to make a POST request to the actual page. The easiest way to test this is to use the Poster Firefox plug‐in. Bring up the Poster plug‐in by clicking the ‘P’ icon ( ) at the bottom‐right hand corner of your browser window.
Page 46 of 54 © Copyright IBM Corporation 1994, 2008. All rights reserved. 11/14/2008 Hands-On: Project Zero Workshop
The Poster plug‐in is a tool for interacting with web resources by allowing us to make HTTP requests and set various options (body, content‐type, etc…) 4. Once Poster is displayed enter the address of our flow page into the URL textbox ‐ http://localhost:8080/flows/index.flow 5. Under Actions in the first select box, choose POST 6. Under the second select box, choose Parameters and click on the GO button to the right side of that select box. This brings up the Parameters dialog. 7. Add a date parameter by entering date for name and September 18th, 2008 for value. Click Add/Change. Click Close. 8. In the same select box where you selected Parameters, choose Parameter Body and click on the same GO button. This ensures that we send the parameters in the body along with our POST request. Note that the content‐type automatically got changed to application/x‐www‐form‐ urlencoded and the string date=September%2018th%2C%202008 appears in the Content to Send area (see image on right). 9. Finally to send the POST request, click on the GO button on the right side of the POST select box (first select box under Actions) 10. This brings up the Response dialog with the response data and other information that was returned from the URL. 11. Verify that the XML returned is correct by ensuring that the
Step 9 ‐ Adding JAVA back‐end:
In this step we will add an Action component that will use a JAVA class to perform some operation on the output that we get from the filter and the receivePOST component. Action is a generic activity for calling a static operation inside a JAVA class.
Page 47 of 54 © Copyright IBM Corporation 1994, 2008. All rights reserved. 11/14/2008 Hands-On: Project Zero Workshop
1. Drag and drop the Action component ( under Built‐in Activities) onto the work area, name it handleAction and arrange the flow of the diagram 2. Bring up the Properties dialog for the handleAction component (image below) and enter the following properties: a. name – should already be set to whatever you re‐named your Action component to (handleAction) b. operation – this is the name of the method which we call inside the JAVA handler class (more on this below) – calculateGas c. target – the target JAVA class that we are using to call our operation (more on this below) – com.ibm.cas.GasParser
The next set of properties are input arguments to the calculateGas method in GasParser.java. To add more inputs, click on the blue ‘Add more inputs’ link for each additional input. d. feedData – This is the filtered (by Date) data that’s coming out of gasDateFilter ‐ ${gasDateFilter} e. gasType – This value (and the following 2) is coming from the receivePOST component recPost1. These parameters will be coming from the Gas Estimator form ‐ ${recPost1.gasType[0]} f. gasAmount ‐ ${recPost1.gasAmount[0]} g. distance ‐ ${recPost1.distance[0]}
3. Click OK to close the Properties dialog. 4. Make sure you set the modify replyPOST_0 to get its input from our new handleAction component. Select replyPOST_0 and open the Properties dialog. Change the body property to ${handleAction}. If the body property is not visible, click on Add more inputs to add it.
Page 48 of 54 © Copyright IBM Corporation 1994, 2008. All rights reserved. 11/14/2008 Hands-On: Project Zero Workshop
The Action component uses the GasParser JAVA class and looks for it in the /classes folder. For this, we need to create a GasParser.java in the /java folder.
5. Create a new JAVA file names GasParser.java in the /java folder by switching to Explorer view, selecting the java folder on the left‐hand side folder hierarchy and clicking the New File button explorer toolbar on top. 6. Select the new file on the file list and click the Edit button on the explorer toolbar on top. This will open a text editor where the file class will go. 7. At this point you can navigate to the WorkshopResources folder on your workstation file‐system and copy and paste the source code for this class (The file should be named GasParser.java). Once pasted, app builder will color code and sometimes partially format the java code. Also, in mode cases the code will be compiled and the java class automatically stored in the /classes folder. To ensure that the JAVA file has compiled successfully, please go to the console view by clicking the Console
button ( ) and select build log ( ) from the menu on the left. You should see log related to compiling your JAVA class. It should be something like this:
CWPZT0600I: Command compile was successful
If you don’t see any output for a JAVA compile, select command prompt ( ) from the left menu and type in zero compile.
JAVA Code explanation
Page 49 of 54 © Copyright IBM Corporation 1994, 2008. All rights reserved. 11/14/2008 Hands-On: Project Zero Workshop
The JAVA code in this step performs the back‐end parsing and calculation of the total gas price given the parameters specified.
public static String calculateGas(org.apache.xerces.dom.ElementNS Impl feedData,String gasType,String gasAmount,String distance){
This is the method definition of calculateGas that was entered in the operation field for the Action component we defined previously. The 4 parameters here correspond to the 4 input parameters defined in the Properties dialog for the same component. Note that the feedData argument needs to be of type org.apache.xerces.dom.ElementNSImpl. This is the output from our gasDateFilter component and when handled by a JAVA class it needs to be of this specific type. This gives us the DOM element object so that we can easily parse it using the org.w3c.dom library.
feedNodes = feedData.getElementsByTagName("entry");
Here we retrieve the entry elements from the feedData coming in. With this, we can perform some String parsing to retrieve the Gasoline and Diesel prices.
total = (floatPrice*Float.parseFloat(gasAmount))/100;
result = "{total:"+ total +",efficiency:"+(total / Float.parseFlo at(distance))+"}";
return result;
Finally, we perform some calculations based on the parsed gas price data and the data from parameters passed to the method. Note that we return the string in JSON format so that it is easier for us to read/manipulate in JavaScript from the original calling function on the front‐end.
Step 10 – Modify the form file to call the flow:
1. Open the index.html file with the grid and form components [/public/index.html] and make sure you are in Design view 2. Right‐click on the ‘Add to store’ button and click on Events ( ). 3. For the Click event, remove the old script that’s there and replace it with the contents in WorkshopResources/Exercise 4 ‐ Step 10.txt. This is basically the same script as the previous one, but if you look at the bottom, you’ll see that there is a XHR POST request being called to the index.flow page. 4. Click OK to close the Events dialog. 5. Test the page by opening this URL in a new browser tab/window: http://localhost:8080/index.html
Page 50 of 54 © Copyright IBM Corporation 1994, 2008. All rights reserved. 11/14/2008 Hands-On: Project Zero Workshop
Exercise 5 – Adding security to the Gas efficiency calculator application
sMash offers the following levels of security:
1. Basic authentication : Basic authentication is defined in RFC 2617 (http://tools.ietf.org/html/rfc2617). 2. Form based authentication: The full‐page form login that leverages external redirect. 3. Single sign‐on authentication: The URL based login that leverages HTTP request attributes that include support for security tokens such as LTPA. 4. OpenID authentication: OpenID consumer based authentication for third party authentication with an OpenID provider. 5. Programmatic login authentication: sMash provides an API‐based authentication model.
Adding security to your web application is as easy as adding few lines to the configuration file (/config/zero.config) and developing the front‐end of the security pages (if required).This workshop will focus on Basic authentication. In short, Basic authentication allows the web browser (or other client‐side program) to provide the user‐name and password (base‐64 encoding) within the request. The user registries can be maintained by using sMash’s File‐based user service which is a text file base user‐ registry. Note: Although File‐based user services are suitable as development‐time registries, it is recommended to use LDAP or Custom user services during production. For more information, read the sMash documentation on security (www.projectzero.org).
Upon completing this exercise, the gas efficiency calculator application will ask the end‐ user to authenticate him/her‐self. When they try to access the ZRM either through REST calls or through the front end data grid, the following authentication prompt is displayed:
Page 51 of 54 © Copyright IBM Corporation 1994, 2008. All rights reserved. 11/14/2008 Hands-On: Project Zero Workshop
By completing this exercise, you will:
1. Gain an understanding on how set up file‐based user services through the CLI. 2. Get familiar with how to set up authentication by modifying the /config/zero.config file.
Step 1: Configuring the web application
1. Browse to the File editor page of sMash’s web application.
2. Type in ‘zero.config’ into the search filter ( ) which is located on the left side panel. 3. Click on the zero.config link from the list beneath the filter. 4. The configuration file should contain two statements: /config/http/port = 8080: The global context for specifying port. /config/runtime/mode="development": The global context for specifying your applications runtime mode. 5. At the end of the configuration file, type in the following lines: @include "security/rule.config" { "authType":"Basic", "conditions":"/request/path =~ /resources/.+", "groups":["ALL_AUTHENTICATED_USERS"] } Let’s take a brief look at the above statement:
Page 52 of 54 © Copyright IBM Corporation 1994, 2008. All rights reserved. 11/14/2008 Hands-On: Project Zero Workshop
The @include "security/rule.config" specifies that the configuration statement is a security rule. The "authType" statement infers that authentication type is Basic. Other possible authentication types are “form” and “SOO” (Single sign‐on authentication). The "conditions" statement specifies the request paths that this authentication rule must be enforced. In this case, we are specifying all files within the resources folder which include the ZRM’s JSON. The "groups" statement specifies the user groups that are allowed to access the secured resources. “ALL_AUTHENTICATED_USERS” is a sMash keyword which includes all registered users irrelevant of their group.
You have now successfully enabled authentication. However as you have not created a user service, your application will have no user registry to which to check authentication. As a result, without creating the user service, authentication will fail for all possible user names.
Step 2: Creating the file‐based user service
1. Browse to the Console of sMash’s web application. Make sure the Command Prompt view is selected in the left‐side section. 2. In the command prompt, type in the keywords “zero user”. This command invokes sMash’s interactive mode for user services. You should see the following:
3. In order to use the default user file (/config/zero.users), click enter on the command prompt (without specifying a location for the user file). You should see the prompt for specifying the next action:
4. Enter “create” in the command prompt to create a new user. You should see then see the prompt for entering the user name:
5. Type in “user” in the command prompt to specify the name of the user. You should then see the prompt for entering the user password:
6. Type in “mypassword” in the command prompt to specify the user’s password. You should then see the prompt for entering the user’s group:
Page 53 of 54 © Copyright IBM Corporation 1994, 2008. All rights reserved. 11/14/2008 Hands-On: Project Zero Workshop
7. Since we do not want to specify any group, click enter. The command prompt should then display the following success message:
8. You have successfully created a user registry record with the name “user” and password “mypassword”. Type exit in the command prompt to end the interactive mode. You should see the termination message:
Step 3: View the user service (Optional)
1. Browse to the File Editor page of sMash’s web application.
2. Type in ‘zero.users’ into the search filter ( ) which is located on the left side panel. 3. Click on the zero.users link from the list beneath the filter. 4. The file based user service displays content in the following format: (User Name):( Base‐64 encoded password):(User’s Group) The zero.user file should display the following content: user:34819d7beeabb9260a5c854bc85b3e44 Note that the user group is missing since we did not specify one.
You have now successfully created Basic authentication for the ZRM. We’ll test the authentication by issuing a REST call for the ZRM ‘gasRecords’. Run the server if it is not already started. Open up a new tab and browse to the URI: http://localhost:8080/resources/gasRecords. The browser should ask you to authenticate yourself before you can view the ZRM’s JSON. Browse to the URI: http://localhost:8080/. As the data grid is mapped to the data store and the data store is a connector to the backend ZRM, you will not be able to view the data grid without authentication. However, as we have not secured the form, it will be displayed.
Page 54 of 54 © Copyright IBM Corporation 1994, 2008. All rights reserved. 11/14/2008 Web 2.0 meets SOA with Apache Tuscany SCA
Luciano Resende [email protected] Doug Tidwell [email protected] Agenda
• Service Oriented Architecture (SOA) • Introduction to Service Component Architecture (SCA) • Web 2.0 • Web 2.0 and SCA • How to get Involved Service Oriented Architecture (SOA)
• SOA is an architectural approach that promotes – Reusability: Existing business functions are reusable – Composition: Existing business functions are composed together to form new solutions – Flexibility : Business functions are flexible to change SOA Programming Model Evolution
ServiceService Component Component ArchitectureArchitecture (SCA) (SCA) Business logic separate from More Flexibility Service call API, handled by WS infrastructure infrastructure Greater Agility Business logic separate from protocol handling, handled by Higher ROI StandardsStandards Based, Based, JAX-WS JAX-WS infrastructure Business logic separate from Multiple protocols supported. Service call API, handled by Protocol is a choice infrastructure Multiple technologies can be X Business logic mixed with protocol used in one solution handling Manage as part of the X Single protocol enforced, for enterprise solution example HTTP HomeHome Grown, Grown, Proprietary Proprietary X Single technology stack enforced X Business logic mixed for a solution with Service call API and X Cannot manage as part of the protocol handling enterprise solution X Single protocol enforced X Cannot manage as part of the enterprise solution Brittle application Time The Store Scenario
• An online retail store with three main business Online Retail Store ShoppingCart functionality
– Product Catalog Store – Customer Shopping Cart – Front End web store application Catalog • Challenges – Business logic mixed with protocol handling – Single protocol enforced The Store Scenario using SCA
• An online retail store with
Collection three main business atom ShoppingCart functionality Currency Converter Store jsonrpc – Product Catalog Total currencyCode=USD http Fruit – Customer Shopping Cart Catalog
– Front End web store Catalog
application ws SCA Overview
Service Interface Reference Interface - Java Property - Java - WSDL - WSDL
Composite A
property setting
Component Component Service A B Reference
promote wire promote
Service Binding Implementation Reference Binding Web Service Java Web Service JMS BPEL JMS SLSB PHP SLSB Rest SCA composite Rest JSONRPC spring JSONRPC JCA EJB module JCA … … … SCA composition is simple and flexible • No more plumbing API calls in my application code! With SCA, it’s a matter of declaring bindings and switching at your will. • The business logic is not bound to a pre-defined deployment topology any more. RSS
Fruit Catalog WS WS Business logic Store Catalog ATOM ATOM Business logic Vegetable Catalog JSON-RPC Business logic Store Composition
• Rich Internet Applications • Reusable components in form of widgets that can be mashed-up together to compose applications • Efficient communication with back-end services using AJAX technologies The Store Scenario as a Web 2.0 Application
• An online retail store with three main business ShoppingCart requirements
– Product Catalog Store – Customer Shopping Cart – Front End web store application Catalog • Still same challenges – Business logic mixed with protocol handling – Single protocol enforced Tuscany SCA and Web 2.0
• Web 2.0 bindings: ATOM, RSS, JSONRPC, DWR • Tuscany Widget implementation to represent web components and provide dependency injection for JavaScript • Other scripting implementation types
Collection atom ShoppingCart Currency Converter Store jsonrpc Total currencyCode=USD http Fruit Catalog
Catalog Vegetable ws Catalog Tuscany ATOM Binding
• The Atom Publish Protocol provides REST style access to data collections. • Services becomes available as Data Feeds trough ATOM Binding • Simplifies consuming and aggregating external feeds • Web 2.0 applications can consume these feeds using – Atom JavaScript Proxy – Regular Feed Readers supporting ATOM protocol – SCA Component References Tuscany ATOM Binding
• Exposing Collections as Atom Feeds
For more information about Tuscany ATOM Binding: http://tuscany.apache.org/sca-java-bindingatom.html Tuscany RSS Binding
• RSS provides REST style access to data collections. • Services becomes available as Data Feeds trough RSS Binding • Simplifies consuming and aggregating external feeds • The following RSS are supported – RSS 0.90, RSS 0.91 Netscape, RSS 0.91 Userland, RSS 0.92, RSS 0.93, RSS 0.94, RSS 1.0, RSS 2.0 • Web 2.0 applications can consume these feeds using – Regular Feed Readers supporting RSS – SCA Component References Tuscany JSON-RPC Binding
• Enables remote web browser clients to easily make RPC style calls to server-side SCA components using JSON-RPC. • Supported Client Experience – JavaScript DHTML Applications using JSON-RPC JavaScript Proxy – Dojo
Stock Details
Stock Quote
For more information about JSON-RPC : http://json-rpc.org/ Tuscany JSON-RPC Binding
• Exposing an SCA Pojo component using JSON-RPC
For more information about Tuscany JSON-RPC Binding: http://tuscany.apache.org/sca-java-bindingjsonrpc.html Tuscany Widget
• Model your Web 2.0 application as an SCA component and allows you to define SCA References, that would be wired to server side services. – Supports references using atom and json-rpc and http bindings – Supports properties
Stock Details
Web 2.0 Application
Stock Quote Tuscany Widget
• Defining your Tuscany Widget and adding references to other SCA services
For more information about Tuscany Widget: http://tuscany.apache.org/sca-java-implementationwidget.html Tuscany Widget
• Including generated client proxy • Defining References to SCA Services
For more information about Tuscany Widget: http://tuscany.apache.org/sca-java-implementationwidget.html How do I get Involved ?
• Take a look at Apache Tuscany latest release – http://tuscany.apache.org/ • Most importantly join the active developer and user communities – http://incubator.apache.org/tuscany/getting-involved.html • You are very welcome to get involved in the project in any way you want to, here are some examples. – Try out the software and give us your feedback – Record bugs (JIRA) for any enhancements you want or problems you find – Suggest new extensions – Provide those bits of documentation that you think are missing or can be improved – Write some code – Give a summary of how you have used Tuscany Disclaimer
The IBM Center for Advanced Studies (CAS) regularly publishes technical documents that are aimed at facilitating an exchange of information. These reports are written by individuals or groups of authors and represent their opinions and do not necessarily reflect those of IBM. In the event of questions or concerns regarding individual reports or presentations, email addresses have been provided for most authors. Alternatively, please feel free to contact CAS at [email protected]. CAS is dedicated to providing a forum for IBM employees, research affiliates, and university students to publish results of their work, their views on technical issues, book reviews, and workshop reports. Trademarks
• Company, product, or service names identified in the text may be trademarks or service marks of IBM or other companies. Information on the trademarks of International Business Machines Corporation in the United States, other countries, or both is located at http://www.ibm.com/legal/copytrade.shtml .
• Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.
• Other company, product or service names may be trademarks or service marks of others.
Web 2.0 meets SOA with Apache Tuscany SCA
Introduction
This workshop will describe the necessary steps to create an online store using SCA and Apache Tuscany.
Setup – Installing the latest Tuscany Eclipse plugin
This section shows you how to install the latest Tuscany Eclipse plugin. The plugin gives you the ability to run an SCA composite file from the Package Explorer. You will see a "Run As Tuscany" menu item when you bring up the context menu on composite files.
Start Eclipse and go to Help -> Software Updates -> Find and Install. Select "Search for new features to install" and then click next.
Create a new Remote Site. On the next dialog, click on "New Remote Site...” to create a new site entry. Give it a name such as "Tuscany" and add the site URL as “http://www.apache.org/dist/tuscany/java/sca/1.3.2/tuscany-sca-1.3.2-updatesite/”.
Select the "Remote Site" you just created, and click "Finish"
Select the "Apache Tuscany SCA Tools" and click "Next", and then, on the next dialog, click "Finish". Accept the "Plugin License" and next click on "Install All".
When asked to "restart eclipse", click the "yes" button.
The Store Scenario
The store scenario describes a Fruit Store business that is under expansion and wants to start offering its products online.
The on-line store composite application you will create is a composition of four services.
There is a Catalog service which you can ask for catalog items, and depending on its currency code property configuration it will use a Currency Converter service to provide the item prices in USD or EUR. Then there is the Shopping Cart service into which items chosen from the catalog can be added, it is implemented as a REST service. The Catalog is bound using the JSONRPC binding, and the Shopping Cart service is bound using the ATOM binding. Finally there is the Store user facing service that provides the browser based user interface of the store. The Store service makes use of the Catalog and Shopping Cart service using the JSONRPC, and ATOM binding respectively.
Create a Java project
In this step you create a Java Project in Eclipse to hold the composite service application.
Click on the New Java Project button in the toolbar to launch the project creation dialog.
Next you enter "store" as the Project name , and for Project Layout select Create separate folders for sources and class files.
Hit the Next button, and on the following page go to the Libraries tab. Use the Add Library... button on the right to add the Tuscany Library library to the project.
Hit the Finish button to complete the New Java Project dialog to create the "store" java project.
Construct Services
First you create two package folders into which later in this step you place service implementations.
Select the "store" project and click on the New Java Package button in the toolbar to launch the package creation dialog.
Next you enter "services" as the package Name , and press the Finish button to complete the dialog.
Repeat the previous step to create another package named "ufservices" . The store project now should look as follows.
In the next steps, you will start creating the online-store composite service application and you will use the " services " package to place regular services, and the " ufservices " package for user facing services.
Catalog
In this step you create the Item class, the Catalog service interface and implementation.
Create a Java class in the " services " package named " Item " and copy-paste the following code snippet into it. package services; public class Item { private String name ; private String price ;
public Item() { }
public Item(String name, String price) { this .name = name; this .price = price; }
public String getName() { return name ; }
public void setName(String name) { this .name = name; }
public String getPrice() { return price ; }
public void setPrice(String price) { this .price = price; } }
Select the "services" package. Next you click on the dropdown arrow next to the New Java Class button and select the New Java Interface option from the dropdown list. In the dialog enter "Catalog" as the Name of the interface and select the Finish button to complete the dialog. The Java editor will open on the new created Java interface. Replace the content of the editor by copy-paste of the following Java interface code snippet. package services; import org.osoa.sca.annotations.Remotable;
@Remotable public interface Catalog { Item[] get(); }
Select the "services" package again. Select the New Java Class button . In the dialog enter "CatalogImpl" as the Name of the class, add "Catalog" as the interface this class implements, and then select Finish to complete the dialog.
The Java editor will open on the new created Java class. Replace the content of the editor by copy-paste of the following Java class code snippet. package services; import java.util.ArrayList; import java.util.List; import org.osoa.sca.annotations.Init; import org.osoa.sca.annotations.Property; import org.osoa.sca.annotations.Reference; public class CatalogImpl implements Catalog { @Property public String currencyCode = "USD" ; @Reference public CurrencyConverter currencyConverter ;
private List
@Init public void init() { String currencySymbol = currencyConverter .getCurrencySymbol( currencyCode ); catalog .add( new Item( "Apple" , currencySymbol + currencyConverter .getConversion( "USD" , currencyCode , 2.99))); catalog .add( new Item( "Orange" , currencySymbol + currencyConverter .getConversion( "USD" , currencyCode , 3.55))); catalog .add( new Item( "Pear" , currencySymbol + currencyConverter .getConversion( "USD" , currencyCode , 1.55))); }
public Item[] get() { Item[] catalogArray = new Item[ catalog .size()]; catalog .toArray(catalogArray); return catalogArray; } }
After completing these steps the content of the "store" project will look as follows.
Note: CatalogImpl is red x'ed because it makes use of the CurrencyConverter interface that we have not implemented yet.
Currency Converter
In this step you create the CurrencyConverter service interface and implementation. You follow the same steps that you learned previously to create the interface and implementation. First create a Java interface in the "services" package named " CurrencyConverter " and copy-paste the following Java interface code snippet into it. package services; import org.osoa.sca.annotations.Remotable;
@Remotable public interface CurrencyConverter { public double getConversion(String fromCurrenycCode, String toCurrencyCode, double amount);
public String getCurrencySymbol(String currencyCode); }
Next create a Java class in the " services " package named " CurrencyConverterImpl " and copy-paste the following Java class code snippet into it. package services; public class CurrencyConverterImpl implements CurrencyConverter { public double getConversion(String fromCurrencyCode, String toCurrencyCode, double amount) { if (toCurrencyCode.equals( "USD" )) return amount; else if (toCurrencyCode.equals( "EUR" )) return (( double )Math. round (amount * 0.7256 * 100)) /100; return 0; }
public String getCurrencySymbol(String currencyCode) { if (currencyCode.equals( "USD" )) return "$" ; else if (currencyCode.equals( "EUR" )) return "E" ; //"€"; return "?" ; } }
After completing these steps the content of the " store " project will look as follows.
Shopping Cart
In this step you create the Item model object, the Cart and Total service interfaces and the ShoppingCart service implementation.
You follow the same steps that you learned previously to create the interface and implementation.
Create a Java interface in the " services " package named " Cart " and copy-paste the following code snippet into it. package services; import org.apache.tuscany.sca.data.collection.Collection; import org.osoa.sca.annotations.Remotable;
@Remotable public interface Cart extends Collection
}
Create a Java interface in the " services " package named " Total " and copy-paste the following code snippet into it. package services; import org.osoa.sca.annotations.Remotable;
@Remotable public interface Total { String getTotal(); }
Create a Java class in the " services " package named " ShoppingCartImpl " and copy- paste the following Java class code snippet into it. package services; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.UUID; import org.apache.tuscany.sca.data.collection.Entry; import org.apache.tuscany.sca.data.collection.NotFoundException; import org.osoa.sca.annotations.Init; import org.osoa.sca.annotations.Scope;
@Scope ("COMPOSITE" ) public class ShoppingCartImpl implements Cart, Total {
private Map
@Init public void init() { cart = new HashMap
public Entry
return entries; }
public Item get(String key) throws NotFoundException { Item item = cart .get(key); if (item == null ) { throw new NotFoundException(key); } else { return item; } }
public String post(String key, Item item) { if (key == null ) { key = "cart-" + UUID. randomUUID ().toString(); } cart .put(key, item); return key; }
public void put(String key, Item item) throws NotFoundException { if (! cart .containsKey(key)) { throw new NotFoundException(key); } cart .put(key, item); }
public void delete(String key) throws NotFoundException { if (key == null || key.equals( "" )) { cart .clear(); } else { Item item = cart .remove(key); if (item == null ) throw new NotFoundException(key); } }
public Entry
public String getTotal() { double total = 0; String currencySymbol = "" ; if (! cart .isEmpty()) { Item item = cart .values().iterator().next(); currencySymbol = item.getPrice().substring(0, 1); } for (Item item : cart .values()) { total += Double. valueOf (item.getPrice().substring(1)); } return currencySymbol + String. valueOf (total); } }
Note : Since the Tuscany conversational support is not ready yet the cart is realized through a hack. The cart field is defined as static.
After completing these steps the content of the " store " project will look as follows.
Store
In this step you create the user facing Store service that will run in a Web browser and provide the user interface to the other services you created.
Select the " ufservices " package. Right click to get the context menu, select New , and then File . In the New File dialog enter " store.html " for the File name, and then select Finish to complete the dialog.
The Text editor will open on the new created html file. Replace the content of the editor by copy-paste of the following html snippet.
function deleteCart() { shoppingCart.del( "" , null ); document.getElementById( 'shoppingCart' ).innerHTML = "" ; document.getElementById( 'total' ).innerHTML = "" ; }
function init() { catalog.get(catalog_getResponse); shoppingCart.get( "" , shoppingCart_getResponse); }