Friday, December 9, 2011

Load Testing Services across GWT RPC

I tried to look up the www on how to load test our application across the technology stack we have: GWT - RPC - Services. Turned out not many tools - in the open source - that provide this functionality and JMeter lacks proper support for GWT RPC protocol.
A couple of options occured to me.
Option 1: Hack GWT generators
GWT is all opensource. And the problem is only with the client side of the RPC. All we need is the ClientSerializationStreamWriter to construct the RPCRequest and ClientSerializationStreamReader to handle service responses. Since GWT generates the client serializers via deferred binding at compile time, I started with the assumption that I could hack the GWT proxy generators to remove / stub out JSNI references from the generated service proxies and type Serializers and use these as part of my load test client. After a day of walking through the GWT implementation, I understood this was not a good idea. Though theoretically possible, the hack was not worth the couple of weeks of effort for multiple reasons.
And I decided to evaluate Option 2: Implement the client side of the RPC protocol and plug this into JMeter. This did not turn out to be as difficult as it seemed first up. Some help and atleast one instance of this attempt to start with. And within a week I have a primitive POC version of GWT RPC plugged into JMeter. I am in the process of implementing a proper GWTRPC Sampler for JMeter. Details I will publish as soon as I am done.

2 comments:

  1. Do you have any updates on your progress? I'm taking a different approach to the same problem by leveraging the gwt-syncproxy project for (threaded) unit testing initially, then move to jmeter via something like the JavaSampler based on that code.

    Jumping straight to jmeter would definitely be desirable as long as it is easy/preditable to setup the RPC calls.

    ReplyDelete
  2. Hello,
    Just to mention our Company (UBIK-INGENIERIE) distributes an in-house GWT-RPC Apache JMeter plugin. You can simply, record, variabilize and replay GWT-RPC based client-server dialogs.

    See:
    http://www.ubik-ingenierie.com/-Solutions-

    For GWT using classical JSON, Standard JMeter will do the job although you will need to write a lot of REGEXP for correlation. For this, we propose another Plugin that transforms JSON to XML to ease correlation through XPATH.

    Regards
    Philippe

    ReplyDelete