Publication Date: 2018-01-08
Approval Date: 2017-12-07
Posted Date: 2017-10-27
Reference number of this document: OGC 17-028
Reference URL for this document: http://www.opengis.net/doc/PER/t13-NG007
Category: Public Engineering Report
Editor: Benjamin Pross, Christoph Stasch
Title: OGC Testbed-13: Asynchronous Services ER
COPYRIGHT
Copyright © 2018 Open Geospatial Consortium. To obtain additional rights of use, visit http://www.opengeospatial.org/
WARNING
This document is not an OGC Standard. This document is an OGC Public Engineering Report created as a deliverable in an OGC Interoperability Initiative and is not an official position of the OGC membership. It is distributed for review and comment. It is subject to change without notice and may not be referred to as an OGC Standard. Further, any OGC Engineering Report should not be referenced as required or mandatory technology in procurements. However, the discussions in this document could very well lead to the definition of an OGC Standard.
LICENSE AGREEMENT
Permission is hereby granted by the Open Geospatial Consortium, ("Licensor"), free of charge and subject to the terms set forth below, to any person obtaining a copy of this Intellectual Property and any associated documentation, to deal in the Intellectual Property without restriction (except as set forth below), including without limitation the rights to implement, use, copy, modify, merge, publish, distribute, and/or sublicense copies of the Intellectual Property, and to permit persons to whom the Intellectual Property is furnished to do so, provided that all copyright notices on the intellectual property are retained intact and that each person to whom the Intellectual Property is furnished agrees to the terms of this Agreement.
If you modify the Intellectual Property, all copies of the modified Intellectual Property must include, in addition to the above copyright notice, a notice that the Intellectual Property includes modifications that have not been approved or adopted by LICENSOR.
THIS LICENSE IS A COPYRIGHT LICENSE ONLY, AND DOES NOT CONVEY ANY RIGHTS UNDER ANY PATENTS THAT MAY BE IN FORCE ANYWHERE IN THE WORLD. THE INTELLECTUAL PROPERTY IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE DO NOT WARRANT THAT THE FUNCTIONS CONTAINED IN THE INTELLECTUAL PROPERTY WILL MEET YOUR REQUIREMENTS OR THAT THE OPERATION OF THE INTELLECTUAL PROPERTY WILL BE UNINTERRUPTED OR ERROR FREE. ANY USE OF THE INTELLECTUAL PROPERTY SHALL BE MADE ENTIRELY AT THE USER’S OWN RISK. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR ANY CONTRIBUTOR OF INTELLECTUAL PROPERTY RIGHTS TO THE INTELLECTUAL PROPERTY BE LIABLE FOR ANY CLAIM, OR ANY DIRECT, SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM ANY ALLEGED INFRINGEMENT OR ANY LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR UNDER ANY OTHER LEGAL THEORY, ARISING OUT OF OR IN CONNECTION WITH THE IMPLEMENTATION, USE, COMMERCIALIZATION OR PERFORMANCE OF THIS INTELLECTUAL PROPERTY.
This license is effective until terminated. You may terminate it at any time by destroying the Intellectual Property together with all copies in any form. The license will also terminate if you fail to comply with any term or condition of this Agreement. Except as provided in the following sentence, no such termination of this license shall require the termination of any third party end-user sublicense to the Intellectual Property which is in force as of the date of notice of such termination. In addition, should the Intellectual Property, or the operation of the Intellectual Property, infringe, or in LICENSOR’s sole opinion be likely to infringe, any patent, copyright, trademark or other right of a third party, you agree that LICENSOR, in its sole discretion, may terminate this license without any compensation or liability to you, your licensees or any other party. You agree upon termination of any kind to destroy or cause to be destroyed the Intellectual Property together with all copies in any form, whether held by you or by any third party.
Except as contained in this notice, the name of LICENSOR or of any other holder of a copyright in all or part of the Intellectual Property shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Intellectual Property without prior written authorization of LICENSOR or such copyright holder. LICENSOR is and shall at all times be the sole entity that may authorize you or any third party to use certification marks, trademarks or other special designations to indicate compliance with any LICENSOR standards or specifications.
This Agreement is governed by the laws of the Commonwealth of Massachusetts. The application to this Agreement of the United Nations Convention on Contracts for the International Sale of Goods is hereby expressly excluded. In the event any provision of this Agreement shall be deemed unenforceable, void or invalid, such provision shall be modified so as to make it valid and enforceable, and as so modified the entire Agreement shall remain in full force and effect. No decision, action or inaction by LICENSOR shall be construed to be a waiver of any rights or remedies available to it.
None of the Intellectual Property or underlying information or technology may be downloaded or otherwise exported or reexported in violation of U.S. export laws and regulations. In addition, you are responsible for complying with any local laws in your jurisdiction which may impact your right to import, export or use the Intellectual Property, and you represent that you have complied with any regulations or registration procedures required by applicable law to make this license enforceable.
1. Summary
While most current OGC specifications are based on synchronous communication patterns, there are several applications that need asynchronous client-server interaction patterns. This way, no immediate response is required to continue processing on the client side. Clients can pick up messages directly or at a later point in time.
The OGC Publish/Subscribe (PubSub) standard (OGC 13-131r1) released in 2016 is now providing a standardized interface for adding asynchronous messaging to OGC web services following the publish/subscribe pattern, i.e. clients can subscribe to certain information and then receive the information once it has been published by an information provider. The OGC Web Processing Service (WPS) standard (OGC 14-065) also defines asynchronous communication, but instead of subscribing to processing results, the status information needs to be queried by the client ("polling"). Another way of providing asynchronous messaging is defined in the OGC SensorThings API (OGC 15-078r6), where utilizing Message Queue Telemetry Transport (MQTT) is proposed for this purpose.
In recent testbeds, there were several activities investigating how to enable asynchronous communication for OGC web services. The latest results of these activities are three engineering reports written in Testbed 12:
-
OGC Testbed 12 Asynchronous Services Response Engineering Report (OGC 16-023r3)
-
OGC Testbed 12 Asynchronous Messaging for Aviation (OGC 16-017), and
-
OGC Testbed 12 PubSub / Catalog ER (OGC 16-137).
OGC 16-023r3 describes two approaches for adding asynchronous functionality to the OGC Web Feature Service (WFS) standard, i.e. using a WPS as facade and the polling mechanism of WPS or adding additional query parameters in the WFS requests. OGC 16-017 describes an approach for asynchronous retrieval of aviation data (i.e. Aeronautical Information Exchange Model (AIXM) and Flight Information Exchange Model (FIXM)) information using geospatial queries and the Advanced Message Queuing Protocol (AMQP) 1.0 as the underlying messaging protocol. OGC 16-137 provides information on a PubSub binding for the OGC Catalogue Service (CS-W) standard and demonstrated how a Representational State Transfer (REST) binding for PubSub can be defined.
The goal of this ER is to summarize and compare the results from the activities dealing with asynchronous WFS responses in Testbed 13. Special focus will be given to the specific requirement for automatic notification of users if new or updated information becomes available and to the software components addressing these requirements, i.e. two asynchronous Web Feature Services (NG119 and NG120).
Parts of this work have been funded by the COLABIS and Mudak-WRM projects funded by the German Federal Ministry of Education and Research under grant agreement numbers 03G0852C and 02WGR1431C.
1.1. Requirements
Compared to previous testbeds, new classes of use cases are addressed in Testbed 13:
-
Communication in situations with denied, degraded, intermittent, or limited bandwidth: Users have an unreliable connection to the network and need to synchronize their local data with servers as soon as a connection become available.
-
Automatic notification of users if new or updated data sets become available that fulfill their query criteria. In this case, specific focus needs to be given to the way how to define such query criteria.
1.2. Key Findings and Prior-After Comparison
Extensions for adding asynchronous communication to WFSs are not yet available. The approaches for Asynchronous Web Feature Services implemented in this Testbed implement and extend an approach developed in the previous Testbed 12 (see Section 7, OGC 16-023r3) using additional query parameters indicating that the operation should be executed in an asynchronous communication mode. The approaches described in this engineering report extend the previous work as follows:
-
Profile support: The Asynchronous WFS-1 implements the NSG WFS 2.0 Profile. The Asynchronous WFS-2 implements the Defense Geospatial Information Working Group (DGIWG) WFS 2.0 profile.
-
Management of asynchronous operations: The Asynchronous WFS-2 implements additional operations for retrieving the status (GetStatus) of or canceling (Cancel) operations running in asynchronous communication mode. These are aligned with the OGC WPS specification.
-
Novel use cases: The scenarios where the two Asynchronous WFSs have been tested in two scenarios with denied, degraded, intermittent, or limited bandwidth: one scenario where an Asynchronous WFS supports simulated users in a Mass Migration Scenario over Syria and Jordan and another scenario where a large OpenStreetMap (OSM) dataset needs to be downloaded from a WFS.
1.3. What does this ER mean for the Working Group and OGC in general
While most current OGC standards are based on synchronous communication patterns, there are several applications, which need asynchronous client-server interaction patterns. This way clients do not have to keep the connection to the server continuously open in order to wait for responses. This ER summarizes the results from the different activities in Testbed 13 dealing with asynchronous service responses and discusses and relates them to previous related activities. Special focus was given to the specific requirements for asynchronous communication in the two planned use case types, i.e. communication in situations with denied, degraded, intermittent or limited bandwidth and automatic notification of users if new or updated data sets become available. Solutions have been provided for the OGC Web Feature Service that reuse and extend the concepts developed in Testbed 12. The ER documents the relevant decisions, implementations, and findings in order to help to enable asynchronous communication in OGC based infrastructures.
1.4. Document contributor contact points
All questions regarding this document should be directed to the editor or the contributors:
Name | Organization |
---|---|
Benjamin Pross (Editor) |
52°North GmbH |
Christoph Stasch (Editor) |
52°North GmbH |
Jeff Harrison |
Carbon Project |
Chen-Yu (How) Hao |
Feng Chia University |
Chih-Wei (Will) Khuan |
Feng Chia University |
1.5. Future Work
The following issues are considered as future work:
-
Exploring the role of Asynchronous Web Feature Services in Geospatial Enterprise Architectures
-
Asynchronous Messaging for other OGC Service Types
-
PubSub Extension of Web Feature Service
-
Additional Response Formats for WFS responses
A more detailed description of these issues is given in Section 9.
1.6. Foreword
Attention is drawn to the possibility that some of the elements of this document may be the subject of patent rights. The Open Geospatial Consortium shall not be held responsible for identifying any or all such patent rights.
Recipients of this document are requested to submit, with their comments, notification of any relevant patent claims or other intellectual property rights of which they may be aware that might be infringed by any implementation of the standard set forth in this document, and to provide supporting documentation.
2. References
The following normative documents are referenced in this document.
-
OGC 13-131r1, OGC® Publish/Subscribe Interface Standard 1.0 - Core
-
OGC 13-133r1, OGC® Publish/Subscribe Interface Standard 1.0 - SOAP Protocol Binding Extension
-
OGC 07-006r1, OpenGIS Catalogue Service Implementation Specification
-
OGC 09-025r2, OGC® Web Feature Service 2.0 Interface Standard - With Corrigendum
-
OGC 16-023r3, OGC Testbed 12 Asynchronous Services Response Engineering Report
-
OGC 16-017, OGC Testbed 12 Asynchronous Messaging for Aviation
3. Terms and definitions
For the purposes of this report, the definitions specified in Clause 4 of the OWS Common Implementation Standard OGC 06-121r9 shall apply. In addition, the following terms and definitions apply.
3.1. Asynchronous Messaging
Describes a communication pattern in which sending entities can deliver in an asynchronous way. No immediate response from the receiving entity is required to continue processing. Receiving entities can pick up messages directly or at a later point in time (as defined previously in OGC 16-017).
4. Abbreviated terms
-
API Application Program Interface
-
Async WFS Asynchronous Web Feature Service
-
AIXM Aeronautical Information Exchange Model
-
CS-W Catalogue Service
-
DGIWG Defense Geospatial Information Working Group
-
ER Engineering Report
-
FIXM Flight Information Exchange Model
-
GML Geography Markup Language
-
JSON JavaScript Object Notation
-
NSG National System for Geospatial Intelligence
-
MQTT Message Queue Telemetry Transport
-
OGC Open Geospatial Consortium
-
OSM OpenStreetmap
-
PubSub Publish/Subscribe
-
REST Representational State Transfer
-
SOS Sensor Observation Service
-
TDS Topographic Data Store
-
UI User Interface
-
WCS Web Coverage Service
-
WFS Web Feature Service
-
WPS Web Processing Service
-
WS-N Web Service Notification
5. Overview
While most current OGC specifications are based on synchronous communication patterns, there are several applications, which need asynchronous client-server interaction patterns. This way, clients do not have to keep the connection to the server continuously open in order to wait for responses, but can rather subscribe to certain information and then receive the information once it has been published by an information provider (Publish/Subscribe pattern).
The two major use cases that require such an asynchronous communication and that have been addressed in Testbed 13 are:
-
Communication in situations with denied, degraded, intermittent, or limited bandwidth: Users have an unreliable connection to the network and need to synchronize their local data with servers as soon as a connection becomes available.
-
Automatic notification of users if new or updated data sets become available that fulfill their query criteria. In this case, specific focus needs to be given to the way how to define such query criteria.
The goal of this ER is to summarize and compare the results from the different activities dealing with asynchronous service responses in Testbed 13. An overview on these activities is given in Figure 1.
Special focus is given to the specific requirement for automatic notification of users, if new or updated information becomes available, and to the software components addressing these requirements, i.e. the two asynchronous Web Feature Services (NG119 and NG120). The work regarding the GeoSynchronization Service (NG121) is described in a separate standard document developed in Testbed 13, the OGC Geo-Synchronization Standard (OGC 17-031).
The remainder of this ER is as follows: Section 6 provides an overview on previous activities and related technologies. Sections 7 and 8 describe the scenarios and the actual implementations of the two Asynchronous WFSs including results of integration testing. Finally, Section 9 describes recommendations and future work items derived from the work described in this ER.
6. Previous Work
Several discussion papers and best practices have been developed previously for supporting asynchronous communication for OGC services. In the Sensor Web community, the Sensor Alert Service and Sensor Event Service were specified to enable publish/subscribe patterns for sensor data sources and data consumers. For delivering the information to subscribed clients, the Web Notification Service has been defined as a complementary service. These concepts have been used in previous Testbeds 6 to 10 to implement asynchronous communication. However, the Sensor Web approaches did not reach the level of OGC implementations standards and there was no general approach for asynchronous communication with OGC services.
Thus, the OGC initiated the PubSub working group in 2010 that ended in 2016 with the release of the OGC Publish/Subscribe Interface Standard 1.0. In addition, the OGC Web Processing Service Implementation Standard also defines support for asynchronous communication since the first version.
Currently, three approaches exist for extending OGC Web Services by asynchronous communication. These are described in the following two subsections. The work described in this ER consists of extensions of the previous approaches, especially the approach for additional request parameters in WFS requests. A special focus was on supporting the two use cases mentioned in Section 5 and delivering the feature data in NSG and DGIWG WFS 2.0 profiles.
6.1. Additional Request Parameters/Polling
In the polling approach, the client sends a request to the service indicating that a service operation should be run in asynchronous mode. The server responds with a status message indicating that the operation has been started. Subsequently, the client can request status information about the operation’s execution. Once the operation is finished, the server will respond with the actual result of the operation. In this approach, the client needs to actively query the status of the operation running on the server.
The OGC WPS (OGC 14-065) supports this approach for asynchronous communication by defining an additional service parameter mode
parameter for its Execute
operation. The sequence of operations is shown in Figure 2.
In Testbed 12, the WPS and its polling approach have been evaluated to support asynchronous retrieval of feature data sets from a WFS and WCS. In comparison, an additional WFS query parameter responseFormat
was specified to directly support asynchronous communication for WFSs. As an example, the following URL can be used to indicate that a GetFeature operation should be executed in asynchronous mode and the result should be mailed to a certain email address:
http://tb12.cubewerx.com/a007/cubeserv?datastore=USGS& service=WFS& version=2.0.2& request=GetFeature& typeNames=NHDFlowline& count=100& outputFormat=application%2Fgml%2Bxml& responseHandler=mailto:tb12@pvretano.com& bbox=37.709077,-122.513476,37.839064,-122.351771,urn:ogc:def:crs:EPSG::4326
The concepts for both approaches and the evaluation results are described in detail in the OGC Testbed 12 Implementing Asynchronous Services Response Engineering Report (OGC 16-023). In a nutshell, asynchronous messaging was successfully implemented using both approaches. Both provide a way to add asynchronous messaging to OGC Web Services in a more lightweight fashion compared to the OGC Publish/Subscribe specification. One potential drawback of the method with WPS facade is that the usual service requests need to be wrapped in a WPS request and response which causes a little overhead. However, the bigger the data sets, the less overhead occurs. An advantage is that the WPS facade approach can be used with the different OGC data services (WFS, WCS, SOS). Besides the advantage of less communication overhead, direct support of asynchronous communication in WFS using additional query parameters was also implemented without polling, but with a notification endpoint, where the operation’s result should be sent to.
6.2. Publish/Subscribe
This approach is following the publish/subscribe messaging pattern that is commonly implemented by message brokers and specified for SOAP Web Services by OASIS in the Web Service Notification (WS-N) framework. Message providers, called publishers, publish their messages to a server. Clients can subscribe for these messages, but do not need to continuously query information. Instead, the clients provide an interface for receiving messages. The publish/subscribe operations may be either directly provided by an OGC Web Service or provided in an external component, the message (or notification) broker.
As mentioned above, the previously defined Sensor Event Service and Sensor Alert Service were following the publish/subscribe pattern and were evaluated in Testbeds 6 to 10. With the release of the OGC Publish/Subscribe Interface Standard in 1.0 (OGC 13-131r1) in 2016, a general standard is now available that can be used to extend existing OGC Web Services with asynchronous messaging.
Figure 3 shows the general interaction between subscribers and publishers. OGC Web Services would usually act as a Publisher
, where clients (Subscriber
) can subscribe for certain information, e.g. in case a feature set in a WFS is updated or new features are available. The publisher is responsible for checking all subscriptions and sending messages to subscribers using Sender
and Receiver
components. Subscribers can also renew subscriptions or unsubscribe.
In Testbed 12, a publish/subscribe extension for the OGC Catalogue Service, version 2.02 (OGC 07-006r1) has been specified and evaluated. The results are described in the OGC Testbed 12 PubSub/Catalog ER (OGC 16-137). Furthermore, the application of the OGC PubSub standard in the aviation domain has also been evaluated and reported in the corresponding OGC Testbed 12 Asynchronous Messaging for Aviation ER (OGC 16-017).
6.3. MQTT Extension
The OGC SensorThings API (OGC 15-078r6) takes a slightly different approach than utilizing the OGC Publish/Subscribe standard. Instead, an MQTT extension is specified that describes how to apply the Message Queue Telemetry Transport (MQTT) protocol for asynchronous communication in the SensorThings API. The interactions for creating and subscribing to observations in the SensorThings MQTT extension are shown in Figure 4.
Clients can subscribe to data streams/observations. Different sensor sources can push new observations to the SensorThings API. If clients are subscribed, they will receive the new observations via MQTT. MQTT has been originally designed for machine-to-machine communication and thus for messages with high frequency and small payload. As such, it is well-suited for publish/subscribe in sensor applications.
7. NG119 Asynchronous WFS-1
7.1. Demonstration Scenario
In OGC Testbed 13, participants assessed the ability of an Asynchronous WFS to support simulated users in a Mass Migration Scenario over Syria and Jordan. In this scenario, large numbers of people have been displaced from the Daraa region of Syria to the Zaatari refugee camp in Jordan due to ongoing conflict. As the conflict ends 'de-escalation zones' are established by major powers and plans are made to return displaced people from refugee camps to the region. Understanding the situation on the ground and the infrastructure, as well as transporting these people from refugee camps into a former conflict zone is a major challenge for relief agencies. To accomplish this task, they must understand the environment and infrastructure in the region between Zaatari refugee camp and the Daraa region.
The following examples provide a brief sample of the scenario involved in testing the Asynchronous WFS approach.
Years of war have displaced hundreds of thousands from Darra city and region. Thousands have sought shelter at the sprawling Zaatari refugee camp (Figure 5).
A ceasefire has been declared this year. Government and non-government organizations seek to assist displaced populations at Zaatari in returning to Daraa, as illustrated in Figure 6.