Changes between Version 3 and Version 4 of MapGuideRfc46


Ignore:
Timestamp:
Mar 14, 2008, 3:38:57 PM (16 years ago)
Author:
ronnielouie
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • MapGuideRfc46

    v3 v4  
    2727== Motivation ==
    2828
    29 The current MgSelectionBase::GenerateFilter() API returns a string representing a filter for a set of selected features.  This filter string would look something like: "FeatId = 1109 OR FeatId = 1130 OR FeatId = 2065" such that each of the IDs of the selected features is explicitly specified.  The string is then passed as the filter to MgFeatureService::SelectFeatures() to query the datastore.   
     29The current MgSelectionBase::GenerateFilter() API returns a string representing a filter for a set of selected features. 
     30
     31{{{
     32 STRING MgSelectionBase::GenerateFilter(MgLayerBase* layer, CREFSTRING className);
     33}}}
     34
     35This filter string would look something like: "FeatId = 1109 OR FeatId = 1130 OR FeatId = 2065" such that each of the IDs of the selected features is explicitly specified.  The string is then passed as the filter to MgFeatureService::SelectFeatures() to query the datastore.   
    3036
    3137A selection can contain an unlimited number of features, which means that the filter will contain an unlimited number of OR conditions.  However, most datastores have a finite number of OR's that can be supported, and some data sources, such as Access databases, are limited to a relatively small number or OR conditions. 
    3238
    33 Results can be unpredictable when the limit is exceeded due to buffer overruns and/or memory corruption leading to instability in the MapGuide Server.  In an effort to improve stability, GenerateFilter() was modified to return a string representing a smaller subset of the total selected features.
     39Results can be unpredictable when the limit is exceeded due to buffer overruns and/or memory corruption leading to instability in the MapGuide Server.  In an effort to improve stability, GenerateFilter() was modified to return a string representing a smaller, but incomplete subset of the total selected features.
    3440
    3541== Proposed Solution ==
    3642
    37 This is a more detailed description of the actual changes desired.  The contents of this section will vary based on the target of the RFC, be it a technical change, website change, or process change.  For example, for a technical change, items such as files, XML schema changes, and API chances would be identified.  For a process change, the new process would be laid out in detail.  For a website change, the files affected would be listed.
     43Exposing a new API to return a collection of smaller filters for a set of selected features will allow for querying of the datastore without compromising Server stability.
     44
     45Proposed New API:
     46
     47{{{
     48 MgStringCollection* MgSelectionBase::GenerateFilters(MgLayerBase* layer, CREFSTRING className, INT32 selectionSize);
     49}}}
     50
     51The selectionSize parameter specifies the maximum size for each of the individual filters in the collection.  For example, if selectionSize = 20, the maximum number of features represented by an individual filter is 20.  The collection could contain an unlimited number of filters to handle an unlimited number of features.
    3852
    3953== Implications ==
    4054
    41 This section allows discussion of the repercussions of the change, such as whether there will be any breakage in backwards compatibility, if documentation will need to be updated, etc.
     55Code that currently calls MgSelectionBase::GenerateFilter() should be updated to use MgSelectionBase::GenerateFilters() instead, and the caller will be required to process all the filters in the collection to correctly query the complete selection set.  In places where a relatively small number of features are expected in a selection (i.e. less than the value specified by SelectionFilterSize in serverconfig.ini/webconfig.ini), MgSelectionBase::GenerateFilter() can still be safely used to return correct results.
     56
     57This is a new API which will need to be documented.
    4258
    4359== Test Plan ==
    4460
    45 How the proposed change will be tested, if applicable.  New unit tests should be detailed here???
     61Test existing APIs to ensure functionality does not change. Test NEW APIs functionality.
    4662
    4763== Funding/Resources ==
    4864
    49 This section will confirm that the proposed feature has enough support to proceed.  This would typically mean that the entity making the changes would put forward the RFC, but a non-developer could act as an RFC author if they are sure they have the funding to cover the change.
     65Autodesk to supply