[xgws-user] xsul perfomance
Omer Erdem Demir
demir_at_cs.ucdavis.edu
Fri, 10 Mar 2006 15:03:56 -0800
I have a question regarding performance of xsul as a standalone
server. I downloaded and compiled xsul source and first tried the
sample soap_bench which works fine. On an older laptop it can process
about 1200 requests per second (the echoVoid operation), which is
impressive compared to axis. Then I decided to write my own service
and I followed the instructions for the decoder example. The service
runs fine but it is very slow (400 r/s). I expect a slow down since
this service has a parameter and returns a value but the slowdown from
1200 to 400 is more than I'd expect. Is this common for services
generated from WSDL? I am attaching the relevant sources for the
server and the service implementation below.
The server:
public static void main(String [] args)
{
XsulVersion.exitIfRequiredVersionMissing(XsulVersion.SPEC_VERSION);
//sanity check
XsulVersion.exitIfRequiredVersionMissing("2.0.3");
int tcpPort = args.length > 0 ? Integer.parseInt(args[0]) : 0;
httpServices = new HttpBasedServices(tcpPort);
System.out.println("Server started on "+httpServices.getServerPort());
String wsdlLoc = args.length > 1 ? args[1] : "config/service.wsdl";
System.out.println("Using WSDL for service description from "+wsdlLoc);
XService xsvc = httpServices.addService(
new XmlBeansBasedService(SERVICE_NAME, wsdlLoc, new
PriceListerImplementation()));
xsvc.startService();
System.out.println("Service started");
System.out.println("Service WSDL available at
"+getServiceWsdlLocation());
return;
}
The service implementation:
public PriceDocument deneme(SymbolDocument input) {
String symbol = input.getSymbol();
PriceDocument result = PriceDocument.Factory.newInstance();
result.setPrice(0);
if ("OED".compareTo(symbol)==0)
{
result.setPrice(123.456);
}
return result;
}
Thank you.
--
Omer Erdem Demir