Distributed tile repository

Feedback


If you want to store map tiles in a distributed file system or database,  you need to register the distributed tile repository into iServer before creating a distributed tiling task. The supported distributed tile repository types currently include: FastDFS, MongoDB, OTS.

After logging in to iServer Manager(http://<server>:<port>/iserver/manager), click Clusters>Data Registration, you will see the existing data storage list, which displays all the distributed tile libraries created in current tiling master node, and which also includes data storage items for big data file sharing or spatial database. Click the corresponding distributed tile repository storage ID, you can view the detailed storage configuration and tile set list.

Click Register data storage button, on the Register data storage page, you need to create a "Storage ID" as the unique identifier for the new distributed tile library,  and choose a tile storage type, such as FastDFS and MongoDB. Different tile library meeds different parameters. Please confirm whether the storage server is available before creating it.

Add FastDFS storage

FastDFS is an open source and lightweight distributed file system, which manages the file, including file storage, file synchronization, file access (upload and download), etc., to solve the problem of mass storage and load balancing. FastDFS server has two roles: Tracker and Storage. FastDHT is a high performance distributed hash table (DHT) which based on key value pairs. It can store mass key value pairs such as filename mapping, session data and user related data, , which is used to save the mapping between tiling  result file name and storage file name. Please refer to FastDFS installation and configuration for more information.

As mentioned above, when adding FastDFS storage, it needs to set the storage sever, namely, the address of FDFS Trackers and FDHT Groups server.

Table 1. Parameters Description of FastDFS distributed storage

Name

 Description

FDFS Trackers

The Tracker is to used to balance load and dispatch servers. The tracker is composed of one or more servers. You can increase or decrease servers according to the server pressure.
The format of adding a server in Tracker is: <server>:<port>, such as: 192.168.110.10:22122.
For detailed IP and port about FDFS, see: Configure FastDFS, namely,  the configuration of bind_addr and port in tracker.conf.
FDHT Groups FastDHT is composed of one or more Group. Each group is composed of one or more servers. The same group of users store the same data. Each server in the group is peer-to-peer. Data synchronization is only performed between servers in the same group.
The format of adding a server in Group is: <server>:<port>, such as: 192.168.110.10:11411.
For detailed port, see:  Configure FastDHT, namely, the configuration of bind_addr and port in fdhtd.conf.

 

You can also add the FastDFS storage by modifying System configuration file. Specific operation, add the following configuration in iserver-system.xml:

<storages>
  <storage>
    <id>f12</id>
    <tileSourceInfo class="com.supermap.services.tilesource.FastDFSTileSourceInfo">
      <type>FastDFS</type>
      <fdfsTrackers>
        <string>192.168.112.12:22122</string>
      </fdfsTrackers>
      <fdhtGroups>
        <string-array>
          <string>192.168.112.12:11411</string>
        </string-array>
      </fdhtGroups>
    </tileSourceInfo>
  </storage>
</storages>

Add MongoDB storage

MongoDB is a database based on distributed file storage designed to provide scalable, high-performance data storage solutions for WEB applications. Please refer to Installation and configuration of MongDB for more information about MongoDB.

When adding the MongoDB service, you should configure following parameters:

You can also add MongoDB storage through modifying System configuration file. Specific operation, add the following configuration in iserver-system.xml:

<storage> 
      <id>m27</id>  
      <tileSourceInfo class="com.supermap.services.tilesource.MongoDBTilesourceInfo"> 
        <type>MongoDB</type>  
        <serverAdresses> 
          <string>localhost:27017</string> 
        </serverAdresses>  
        <database>smtiles</database>  
        <username>iserver</username>  
        <password>iserver</password> 
      </tileSourceInfo> 
    </storage> 
        

Where, <database>, <username> and <password> are optional.

Add OTS storage

Open Table Service (OTS),  now has been renamed to Table Store is a scalable and fully managed NoSQL database service based on automatic data partitioning and load balancing technologies.  Based on SSD technology, this cloud NoSQL database service enables you to store large quantities of structured and semi-structured data with real-time access, strong consistency and single-digit millisecond latency.

When adding Table Store service, you should configure following parameters:

You can also add OTS storage through modifying System configuration file.  Please add the following configuration in iserver-system.xml:

    <storage> 
      <id>OTS1</id>  
      <tileSourceInfo class="com.supermap.services.tilesource.OTSTileSourceInfo"> 
        <type>OTS</type>  
        <instanceName>tileStore</instanceName>  
        <nodeName>cn-hangzhou</nodeName>  
        <fromPublic>true</fromPublic>  
        <accessKeyId>accessKeyId</accessKeyId>  
        <accessKeySecret>accessKeySecret</accessKeySecret> 
      </tileSourceInfo>
    </storage> 

  Note: Please input the actual obtained AccessKey information in to <accessKeyId> and <accessKeySecret>.