Please review RFC 66

29 messages Options
Embed this post
Permalink
1 2
Trevor Wekel-3

RE: Re: Please review RFC 66

Reply Threaded More More options
Print post
Permalink
I think just that the operation completed successfully.

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Zac Spitzer
Sent: Monday, June 22, 2009 3:02 AM
To: MapGuide Internals Mail List
Subject: Re: [mapguide-internals] Re: Please review RFC 66

seem to work well

i did a test by creating one session, then creating another
and then closing the first and testing is the session:close_session_id exists
which returned no/false ( as Administrator)

out of interest, in the admin log even tho ResourceExists returned
False, it logs as sucess

<2009-06-22T18:55:38>
        1816 Administrator ResourceExists.1.0.0:1(Session:61b8e4b0-4138-102c-8000-005056c00008_en_7F0000010AFC0AFB0AFA//)
Success

does Success in these logs indicate the result, or just that the
operation completed?

z


On Mon, Jun 22, 2009 at 6:26 PM, Zac Spitzer<[hidden email]> wrote:

> ahh, of course, thanks Trevor, I'm actually wokring on upgrading an app to 2.1
> at the moment, I'll try it
>
> z
>
>
> On Mon, Jun 22, 2009 at 6:21 PM, Trevor Wekel<[hidden email]> wrote:
>> Hi Zac,
>>
>> I think ResourceExists is implemented in 2.1.  I wonder if MgResourceService.ResourceExists would work on the root of the session repository "Session:xxyyzz-abc//"?  Alternatively you could check for the existence of the MgMap object "Session:xxyyzz-abc//MyMapName.Map".
>>
>> ResourceExists does return a boolean.
>>
>> Thanks,
>> Trevor
>>
>> ________________________________________
>> From: [hidden email] [[hidden email]] On Behalf Of Zac Spitzer [[hidden email]]
>> Sent: Monday, June 22, 2009 2:10 AM
>> To: MapGuide Internals Mail List
>> Subject: Re: [mapguide-internals] Re: Please review RFC 66
>>
>> Frustratingly, there isn't currently a nice simple way to check if a
>> session is valid without getting into exception and error log territory
>>
>> Adding something like MgSite.isValidSession(sessionId) which returns
>> a boolean result would be really useful and elimate the need for klunky
>> workarounds.
>>
>> z
>>
>>
>> On Mon, Jun 22, 2009 at 4:55 PM, Kenneth Skovhede, GEOGRAF
>> A/S<[hidden email]> wrote:
>>> 1)
>>> On my setup "GETFEATUREPROVIDERS" returns 13Kb worth of xml.
>>> It may not consume CPU resources, but it does consume bandwidth,
>>> especially since it is not required, and it happens a fixed intervals,
>>> even if the user is inactive.
>>>
>>> If its too much work to put in a real function, I think Zac's proposal is
>>> way better,
>>> but I'm not sure it will work if admin functions are disabled in the
>>> WebTier.
>>>
>>> 2)
>>> There is a clear 1-1 relation between the server timeout setting and the
>>> client ping setting.
>>> If you can read the timeout value on viewer startup, that is fine, but I
>>> don't think you can.
>>>
>>> If you require the admin-user to change the time in two places, you can be
>>> certain
>>> that there will be a pile of support requests.
>>> Also, for a non-specialist, it is not immediately obvious that the two
>>> should not be the
>>> same, eg. setting both to 15 minutes will make the sessions expire at
>>> random, due to races
>>> and clock drift.
>>>
>>> 3) I have seen scenarios where a single reqest fails.
>>> If you know the duration of the session, it is easy to ignore "connection
>>> broken" responses,
>>> and only stop pinging when there has been no positive response within a
>>> session duration.
>>>
>>> I think you need to adress issue 1 and 2.
>>> Issue 3 is easy and will improve failure resilience, but not required.
>>>
>>> Regards, Kenneth Skovhede, GEOGRAF A/S
>>>
>>>
>>>
>>> Zac Spitzer skrev:
>>>>
>>>> how about GETSITEVERSION ? that's what I have used for keepalives in
>>>> my own stuff
>>>> and it returns a much smaller response?
>>>>
>>>> z
>>>>
>>>> On Mon, Jun 22, 2009 at 4:05 PM, Christine
>>>> Bao<[hidden email]> wrote:
>>>>
>>>>>
>>>>> Hi Kenneth,
>>>>>
>>>>>    Thank you for your suggestion. Here are my comments:
>>>>>
>>>>>
>>>>> 1.       A real function to support "keep alive" pings
>>>>>
>>>>> We plan to call "GETFEATUREPROVIDERS" through MapAgent to keep alive.
>>>>> This function is light-weighted and won't cause much overhead. Using this
>>>>> method is the easiest way to approach it. Your suggestion makes sense, but
>>>>> we'll need to add another API which is only for this purpose, so we decide
>>>>> not to do this.
>>>>>
>>>>>
>>>>>
>>>>> 2.       The client read out timeout value to adjust ping interval
>>>>>
>>>>> I'm afraid it's too much complicated. The plan is to ping server at a
>>>>> fixed time interval (of course you can set it in configuration), and the
>>>>> interval won't change during runtime. It works as Fusion does.
>>>>>
>>>>>
>>>>>
>>>>> 3.       Connection broken
>>>>>
>>>>> Once the connection broken or timeout because server down, the client
>>>>> will stop ping server. But it will not recovery from a broken/timeout
>>>>> session.
>>>>>
>>>>> Thanks & regards,
>>>>> Christine
>>>>>
>>>>>
>>>>> ------------------------------
>>>>>
>>>>>
>>>>>
>>>>> Message: 3
>>>>>
>>>>> Date: Fri, 19 Jun 2009 12:41:14 +0200
>>>>>
>>>>> From: "Kenneth Skovhede, GEOGRAF A/S" <[hidden email]>
>>>>>
>>>>> Subject: Re: [mapguide-internals] RE: Please review RFC 66
>>>>>
>>>>> To: MapGuide Internals Mail List <[hidden email]>
>>>>>
>>>>> Message-ID: <[hidden email]>
>>>>>
>>>>> Content-Type: text/plain; charset=ISO-8859-3; format=flowed
>>>>>
>>>>>
>>>>>
>>>>> I commented on the issue as well.
>>>>>
>>>>>
>>>>>
>>>>> You are free to ignore it, but in case you somehow missed it, here it is:
>>>>>
>>>>> http://n2.nabble.com/Please-review-RFC-66-tc3090381.html#a3092233
>>>>>
>>>>>
>>>>>
>>>>> Regards, Kenneth Skovhede, GEOGRAF A/S
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> mapguide-internals mailing list
>>>>> [hidden email]
>>>>> http://lists.osgeo.org/mailman/listinfo/mapguide-internals
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>> _______________________________________________
>>> mapguide-internals mailing list
>>> [hidden email]
>>> http://lists.osgeo.org/mailman/listinfo/mapguide-internals
>>>
>>
>>
>>
>> --
>> Zac Spitzer -
>> http://zacster.blogspot.com
>> +61 405 847 168
>> _______________________________________________
>> mapguide-internals mailing list
>> [hidden email]
>> http://lists.osgeo.org/mailman/listinfo/mapguide-internals_______________________________________________
>> mapguide-internals mailing list
>> [hidden email]
>> http://lists.osgeo.org/mailman/listinfo/mapguide-internals
>>
>
>
>
> --
> Zac Spitzer -
> http://zacster.blogspot.com
> +61 405 847 168
>



