[mapguide-internals] RE: Re: Please review RFC 66
Trevor Wekel
trevor.wekel at autodesk.com
Wed Jun 24 04:23:26 EDT 2009
Hi Christine,
I personally disagree with 1).
I believe it is more straightforward to create a new HTTP API call which can be used as a ping. As Kenneth suggested earlier a new HTTP API, GETSESSIONTIMEOUT, gives more information to the client and it could also be used as the ping call. The call could either return the timeout as a raw text string (which CREATESESSION already does), or an XML document. Since we are looking for fast over-the-wire performance, the raw text string is probably better and requires minimal to no javascript parsing by the viewers.
Futhermore, the mapagent folder does not currently contain any PHP code and does not depend on any API language. This makes it API language agnostic. Adding a KeepAlive.php to mapagent muddies the "API agnostic" waters and we would need to validate that it does not force any additional installer or IIS/Apache configuration work.
For 2), the PingServerInterval in webconfig.ini can be completely eliminated if the clients know the server session timeout. The viewers can simply take the server session timeout, divide it by 3 or 4, and use that as the value. Maintaining a ping interval in webconfig.ini and the session timeout in serverconfig.ini is a hassle.
Thanks,
Trevor
-----Original Message-----
From: mapguide-internals-bounces at lists.osgeo.org [mailto:mapguide-internals-bounces at lists.osgeo.org] On Behalf Of Christine Bao
Sent: Wednesday, June 24, 2009 12:56 AM
To: mapguide-internals at lists.osgeo.org
Subject: [mapguide-internals] Re: Please review RFC 66
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
_______________________________________________
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