Changes between Version 1 and Version 2 of MapGuideRfc11


Ignore:
Timestamp:
Feb 27, 2007, 6:35:28 PM (17 years ago)
Author:
waltweltonlair
Comment:

Just formatting fixes...

Legend:

Unmodified
Added
Removed
Modified
  • MapGuideRfc11

    v1 v2  
    2323== Overview ==
    2424
    25 GETTILEIMAGE relies on the session repository to do its work.  To improve tiled map performance and to facilitate external caching mechanisms like Squid, a new version of the operation should be introduced which does not require an MgMap object in the session repository.
     25GETTILEIMAGE relies on the session repository to do its work.  To improve tiled map performance and to facilitate external caching mechanisms like Squid, a new version of the operation should be introduced which does not require an !MgMap object in the session repository.
    2626
    2727== Motivation ==
    2828
    29 The session repository is a key component in MapGuide Server performance.  Any reduction in load on this key component will improve overall system performance.  The GETTILEIMAGE request only operates on the base map layers for a particular map.  This means all of the dynamic layers (buffers, redlines, etc) added to a specific user's MgMap object in the session repository will not be involved in tile creation.
     29The session repository is a key component in !MapGuide Server performance.  Any reduction in load on this key component will improve overall system performance.  The GETTILEIMAGE request only operates on the base map layers for a particular map.  This means all of the dynamic layers (buffers, redlines, etc) added to a specific user's !MgMap object in the session repository will not be involved in tile creation.
    3030
    31 As far as the tiles are concerned, only the base map layers in the original map definition are of interest.  This information will be the same for all users of the map so there is no real benefit to using a unique session repository held MgMap instance for each user.
     31As far as the tiles are concerned, only the base map layers in the original map definition are of interest.  This information will be the same for all users of the map so there is no real benefit to using a unique session repository held !MgMap instance for each user.
    3232
    33 The current GETTILEIMAGE Http op needs the session id to gain access to the session held MgMap object.  This makes external cache implementations like Squid virtually impossible to use since the user's current scale is contained in the MgMap and not in the URL.
     33The current GETTILEIMAGE Http op needs the session id to gain access to the session held !MgMap object.  This makes external cache implementations like Squid virtually impossible to use since the user's current scale is contained in the !MgMap and not in the URL.
    3434
    3535== Proposed Solution ==
     
    3737Implement version 2 of GETTILEIMAGE as follows:
    3838
     39{{{
     40 OPERATION=GETTILEIMAGE
     41 VERSION=2.0.0
     42 MAPDEFINITION=Library://NavteqNorthAmerica/Maps/nacolorTiled.MapDefinition
     43 BASEMAPLAYERGROUPNAME=Base Layer Group
     44 TILECOL=9079
     45 TILEROW=7440
     46 SCALEINDEX=1
     47}}}
    3948
    40  OPERATION=GETTILEIMAGE
    41 
    42 
    43  VERSION=2.0.0
    44 
    45 
    46  MAPDEFINITION=Library://NavteqNorthAmerica/Maps/nacolorTiled.MapDefinition
    47 
    48 
    49  BASEMAPLAYERGROUPNAME=Base Layer Group
    50 
    51 
    52  TILECOL=9079
    53 
    54 
    55  TILEROW=7440
    56 
    57 
    58  SCALEINDEX=1
    59 
    60 
    61 Most of the parameters are self explanatory.  The SCALEINDEX parameter is the scale index for the tile set of interest.  Tile set 0 corresponds to the most detailed scale defined in the MapDefinition.
     49Most of the parameters are self explanatory.  The SCALEINDEX parameter is the scale index for the tile set of interest.  Tile set 0 corresponds to the most detailed scale defined in the !MapDefinition.
    6250
    6351
     
    7462
    7563
    76 Implement a new GetTile method for MgTileService.  All of the parameters are identical so there will be minimal processing required by the Web Extensions to implement the HTTP operation.  This method can also be used to programmatically pregenerate tile caches.
     64Implement a new !GetTile method for !MgTileService.  All of the parameters are identical so there will be minimal processing required by the Web Extensions to implement the HTTP operation.  This method can also be used to programmatically pregenerate tile caches.
    7765
     66{{{
     67class MgTileService
     68{
     69    virtual MgByteReader* GetTile(
     70        MgResourceIdentifier* mapDefinition,
     71        CREFSTRING baseMapLayerGroupName,
     72        INT32 tileColumn,
     73        INT32 tileRow,
     74        INT32 scaleIndex) = 0;
     75}
     76}}}
    7877
    79 class MgTileService
     78On the Server side, a cache of serialized !MgMap objects will be maintained to respond to the new API.  These objects will be deserialized and used when a tile has to be rendered.  For previously cached tiles, the !GetTile arguments are sufficient to construct a fully qualified file name so the !MgMap object will not be used.  This will reduce the load on the session repository and speed up tile serving for cached tiles.
    8079
     80Two new serverconfig.ini parameters will be added to the !TileService section:
    8181
    82 {
     82{{{
     83[TileServiceProperties]
     84TiledMapCacheSize = 10
     85RenderOnly = 0
     86}}}
    8387
     88A very simple cache management scheme will be introduced.  When the !TiledMapCacheSize is exceeded, all of the serialized !MgMap objects will be dumped from the cache and rebuilt as requested.  If a site has a large number of tiled maps, the !TiledMapCacheSize should be set large enough to handle "typical" concurrency loads.  An entry will be written to the Server logs when the cache size is exceeded to aid with tuning the cache size parameter.
    8489
    85     virtual MgByteReader* GetTile(
     90If a map's tile cache is cleared or its !MapDefinition changed, the corresponding !MgMap serialized form will be removed from the cache.
    8691
    87 
    88         MgResourceIdentifier* mapDefinition,
    89 
    90 
    91         CREFSTRING baseMapLayerGroupName,
    92 
    93 
    94         INT32 tileColumn,
    95 
    96 
    97         INT32 tileRow,
    98 
    99 
    100         INT32 scaleIndex) = 0;
    101 
    102 
    103 }
    104 
    105 On the Server side, a cache of serialized MgMap objects will be maintained to respond to the new API.  These objects will be deserialized and used when a tile has to be rendered.  For previously cached tiles, the GetTile arguments are sufficient to construct a fully qualified file name so the MgMap object will not be used.  This will reduce the load on the session repository and speed up tile serving for cached tiles.
    106 
    107 Two new serverconfig.ini parameters will be added to the TileService section:
    108 
    109 
    110 [TileServiceProperties]
    111 
    112 
    113 TiledMapCacheSize = 10
    114 
    115 
    116 RenderOnly = 0
    117 
    118 A very simple cache management scheme will be introduced.  When the TiledMapCacheSize is exceeded, all of the serialized MgMap objects will be dumped from the cache and rebuilt as requested.  If a site has a large number of tiled maps, the TiledMapCacheSize should be set large enough to handle "typical" concurrency loads.  An entry will be written to the Server logs when the cache size is exceeded to aid with tuning the cache size parameter.
    119 
    120 If a map's tile cache is cleared or it's MapDefinition changed, the corresponding MgMap serialized form will be removed from the cache.
    121 
    122 The RenderOnly parameter determines whether rendered tiles are written to disk.  If set to "1", tiles will not be written to the MapGuide disk cache.  This can be set to facilitate use of external HTTP caches like Squid.
     92The !RenderOnly parameter determines whether rendered tiles are written to disk.  If set to "1", tiles will not be written to the !MapGuide disk cache.  This can be set to facilitate use of external HTTP caches like Squid.
    12393
    12494== Implications ==
     
    138108mapframe.jsp
    139109
    140 The new MgTileService::GetTile method will need to be documented.  Since the documentation is autogenerated from the header files, there should be minimal documetation impact.
     110The new MgTileService::!GetTile method will need to be documented.  Since the documentation is autogenerated from the header files, there should be minimal documetation impact.
    141111
    142112== Test Plan ==