Yingyi Bu has posted comments on this change.

Change subject: Remove Server Context
......................................................................


Patch Set 1:

(1 comment)

I like various context classes.

At the high level, it provides:

(1)  a facet for separating concerns and modularizing code.  For example, 
AqlMetadataProvider is an example that lacks those, which deserves more 
refactoring.

(2)  extensibility.  If you want to pass more things to a calling client, you 
just need to pass the context, instead of every individual parameters.  If 
tomorrow you want to add things, add things to the context and no interface 
(contract) will need to change.  That's also why SonarQube warns us if we pass 
more parameters to a method.

https://asterix-gerrit.ics.uci.edu/#/c/1320/1/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/src/main/java/org/apache/hyracks/control/common/application/ApplicationContext.java
File 
hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/src/main/java/org/apache/hyracks/control/common/application/ApplicationContext.java:

Line 39:     public ApplicationContext(File baseDir, IApplicationConfig 
appConfig, ThreadFactory threadFactory) {
Passing a serverCtx is easier to extend.

For example, if tomorrow you need to additional things into the class, you 
don't need to add additional parameters.  So as other interfaces if any.

Again, maybe it's under utilized, but the design was well conceived.


-- 
To view, visit https://asterix-gerrit.ics.uci.edu/1320
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I4261cf44410b498e84ffcac5e217281a306a7f03
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: abdullah alamoudi <[email protected]>
Gerrit-Reviewer: Jenkins <[email protected]>
Gerrit-Reviewer: Michael Blow <[email protected]>
Gerrit-Reviewer: Till Westmann <[email protected]>
Gerrit-Reviewer: Yingyi Bu <[email protected]>
Gerrit-Reviewer: abdullah alamoudi <[email protected]>
Gerrit-HasComments: Yes

Reply via email to