Asynchronous Call

S

Shimon Sim

I am working with ASP.NEt application and need to create something like
notification module. Application passes a event information and module
decides how to handle this event - who to notify and what information to
send.

The main issue is I don't want slow done main application because of this
module. Main application doesn't need to know if module succeeded. SO I was
thinking that the best way is to go asynchronous.
I know that Web Services support asynch. calls. I am not sure if this is the
only way to go. I have some issues with Web Servises - security, speed.

I just wanted to know if there are more options to accomplish my task.
Thanks,
Shimon.
 
S

societopia.net

Although asynchronous calls that have been triggered from one http Request
would run simultaneously, the response to the browser would not complete
until all threads have finished processing. However, if you want the web
response to come back to the browser before the notification module have
ended you might examine using the MessageQueue class to send a message from
your web application and on the receiving end you might write a Windows
service that would receive those messages and execute the notification logic
that you wanted.
 
S

Steven Cheng[MSFT]

Thanks for Societopia's informative input,

Hi Shimon,

In addition to the things Societopia has mentioned, for a certain
notification service used in asp.net we can also consider using a
background thread in the asp.net's appdomain which do the constant task and
other working threads can fire event or perform querying from that
background thread's status. Anyway, this all depend on the actual scenario.
If there're any other ideas, please feel free to post here.

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
S

Shimon Sim

Thanks to everybody.
But I am using ASP.NET host provider and everything that is out of ASP.NET
is not available.
Where can I see some code on creating additional threads for asp.net
appdomain?
Shimon.
 
S

Steven Cheng[MSFT]

Hi Shimon,

As for using managed background thread to process background schedule task
in ASP.NET, here are two good tech articles I've found on the web:

#Creating Custom ASP.NET Jobs For Background Processing On Single or
MultipleThreads
http://www.kdkeys.net/forums/4526/ShowPost.aspx

#Background Processing, and Processing E-mails from ASP.NET
http://pubs.logicalexpressions.com/Pub0009/LPMArticle.asp?ID=442

The basic concept is just we create a background thread in
Application_Start or other custom startup time and then hold reference to
that background thread so as to montior or adjust it.

Hope helps. Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 

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

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top