Changes between Version 1 and Version 2 of FdoEnhancedVersionSupport


Ignore:
Timestamp:
Oct 18, 2007, 9:14:40 AM (17 years ago)
Author:
gregboone
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • FdoEnhancedVersionSupport

    v1 v2  
    4545OSGeo.SDF.3.1 --------- OSGeo.SDF.3.1[[br]]
    4646
     47The client decides how precise the search is by how many version parts are included in the requested provider name.
    4748
     49In the above example, "OSGeo.SDF.5.0" is returned when "OSGeo.SDF" is requested. However, suppose that this provider is compatible with FDO version 5.0 and the version of FDO, used by the client, is 4.0. When there is a major version number difference then there is a good chance that the provider is binary incompatible with FDO, meaning that a crash or exception will occur when the provider is loaded.
     50
     51==== Config File Versions ====
     52
     53FDO provides the ability to serialize datastore contents to the FDO XML format. This includes feature schemas, spatial contexts, logical/physical mappings (Schema Overrides) and the features themselves.  FDO XML format data can be stored in a file. The FDO XML format can change between major FDO revisions so there are versioning issues surrounding these files. These are mainly compatibility issues that arise when a file is written by one version of FDO and read by another.
     54
     55In order for a particular version of FDO to determine if it can read a file, it needs to know what version of FDO created the file. Therefore, the file must contain this version information. The following sections discuss the versioning requirements for each type of serializable object.
     56
     57===== Feature Schemas =====
     58
     59Feature Schemas are currently written to XML without FDO version information. This version information needs to be added, going forward, in case the XML format for Feature Schemas changes in future. When a particular version of FDO reads a feature schema from a config file, it may need to know this version in order to read it properly.
     60
     61===== Spatial Contexts =====
     62
     63Similarly, Spatial Contexts are written to XML without FDO version information. This version information need to be added, going forward.
     64
     65===== Schema Overrides =====
     66
     67Schema Overrides are written to XML with FDO versioning information. The overrides include the name, major version and minor version of the provider that wrote them.
     68
     69The main requirement is to make sure that, when Schema Overrides are read from XML, they are parsed into objects that are binary compatible with the current FDO.
     70
     71When FDO reads a Schema Override Set from XML, it delegates the reading to the provider that wrote the overrides. Schema Overrides are provider-specific, so only the provider knows how to read or write them. Currently, FDO chooses the earliest version of the provider that is equal to or greater than the version of the Schema Override set. However, it is possible for the chosen provider to be binary-incompatible with the current FDO. This means that the provider may either fail to be instantiated or it may parse the Schema Overrides into objects not compatible with the current FDO.
     72
     73===== Features =====
     74
     75Features are written to XML without FDO version information. This version information needs to be added, going forward.
     76
     77=== Feature Specification ===
     78
     79The following describes the client-visible changes proposed by this design.
     80
     81==== FDO API ====
     82
     83===== FdoFeatureAccessManager::GetFeatureDataObjectsVersion =====
     84
     85When this function is called it will return the version of the feature data objects specification that the currently loaded Feature Access Manager supports. The version number string has the form [!VersionMajor].[!VersionMinor].[!BuildMajor].[!BuildMinor].
     86
     87The function signature shall be:
     88
     89{{{
     90    FDO_API static FdoString* GetFeatureDataObjectsVersion();
     91}}}
     92
     93===== FdoConnectionManager::CreateConnection() =====
     94
     95When this function is passed a provider name without version part (e.g. "OSGeo.SDF" ), it returns a connection object from the latest registered version of that provider.
     96
     97With this proposal, the provider chosen will be the provider with the latest binary-compatible !FeatureDataObjects version.
     98
     99The connection object will be instantiated from the chosen provider. If there is no compatible registered provider then !CreateConnection will return NULL.
     100
     101For the above provider searches, the provider's !FeatureDataObjects version will be used instead of the provider version itself. The reason for this is that the !FeatureDataObjects version is the one that corresponds to the version of the FDO core.
     102
     103The provider search behaviour is unchanged when the requested provider name contains version parts. In this case, the latest provider matching these version parts is chosen. However, in these cases, the client assumes the risk that the returned connection object may be incompatible with the current FDO.
     104
     105It is expected that most clients will pass in a provider name without version parts, since they would usually be interested in retrieving a binary-compatible version of the requested provider.
     106
     107A provider is considered to be binary-compatible with the current FDO if the specified parts of the provider's !FeatureDataObjectsVersion match those of the current version of FDO. For example, if the !FeatureDataObjectsVersion has 2 parts, then these must match the 1st 2 parts of the current FDO's version. The following table provides some concrete examples:
     108
     109'''Provider !FeatureDataObjectsVersion'''
     110
     1113
     112
     113''Compatible versions of FDO core''
     114
     1153.0.0.0[[br]]
     1163.1.0.0[[br]]
     1173.2.0.1[[br]]
     118
     119''Incompatible FDO versions''
     120
     1212.0.0.0[[br]]
     1224.0.0.0[[br]]
     1234.1.0.0[[br]]
     124
     125'''Provider !FeatureDataObjectsVersion'''
     126
     1273.0
     128
     129''Compatible versions of FDO core''
     130
     1313.0.0.0[[br]]
     1323.0.1.0[[br]]
     133
     134''Incompatible FDO versions''
     135
     1362.0.0.0[[br]]
     1373.1.0.0[[br]]
     1383.2.0.0[[br]]
     139
     140'''Provider !FeatureDataObjectsVersion'''
     141
     1423.2
     143
     144''Compatible versions of FDO core''
     145
     1463.2.0.0[[br]]
     1473.2.1.0[[br]]
     148
     149''Incompatible FDO versions''
     150
     1513.1.0.0[[br]]
     1523.1.1.0[[br]]
     1533.3.0.0[[br]]
     154
     155'''Provider !FeatureDataObjectsVersion'''
     156
     1573.1.0.1
     158
     159''Compatible versions of FDO core''
     160
     1613.1.0.1
     162
     163''Incompatible FDO versions''
     164
     1653.1.0.0[[br]]
     1663.1.0.2[[br]]
     1673.1.2[[br]]
     168
     169