2.5 Web-based workflows
2.5.2 Geospatial service integration
Standards and software for composing and executing workflows, such as BPEL and Taverna, are generally compatible with Web services built using domain independent technologies, includ- ing SOAP and WSDL. In the geospatial domain, the OGC decided against adopting SOAP and WSDL, and developed a separate approach for their Web service interfaces. These interfaces in- clude the WPS, which is of greatest relevance in deploying models on the Web. This alternative approach therefore presents a challenged when integrating geospatial services into workflows.
The WPS specification contains several features to facilitate the inclusion of processes in a workflow (OGC 05-007r7, 2007). These features are utilised by Stollberg and Zipf (2007, 2008a,b), who propose a number of different mechanisms for composing and executing WPS workflows. The first of these approaches employs a single, composite process to act as a workflow orchestrator. This process is responsible for sequentially calling each service in the workflow, and handling input and output matching. In this approach, the workflow is exposed as a standard WPS process, supporting execution from existing clients and tools, and does not require the overhead of an orchestration engine. However, the static nature of the composite process involves coding the logic for service calls and data matching, compiling that code, and deploying on a WPS instance. Any modifications to the workflow involve repeating these tasks, greatly reducing the reusability and flexibility provided by workflows. In many cases workflow composers are unlikely to have the technical knowledge required to perform such tasks, therefore making this mechanism infeasible for all but a small minority.
As an alternative to HTTP POST requests with an XML message, the WPS specification pro- vides an optional key-value pair (KVP) encoding for process execution requests. A KVP encoded request specifies parameters in the query string part of a URL, including the process identifier, in- puts, and the desired format of the output. Figure 2.11 shows an example KVP execution request for the ‘buffer’ process, with inputs ‘Geometry’ and ‘Distance’, and a single output ‘BufferedGe- ometry’. As it would be impossible to encode complex data sets in a query string, KVP instead relies on Web accessible references.
Stollberg and Zipf (2007) exploit KVP encoded requests to create a cascading service chaining mechanism. If we construct a KVP encoded request to one process, it is possible to use this request as an input data reference in another processing request, thus creating a chain. At runtime, the WPS
http://example.com/?
service=WPS&
version=1.0.0&
request=Execute&
Identifier=buffer&
DataInputs=Geometry=@xlink:href=http%3A%2F%2Fmydata.com%2Froad.xml;Distance=20&
RawDataOutput=BufferedGeometry
Listing 2.11: A KVP encoded process execution request.
instance issues an HTTP GET request to the data reference URL, which in this cases is a KVP encoded request. The calling WPS instance is unaware that the URL triggers a process execution request, and simply waits for a response.
The cascading chaining mechanism shares the same strengths as the composite process — the approach does not require an orchestration engine, and existing software can be used. The forced use of references reduces the data transferred between client and server, but does require all complex inputs to be exposed on the Web, something which may not always be possible. Drawbacks also exist in the composition of such workflows, as the length of the KVP request URL will be substantial for complex workflows involving several processes. Reusability is limited as the workflow only exists as KVP encoded WPS request, and must be modified manually for each subsequent request involving different input data.
For the final mechanism, Stollberg and Zipf (2008b) develop a simple XML language to define a WPS process workflow. The language provides several elements for specifying workflow com- ponents and characteristics, including the services, processes, execution order, and input/output matching. The language has many similarities to BPEL, which the authors consider too complex for non-technical GIS users. However, they fail to note that the complexities of BPEL can be al- lieviated with an appropriate client. A WPS process, acting as an orchestration engine, is deployed to execute workflows specified in this language. While the language is similar to, but less complex than BPEL, adoption will be limited by its proprietary nature and restrictions to WPS services. Exception handling, a feature all three approaches lack, is critical in Web service workflows. As a workflow can involve executing a multitude of services, execution failures must be handled and reported to the user, with an indication given as to the responsible service, and the cause.
With the quantity of tool and engine support for BPEL, alternative mechanisms may seem time consuming and unnecessary — consider that the effort to define a new orchestration language may have been better spent creating a client to hide the complexity of BPEL from a user. However, the motivation for these mechanisms has surfaced from disadvantages in orchestrating geospatial Web
service workflows with BPEL (Stollberg and Zipf, 2008b).
Although workflows involving WPS instances are possible (OGC 05-007r7, 2007; Meng et al., 2009), implementation of such workflows involves additional effort and several compromises. In BPEL, all included Web services must be described by with WSDL, meaning a WSDL document for each WPS instance must be defined. The lack of requirement for WSDL in the WPS will often mean this will not be done by the process developer (Lopez-Pellicer et al., 2012). As reviewed in Section 2.4.2, an automatic WSDL generation proxy (Sancho-Jiménez et al., 2008) could poten- tially minimise the effort required to provide WSDL documents for WPS instances. However, the input/output weak descriptions contained in the generated WSDL documents must be tested for their suitability in BPEL workflows.
In an existing example, Meng et al. (2009) describe geospatial service orchestration, but do not provide implementation detail — an important oversight considering the aforementioned com- plications surrounding WSDL and WPS integration.
The Apache ODE and ActiveBPEL orchestration engines expose a workflow on the Web as a SOAP/WSDL service. A more appropriate option in the geospatial community may be to instead expose the workflow on a WPS. Schäffer and Foerster (2008) propose a transactional extension to the WPS specification, enabling BPEL workflows to be dynamically deployed, and then avail- able as a WPS process. However, considering the wealth of support for SOAP/WSDL services compared to those for WPS, the benefits of providing such an interface are unclear. In a similar manner, Yu et al. (2012) suggest extending a BPEL engine to support directly communicating with OGC Web services without the need for WSDL.
Composing Web service workflows with BPEL remains inaccessible for non-technical geospa- tial, especially considering the data formats in use (for example, GML and O&M), as input/output matching may require complex sub-selection. As previously identified, Taverna may be a better solution for non-technical users. Taverna was originally primarily aimed at the life sciences com- munity, and therefore does not provide explicit support for OGC Web services. It does however support domain independent Web service technologies, such as SOAP and WSDL. Consequently, we are faced with the same challenges encountered when integrating WPS with BPEL.
Successful orchestration of WPS workflows with Taverna is demonstrated by de Jesus et al. (2011), who extend the basic SOAP and WSDL structures described in the WPS specification (OGC 05-007r7, 2007). WSDL documents are automatically generated from a PyWPS implementation, and contain enough information for Taverna to present the list of processes and associated in-
puts and outputs to the user. Additional support for asynchronous process execution through SOAP/WSDL, a matter undocumented in the WPS specification, is developed. Although the ex- ample proves the possibility and feasibility of WPS workflow orchestration with Taverna, the full potential of the software cannot be exploited. The generated WSDL documents do not provide sub- stantially strong enough descriptions of inputs and outputs, a drawback faced by similar WSDL generation mechanisms. The reviewed approach is also specific to a single implementation, the Python-based PyWPS, and does not consider process developers not familiar with the language.