469,334 Members | 4,388 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,334 developers. It's quick & easy.

Which service to use

I need to write a service and I am unsure which particular type I should
be using:

Key requirements:

1. Service must be able to run 24/7
2. Persist certain data items (logging to disk or DB is not permitted)

So after reading about, I see the following options available to me:

1. Windows Service
2. ASP.NET Web Service under II6
3. WCF Web Service II6/7
4. WCP Web Service under WAS

The Windows Service in my opinion seems the best option regarding
persistent data, but it's a lot more complicated to write certain
features you kinda get free with Web Services.

The Recycling is the really the big problem under IIS since I need to
keep values. Turning recycling off is not good enough either (touching
files etc cause a recycle)
Does WCF allow you to persist data, or does WAS allow this?

I don't mind learning new technology, so a pointer in the right
direction would be appreciated.

A final note, it doesn't need to be a HTTP interface if there are other
options. Only reason thats being used is II6 enforces this but we took
the trade off for the lovely features of II6 over writing a custom
Windows Service.
Thanks in advance.

Steven

*** Sent via Developersdex http://www.developersdex.com ***
Mar 6 '08 #1
4 975
Can you describe where you want to persist things if not the disk or DB? And
what exactly does your service need to do?

I agree that a Windows service is a better option for 24/7 if the same
process must stay running - but if the service is intended for comms (as
your WCF comments imply), then note that hosting WCF in a Windows service is
fairly simple.

Re http, again WCF offers various transports and protocols - http is one of
them, but others are available simply by changing the configuration.

Marc
Mar 6 '08 #2
I need to presist ceratins fields in memory. Due to other factors, I am
not allowed to store these values on disk or Database.
Protocol aint too much of an issue.
I would prefer to keep using IIS, but the persistent data really is a
problem. At the moment, we have the web service ring fenced on it's
server with recycle disabled and no one can get access (ie to touch
files or update) but it's a critical process and really need another
option.

*** Sent via Developersdex http://www.developersdex.com ***
Mar 6 '08 #3
So use a win-service an WCF for the simple network access. You can get
a console example of this in VS; just move the code to a service app,
job done.

But I reckon you are going to have a lot of problems. In-memory
storage is (by definition) volatile. Computers reboot / fail etc. And
it doesn't scale worth a damn. Best of luck ;-p

Marc
Mar 6 '08 #4
Steven Blair wrote:
I need to presist ceratins fields in memory. Due to other factors, I am
not allowed to store these values on disk or Database.
It is probably just a terminology problem.

Many of us consider persist=write to disk.

Arne
Mar 8 '08 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Markus Eßmayr | last post: by
1 post views Thread by CARIGAR | last post: by
1 post views Thread by haryvincent176 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.