aspose file tools*
The moose likes Performance and the fly likes WebService name hardcoded for performance ?!!! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Performance
Bookmark "WebService name hardcoded for performance ?!!!" Watch "WebService name hardcoded for performance ?!!!" New topic
Author

WebService name hardcoded for performance ?!!!

aditee sharma
Ranch Hand

Joined: Jul 22, 2008
Posts: 182
Given a distributed environment with 5 weblogic 9.1 machines, and Oracle RAC 10g (distributed) Database.

I see a webservice in the application and it is named as per the client or calling application (??!!!)
If you think this is not that bad, my manager asked me to make another web service for a different client application that has the same input, is hosted on the same clusters, accesses the same Database and tables and differs only in one output parameter or two.
I suggested that names should not be hardcoded as per the calling client applications and that we don't really need 2 different webservices especially when the code is almost identical and given the fact that they will be using the same resources, but he said that a exclusive webservice for a client will provide better performance and if something fails in a webservice, no other clients will be affected.
I am highly skeptical of what he has said and would like to know if my ideas of Code Re-usability and component development concepts are misplaced here, or is the manager just being over-cautious?
Nitesh Kant
Bartender

Joined: Feb 25, 2007
Posts: 1638

At the first look it sounds a little weird to have *exact* duplication of code in two different services.
He must be having some really good reasons of doing it if at all he understands what he is asking to do.

If instead of code duplication it would have been different deployment it would have made more sense. What i mean is, it could have been so that you define one more operation/service that has different parameters and deploy it into an entirely different setup, so that you can honor SLAs for a particular client, if that is the requirement.

It also makes sense, if in your code base you have different source branches for different clients. Such that change on one of the client does not go/fit for other client. In some companies people follow this process.

But of course, in an "ideal world" this type of development is weird to say the least.


apigee, a better way to API!
aditee sharma
Ranch Hand

Joined: Jul 22, 2008
Posts: 182
Thanks for your reply.
Nitesh Kant wrote: What i mean is, it could have been so that you define one more operation/service that has different parameters and deploy it into an
entirely different setup, so that you can honor SLAs for a particular client, if that is the requirement.

Not sure what you mean by a different setup. If it means different machines or different instance of Database or a combination of both, then as stated earlier, the answer is no.The webservices will be hosted on the same cluster and will access the same database. Except for the name and 1 or 2 output parameters, everything else is just a duplicate of the other and sharing each other's resources.

Nitesh Kant wrote:
It also makes sense, if in your code base you have different source branches for different clients. Such that change on one of the client does not go/fit for other client. In some companies people follow this process.

No, we have just one code base. As I see here and which is also the usual practice, branches are created only for different releases, not clients.
Abhinav Srivastava
Ranch Hand

Joined: Nov 19, 2002
Posts: 349

I don't see any impact on performance. Are the two web-services "similar" by design or by "chance". Is the WSDL likely to change for one of the clients?
aditee sharma
Ranch Hand

Joined: Jul 22, 2008
Posts: 182
Abhinav Srivastava wrote:I don't see any impact on performance. Are the two web-services "similar" by design or by "chance". Is the WSDL likely to change for one of the clients?

By design.The new one is being developed now and there is another one already existing. WSDL will change because the name is different and 2 output parameters are also different.The point is : do we gain anything by keeping the WSDLs and the web services separate ?
If we have 2 Web services hosted on the same cluster, accessing the same DB and other resources, then no matter how much one is used more than the other, shall we gain anything performance wise?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: WebService name hardcoded for performance ?!!!