Hi Gian Marco!
I have some news for you.
1. Found small bug in ReflectionConfigurator.cs when all actions were registered.
mi.DeclaringType == type || _reflectionHelpers.HasAttribute<DirectMethodAttribute>(mi)
2. Back to parallel execution. Nevertheless I tried to implement it and it took 3 lines of code. And it is extremely fast. Whole query with a lot of actions executes as long as it takes for longest action to execute (hope my english is good enough to explain correctly ;) I'm exited overall. Here is the code you can play with (just for fun)
private void DoPost(HttpRequest httpRequest, HttpResponse httpResponse)
...
for(int i = 0; i < requests.Length; i++)
{
new Thread((object idx) =>
{
responses[(int)idx] = new DirectHandler(_metadata, _directHandlerInterceptor).Handle(requests[(int)idx]);
}).Start(i);
}
while (responses.Any(r => r == null)) { Thread.Sleep(1); }
...
3. More serious. I like your idea to make DirectHttpHandler independed from it's static data. But I'm stuck with few things. First of all do you want to make it backward compatible? Second is how do you imagine registration of independent handlers? Where should registration be located at? Inside a constructor? I started trying to do something and found that either I will have to register each handler in web.config or use them as-is (e.g. http://.../handler1.ashx). Not sure that I like any of these options.
Still in my vision there is should be single entry point (http://../rpc) for querying info about actions and executing them. Same as registration - all in one place.
What are your thoughts?