--
Zac Spitzer -
http://zacster.blogspot.com
+61 405 847 168
_______________________________________________
mapguide-internals mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapguide-internals
_______________________________________________
mapguide-internals mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapguide-internals
Christine Bao

RE: Please review RFC 66

Reply Threaded More More options
Print post
Permalink
In reply to this post by Christine Bao
Hi Zac,

     Your suggestion is very good. I'll use GETSITEVERSION instead of GETFEATUREPROVIDERS. Thank you!

Thanks & regards,
Christine


> Zac Spitzer skrev:

>>

>> how about GETSITEVERSION ? that's what I have used for keepalives in

>> my own stuff

>> and it returns a much smaller response?

>>

>> z

_______________________________________________
mapguide-internals mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapguide-internals
Christine Bao

Re: Please review RFC 66

Reply Threaded More More options
Print post
Permalink
In reply to this post by Christine Bao
Hi Kenneth,

     About your questions:


1)      I'll use GETSITEVERSION instead of GETFEATUREPROVIDERS. You mentioned "if admin functions are disabled in the web tier". Would you please explain more about this?



2)      The interval value should be set a reasonable value to make it work well. For example, the server timeout value is 20 minutes by default, and Fusion pings server every 5 minutes, so the ping can keep browser alive. Basic web layout will ping each 5 minutes also.



