Serving the Quantitative Finance Community

 
User avatar
esty
Topic Author
Posts: 0
Joined: May 20th, 2004, 7:07 pm

web services in qf

January 3rd, 2006, 9:40 pm

I've been hearing even more hype about web services than usual lately. I kind of thought this had started to die down when people realized:1) Using XML doesn't make computers magically able to realize that "isin" in one database should be mapped to "isinCode" in the other2) XML (often) imposes a large amount of transfer, store, and parse overhead3) web services are no magic bullet, just like OOP, CASE, AOP, and what have you were not.Oddly, I'm hearing people talk about deploying web services internal to shops. So for example, you might expose pricing code or risk analytics through internal web services. Are you guys doing this? What are the advantages of doing this? Easier than deploying and managing DLL's? Maybe, but you'll need client side programs to interact with the web services anyway. It doesn't seem to reduce IT overhead because I don't imagine the average excel jockey is going to be writing VBA macros to produce xml requests, hit internal web services and parse responses.What are some really good use cases for web services like this? Mind you, I'm talking about 'web services' = 'APIs implemented as a series of XML "method calls" sent over HTTP over port 80', not 'web services' = 'software-as-a-service, which is provided over the web, and accessed through a browser', though I admit the line can be blurry.
 
User avatar
judo
Posts: 0
Joined: January 30th, 2005, 1:07 pm

web services in qf

January 16th, 2006, 2:46 am

The text books always say that XML web services are suited for interfacing one system versus an external one and for internal use. However the ease of deployment using .NET means that even an 'excel jockey' could easily call a web service (especially under Visual Studio 2005). I agree that XML imposes a lot of overhead, and so is not really suitable for data intensive tasks but for processors intensive tasks (such as calling a pricing function) the overhead is minimal. If anyone is interested I put up a free XML web service for pricing employee stock options on esomanager.In truth I've heard XML web services as the next big thing for the past 4 years and I've seen very few real applications of the technology .
 
User avatar
rtougher
Posts: 0
Joined: January 12th, 2006, 9:46 pm

web services in qf

January 16th, 2006, 2:36 pm

Web services provide a few benefits above the traditional build-a-dll-and-ship model, even to strictly internal software environments:1. Single point of update. You need to update only the web service, instead of shipping DLLs to each department using the functionality.2. Mandatory updates, if necessary. You can force people to use the latest version of the functionality.3. Code security. You can make sure only a few people have access to the actual bits of the DLL that implements the functionality. If you're shipping the DLL around to everyone in the company, it may get accidentally (or intentionally) sent to someone that should not have access to it. This would probably be bad if you were developing proprietary financial models.Obviously there are some drawbacks:a. A web service is a single point of failure. If it goes down, the entire company cannot use the functionality.b. Calling a web service is a little bit slower than a DLL: the underlying code needs to package up the parameters as XML, the receiving end needs to parse the XML, etc.c. Network latency. If your web service requires that a lot of data be passed to it, or if it returns a lot of data, this could result in slow response times.d. Shared processor clock cycles. If your web service is processor-intensive, it may get bogged down if many applications call the web service at the same time.Regarding complexity of the caller's code, calling a web service from VB6 is pretty simple:Dim oClientDim oResponseSet oClient = CreateObject("MSSOAP.SoapClient30")oClient.MSSoapInit "http://location/of/web/service/wsdl"Set oResponse = oClient.callYourCalculationFunction(some, parameters)so it probably wouldn't cause problems for business users calling your web service from an Excel Workbook.- Rob
 
User avatar
SierpinskyJanitor
Posts: 1
Joined: March 29th, 2005, 12:55 pm

web services in qf

January 16th, 2006, 8:14 pm

it would be interesting to read the opinion of someone who actually knew what WebServices are especially their practical application in QF. But it seems this forum has drifted away from a rather useful source of technical knowledge thus becoming a quanabe playground...
 
User avatar
DrBen
Posts: 7
Joined: February 8th, 2003, 1:24 pm

web services in qf

January 16th, 2006, 8:33 pm

rtougher: I would also add that with WS you cannot overload methods, it does not support a distributed object model since most objects cannot be serialized as XML.esty: The killer WS app must be the fact that you can use Excel as a WS client.judo: Nice Web service.
 
User avatar
alvincho
Posts: 0
Joined: February 20th, 2002, 5:13 am

web services in qf

January 18th, 2006, 7:18 am

WebServices can be overriden in .NET enviornment. You can use MessageName attribute to make .NET application treat different methods in WebServices as the same name.We use Web Services a lot in our inhouse applications.
 
User avatar
DrBen
Posts: 7
Joined: February 8th, 2003, 1:24 pm

web services in qf

January 19th, 2006, 8:03 pm

QuoteOriginally posted by: alvinchoWebServices can be overriden in .NET enviornment. You can use MessageName attribute to make .NET application treat different methods in WebServices as the same name.We use Web Services a lot in our inhouse applications.Sure, I just wanted to point out that a .NET API does not map 1-to-1 to a Web service API, because the signature in the API sense does not corresponding 100% to a 'signature' in Web services. In short, a service is a slightly different notion to that of a class. I provide the below example since to illustrate this and it may even be helper to gfolk in 6 months time whop read this thread and are looking for som pointers on Web service implementation. The only point I want to make here is show how it really is very straightforward a Web service and for .NET the Web service is an aspect which is handled transparently from the business logic. Great technology!Here's the example, consider the .NET class with two methods:"Usual stuff"public class Add{ public double Add(double a, double b){ ....add two implementation.... } public double Add(double a, double b, double c){ ....add three implementation.... }}how this class would map to the following service which also contains two methods:"Usual stuff"using System.Net;using System.Web;using System.Web.Services;using System; [WebService (Namespace="Your URL")] public class Add : WebService { [WebMethod (EnableSession = false, MessageName = "AddTwo")] public double AddTwo(double a, double b) { ....add two implementation.... } [WebMethod (EnableSession = false, MessageName = "AddThree")] public double AddThree(double a, double b) { ....add three implementation.... }}The actual implementation code is the same and the only essential difference is that you need to provide a different MessageName attribute since over-loading methods is not allowed.p.s. Does anyone know of a decent font for code on this FuseTalk forum?
Last edited by DrBen on January 18th, 2006, 11:00 pm, edited 1 time in total.