[mapguide-internals] Re: Please review RFC 66

Christine Bao Christine.Bao at autodesk.com
Wed Jun 24 02:55:38 EDT 2009


Hi Kenneth,


1)      As the existing APIs (GetSiteVersion, GetFeatureProviders) don't work when DisableAuthoring is enabled, I think we need to adopt what Fusion does. Fusion's solution is: it creates a Common.php in $www\fusion\layers\MapGuide\php, and MapGuide.js calls this php file periodically. Common.php uses server API to keep alive session. Please check the code.

To keep Ajax viewer not timeout, a KeepAlive.php will be created in MapAgent folder, and it does the similar thing as Common.php.



2)      Second one is about read timeout value.

Fusion's ping is already done by DM Solution. The value is stored in ApplicationDefinition's Map tag extension part, <KeepAliveInterval> tag. For example

    <Map>

      <Type>MapGuide</Type>

      <SingleTile>true</SingleTile>

      <Extension>

        <ResourceId>Library://Samples/Sheboygan/Maps/Sheboygan.MapDefinition</ResourceId>

        <SelectionAsOverlay>true</SelectionAsOverlay>

        <SelectionColor>0x0000FFA0</SelectionColor>

        <KeepAliveInterval>500</KeepAliveInterval>

      </Extension>

</Map>



Basic layout is not done yet, and it will be added by this RFC. The timeout value will be set in webconfig.ini file, for example "PingServerInterval=300", 0 means not ping. Also web layout can turn it on/off individually by set tag <EnablePingServer> to 1/0. For example, if a web layout's EnablePingServer is 0, even webconfig.ini set PingServerInterval=300 the basic layout will not ping server.



3)      How to stop pinging is a tricky thing. Fusion even never stops pinging. It's not in this RFC's plan originally. As it's a good suggestion, we'll try to figure out a way - catch exception is a case.

Thanks & regards,
Christine


------------------------------



Message: 8

Date: Tue, 23 Jun 2009 11:02:11 +0200

From: "Kenneth Skovhede, GEOGRAF A/S" <ks at geograf.dk>

Subject: Re: [mapguide-internals] Re: Please review RFC 66

To: MapGuide Internals Mail List <mapguide-internals at lists.osgeo.org>

Message-ID: <4A409A13.9010702 at geograf.dk>

Content-Type: text/plain; charset=ISO-8859-1; format=flowed



1)

In the file "webconfig.ini" you can set:

DisableAuthoring = 1



Which will disable a lot of features in the MapGuide server.

It is recommended to do so in the Autodesk MapGuide Security Whitepaper (page 3, middle).

http://usa.autodesk.com/adsk/servlet/index?siteID=123112&id=7798553



I just tested this, and the GetSiteVersion method is disabled, when DisableAuthoring is enabled.

FYI, GetFeatureProviders is also disabled.



This means that the keepalive feature will not work on a secure site.

This leads back to my original comment: Make a seperate method for this.



2)

How does the client (fusion, basic layout) read the timeout value?

The "20" minutes is set in the serverconfig.ini, and many people may have changed that value.

If the session timeout is changed to say 5 min, in order to handle heavy load better, the keepalive system will not work as expected.



3) Ok, MgConnectionFailedException is a good place to stop pinging. I was thinking more of a "no response" type error when I wrote it.



Regards, Kenneth Skovhede, GEOGRAF A/S



More information about the mapguide-internals mailing list