How can a server dynamically handle all incoming requests without performance drawback ?
I'd been searching for a satisfactory solution to that problematic since a long time... After I recently found one, I decided to document it as a Pattern:
The "message bound" Command pattern
"A controller that dynamically handles all incoming requests without performance drawback."
Reflection is useful and more elegant than static conditional logic to decide which command a server Front Controller should run from a given message/request.
Compares to the static implementation, reflection significantly improves the productivity of the development each time we need to add a new kind of message or request type to handle.
However, this elegance has a cost named performance… The "message bound" command pattern purpose is to solve this performance drawback.
No comments:
Post a Comment