Changes between Version 26 and Version 27 of MapGuideRfc86
- Timestamp:
- 10/14/09 20:09:08 (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
MapGuideRfc86
v26 v27 88 88 == Proposed Solution == 89 89 90 In this RFC, we extend Feature Service to add the ability to use the same FDO connection for calls to Feature Service. The following two methods will be added to class !MgFeatureService to allow users to pin/unpin an FDO connection to the current session. Method !PinConnection(...) will select an FDO connection from FDO connection pool for the specified feature source if there is one FDO connection available. Otherwise, create a new FDO connection and add it to FDO connection pool. Then this FDO connection is pinned to current session. It means this FDO connection becomes an exclusive connection and can’t be used by other sessions. Since then, any call to Feature Service for the feature source and the session, which needs an FDO connection, will always use the pinned FDO connection till users call method !UnpinConnection(...) to unpin this FDO connection or current session is time-out. By default, one session will be time-out after 20 minutes. Users can modify this setting through property [!SiteServiceProperties]->!SessionTimeOut in !MapGuide Server configuration file "serverconfig.ini".90 In this RFC, we extend Feature Service to add the ability to use the same FDO connection for calls to Feature Service. The following two methods will be added to class !MgFeatureService to allow users to pin/unpin an FDO connection to the current session. Method !PinConnection(...) will select an FDO connection from FDO connection pool for the specified feature source if there is one FDO connection available. Otherwise, create a new FDO connection and add it to FDO connection pool. Then this FDO connection is pinned to current session. It means this FDO connection becomes an exclusive connection and can’t be used by other sessions. Since then, any call to Feature Service for the feature source and the session, which needs an FDO connection, will always use the pinned FDO connection till users call method !UnpinConnection(...) to unpin this FDO connection or current session or the pinned connection is time-out. By default, one session will be time-out after 20 minutes. Users can modify this setting through property [!SiteServiceProperties]->!SessionTimeOut in !MapGuide Server configuration file "serverconfig.ini". 91 91 92 92 {{{ … … 117 117 Some of methods in !MgFeatureService don’t depend on an existing feature source and an FDO connection. So this change will not affect them. For example, MgFeatureService::!GetFeatureProviders, MgFeatureService::!XmlToSchema, and so on. 118 118 119 To avoid exhausting the avaiable FDO connections through pinned connections, the following two properties will be added into serverconfig.ini to set a limitation of pinned connections per FDO providers.119 To avoid exhausting the avaiable FDO connections through pinned connections, properties 'PinnedDataConnectionSize' and 'PinnedDataConnectionSizeCustom' will be added into serverconfig.ini to set a limitation of pinned connections per FDO providers. Moreover, users can set time duration in seconds for when an idle pinned FDO connection is dropped. 120 120 121 121 {{{ … … 124 124 # F E A T U R E S E R V I C E 125 125 # 126 # Property Name Description126 # Property Name Description 127 127 # ----------------------------------------------------------------------------- 128 # PinnedDataConnectionSize Default # of pinned FDO connections per provider.128 # PinnedDataConnectionSize Default # of pinned FDO connections per provider. 129 129 # Value < 0 The default number of pinned connection is 130 130 # same as value of DataConnectionPoolSize. … … 132 132 # Value > 0 Its value has to be less than or equal to 133 133 # the value of DataConnectionPoolSize. 134 # PinnedDataConnectionSizeCustom Custom # of pinned FDO connections for specified provider134 # PinnedDataConnectionSizeCustom Custom # of pinned FDO connections for specified provider 135 135 # 0 <= Length <= 1024 136 136 # Example: OSGeo.SDF:5,OSGeo.SHP:5 137 # PinnedDataConnectionTimeout Time duration in seconds for when an idle pinned FDO 138 # connection is dropped. 139 # 0 < Value <= 1800 140 # PinnedDataConnectionTimerInterval Time interval in seconds for when the server 141 # checks for idle pinned FDO connection. 142 # 0 < Value <= 1800 137 143 # ***************************************************************************** 138 144 PinnedDataConnectionSize = 20 139 145 PinnedDataConnectionSizeCustom = 146 PinnedDataConnectionTimeout = 360 147 PinnedDataConnectionTimerInterval = 60 140 148 }}} 141 149