views:

92

answers:

2

My team has some data stored in a database which other teams in our company are interested in getting, and we're planning to build some web services, so that they don't have direct access to our database.

We aren't running very complex queries (consider it instant, once we're interested in the overhead), and we're wondering how long a web service call should last, to conclude if we should use a web service, or try some more efficient approaches.

We'd use RESTful web services. Any help providing an expected time range?

+1  A: 

How fast does it need to be? The primary expense of any of these solutions (outside of the DB query itself) is simply marshalling the data (i.e. converting the data from DB format to web service format, XML, JSON, whatever).

So, if you're willing to "wash" the price of the DB query, that's where most of your effort will end up.

Second to marshalling is the actual transfer time, which depends on your overall network speed.

A web service that returns a "perfect" representation won't be significantly slower than a more specialized mechanism (RPC, CORBA, raw socket protocol).

I wouldn't fixate on the "web service" nature per se, and instead worry about converting the data and moving it.

Will Hartung
A: 

While there are no hard and fast rules, the default http timeout in most web service systems is 120 seconds. You could identify the max time that the result takes to appear and decide accordingly if this is too less or adequate. Since it appears to be an internal system, I dont suppose the actual web service would add too much overhead to the actual time that the DB takes in retrieving the data.

Thiyagaraj