[mapguide-internals] TileService cache Question

UV uvwild at googlemail.com
Mon Mar 15 11:45:24 EDT 2010


Trying to understand parallel overlapping tile requests to the tile 
service in preparation of meta tiling.

line 321-326 ServerTileService.cpp:
   // If there is a dangling lock file, then attempt to remove it.
    if (DetectTileLockFile(lockPathname))
    {
        // TODO: Handle the exception by displaying a tile with an error 
message?
        MgFileUtil::DeleteFile(lockPathname, true);
    }


I dont understand this logic... If someone has made the request for my 
tile already should I not wait instead of removing the lockfile?
Checking the time stamp of the lockfile would be a practical way to 
determine if its worth waiting......

The logic shown above seems to assume that it is an erroneous state to 
request a tile while it is computed.
In a multi-threaded server I can easily create scenarios where this 
could happen and a retry would be a smarter reaction to a found lockfile.

Any ideas?



More information about the mapguide-internals mailing list