3)      The third one is about when to stop pinging server. My solution so far is: if request fail (MgConnectionFailedException) the ping will stop. It's possible that the server is busy and returns this exception, and it will recovery after a while, but I still prefer to stop pinging because: a) The exception happening means server is busy, so browser should stop pinging to release overhead. b) Keep-alive is a nice to have function, the browser still works without pinging. c) Once user refresh the browser, pinging comes back.

Thanks & regards,
Christine


> On Mon, Jun 22, 2009 at 4:55 PM, Kenneth Skovhede, GEOGRAF

> A/S<[hidden email]> wrote:

>> 1)

>> On my setup "GETFEATUREPROVIDERS" returns 13Kb worth of xml.

>> It may not consume CPU resources, but it does consume bandwidth,

>> especially since it is not required, and it happens a fixed intervals,

>> even if the user is inactive.

>>

>> If its too much work to put in a real function, I think Zac's proposal is

>> way better,

>> but I'm not sure it will work if admin functions are disabled in the

>> WebTier.

>>

>> 2)

>> There is a clear 1-1 relation between the server timeout setting and the

>> client ping setting.

>> If you can read the timeout value on viewer startup, that is fine, but I

>> don't think you can.

>>

>> If you require the admin-user to change the time in two places, you can be

>> certain

>> that there will be a pile of support requests.

>> Also, for a non-specialist, it is not immediately obvious that the two

>> should not be the

>> same, eg. setting both to 15 minutes will make the sessions expire at

>> random, due to races

>> and clock drift.

>>

>> 3) I have seen scenarios where a single reqest fails.

>> If you know the duration of the session, it is easy to ignore "connection

>> broken" responses,

>> and only stop pinging when there has been no positive response within a

>> session duration.

>>

>> I think you need to adress issue 1 and 2.

>> Issue 3 is easy and will improve failure resilience, but not required.

>>

>> Regards, Kenneth Skovhede, GEOGRAF A/S

>>

_______________________________________________
mapguide-internals mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapguide-internals
Kenneth Skovhede, GEOGRAF A/S

Re: Re: Please review RFC 66

Reply Threaded More More options
Print post
Permalink
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



Christine Bao skrev:

