?
Solved

Web Service vs Windows Service

Posted on 2007-10-03
4
Medium Priority
?
1,676 Views
Last Modified: 2013-11-07
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!
0
Comment
Question by:StewartMeyers
  • 3
4 Comments
 
LVL 21

Accepted Solution

by:
surajguptha earned 1500 total points
ID: 20010944
>>can a web service start a thread (in this case the schedule thread) when it is started?  
What do u mean by a scheduled thread. Are you looking for the web service to generate alerts or check something periodically??

>> Does web services even allow multi-threading?  
Yes it automatically handles mutiple requests. And you could also use multi threading within the web services code if you wanted.

>>Since a web service runs under IIS, can it take advantage of web farms?
Web Frams in terms of the database or web frams 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 ??
0
 
LVL 21

Expert Comment

by:surajguptha
ID: 20010951
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.
0
 

Author Comment

by:StewartMeyers
ID: 20011713
>>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.
0
 
LVL 21

Expert Comment

by:surajguptha
ID: 20011797
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
0

Featured Post

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
It’s a strangely common occurrence that when you send someone their login details for a system, they can’t get in. This article will help you understand why it happens, and what you can do about it.
This video teaches viewers how to create their own website using cPanel and Wordpress. Tutorial walks users through how to set up their own domain name from tools like Domain Registrar, Hosting Account, and Wordpress. More specifically, the order in…
Learn how to set-up PayPal payment integration in your Wufoo form. Allow your users to remit payment through PayPal upon completion of your online form. This is helpful for collecting membership payments, customer payments, donations, and more.
Suggested Courses
Course of the Month15 days, 8 hours left to enroll

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question