Saju
Saju

Reputation: 422

Flex webservice huge performance issue

I am pulling out a good amount of data using webservice from a java application. The data is a bit complex in its structure with lot of hierarchical pattern using array collections. I am experiencing huge performance issue of around 15 second(in jboss and WebSphere) to get the data loaded. Time consumed is mostly while converting the service data into flex object structure. Issue gets worsen while moving to Weblogic application server. I am using axis2 framework.

Is there any way to optimize this? What can be the alternative technologies I can use instead of webserivces?

Upvotes: 2

Views: 449

Answers (1)

RIAstar
RIAstar

Reputation: 11912

I'm afraid you may not like my answer, because it will involve a lot of refactoring. I can't think of any easy fixes.

What can be the alternative technologies I can use instead of webserivces?

You'll get best performance by using AMF remoting instead of web services. Here's an article that explains what it is and contains a benchmark that will show you that this could cut easily cut your response time in half: http://www.themidnightcoders.com/products/weborb-for-net/developer-den/technical-articles/amf-vs-webservices.html. And that benchmark is using .Net on the server side. It'll work even beter with a Java server.

Is there any way to optimize this?

You should consider refactoring the objects you pass to the client to "Data Transfer Objects" (DTO's). These are simple value objects that contain only the data necessary for the client to display. Which means: less time spent transferring data from the server to the client and less time spent converting objects to ActionScript classes.

How can you limit the work involved?

You could add a layer on the server side, that would call your existing web services, convert complex data into simple DTO's and deliver them to the client through AMF services. That way you can leave your existing code intact and still get a significant performance boost.

Upvotes: 3

Related Questions