Changes between Version 26 and Version 27 of MapGuideRfc86


Ignore:
Timestamp:
10/14/09 20:09:08 (15 years ago)
Author:
leaf
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • MapGuideRfc86

    v26 v27  
    8888== Proposed Solution ==
    8989
    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".
     90In 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".
    9191
    9292{{{
     
    117117Some 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.
    118118
    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.
     119To 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.
    120120
    121121{{{
     
    124124    # F E A T U R E  S E R V I C E
    125125    #
    126     # Property Name                    Description
     126    # Property Name                      Description
    127127    # -----------------------------------------------------------------------------
    128     # PinnedDataConnectionSize         Default # of pinned FDO connections per provider.
     128    # PinnedDataConnectionSize           Default # of pinned FDO connections per provider.
    129129    #                                       Value < 0  The default number of pinned connection is
    130130    #                                                  same as value of DataConnectionPoolSize.
     
    132132    #                                       Value > 0  Its value has to be less than or equal to
    133133    #                                                  the value of DataConnectionPoolSize.
    134     # PinnedDataConnectionSizeCustom   Custom # of pinned FDO connections for specified provider
     134    # PinnedDataConnectionSizeCustom     Custom # of pinned FDO connections for specified provider
    135135    #                                       0 <= Length <= 1024
    136136    #                                       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
    137143    # *****************************************************************************
    138144    PinnedDataConnectionSize           = 20
    139145    PinnedDataConnectionSizeCustom     =
     146    PinnedDataConnectionTimeout        = 360
     147    PinnedDataConnectionTimerInterval  = 60
    140148}}}
    141149