Changes between Version 10 and Version 11 of MapGuideRfc66


Ignore:
Timestamp:
Jul 6, 2009, 1:47:12 PM (15 years ago)
Author:
tomfukushima
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • MapGuideRfc66

    v10 v11  
    1 = !MapGuide RFC 66 - Session timeout and error messages =
     1= !MapGuide RFC 66 - Prevent session timeout, and give better error messages =
    22
    33This page contains an change request (RFC) for the !MapGuide Open Source project.
     
    2424== Overview ==
    2525
    26 Failover is to improve user feedback to monitor state between client and server tier, while detect and report cases of failure in both Ajax and Fusion web layout.
     26This RFC adds features keep sessions alive while the browser is open; and to improve user feedback to monitor state between client and server tier, while detect and report cases of failure in both Ajax and Fusion web layout.
    2727
    2828== Motivation ==
     
    3131The use cases would be:[[BR]]
    32321.      If the Http session is timeout, the user should be informed about the fact instead of getting some script errors or meaningless error messages.[[BR]]
    33 2.      If the MapGuide Server session is timeout, the user should be informed about the fact instead of getting some script errors or some meaningless error messages.[[BR]]
    34 3.      If the connection to MapGuide Server is broken, the user should be informed by a friendly message which helps the user know what's happening instead of getting a kind of "exception stack trace" message box.
     332.      If the !MapGuide Server session is timeout, the user should be informed about the fact instead of getting some script errors or some meaningless error messages.[[BR]]
     343.      If the connection to !MapGuide Server is broken, the user should be informed by a friendly message which helps the user know what's happening instead of getting a kind of "exception stack trace" message box.
    3535
    3636== Proposed Solution ==
    3737
    3838The possible solutions could be:[[BR]]
    39 1.      To avoid timeout (either from browser to web tier, or from web tier to MapGuide server), implement a script which pings the servers periodically to keep the both sessions alive. [[BR]]
     391.      To avoid timeout (either from browser to web tier, or from web tier to !MapGuide server), implement a script which pings the servers periodically to keep the both sessions alive. [[BR]]
    40402.      Refine the code handling the exceptions like "connection broken" to provide more friendly messages.
    4141
     
    5050
    5151   b.   Ajax viewer doesn’t ping server to keep-alive so far. If open an Ajax viewer and leave it open for a while more than the timeout interval, it can’t continue work. To keep Ajax viewer alive, the approach is:[[BR]]
    52      1).  Create a server API GetSessionTimeout(), return the timeout setting from server side. [[BR]]
    53 The API is in MgSiteConnection class, declare as[[BR]]
     52     1).  Create a server API !GetSessionTimeout(), return the timeout setting from server side. [[BR]]
     53The API is in !MgSiteConnection class, declare as[[BR]]
    5454{{{
    55 class MG_MAPGUIDE_API MgSiteConnection  : public MgGuardDisposable
     55class MG_MAPGUIDE_API !MgSiteConnection  : public MgGuardDisposable
    5656{
    5757    /////////////////////////////////////////////////////////////////////////////////
     
    9090[[BR]]
    9191
    92      2).  Call GetSessionTimeout() from mainframe.templ periodically.[[BR]]
    93 MapAgent.fcgi operation sample is:[[BR]]
     92     2).  Call !GetSessionTimeout() from mainframe.templ periodically.[[BR]]
     93!MapAgent.fcgi operation sample is:[[BR]]
    9494{{{
    9595[MapAgent URL]\MapAgent.fcgi?OPERATION=GETSESSIONTIMEOUT&VERSION=1.0.0&SESSION=[session Id]&LOCALE=[locale]&CLIENTAGENT=[client];   
     
    9797[[BR]]
    9898
    99      3).  User doesn’t need to set the time interval of pinging. It’s read from server timeout setting and divided by 5. User can turn the ping on/off by setting <EnablePingServer>=1/0 of basic web layout. [[BR]]
     99     3).  User doesn’t need to set the time interval of pinging. It’s read from server timeout setting and divided by 5. User can turn the ping on/off by setting <!EnablePingServer>=1/0 of basic web layout. [[BR]]
    100100
    101 Web Layout schema should be updated from 1.0.0 to 1.1.0 for adding <EnablePingServer> tag. [[BR]]
     101Web Layout schema should be updated from 1.0.0 to 1.1.0 for adding <!EnablePingServer> tag. [[BR]]
    102102{{{
    103103  <xs:complexType name="WebLayoutType">
     
    119119
    1201202.      Refine exception handling such as “connection broken”[[BR]]
    121    a.   Fusion does not handle exception message well. It shows long unreadable message when exception happens. For example if connection broken the error message is "FATAL: xml2json: invalid XML document: MgConnectionFailedException : http://127.0.0.1/mapguide2010/mapagent/mapagent.fcgi?version=1.0.0&locale=en&clientagent=Fusion%20Viewer&operation=QUERYMAPFEATURES&session=40d3e074-3ee5-102c-8000-005056c00008_en_7F0000010AFC0AFB0AFA&mapname=Sheboygan4a3b609791c82&geometry=POLYGON((-87.730254250931%2043.73763292302%2C%20-87.730254250931%2043.737069942268%2C%20-87.729691270179%2043.737069942268%2C%20-87.729691270179%2043.73763292302%2C%20-87.730254250931%2043.73763292302))&maxFeatures=1&persist=0&selectionVariant=INTERSECTS&layerNames=&layerAttributeFilter=5 type=0". This is no user-friendly. The error message should show exception message such as "Fussion error: Cannot establish connection".[[BR]]
     121   a.   Fusion does not handle exception message well. It shows long unreadable message when exception happens. For example if connection broken the error message is "FATAL: xml2json: invalid XML document: !MgConnectionFailedException : !http://127.0.0.1/mapguide2010/mapagent/mapagent.fcgi?version=1.0.0&locale=en&clientagent=Fusion%20Viewer&operation=QUERYMAPFEATURES&session=40d3e074-3ee5-102c-8000-005056c00008_en_7F0000010AFC0AFB0AFA&mapname=Sheboygan4a3b609791c82&geometry=POLYGON((-87.730254250931%2043.73763292302%2C%20-87.730254250931%2043.737069942268%2C%20-87.729691270179%2043.737069942268%2C%20-87.729691270179%2043.73763292302%2C%20-87.730254250931%2043.73763292302))&maxFeatures=1&persist=0&selectionVariant=INTERSECTS&layerNames=&layerAttributeFilter=5 type=0". This is no user-friendly. The error message should show exception message such as "Fussion error: Cannot establish connection".[[BR]]
    122122   b.   Ajax viewer shows exception messages and they are user-friendly. No improvements needed for Ajax viewer.
    123123