<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.5450.4" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=538060921-19092006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=538060921-19092006><FONT face=Arial
color=#0000ff size=2>The fact that there are several instances of calls to
DescribeSchema does not imply that that code actually gets called a lot during
normal operation of MapGuide. This is because the FeatureService is an API more
than anything else.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=538060921-19092006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=538060921-19092006><FONT face=Arial
color=#0000ff size=2>Personally, I would accept the fact that in a multithreaded
environment, an operation might fail if the schema changes underneath it and
would simply cache the schema once per open FDO connection, but that's my
personal opinion. Another option is to have some sort of a "read-only" flag on
the connection which you can use to determine whether to cache the schema or
not.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=538060921-19092006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=538060921-19092006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=538060921-19092006><FONT face=Arial
color=#0000ff size=2>Traian</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=538060921-19092006></SPAN><SPAN
class=538060921-19092006><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=538060921-19092006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> Haris Kurtagic [mailto:haris@sl-king.com]
<BR><B>Sent:</B> Tuesday, September 19, 2006 4:59 PM<BR><B>To:</B>
dev@mapguide.osgeo.org<BR><B>Subject:</B> RE: [mapguide-dev]
DescribeSchema<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV dir=ltr align=left><SPAN class=421135220-19092006><FONT face=Arial
color=#0000ff size=2>What I was trying to say is that MapGuide server itself
(server feature service) is calling many times this command in
fdo.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=421135220-19092006><FONT face=Arial
color=#0000ff size=2>And also after getting it is doing a lot of "copying and.."
and it takes a lot of time MapGuide itself..</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=421135220-19092006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=421135220-19092006><FONT face=Arial
color=#0000ff size=2>So If I cache it inside FDO provider it is little better,
but not sure also is it "right" to cache. </FONT></SPAN><SPAN
class=421135220-19092006><FONT face=Arial color=#0000ff size=2>In multithreaded
enviroment I could imagine some problems if schema is
changing.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=421135220-19092006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=421135220-19092006><FONT face=Arial
color=#0000ff size=2>I am using 1.0.1 version.</FONT></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><SPAN class=421135220-19092006></SPAN><FONT face=Arial><FONT
color=#0000ff><FONT size=2>H<SPAN
class=421135220-19092006>aris</SPAN></FONT></FONT></FONT><BR></DIV>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> Traian Stanev
[mailto:traian.stanev@autodesk.com] <BR><B>Sent:</B> Tuesday, September 19, 2006
10:52 PM<BR><B>To:</B> dev@mapguide.osgeo.org<BR><B>Subject:</B> RE:
[mapguide-dev] DescribeSchema<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff
size=2></FONT> </DIV>
<DIV dir=ltr align=left><SPAN class=578463220-19092006><FONT face=Arial
color=#0000ff size=2>You are right. DescribeSchema is a major choke point for
any code that calls it a lot. It should be cached whenever possible. That said,
MapGuide is going to (or already has) some caching of the schemas, so it's not
that critical for the provider to have a fast DescribeSchema, unless you are
worried about code other than MapGuide. However, I would argue that
competently written FDO code already avoids repeated calls to things
like:</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=578463220-19092006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=578463220-19092006><FONT face=Arial
color=#0000ff size=2> * DescribeSchema</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=578463220-19092006><FONT face=Arial
color=#0000ff size=2> * GetSpatialContexts</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=578463220-19092006><FONT face=Arial
color=#0000ff size=2> *
FdoIFeatureReader::GetClassDefinition</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=578463220-19092006><FONT face=Arial
color=#0000ff size=2> * anything that converts FDO stuff to
XML.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=578463220-19092006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=578463220-19092006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=578463220-19092006><FONT face=Arial
color=#0000ff size=2>Traian</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=578463220-19092006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff
size=2></FONT> </DIV><FONT face=Arial color=#0000ff size=2></FONT><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> Haris Kurtagic [mailto:haris@sl-king.com]
<BR><B>Sent:</B> Tuesday, September 19, 2006 4:25 PM<BR><B>To:</B>
dev@mapguide.osgeo.org<BR><B>Subject:</B> [mapguide-dev]
DescribeSchema<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=625541520-19092006>Hi,</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=625541520-19092006></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=625541520-19092006>Right now FDO
command <FONT size=2>DescribeSchema is called many times while describing Data
Store and in another cases.</FONT></SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=625541520-19092006></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=625541520-19092006>I have a question
how should fdo provider react to this requests.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=625541520-19092006></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=625541520-19092006>Is it supposed that
provider will cach schema or is it supposed to allow dinamicaly changing of
schema (in underlaying RDBMS for example) or .. ?</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=625541520-19092006></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=625541520-19092006>Also as I see it,
there is a lot of coping of fdo schema returned from provider inside server, so
it is very time consuming.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=625541520-19092006>Not sure if I am
looking right but it doesn't look good :)</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=625541520-19092006></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN
class=625541520-19092006>Haris</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=625541520-19092006></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN
class=625541520-19092006></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN
class=625541520-19092006></SPAN></FONT> </DIV></BODY></HTML>