sounds like Windows service might be the best bet, but maybe the hardest too.

Anther approach is you can always do a singleton object that never get collected by 
the garbage, have that object get created by a web service call.  Then all other Web 
Service calls just use that object that is already running in the background.  I do 
this for an IM host.  The host is just an object running on the server.  Each post and 
get of messages is done through Web Services.  If the object isn't created when 
getting the instance, it gets created.  The downfalls to this is if the server goes 
down, the process not only stops, but doesn't get restarted until it is requested and 
you loose all data when server goes down.  In the case of IM's, that doesn't matter.

an example of a singleton object.
Public Class CurrentUser
    Private Shared mCurrentUser As CurrentUser

    Public Shared Function Instance() As CurrentUser
        If mCurrentUser Is Nothing Then
            mCurrentUser = New CurrentUser()
            GC.SuppressFinalize(mCurrentUser)
        End If
        Instance = mCurrentUser
    End Function
End Class

-----Original Message-----
From: Erick Thompson [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 29, 2002 1:21 PM
To: [EMAIL PROTECTED]
Subject: [DOTNET] Web service or windows service?


I have a very long running process in a assembly that runs on a remote
server. The process will run for about 2-3 weeks. All the management takes
place via a set of web pages. There will also be a set of pages to monitor
the process. The monitoring takes place in two different ways, first, the
assembly raises events regularly (item processed, etc). In addition, the
user can query the assembly (eg GetPercentFinished()) from a web page.

Given that everything is going to occur over the web, it made sense to make
a web service that wrapped the dll that actually does the work. However, I'm
not completely clear on how scope and web services interact. If a page makes
an async call to a web service, is there any way for a later page to
interact with that instance of the web service (to see the last item
processed)? Or, should I create a standard windows service that drives the
assembly, and have the web pages interact with that service?

My feeling is a traditional windows service is the best solution here, but I
haven't really worked with web services yet, so I thought I'd ask for a
double check.

Thanks,
Erick

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to