Overview of SuperMap iServer REST services

Feedback


REST -- Representational State Transfer is a software architecture style proposed by Dr. Roy Fielding in 2000. The web services adopting the REST architecture style are simpler and easier to use compared to complicated SOAP services. Therefore, SuperMap iServer provides GIS users with RESTful GIS services.

What benefits does a REST service provide?

As web services with the REST architecture style are accepted by more and more people, more websites are providing RESTful web services, and more developers like to use REST services to create application systems. So what characteristics of a REST service are attracting all kinds of applications?

  1. In a REST service, all operations on a resource are performed in the same fashion:
  2. A REST service does not have a status. The server does not store any information about the conversation between it and the client. Therefore, every request from a client to a server must contain all the information required to understand this request. All the status information is contained in communication message (Message) between the two.
  3. A REST service has idempotence. A server returns identical results for identical requests. Thus the results returned by a server can be cached, and the cache can be used to improve the response speed. The cache can be stored on the client or on the proxy server.
  4. A REST service has a hierarchical structure. A Proxy layer and a Gateway layer are added between the client and the resource of a REST service. Functions that are not included in the service can be added at those layers, such as a load balancing function, a security controlling function, etc.
  5. The design of a system becomes easier. A RESTful development mode makes the system structure clearer and easier to maintain.
  6. Compared to other mechanisms added to the HTTP protocol, REST services are less dependent on software.

Characteristics of SuperMap iServer REST services

SuperMap iServer has brought many advantages of REST services into GIS services. REST services are specifically designed for GIS in SuperMap iServer, by strictly following the REST design principles, and emphasizing equally on rich functionality, simple and easy development, flexible operations, and a highly extensible platform. These REST services provide simpler, more open and flexible solutions to people who need GIS services, GIS service providers, as well as GIS service managers. SuperMap iServer REST services have the following characteristics: ("REST services" in the sections below refers to REST services provided in SuperMap iServer, unless otherwise noted.)

SuperMap iServer REST services strictly conform to the ROA (Resource-Oriented Architecture) design. All the GIS functions are published as resources. Any operation on a resource is implemented through the HTTP protocol. HTTP limits the operations on a resource to four methods: GET, POST, PUT, and DELETE, which correspond to the CRUD (Create, Retrieve, Update, Delete) operations on a resource. A SuperMap iServer REST service is real RESTful service that inherits all the advantage of REST and provides users with easy operations. Once a user gets familiar with resources in a REST service, he/she can operate on all the resources using the same methods.

For example, SuperMap iServer provides the map resource representing a map. The following URI is the address of map resource World Map: http://localhost:8090/iserver/services/map-world/rest/maps/World Map. The map resource can be used to retrieve information about the basic status of the map, such as the center, the scale, the map extent, the image size, the map unit, the layers included, the images included, etc. The PUT method can be operated on the map resource to modify the map information, such as changing the center, changing the scale, changing the image size, etc.

A REST service and its client interact with each other. When a client submits a request, a REST service needs to respond. Then the client determines the operation condition based on the response in order to proceed. To ensure that the client is fully informed about the response results, a SuperMap iServer REST service provides abundant response codes that reflect possible problems during the interaction between the client and the REST server. For example, 401 indicates that an operation is not completed due to security reasons. The client can retrieve these response codes, and determine whether the requested operation was successful or not, and if not, what caused the problem.

SuperMap iServer abstracts all GIS functions into resources of REST services. These resources are relatively independent. Universal connector interfaces are used to operate on the resources, ensuring that REST services of different types are decoupled and the reusability of the system is improved.

A REST service is published as an individual application program which can be deployed in various types of middleware, such as RESTlet, Middleware (Tomcat, JBoss, Weblogic, etc.), and Tuscany. In the meantime, a REST service does not depend on any middleware, but is published directly via SuperMap iServer. A service provider can choose middleware flexibly according to the characteristics.

SuperMap iServer not only provides REST services with various types of GIS functions, but also provides SuperMap iServer REST SDK. Developers can utilize this REST SDK to extend resources, security, and representations. The open structure of a REST service in SuperMap iServer allows custom resources, security controllers, response representors, etc., to be added in a service.

SuperMap iServer provides a visual tool for configuring services - iServerManager. This tool offers a guide to configure services, allowing users to customize GIS services easily. This tool can be used to create, edit, and delete a GIS service, to cluster services, and to control the start and stop of a service.

Overall, REST services achieve real interactions between services and clients in a simple and lightweight fashion. People who need services can easily grasp how to use REST services. RESTful GIS services have reduced the workload of building an application system to some degree for secondary developers. Because SuperMap iServer provides simple and convenient ways for service providers to create and publish resources, flexible mechanism for extending services, as well as SDK of REST services, it is also one of the best choices of service providers to build Service GIS services.