[mapguide-internals] Re: Please review RFC 66

Zac Spitzer zac.spitzer at gmail.com
Mon Jun 22 04:26:54 EDT 2009


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<trevor.wekel at autodesk.com> 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: mapguide-internals-bounces at lists.osgeo.org [mapguide-internals-bounces at lists.osgeo.org] On Behalf Of Zac Spitzer [zac.spitzer at gmail.com]
> 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<ks at geograf.dk> 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<Christine.Bao at autodesk.com> 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" <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: <4A3B6B4A.7050206 at geograf.dk>
>>>>
>>>> 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
>>>> 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
>>
>
>
>
> --
> Zac Spitzer -
> http://zacster.blogspot.com
> +61 405 847 168
> _______________________________________________
> 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
>



-- 
Zac Spitzer -
http://zacster.blogspot.com
+61 405 847 168


More information about the mapguide-internals mailing list