rarahim wrote:
> On Jan 22, 10:21 pm, rarahim<reez...@gmail.com> wrote:
>>> There is obviously less code to write if you don't use web services.
>>> But, as I said, connecting to the database directly is not safe. No one
>>> (with any brains) exposes their database ports (eg 1433 for SQL Server)
>>> to the internet. If you do, then you will have a large number of hackers
>>> using password cracking tools trying to get at your data.
>>
>>> That's why some people use a VPN if they require access to their
>>> database - and don't want to rewrite their application. You can use a
>>> VPN as well as web services if you really want to - but there's not much
>>> point.
>>
>> I see.. so the benefit of using a web service in this case is for
>> security reasons.
>>
>> Is there any benefit to be gained as far as performance is concerned?
>>
>> Thanks.
>
> Also, in terms of the saving on the bandwidth, is the amount of data
> transported back and forth the client and server any different when
> accessing via web service?
A VPN uses encryption to safeguard data being passed between the client
and server (like HTTPS does for web sites). It takes time and processing
power to encrypt/decrypt data - which tends to decrease scalability.
When you connect directly to a database server you will probably be
passing datasets back and forth. You could create a web service that did
the same thing - just for the added security. However, normally web
services are not used just to retrieve and save datasets. In fact, as a
dataset is not a cross-platform datatype, you're not supposed to use web
services for that purpose.
Really, you should create web services that contain some of your
application's business logic - to reduce the need to pass data to and
from your client. This will save on bandwidth, but put a greater
processing load on your "application" server - as you're transferring
processing that would have been done on the client to the server.
When you need to support more users you should just be able to add an
application server - using load balancing - which you can do if you've
structured your application well.
So, it's very difficult to tell whether you will gain an increase in
performance. That will largely depend on the design/architecture of your
application.
|