[ 
https://issues.apache.org/jira/browse/SLIDER-875?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15409701#comment-15409701
 ] 

Gour Saha commented on SLIDER-875:
----------------------------------

[~billie.rinaldi] I reviewed all the commits in the branch 
feature/SLIDER-875_uber_app and overall everything looks good. Few comments -

+*slider-core/src/main/java/org/apache/slider/common/SliderKeys.java*+

{quote}
  String COMPONENT_TYPE = "site.global.component_type";
  String EXTERNAL_COMPONENT = "external”;
{quote}
Should we rename these to something like -
  PROPERTY_COMPONENT_TYPE = "site.global.component_type"
  COMPONENT_TYPE_APPLICATION = “application” or “external_app”

Only external is a little vague and might make new users wonder what it means.

{quote}
  String COMPONENT_SEPARATOR = "-";
{quote}
Did we plan to move away from dash \(-\)?

+*slider-core/src/main/java/org/apache/slider/common/tools/SliderUtils.java*+

{quote}
487   public static void copy(Configuration conf,
.
.
495      throw new FileNotFoundException("Source dir not found " + srcFile);
.
498      throw new FileNotFoundException(
          "Source dir not a file " + srcFile);
{quote}
Change all “dir” to “file” in messages

{quote}
965  public static Map<String, String> mergeMapsIgnorePrefixes(
.
.
974      for (String prefix : prefixes) \{
        if (key.startsWith(prefix)) \{
          hasPrefix = true;
          break;
        \}
      \}
{quote}
Do you think we can create a Pattern of a regex something like 
{{“^\[prefix1|prefix2|..\]”}} first and then do a match with all keys like 
matcher(key) which will be faster and more efficient? The inner for loop will 
be gone too.

Also based on what this method is doing do you think it should be renamed to 
_mergeMapsIgnoreDuplicateKeysAndPrefixes_?

+*slider-core/src/main/java/org/apache/slider/core/build/InstanceBuilder.java*+
{quote}
263:   private void getExternalComponents(ConfTreeOperations ops,
{quote}
Should we call it _loadExternalComponents_ or _initializeExternalComponents_ or 
something better instead of get, since it does not return anything?

{quote}
265:     if (ops.getGlobalOptions().get(COMPONENT_TYPE) != null) \{
{quote}
Should we change it to _ops.getGlobalOptions().containsKey(COMPONENT_TYPE)_ 
just to be safe from a key existing with null value?

{quote}
282:   private static String[] PREFIXES_TO_SKIP = \{"zookeeper.",
      "env.MALLOC_ARENA_MAX", "site.fs.", "site.dfs."\};
{quote}
Should we define this in _SliderKeys_ or somewhere more appropriate. Also, 
rename the variable to COMPONENT_PREFIXES_TO_SKIP.

+*slider-core/src/main/java/org/apache/slider/providers/agent/AgentClientProvider.java*+

{quote}
77: import static 
org.apache.slider.providers.agent.AgentUtils.getMetainfoComponentName;
{quote}
Minor comment, since it is just aesthetic only - calling 
_AgentUtils.getMetainfoComponentName_ directly might be easier for developers 
to understand that it is a static method in the context of the code and we can 
also avoid this static import.

{quote}
220:         // already checked it wasn't null
{quote}
We should get rid of this comment

+*slider-core/src/main/java/org/apache/slider/providers/agent/AgentKeys.java*+

{quote}
  String DEFAULT_METAINFO_MAP_KEY = "DEFAULT”;
{quote}
Minor comment, not important, maybe make the value a little more descriptive 
say _DEFAULT_KEY_ or _DEFAULT_METAINFO_KEY_


> Ability to create an Uber application package with capability to deploy and 
> manage as a single business app
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: SLIDER-875
>                 URL: https://issues.apache.org/jira/browse/SLIDER-875
>             Project: Slider
>          Issue Type: New Feature
>          Components: agent, app-package, appmaster, client, core
>    Affects Versions: Slider 0.70
>            Reporter: Gour Saha
>            Assignee: Billie Rinaldi
>             Fix For: Slider 2.0.0
>
>
> A business application as we typically refer to, is one that provides value 
> to an end user. Few examples will be, a CRM application, an online 
> advertising application, and a trucking application (to monitor driving 
> habits of truck drivers).
> An end user does not understand (or care about) the numerous application 
> components like HBase, Storm, Spark, Kakfa, Tomcat, MySql, Memcached, or 
> Nodejs that are required to build such a business application. 
> Several such business applications are hosted by cloud vendors like AWS, GCE, 
> Azure, and others. From a cluster management point of view, the IT 
> administrator would benefit from an Uber control of the business application 
> as a whole. The business application owner understands the different 
> components (like Tomcat, Memcached, HBase, etc.) of her/his Uber application. 
> As much as they need fine-grain control of each of these individual 
> applications (which is supported today), they would also benefit from a 
> management control for the Uber app. With Docker becoming popular every day, 
> this will provide a platform to the application owners to define a business 
> application as a conglomeration of Docker containers.
> Slider currently is viewed (and used) to package individual applications like 
> HBase, Storm, Kafka, Memcached, and Tomcat. Slider should be able to expose 
> the concept of an Uber application package definition. This Uber definition 
> will be composed of config and resource specifications of the individual 
> application components. Additionally, it will have definitions for Uber 
> management and control, like -
> # Stop, start and flex of the Uber app
> # Dependency specification between the individual applications such that flex 
> of certain components of an application can automatically trigger 
> proportional flex of components in another application
> # Cruise control of the Uber app, on top of what SLIDER-868 will provide for 
> an individual app. Ability to define a skyline for the Uber app, over time 
> and other dimensions.
> # Resource requirements and planning for the Uber app as a whole. Most of the 
> time, an Uber app is functional only when all (or minimum viable) application 
> components are deployed and available. Tomcat running with MySql, Memcached 
> and HBase still waiting for containers, is a useless business application. 
> Slider should be able to do resource calculation and negotiation for the Uber 
> app as a whole. It can work with YARN to get the minimal viable applications 
> of the Uber app running or not bother to run anything (I smell SLAs for 
> vendors and savings for application owners).
> # Ability to define and use multiple YARN labels for the Uber application (in 
> addition to the fine grained label definitions for the individual 
> sub-components of a single app)
> I am sure, there are several other benefits which are not identified yet, but 
> this is a start.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to