[fdo-internals] RE: MOTION: FDO RFC 34 - FDO Reader Access By
Index
Traian Stanev
traian.stanev at autodesk.com
Wed Sep 16 14:57:32 EDT 2009
It's most predictable if the index is the same in the property collection and in whatever is returned by GetPropertyIndex.
Traian
From: fdo-internals-bounces at lists.osgeo.org [mailto:fdo-internals-bounces at lists.osgeo.org] On Behalf Of Badreddine Karoui
Sent: Wednesday, September 16, 2009 2:56 PM
To: FDO Internals Mail List
Subject: RE: [fdo-internals] RE: MOTION: FDO RFC 34 - FDO Reader Access By Index
As far as I'm concerned this is not a technical or implementation issue but an API issue. What is more readable and predictable API?
Badreddine
From: fdo-internals-bounces at lists.osgeo.org [mailto:fdo-internals-bounces at lists.osgeo.org] On Behalf Of Traian Stanev
Sent: Wednesday, September 16, 2009 2:42 PM
To: FDO Internals Mail List
Subject: RE: [fdo-internals] RE: MOTION: FDO RFC 34 - FDO Reader Access By Index
I think the discussion keeps dancing around the issue without anybody giving an objective technical reason of why it is impossible for the order of the properties in the class definition returned by the Select to match the indices returned by GetPropertyIndex. If it is not impossible, then at least give some other overwhelming reason of why it should not be done.
The following arguments are not sufficient:
* Existing providers should not have to be forced to change - as far as I know there are no existing providers implementing this new API which we are introducing with this RFC.
* It's more work to do it like that - the same amount of work would have to be done on the client side in order to use this feature if it is not done on the provider side
Unless I am misunderstanding things, the default implementation will actually conform to this, since it will get the indices from the class definition. Providers which are unwilling to implement uniform indexing can simply fall back to the default implementation, which will automatically give them uniform indexing.
The GetClassDefinition call can build up the property collection in any way it wants. Is there anything stopping it from ordering the collection of properties based on values returned by GetPropertyIndex?
Traian
From: fdo-internals-bounces at lists.osgeo.org [mailto:fdo-internals-bounces at lists.osgeo.org] On Behalf Of Badreddine Karoui
Sent: Wednesday, September 16, 2009 2:28 PM
To: FDO Internals Mail List
Subject: RE: [fdo-internals] RE: MOTION: FDO RFC 34 - FDO Reader Access By Index
Never mind the potential performance improvement, you can also look at this feature as reducing complexity. If anything, it brings the Fdo feature reader in line with similar data access API such as ADO.Net; I call that more familiar and less complex. Also, relying on a documented behavior such as the reader returning properties in the same order as the class definition is complex and error prone. I'd rather use an API that is self documenting than having to dig some rule off some document somewhere.
Badreddine
From: fdo-internals-bounces at lists.osgeo.org [mailto:fdo-internals-bounces at lists.osgeo.org] On Behalf Of Jason Birch
Sent: Wednesday, September 16, 2009 12:53 PM
To: FDO Internals Mail List
Subject: Re: [fdo-internals] RE: MOTION: FDO RFC 34 - FDO Reader Access By Index
I agree with this.
FDO is already seen as large and awkward by much of the larger open source community. Anything that can be done to reduce complexity, or at least not increase complexity, is good.
Jason
2009/9/16 Traian Stanev <traian.stanev at autodesk.com<mailto:traian.stanev at autodesk.com>>
Hi Dan,
I think you are right, there are not many places where the performance gain would be significant -- but they do exist. Imagine a copy from one data source to another, of a feature class with 100K features and 100 columns -- a common situation with street network files. For each feature, for each property, you would have to do a name->index lookup inside the reader provider (SDF, SQLite, SHP or whatever other provider gets columns by index natively). Such lookups do get costly once you have lots of columns.
If given a choice between the RFC34 as it is now and not having access by index at all, I would choose the latter -- i.e. I'd rather see the RFC withdrawn than implemented in a way that will require API users to write more code to use it than if they used access by name. Simply because if it's more work to use access by index, I don't see people switching their code around to make use of it.
Traian
> -----Original Message-----
> From: fdo-internals-bounces at lists.osgeo.org<mailto:fdo-internals-bounces at lists.osgeo.org> [mailto:fdo-internals-<mailto:fdo-internals->
> bounces at lists.osgeo.org<mailto:bounces at lists.osgeo.org>] On Behalf Of Dan Stoica
> Sent: Wednesday, September 16, 2009 9:54 AM
> To: FDO Internals Mail List
> Subject: [fdo-internals] RE: MOTION: FDO RFC 34 - FDO Reader Access By Index
>
> Talking about the performance gain it might be disappointing. The reason is
> the access by name has been optimized for a number of providers.
>
> As for convenience, I'm not very sure either.
>
> Dan.
>
> -----Original Message-----
> From: fdo-internals-bounces at lists.osgeo.org<mailto:fdo-internals-bounces at lists.osgeo.org> [mailto:fdo-internals-<mailto:fdo-internals->
> bounces at lists.osgeo.org<mailto:bounces at lists.osgeo.org>] On Behalf Of Klain Qin
> Sent: Tuesday, September 15, 2009 10:02 PM
> To: FDO Internals Mail List
> Subject: [fdo-internals] RE: MOTION: FDO RFC 34 - FDO Reader Access By Index
>
> Yes, Carsten. You are right. This is exactly the way being proposed for the
> default implementation as depicted in the RFC.
>
> Klain
>
> -----Original Message-----
> From: fdo-internals-bounces at lists.osgeo.org<mailto:fdo-internals-bounces at lists.osgeo.org> [mailto:fdo-internals-<mailto:fdo-internals->
> bounces at lists.osgeo.org<mailto:bounces at lists.osgeo.org>] On Behalf Of Carsten Hess
> Sent: Wednesday, September 16, 2009 9:39 AM
> To: FDO Internals Mail List
> Subject: [fdo-internals] RE: MOTION: FDO RFC 34 - FDO Reader Access By Index
>
> Hi,
>
> Couldn't the default implementation of the reader base class implement an
> index based access using a name / index hashtable?
> That way index based access would be about as slow as name based access in
> the default cases and in providers taht override this index based behavior
> the access would be faster. It also would not put a burden on the client
> code while not loosing any performance in either case.
>
> Cheers,
> Carsten
> ________________________________________
> From: fdo-internals-bounces at lists.osgeo.org<mailto:fdo-internals-bounces at lists.osgeo.org> [fdo-internals-
> bounces at lists.osgeo.org<mailto:bounces at lists.osgeo.org>] On Behalf Of Klain Qin [klain.qin at autodesk.com<mailto:klain.qin at autodesk.com>]
> Sent: Tuesday, September 15, 2009 9:34 PM
> To: FDO Internals Mail List
> Subject: [fdo-internals] RE: MOTION: FDO RFC 34 - FDO Reader Access By Index
>
> To fix all of the providers internally would be hard and involve much work.
> One example is: there are several providers like sqllite/rdbms which have
> delay loading readers in some cases meaning the first property being
> accessed will be first cached for class definition. There are other
> complexities to ensure the consistency. So to provide an API like
> GetPropertyIndex() would be easier for the users to use the new API
> conveniently and correctly. The only concern is, as you mentioned, the
> client codes have to keep a property name->index map by themselves. But
> still providing this new API will be the easiest and least efforts at this
> time.
>
> Klain
>
> From: fdo-internals-bounces at lists.osgeo.org<mailto:fdo-internals-bounces at lists.osgeo.org> [mailto:fdo-internals-<mailto:fdo-internals->
> bounces at lists.osgeo.org<mailto:bounces at lists.osgeo.org>] On Behalf Of Traian Stanev
> Sent: Tuesday, September 15, 2009 10:25 PM
> To: FDO Internals Mail List
> Subject: [fdo-internals] RE: MOTION: FDO RFC 34 - FDO Reader Access By Index
>
>
> How hard would it be to fix the providers internally so that the index of
> the properties in the collection returned with GetClassDefinition
> corresponds to the index needed for getting the property by index? I suspect
> it is not too hard since it would involve the same amount of work as
> implementing this new GetPropertyIndex API, but will not add new API that
> one has to call before getting the properties by index.
>
>
> Traian
>
>
> From: fdo-internals-bounces at lists.osgeo.org<mailto:fdo-internals-bounces at lists.osgeo.org> [mailto:fdo-internals-<mailto:fdo-internals->
> bounces at lists.osgeo.org<mailto:bounces at lists.osgeo.org>] On Behalf Of Klain Qin
> Sent: Monday, September 14, 2009 11:02 PM
> To: FDO Internals Mail List
> Subject: [fdo-internals] RE: MOTION: FDO RFC 34 - FDO Reader Access By Index
>
> Hi all,
>
> While this RFC is being voted, I've updated it again in order to use access
> by index API more efficiently and correctly.
>
> Previously in order to use access by index functions for FdoIFeatureReader
> or FdoIDataReader, the API users will have to know beforehand how index is
> mapping to property name. And mapping is different for different provider
> implementations like SqlLite/SDF and RDBMS. E.g. with the same FDO schema
> definition, SqlLite and RDBMS will arrange the property order returned from
> GetClassDefinition() differently:
>
>
> a. If you don't set selected property names be returned from an
> FdoISelect command
>
>
>
> SqlLite provider will arrange the properties in the order: Identity property
> -> Geometry property -> the left will be arranged in the order of how they
> are added into the class definition, like ID -> geometry -> datetime->
> double
>
> For RDBMS provider the order is: identity property -> the left is ordered by
> the first character of the property name like ID -> datetime-> double ->
> geometry
>
>
>
> b. If you do set selected property names to be returned from an
> FdoISelect command
>
>
>
> SqlLite provider will respect the order of how they are added to selected
> properties.
>
> SDF provider will respect the order of corresponding properties defined in
> the original class definition(without setting selected properties)
>
> So to resolve this inconvenience, RFC 34 is updated again to add another
> function for getting the index of a specific property name. Now both of the
> property name and index related functions are moved to FdoIReader as they
> are needed for both FdoIFeatureReader and FdoIDataReader.
> FdoString* GetPropertyName(FdoInt32 index);
> FdoInt32 GetPropertyIndex(FdoString* propertyName);
> Can you take a look again at this RFC?
>
> http://trac.osgeo.org/fdo/wiki/FDORfc34
>
> Thanks,
> Klain
>
> From: fdo-internals-bounces at lists.osgeo.org<mailto:fdo-internals-bounces at lists.osgeo.org> [mailto:fdo-internals-<mailto:fdo-internals->
> bounces at lists.osgeo.org<mailto:bounces at lists.osgeo.org>] On Behalf Of Greg Boone
> Sent: Monday, September 14, 2009 11:33 PM
> To: FDO Internals Mail List
> Subject: [fdo-internals] MOTION: FDO RFC 34 - FDO Reader Access By Index
>
> Hi all,
>
> There were no further comments on RFC 34:
> http://trac.osgeo.org/fdo/wiki/FDORfc34 - FDO Reader Access By Index.
>
> I would like to motion a vote to accept this RFC.
>
> Thanks,
> Greg.
>
>
>
> From: fdo-internals-bounces at lists.osgeo.org<mailto:fdo-internals-bounces at lists.osgeo.org> [mailto:fdo-internals-<mailto:fdo-internals->
> bounces at lists.osgeo.org<mailto:bounces at lists.osgeo.org>] On Behalf Of Greg Boone
> Sent: Wednesday, September 09, 2009 12:41 PM
> To: FDO Internals Mail List
> Subject: [fdo-internals] RE: FDO RFC 34 - FDO Reader Access By Index
>
> Hi All,
>
> FDO RFC 34 - Access By Index: http://trac.osgeo.org/fdo/wiki/FDORfc34 has
> been updated and is ready for a secondary review.
>
> Please refer to the section labeled: "Provider Implementation"
>
> Please respond with comments by end of day, Friday September 11.
>
> Greg
>
> From: fdo-internals-bounces at lists.osgeo.org<mailto:fdo-internals-bounces at lists.osgeo.org> [mailto:fdo-internals-<mailto:fdo-internals->
> bounces at lists.osgeo.org<mailto:bounces at lists.osgeo.org>] On Behalf Of Greg Boone
> Sent: Thursday, August 06, 2009 9:39 AM
> To: FDO Internals Mail List
> Subject: [fdo-internals] FDO RFC 34 - FDO Reader Access By Index
>
> Hi All,
>
> FDO RFC 34, http://trac.osgeo.org/fdo/wiki/FDORfc34, is ready for review.
>
> Please review and respond with comments.
>
> Greg
>
>
>
>
> _______________________________________________
> fdo-internals mailing list
> fdo-internals at lists.osgeo.org<mailto:fdo-internals at lists.osgeo.org>
> http://lists.osgeo.org/mailman/listinfo/fdo-internals
> _______________________________________________
> fdo-internals mailing list
> fdo-internals at lists.osgeo.org<mailto:fdo-internals at lists.osgeo.org>
> http://lists.osgeo.org/mailman/listinfo/fdo-internals
> _______________________________________________
> fdo-internals mailing list
> fdo-internals at lists.osgeo.org<mailto:fdo-internals at lists.osgeo.org>
> http://lists.osgeo.org/mailman/listinfo/fdo-internals
_______________________________________________
fdo-internals mailing list
fdo-internals at lists.osgeo.org<mailto:fdo-internals at lists.osgeo.org>
http://lists.osgeo.org/mailman/listinfo/fdo-internals
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/fdo-internals/attachments/20090916/a3f6cf11/attachment-0001.html
More information about the fdo-internals
mailing list