batching/lazy

27 views
Skip to first unread message

Ramon Smits

unread,
Apr 4, 2012, 6:51:40 AM4/4/12
to agath...@googlegroups.com

Does anyone have an implementation that 'batches' requests via a lazy response implementation?

--
Ramon

Davy Brion

unread,
Apr 4, 2012, 7:08:13 AM4/4/12
to agath...@googlegroups.com
do you mean an implementation that only sends the requests once a property of a response object is accessed? the current implementation delays sending the requests until a response is retrieved through GetResponse<TResponse>

Ramon Smits

unread,
Apr 4, 2012, 8:06:31 AM4/4/12
to agath...@googlegroups.com
do you mean an implementation that only sends the requests once a property of a response object is accessed? the current implementation delays sending the requests until a response is retrieved through GetResponse<TResponse>

Yes I know, but this makes IRequestDispatcher known to the caller. If would be pretty awesome if for example there would exist something like:


Lazy<T> IRequestDispatcher.AddLazy<T>(Request request);


or maybe even lazy proxy like behavior as for example NHibernate provides.


Davy Brion

unread,
Apr 4, 2012, 8:18:39 AM4/4/12
to agath...@googlegroups.com
it would be sorta cool, but i doubt if it'll introduce a noticeable benefit :)

Ramon Smits

unread,
Apr 4, 2012, 8:24:49 AM4/4/12
to agath...@googlegroups.com
On Wed, Apr 4, 2012 at 2:18 PM, Davy Brion <ral...@davybrion.com> wrote:
it would be sorta cool, but i doubt if it'll introduce a noticeable benefit :)

Well, the benefit would be that if you have multiple controllers that all perform requests and share one IRequestDispatcher that all these actions are batches and perform a roundtrip when the first view model action takes place without letting a result processor know anything about Agatha.


Davy Brion

unread,
Apr 4, 2012, 8:36:11 AM4/4/12
to agath...@googlegroups.com
are you talking about asp.net mvc controllers? or something custom made?

in any case, request dispatchers aren't meant to be shared... they keep the WCF connection open for the duration of their lifetime, and there are no thread safety provisions either
Reply all
Reply to author
Forward
0 new messages