]> git.evergreen-ils.org Git - OpenSRF.git/blob - doc/Dispatch-Mode-for-Subrequests.txt
LP#1702978: memcache Get methods use key as va_list format
[OpenSRF.git] / doc / Dispatch-Mode-for-Subrequests.txt
1 Dispatch mode for method_lookup Subrequests
2 ===========================================
3
4 There is a pattern in the wild of using OpenSRF's method_lookup() facility
5 to decide between one of several local methods when delegating to pre-existing
6 logic.  Often times, we want to simply hand control over to another method,
7 but the output of a subrequest's run() is an array of results.  The caller has
8 to know if, and how, to restructure the result for the client.
9
10 Instead, we can now call dispatch() instead of run() and have OpenSRF session
11 control completely passed to the delegate code.  This way, the delegate code
12 need not know anything about its caller, and vice versa.