Find and resolve dynamic correlations

Started by
3 comments, last by Kylotan 15 years, 6 months ago
Hi All, I am working on a prototype of automatic load generator for my server. For this purpose, i record all the interactions(method calls and responses) of a real user, so that i can replay those recorded requests and responses later with 100's of virtual users. Recording is done in serialized XML forms. Actually when i was going to replay those recorded scenarios, i found a very big problem. The problem is divided into 3 cases: ##################################################### Case1: Var x = func1.a (); ….. …. // Some intermediate statements …. func2.b (a, b, x); ##################################################### Case2: func2.b(a, func1.a(), b); ##################################################### Case3: Var x = func1.a(); ….. …. // Some intermediate statements Variable x is updated …. func2.b(a, b, x); ###################################################### During replay of those recorded calls You can see the values returned by func1 call(it was already recorded) have been used in func2(this call is already been recorded) in 3 different ways. I have to find these 3 cases during runtime (replaying of those recorded calls) and have to pass these dynamic values returned by func1 to func2 instead of those values which are in recorded script. Please help me
Advertisement
I would make a version of the client that does not use graphics, and then script that client to generate various requests to the server. When not using graphics, you should be able to run many clients on a single machine.

An alternative is to generate load using only the kinds of requests that don't require intermediate processing on the client.
enum Bool { True, False, FileNotFound };
Actually i have described my scenarios as required by my company.
I have to record real time user invocations(method calls) in serialized
form and then later replay them with virtual-players.

The problem is that most of the time when a recorded call is being replayed,
server sends back some dynamic data and i have to know that this method call returned value will be used in which recorded call(call that will be replayed later in sequence) as parameter.

This question is Open to all who is visiting this community.
For web analysis, most tools create a html proxy for recording between the 'client' (browser of choice) and the network interface. I have in the past done this, and it works terrific. The actual commands from the browser are stored in a system that has the ability to retrieve those 'scripts' and replay them using all types of load conditions. As well, multiple scripts that record different behavior can now be replayed simultaneously against the server. If you use a database to record and retrieve the scripts, serveral clients can be replaying the various scripts to create very specific and repeatable loading conditions.

Look at making a proxy for your game client to record the network packets the game cleint is sending to the server.

Good luck!
As I see it, you need a way to delineate your test data so that rather than just a stream of RMIs, it's a set of situations, like your 3 cases in the example, and within each situation you have a stream of RMIs each dependent on previous ones. I don't think merely recording your RMIs and playing them back will help since you will lose that sort of context. You probably also need to record the dependencies as you go along, so that the future playbacks can rewrite the messages accordingly. This has to be built into your client code, as there's no way of knowing from the outside where those dependencies are. So for each RMI you invoke, it's worth recording whether any of the parameters depend on previous RMI calls within this situation.

Note that this works for Case 1 and Case 2. In Case 3, you really are stuck, because the only way you'll know how to process the value of 'x' is to run that exact same client code. Imagine that the updating statement is 'if (rand() % 2 == 0) x += rand();' - you couldn't possibly reproduce that in your load generator program with any real accuracy. Output and input would not be directly related, as global state would play a part. So I think you need to be able to label some RMI situations as unrepeatable, or to be able to use dummy data (perhaps by switching the receiving server into some sort of lenient test mode).

This topic is closed to new replies.

Advertisement