[mapguide-internals]MapGuide-MgServerDescribeSchema::DescribeSchema

Ronnie Louie ronnie.louie at autodesk.com
Sat Jun 16 14:23:09 EDT 2007


Hi Haris,

That is certainly an optimization that should be considered.
DescribeSchema() current steps thru each of the classes in the
collection because GetMgClassDefinition() retrieves the definition for
the class that is passed to it.  If we want DescribeSchema to retrieve
the whole collection of class definitions, GetMgClassDefinition() may
need a new parameter or API to retrieve more than one class definition
at a time.

Ronnie

-----Original Message-----
From: mapguide-internals-bounces at lists.osgeo.org
[mailto:mapguide-internals-bounces at lists.osgeo.org] On Behalf Of Haris
Kurtagic
Sent: Saturday, June 16, 2007 4:28 AM
To: MapGuide Internals Mail List
Subject: RE:
[mapguide-internals]MapGuide-MgServerDescribeSchema::DescribeSchema

Hi Ronnie,

Yes, when i was testing it I used DeepClone.. functions from SchemaUtil.
Also I noticed that in DescribeSchema this class serializaton is done
one by one class from collection of classes, perhaps to do it once for
whole collection ?

Haris 

-----Original Message-----
From: mapguide-internals-bounces at lists.osgeo.org
[mailto:mapguide-internals-bounces at lists.osgeo.org] On Behalf Of Ronnie
Louie
Sent: 16. junij 2007 1:25
To: MapGuide Internals Mail List
Subject: RE:
[mapguide-internals]MapGuide-MgServerDescribeSchema::DescribeSchema

Hi Haris,

I have created ticket# 211 (http://trac.osgeo.org/mapguide/ticket/211)
to capture this issue.  A possible solution is to clone the feature
class we are interested in, so that serialization can do whatever it
needs to it for writing out to xml without having to manipulate the
class collection in the original schema.

Ronnie

-----Original Message-----
From: mapguide-internals-bounces at lists.osgeo.org
[mailto:mapguide-internals-bounces at lists.osgeo.org] On Behalf Of Haris
Kurtagic
Sent: Friday, June 15, 2007 1:42 PM
To: MapGuide Internals Mail List
Subject: RE:
[mapguide-internals]MapGuide-MgServerDescribeSchema::DescribeSchema

Thank you,
Haris

-----Original Message-----
From: mapguide-internals-bounces at lists.osgeo.org
[mailto:mapguide-internals-bounces at lists.osgeo.org] On Behalf Of Ronnie
Louie
Sent: 15. junij 2007 19:07
To: MapGuide Internals Mail List
Subject: RE: [mapguide-internals]
MapGuide-MgServerDescribeSchema::DescribeSchema

Hi Haris,

I took a look at this today, and at first glance it does look rather
cumbersome to get the original schema, remove the class, add to a
temporary schema, serialize, remove from temporary schema, add back to
original schema.

It seems the reason behind this is that a class can have only one parent
object (schema) at a time.  Because the class is moved to a temporary
schema for serialization, it must be removed from the original parent
schema before it can be added to the temporary one.  Same goes for when
it is returned back to the original.

I will see if there is a better way to do this, such that the original
schema does not need to be modified.  I will let you know my findings.


Ronnie

-----Original Message-----
From: mapguide-internals-bounces at lists.osgeo.org
[mailto:mapguide-internals-bounces at lists.osgeo.org] On Behalf Of Haris
Kurtagic
Sent: Friday, June 15, 2007 7:57 AM
To: MapGuide Internals Mail List
Subject: [mapguide-internals] MapGuide
-MgServerDescribeSchema::DescribeSchema

After many, many hours of breaking our heads we found what is causing
problems with our multi-user concurrent feature edits. 

I would appreciate if someone would discuss about this what we found.

 

The problem was when executing MgServerDescribeSchema::DescribeSchema.

While transfering classes from FDO schema collection to MapGuide it is
calling MgServerGetFeatures::GetMgClassDefinition in a for-loop for
every class.

GetMgClassDefinition will seralize class to XML. But serialazing is done
in a way that new temporary schema is created and than class is removed
from original schema , put to temporary, temporary schema serialized and
class returned to original class collection.

And if in that proccess another thread is doing describe schema it is
error and exception and...

 

This is more obvious in a case of edits because after every edit (
insert/update/delete ) cache is cleared and DescribeSchema is called
again.

 

I believe that describe schema should work differently, when doing "get
class" it shouldn't change original schema list ( temporary removes
class from list).

 

I would like if someone would talk to me about this findings.

 

Thank you,

Haris

 

_______________________________________________
mapguide-internals mailing list
mapguide-internals at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-internals

_______________________________________________
mapguide-internals mailing list
mapguide-internals at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-internals
_______________________________________________
mapguide-internals mailing list
mapguide-internals at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-internals

_______________________________________________
mapguide-internals mailing list
mapguide-internals at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-internals
_______________________________________________
mapguide-internals mailing list
mapguide-internals at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-internals



More information about the mapguide-internals mailing list