[mapguide-internals] Toggling layers on and off in a load tester application.

Carl Jokl carl.jokl at keynetix.com
Sat Sep 26 07:50:10 EDT 2009


Let me give you a bit more background. Not too long ago we went live with a
migrated web application which had originally been running in MapGuide 6.5
but was migrated to MapGuide Enterprise. Extensive testing was done of the
MapGuide enterprise migration before it went live. In spite of all our
testing and in particular load testing, when the application went live it
proved to be unstable. In the end we had to roll back the live system from
MapGuide Enterprise to MapGuide 6.5. We are left now trying to figure out
what the problem is (which we are certain lies in the MapGuide Enterprise
Server). As these stability issues did not show up in our load testing we
need to be sure our testing can replicate a load closer to the live
environment. I have been given responsibility for creating a load testing
application. Rather than trying to gather as many of our staff to use the
application concurrently to do load testing as we have previously I have
created a program which simulates multiple concurrent users manipulating a
map on the server. To that end this program needs to be able to perform the
basic user activities. 

This work is almost complete. This is basically a C# .Net application which
communicates with the server components and "pretends" to be the AJAX
viewer. This works well actually. I have image files dumped out to prove
that the client has a correct map image as the map is panned and zoomed. It
even is able to update for different selection. I think I am already close
to being able to toggle layers on and off. This isn't any kind of official
or approved approach from Autodesk rather it is from reverse engineering how
the AJAX viewer works. I can use the Live Headers pluging for FireFox and
watch every HTTP Request and Response moving back and fourth between the
viewer and the server.

You say that you don't think this is possible. I say it has to be possible
for the AJAX viewer to work. Everything the AJAX viewer displays in the
browser was rendered on the server. This is a collection of HTML Div objects
which JavaScript is updating with new rendered images from the server. I
have done a lot of reading of the JavaScript source code to have a
reasonable idea how the AJAX viewer works. 
I have observed a single HTTP request made from the viewer to the server
when a layer is turned either on or off. This implies that it only takes one
call to do it. Even though my C# code calls the same URL with the same
parameters the image I get back still shows the layer as being visible. This
is why it is really frustrating. I can't see what the AJAX viewer does any
different from my code. The AJAX viewer would as far as I know when a layer
is turned off make a request to the server to render a new map image with
that layer turned off. 

I wonder if I might have to go into the server side C++ code to reverse
engineer more of how the viewer-server interaction works and what the Server
expects to receive in terms of parameters. The BEHAVIOR parameter in
particular I am just using blindly the same value I am seeing going back and
fourth in the HTTP Interaction. It would be good to know what the different
number codes relate to. 

My starting point on this project has been the existing Grinder based load
tester which was posted by another user on this forum. That user has been
able to carry out load testing in this way.
-- 
View this message in context: http://n2.nabble.com/Toggling-layers-on-and-off-in-a-load-tester-application-tp3713110p3717151.html
Sent from the MapGuide Internals mailing list archive at Nabble.com.


More information about the mapguide-internals mailing list