[
https://issues.apache.org/jira/browse/DEFT-142?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13080125#comment-13080125
]
Johnathan Meehan commented on DEFT-142:
---------------------------------------
Initial implementation committed:
http://svn.apache.org/viewvc?rev=1154336&view=rev
Notes:
- Did not include the status handler implementation that is in the patch;
wanted to discuss that first, and keep this change as one thing (DEFT-181).
Other than that, comments from "30/Jul/11 13:30" generally apply.
- Introduced Mockito (http://mockito.org/) to the build, which is under the MIT
licence.
- Reorganised a few things along the way.
- Added unit tests, but not for some types or areas (e.g.
ForbiddenRequestHandler) that will be removed when implementing DEFT-181; will
revisit if that does not go ahead.
- Would like to revisit Application#getHandler(String) as part of DEFT-181 or
if not implementing.
Test:
ab -k -c10 -n250000 http://127.0.0.1:8080/
14021.15 [#/sec] (mean)
14132.04 [#/sec] (mean)
16253.50 [#/sec] (mean)
14880.28 [#/sec] (mean)
15084.88 [#/sec] (mean)
Ready for review.
> Dynamic creation of RequestHandlers
> -----------------------------------
>
> Key: DEFT-142
> URL: https://issues.apache.org/jira/browse/DEFT-142
> Project: Deft
> Issue Type: New Feature
> Components: Core
> Assignee: Johnathan Meehan
> Fix For: 0.4.0
>
> Attachments: deft-142_clone.patch
>
>
> The outcome after a discussion with github.com/inferno-:
> (In the current design) it's volatile to have fields in user defined
> RequestHandlers in conjunction with asynchronous calls. (intermediate request
> (to same RH) could change the state of the RH)
> We should investigate the performance impact for dynamic creation of RH.
> Proposed solution:
> 1, Map<String, RequestHandler> => Map<String, Class<RequestHandler>>
> 2, Application.getHandler should create the appropriate RequestHandler using
> reflection.
> 3, UT / benchmark
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira