AsyncRequestDispatcher in ASP.NET MVC

58 views
Skip to first unread message

shapper

unread,
Aug 25, 2012, 11:09:55 AM8/25/12
to agath...@googlegroups.com
Hello,

I have been using RequestDispatcher in a MVC project.

Can I use an AsyncRequestDispatcher? In this case do I need to use an AsynController?

Using an AsyncRequestDispatcher implies that the controller might return the view before the Response is received?

Or this only happens when using an AsyncRequestDispatcher with an AsyncController?

---
 
Thank You,
Miguel

Deathraven

unread,
Aug 25, 2012, 1:59:11 PM8/25/12
to agath...@googlegroups.com
The AsyncRequestDispatcher has nothing todo with http request that your
Controller might recieve.

Mark Meyers

unread,
Aug 25, 2012, 4:57:30 PM8/25/12
to agath...@googlegroups.com
in an mvc context it is probably better to run agatha in process imho

shapper

unread,
Aug 25, 2012, 5:57:59 PM8/25/12
to agath...@googlegroups.com
Hello,

Yes, if I understood you correctly, that is what I am using.

I am using Client with no WCF and using RequestDispatcher:

new ServiceLayerAndClientConfiguration(typeof(MyHandler).Assembly, typeof(MyRequest).Assembly, new Agatha.StructureMap.Container(ObjectFactory.Container)).Initialize();

FindUserByIdResponse response = _dispatcher.Get<FindUserByIdResponse>(request);

What about having two packages: a base one and and extra one for WCF?

--- 
Thank You,
Miguel

Mark Meyers

unread,
Aug 25, 2012, 6:12:55 PM8/25/12
to agath...@googlegroups.com
What about having two packages: a base one and and extra one for WCF?

this might help

not sure if I understand the advantage to using an AsyncRequestDispatcher in this context, you will have to wait for the agatha-response anyway before you can return the http-response (view)

Mark Meyers

unread,
Aug 25, 2012, 6:41:05 PM8/25/12
to agath...@googlegroups.com
elaborating : I can't imagine a scenario where a user would be willing to wait that long for a page, so that this kind of infrastructure would be required in order to free up some threads ;-)

Davy Brion

unread,
Aug 26, 2012, 6:55:08 AM8/26/12
to agath...@googlegroups.com
the only benefit i see from using an asyncrequestdispatcher in a web context is if you need to send multiple, independent calls to *separate* services and you just want to minimize the total wait time.  Other than that, there's no benefit to using the asyncrequestdispatcher in a web context IMO.

shapper

unread,
Aug 26, 2012, 1:14:14 PM8/26/12
to agath...@googlegroups.com

Thank You Both for the feedback,

Miguel
Reply all
Reply to author
Forward
0 new messages