Changes between Version 2 and Version 3 of Grass7/RPCInterface


Ignore:
Timestamp:
04/23/14 01:25:35 (11 years ago)
Author:
huhabla
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Grass7/RPCInterface

    v2 v3  
    55== Introduction ==
    66
    7 Like any other GIS needs GRASS GIS a reliable graphical user interface (GUI) to manage, display and interact with maps. The GRASS GIS core libraries should be used to implement a GUI to achieve good performance, especially in case of vector editing. The design of the GRASS core libraries targets the implementation of GRASS modules and is not designed for persistent applications like a GUI. The main problem for persistent application is, that several library functions will terminate the application in case of a fatal error. This approach makes the implementation of GRASS modules more easy, since the handling of fatal errors is mostly done by library functions, which is not usable in persistent applications.
     7Like any other GIS needs GRASS a reliable graphical user interface (GUI) to manage, display and interact with maps. The GRASS GIS core libraries should be used to implement a GUI to achieve good performance, especially in case of vector editing. The design of the GRASS core libraries targets the implementation of GRASS modules and is not designed for persistent applications like a GUI. The main problem for persistent application is, that several library functions will terminate the application in case of a fatal error. This approach makes the implementation of GRASS modules more easy, but is not applicable in persistent applications, since the handling of fatal errors is mostly done by library functions.
    88
    9 One reasonable approach to use the GRASS GIS core libraries in persistent applications is the implementation of a Remote Procedure Call wrapper, that provides an interface to GRASS library functions that exists in a different process than the persistent application. This will avoid the termination of the persistent application in case of a fatal error. The drawback is the complex implementation of a RPC interface, or in case a third party solution is used to implement the RPC interface additional dependencies. The RPC interface will also add more overhead to each function call, since data that is passed between persistent application and the GRASS library interface process must be serialized and transferred via Interprocess Communication (IPC).
     9One reasonable approach to use the GRASS GIS core libraries in persistent applications is the implementation of a Remote Procedure Call wrapper, that provides an interface to GRASS library functions that exists in a different process space than the persistent application. This will avoid the termination of the persistent application in case of a fatal error. The drawback is the complex implementation of a RPC interface, or in case a third party solution is used to implement the RPC interface additional dependencies. The RPC interface will also add more overhead to each function call, since data that is passed between persistent application and the GRASS library interface process must be serialized and transferred via Interprocess Communication (IPC). It will also add more code and complexity to GRASS that must be maintained.
    1010
    11 The benefit of a RPC interface are
    12  * the ability to implement performant and well function persistent applications.
     11The benefits of a RPC interface are:
     12 * the ability to implement fast and well function persistent client applications like GUI's
     13 * Support for different programming languages on client side (Python, C++, Java, JavaScript) that will have access to GRASS library functions
     14 * Implementation of GUI specific functionality, hence bundling of GRASS library functions on the server side
     15 * Support for parallel reading of raster and vector maps using several server processes in parallel
     16 * Providing a well designed object oriented interface to GRASS that will not change in case the underlying GRASS core libraries change
     17
     18== Implementation ==
     19
     20I would strongly suggest to use apache thrift[1] to implement the RPC interface for GRASS core libraries. This framework support plenty of programming languages, adds minimal dependencies and provides platform independent RPC functionality (data serialization, IPC).
     21
     22
     23
     24[1] https://thrift.apache.org/