Based on what you described here I believe that local task service would be good option for this case. What I could recommend to look at is ht tests cases of the code base. There are number of scenarios on how to set it up from both sides (ht handler and task service)
local task used from ht handler
local task server
Please take a look at their super classes fro some details.
And of course search this forum or post your questions we are more than happy to help!!! :)
HTH