> Hi Kenneth,
>
>      About your questions:
>
>
> 1)      I'll use GETSITEVERSION instead of GETFEATUREPROVIDERS. You mentioned "if admin functions are disabled in the web tier". Would you please explain more about this?
>
>
>
> 2)      The interval value should be set a reasonable value to make it work well. For example, the server timeout value is 20 minutes by default, and Fusion pings server every 5 minutes, so the ping can keep browser alive. Basic web layout will ping each 5 minutes also.
>
>
>
> 3)      The third one is about when to stop pinging server. My solution so far is: if request fail (MgConnectionFailedException) the ping will stop. It's possible that the server is busy and returns this exception, and it will recovery after a while, but I still prefer to stop pinging because: a) The exception happening means server is busy, so browser should stop pinging to release overhead. b) Keep-alive is a nice to have function, the browser still works without pinging. c) Once user refresh the browser, pinging comes back.
>
> Thanks & regards,
> Christine
>
>
>  
>> On Mon, Jun 22, 2009 at 4:55 PM, Kenneth Skovhede, GEOGRAF
>>    
>
>  
>> A/S<[hidden email]> wrote:
>>    
>
>  
>>> 1)
>>>      
>
>  
>>> On my setup "GETFEATUREPROVIDERS" returns 13Kb worth of xml.
>>>      
>
>  
>>> It may not consume CPU resources, but it does consume bandwidth,
>>>      
>
>  
>>> especially since it is not required, and it happens a fixed intervals,
>>>      
>
>  
>>> even if the user is inactive.
>>>      
>
>  
>
>  
>>> If its too much work to put in a real function, I think Zac's proposal is
>>>      
>
>  
>>> way better,
>>>      
>
>  
>>> but I'm not sure it will work if admin functions are disabled in the
>>>      
>
>  
>>> WebTier.
>>>      
>
>  
>
>  
>>> 2)
>>>      
>
>  
>>> There is a clear 1-1 relation between the server timeout setting and the
>>>      
>
>  
>>> client ping setting.
>>>      
>
>  
>>> If you can read the timeout value on viewer startup, that is fine, but I
>>>      
>
>  
>>> don't think you can.
>>>      
>
>  
>
>  
>>> If you require the admin-user to change the time in two places, you can be
>>>      
>
>  
>>> certain
>>>      
>
>  
>>> that there will be a pile of support requests.
>>>      
>
>  
>>> Also, for a non-specialist, it is not immediately obvious that the two
>>>      
>
>  
>>> should not be the
>>>      
>
>  
>>> same, eg. setting both to 15 minutes will make the sessions expire at
>>>      
>
>  
>>> random, due to races
>>>      
>
>  
>>> and clock drift.
>>>      
>
>  
>
>  
>>> 3) I have seen scenarios where a single reqest fails.
>>>      
>
>  
>>> If you know the duration of the session, it is easy to ignore "connection
>>>      
>
>  
>>> broken" responses,
>>>      
>
>  
>>> and only stop pinging when there has been no positive response within a
>>>      
>
>  
>>> session duration.
>>>      
>
>  
>
>  
>>> I think you need to adress issue 1 and 2.
>>>      
>
>  
>>> Issue 3 is easy and will improve failure resilience, but not required.
>>>      
>
>  
>
>  
>>> Regards, Kenneth Skovhede, GEOGRAF A/S
>>>      
>
>  
>
> _______________________________________________
> mapguide-internals mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/mapguide-internals
>  
_______________________________________________
mapguide-internals mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapguide-internals
zspitzer

Re: Re: Please review RFC 66

Reply Threaded More More options
Print post
Permalink
hmmm, i think that should be changed? thoughts?

GetSiteVersion is important

z

On Tue, Jun 23, 2009 at 7:02 PM, Kenneth Skovhede, GEOGRAF
A/S<[hidden email]> wrote:

