[quoted text, click to view] "Val P" <ValP@discussions.microsoft.com> wrote in message
news:1575ABF7-5E34-4581-8B2A-9BAD4FC95978@microsoft.com...
>I have the following requirement, maybe someone can suggest what the proper
> way of handling it is?
>
> 1. I have an ASP.NET application where users can submit certain jobs.
> 2. I want to return as soon as they submit the job, and continue with
> their
> work, without popups. The job result will be signaled in some other way.
> 3. I want the object that handles the jobs to work as a singleton or in a
> similar matter, where the same instance collects requests from all users,
> and
> filters out duplicates (if two users send the same request, it needs to be
> handled only once).
> 4. If all users log out and all sessions are torn down (including
> application unload) the jobs should still continue to process.
>
>
> What would be the best way of doing this? We've handled this previously
> with
> an NT service, but it seemed like it wasn't quite the right approach.
> Maybe
> it was, but what are other options? NT services are a little messy to work
> with in unit tests during builds, and we do continuous integration...
---I think the approach you mention with MSMQ would be one very good way of
accomplishing this. Do I understand you correctly though that since MSMQ
isn't installed by default you can't use it? B/c if you can, it's not all
that difficult to include in a setup project.
My first inclination would be toward using Workflow foundation and just
spinning it off to a workflow. Inside the workflow I'd include logic to
just reject the request if it had already been submitted. (#3) Absent that,
you could use a WCF or Web Service that you call from your ASP.NET app.(#2)
Any of these, MSMQ, Web Services, WCF or WF could all reside on their own
and could all easily maintain logic to ensure duplicate jobs aren't
processed. (#3) As such, it would 'live' on its own and not even
necessarily know or care if the ASP.NET is up and running or anything under
#4
Whether or not you'd want to use COM+ would largely depend on the nature of
the application, but based on what you're discussing here, I don't see it
having substantive advantages over the other approaches. Entlib could help
in a few areas but I don't see it bringing anything to the table for this
specific scenario as I understand it vs anything else. So I guess I'm
saying "Sure, I'd probably incorporate EntLib - but not b/c of anything
inherent to this, rather, b/c I use many of its features in all of my .NET
Apps"
With respect to examples, it's a pretty typical scenario discussed in WF.
I'm assuming that you would have mentioned WF if you could use it... so I'm
guessing you can't use it as an option. However even if you can't, you can
still see the approaches they cover - there are gazillions of examples of
WF.
If I misunderstood your question or didn't adequately address it, please let
me know what I missed specifically and I'll try my best to revisit it.
Thanks,
Bill
W.G. Ryan, MVP
Principal Architect
Global Emergency Resources
http://www.ger911.com | Bill.Ryan@[LeaveThisOut].ger911.com
[quoted text, click to view] >
> Is entlib/com+ the right way to go? Is there a sample? According to
> articles
> such as:
>
>
http://www.ondotnet.com/pub/a/dotnet/excerpt/com_dotnet_ch10/index.html?page=10 >
> we can't do disconnected work... but I do not want the job processing to
> stop if the user logs out or his sessions is torn down.
>
> MSMQ is the other option, but it's not something installed by default...
>
> Any suggestions?
>