From 168b4cafe766ec976e075ec2ea496c00a27dc7d0 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Tue, 1 Nov 2016 17:22:48 -0400 Subject: [PATCH 1/1] LP#1631522: add release notes for ->dispatch Signed-off-by: Galen Charlton --- doc/Dispatch-Mode-for-Subrequests.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 doc/Dispatch-Mode-for-Subrequests.txt diff --git a/doc/Dispatch-Mode-for-Subrequests.txt b/doc/Dispatch-Mode-for-Subrequests.txt new file mode 100644 index 0000000..6b3a121 --- /dev/null +++ b/doc/Dispatch-Mode-for-Subrequests.txt @@ -0,0 +1,12 @@ +Dispatch mode for method_lookup Subrequests +=========================================== + +There is a pattern in the wild of using OpenSRF's method_lookup() facility +to decide between one of several local methods when delegating to pre-existing +logic. Often times, we want to simply hand control over to another method, +but the output of a subrequest's run() is an array of results. The caller has +to know if, and how, to restructure the result for the client. + +Instead, we can now call dispatch() instead of run() and have OpenSRF session +control completely passed to the delegate code. This way, the delegate code +need not know anything about its caller, and vice versa. -- 2.43.2