Which service to use

S

Steven Blair

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
 
M

Marc Gravell

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
 
S

Steven Blair

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.
 
M

Marc Gravell

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
 
A

Arne Vajhøj

Steven said:
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
 
C

Christopher Van Kirk

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

I think it's worth mentioning that you haven't really provided us with
any decision criteria here.

Each of the options you have provided are superior to the others under
certain specific circumstances.

Based on your other post in this thread, it sounds like the target is
an in-memory cache of something. Important questions include: how do
you intend to access the data, how often will it be hit, how big are
the queries, how big are the results, how many clients will it have,
are you stuck with equipment or software that's already in place, how
should it recover from failure, how important is performance, how much
time do you have to implement it, etc.

The question as you have framed it is analogous to this one:

I want to write a program, but I'm not sure whether I should do it in
Java, Perl, C# or Native Assembly. Which should I use?

Think about that for a bit.
 
S

Steven Blair

I could be receiving 100's of calls to the service per minute. Due to
security procedures we are bound to, the information held in memory is
not allowe dot be written to disk or Database.
It's worth pointing out that if the server is rebooted, we have a
secondary and tertiary service in place.
The main concern is the recycling. Rebooting is controlled, whereas the
recycle so far happens when soemone updates IIS, .net frameworks, touch
config files etc.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top