Link to home
Create AccountLog in
Avatar of StewartMeyers
StewartMeyersFlag for United States of America

asked on

Web Service vs Windows Service

I need to decide whether to use a Web or Windows service for an upcoming project, but don't understand the advantages/disadvantages of each.  The service needs to do two basic things:

- accept incoming requests from an ASP.NET web application to kick off a long running process, and alert the user when it is complete.
- automatically kick off similar long running processes based on a specific schedule

One of the questions I have is can a web service start a thread (in this case the schedule thread) when it is started?  Does web services even allow multi-threading?  Since a web service runs under IIS, can it take advantage of web farms?

Any feedback would be greatly appreciated!
ASKER CERTIFIED SOLUTION
Avatar of surajguptha
surajguptha
Flag of United States of America image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Since you want this middle tier for only ur ASP .net web application i would suggest the use of windows services. THere is no real need for web services unless you are looking for interoperability in my opinion.
Avatar of StewartMeyers

ASKER

>>What do u mean by a scheduled thread?
A portion of the service is a scheduler which will kick off processes automatically based on a time in the future.

>>Web Farms in terms of the database or web farms as in multiple copies of the web services in different servers and to be able to view all the web services as just one service ??
Multiple copies of the web service.

>>Since you want this middle tier for only ur ASP .net web application i would suggest the use of windows services. THere is no real need for web services unless you are looking for interoperability in my opinion.
Can you please elaborate a bit?  What would be the disadvantage of a web service?  Thanks.
web services are not designed for running scheduled threads. The best best in my opinion if you want to do that would be windows services.

Web farms would be possible using clustering. But thats not web service implementable but can be implemented on Win 2003

web services are slower since they use XML serialization