> 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
>
>
>
> Christine Bao skrev:
>>
>> Hi Kenneth,
>>
>>     About your questions:
>>
>>
>> 1)      I'll use GETSITEVERSION instead of GETFEATUREPROVIDERS. You
>> mentioned "if admin functions are disabled in the web tier". Would you
>> please explain more about this?
>>
>>
>>
>> 2)      The interval value should be set a reasonable value to make it
>> work well. For example, the server timeout value is 20 minutes by default,
>> and Fusion pings server every 5 minutes, so the ping can keep browser alive.
>> Basic web layout will ping each 5 minutes also.
>>
>>
>>
>> 3)      The third one is about when to stop pinging server. My solution so
>> far is: if request fail (MgConnectionFailedException) the ping will stop.
>> It's possible that the server is busy and returns this exception, and it
>> will recovery after a while, but I still prefer to stop pinging because: a)
>> The exception happening means server is busy, so browser should stop pinging
>> to release overhead. b) Keep-alive is a nice to have function, the browser
>> still works without pinging. c) Once user refresh the browser, pinging comes
>> back.
>>
>> Thanks & regards,
>> Christine
>>
>>
>>
>>>
>>> On Mon, Jun 22, 2009 at 4:55 PM, Kenneth Skovhede, GEOGRAF
>>>
>>
>>
>>>
>>> A/S<[hidden email]> wrote:
>>>
>>
>>
>>>>
>>>> 1)
>>>>
>>
>>
>>>>
>>>> On my setup "GETFEATUREPROVIDERS" returns 13Kb worth of xml.
>>>>
>>
>>
>>>>
>>>> It may not consume CPU resources, but it does consume bandwidth,
>>>>
>>
>>
>>>>
>>>> especially since it is not required, and it happens a fixed intervals,
>>>>
>>
>>
>>>>
>>>> even if the user is inactive.
>>>>
>>
>>
>>
>>>>
>>>> If its too much work to put in a real function, I think Zac's proposal
>>>> is
>>>>
>>
>>
>>>>
>>>> way better,
>>>>
>>
>>
>>>>
>>>> but I'm not sure it will work if admin functions are disabled in the
>>>>
>>
>>
>>>>
>>>> WebTier.
>>>>
>>
>>
>>
>>>>
>>>> 2)
>>>>
>>
>>
>>>>
>>>> There is a clear 1-1 relation between the server timeout setting and the
>>>>
>>
>>
>>>>
>>>> client ping setting.
>>>>
>>
>>
>>>>
>>>> If you can read the timeout value on viewer startup, that is fine, but I
>>>>
>>
>>
>>>>
>>>> don't think you can.
>>>>
>>
>>
>>
>>>>
>>>> If you require the admin-user to change the time in two places, you can
>>>> be
>>>>
>>
>>
>>>>
>>>> certain
>>>>
>>
>>
>>>>
>>>> that there will be a pile of support requests.
>>>>
>>
>>
>>>>
>>>> Also, for a non-specialist, it is not immediately obvious that the two
>>>>
>>
>>
>>>>
>>>> should not be the
>>>>
>>
>>
>>>>
>>>> same, eg. setting both to 15 minutes will make the sessions expire at
>>>>
>>
>>
>>>>
>>>> random, due to races
>>>>
>>
>>
>>>>
>>>> and clock drift.
>>>>
>>
>>
>>
>>>>
>>>> 3) I have seen scenarios where a single reqest fails.
>>>>
>>
>>
>>>>
>>>> If you know the duration of the session, it is easy to ignore
>>>> "connection
>>>>
>>
>>
>>>>
>>>> broken" responses,
>>>>
>>
>>
>>>>
>>>> and only stop pinging when there has been no positive response within a
>>>>
>>
>>
>>>>
>>>> session duration.
>>>>
>>
>>
>>
>>>>
>>>> I think you need to adress issue 1 and 2.
>>>>
>>
>>
>>>>
>>>> Issue 3 is easy and will improve failure resilience, but not required.
>>>>
>>
>>
>>
>>>>
>>>> Regards, Kenneth Skovhede, GEOGRAF A/S
>>>>
>>
>>
>> _______________________________________________
>> mapguide-internals mailing list
>> [hidden email]
>> http://lists.osgeo.org/mailman/listinfo/mapguide-internals
>>
>
> _______________________________________________
> mapguide-internals mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/mapguide-internals
>



--
Zac Spitzer -
http://zacster.blogspot.com
+61 405 847 168
_______________________________________________
mapguide-internals mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapguide-internals
Christine Bao

Re: Please review RFC 66

Reply Threaded More More options
Print post
Permalink
In reply to this post by Christine Bao
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" <[hidden email]>

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

To: MapGuide Internals Mail List <[hidden email]>

Message-ID: <[hidden email]>

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
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapguide-internals
Trevor Wekel-3

RE: Re: Please review RFC 66

Reply Threaded More More options
Print post
Permalink
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: [hidden email] [mailto:[hidden email]] On Behalf Of Christine Bao
Sent: Wednesday, June 24, 2009 12:56 AM
To: [hidden email]
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" <[hidden email]>

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

To: MapGuide Internals Mail List <[hidden email]>

Message-ID: <[hidden email]>

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
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapguide-internals
_______________________________________________
mapguide-internals mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapguide-internals
Christine Bao

Re: Please review RFC 66

Reply Threaded More More options
Print post
Permalink
In reply to this post by Christine Bao
Hi Trevor,

     I agree with you that a new API GetSessionTimeout() is necessary. We'll create this API and get sever timeout session. After sever timeout value n is retrieved, the browser's ping interval is n/5. By doing so user doesn't need to set the ping interval and can get rid of making mistakes.

Thanks & regards,
Christine


_______________________________________________
mapguide-internals mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapguide-internals
Christine Bao

Re: Please review RFC 66

Reply Threaded More More options
Print post
Permalink
In reply to this post by Christine Bao
Hi Zac,

    If you think GetSiteVersion should be available in security mode, would you please raise it in another thread (ticket or RFC)? Then it can be discussed :)

Thanks & regards,
Christine


hmmm, i think that should be changed? thoughts?

GetSiteVersion is important

z
_______________________________________________
mapguide-internals mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapguide-internals
1 2