<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">+1 to the general idea.<br>
      -1 to using Properties format (or *any* new format).<br>
      <br>
      Using any format that ISPN can't directly read back in ties the
      functionality only to your specific use case.<br>
      But If it's in a configuration format that ISPN can read back in,
      it would be much more generally useful.<br>
      <br>
      -Dennis<br>
      <br>
      On 11/19/2013 10:39 AM, Dan Berindei wrote:<br>
    </div>
    <blockquote
cite="mid:CA+nfvwTfMLN4CCNHCFELWExB51XSgn6gemw=5UhZ7d4U5VCZBg@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>I think the properties format is too closely tied to your
          particular use case - in general having a long prefix on every
          line would actual settings harder to see than in a structured
          format like XML/JSON/YAML, not easier. And if the cache name
          is repeated on every line, you can't easily compare the
          configuration of two nodes or of two caches - all the lines
          would be different.</div>
        <div><br>
        </div>
        I'm also not sure about implementing
        toProperties()/append(StringBuilder)/etc. in every configuration
        class instead of using reflection. We already have a lot of
        changes to make when we add/modify a setting, I'd rather not
        make that even harder than it is.
        <div>
          <br>
        </div>
      </div>
      <div class="gmail_extra"><br>
        <br>
        <div class="gmail_quote">On Tue, Nov 19, 2013 at 5:18 PM, Michal
          Linhard <span dir="ltr">&lt;<a moz-do-not-send="true"
              href="mailto:mlinhard@redhat.com" target="_blank">mlinhard@redhat.com</a>&gt;</span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">No need
            for java.util.Properties, the main feature I want is<br>
            - Configuration displayable as collection of flat key-value
            properties<br>
            - Hierarchy (e.g. l1 is under clustering) is expressed via
            extending the<br>
            prefix and dividing by dot '.'<br>
            <br>
            but it would be usefull if the outputformat was easily
            parceable, using<br>
            common Java SE means<br>
            one advantage of not using string as output value and
            keeping a<br>
            collection like java.util.Properties<br>
            that you can easily combine more of the configs (give them
            different<br>
            prefixes) and sort them in the end<br>
            <br>
            that's what I do in PerfRepo:<br>
            config.node01.cache.clustering...<br>
            config.node01.global...<br>
            config.node01.jgroups...<br>
            config.node02.cache.clustering...<br>
            ...<br>
            <span class="HOEnZb"><font color="#888888"><br>
                m.<br>
              </font></span>
            <div class="HOEnZb">
              <div class="h5">On 11/19/2013 03:25 PM, Sanne Grinovero
                wrote:<br>
                &gt; I love the idea, especially as it happened to me to
                try to help<br>
                &gt; someone who was running Infinispan configured via
                other means (like<br>
                &gt; the AS7 configuration format), and it's always hard
                to understand how<br>
                &gt; it's actually configured without knowing all the
                implicit default<br>
                &gt; values, on a specific version (as defaults evolve
                too).<br>
                &gt;<br>
                &gt; But do you really need an output in the form of
                java.util.Properties ?<br>
                &gt; Wouldn't a descriptive string not be more suited?
                The API could be the<br>
                &gt; well known toString() method on the configuration;
                we'd enforce the<br>
                &gt; internal components to fullfill some internal
                contract like<br>
                &gt; "appendTo(StringBuilder sb);" to make sure it's
                always maintained<br>
                &gt; correctly.<br>
                &gt; Also, I'd add an option which logs the fully
                defined configuration on<br>
                &gt; cache start at INFO or DEBUG level.<br>
                &gt;<br>
                &gt; Sanne<br>
                &gt;<br>
                &gt; On 19 November 2013 13:47, Michal Linhard &lt;<a
                  moz-do-not-send="true"
                  href="mailto:mlinhard@redhat.com">mlinhard@redhat.com</a>&gt;
                wrote:<br>
                &gt;&gt; please refer to the branch, I've rewritten the
                original config:<br>
                &gt;&gt; <a moz-do-not-send="true"
                  href="https://github.com/mlinhard/infinispan/tree/t_flatconfig"
                  target="_blank">https://github.com/mlinhard/infinispan/tree/t_flatconfig</a><br>
                &gt;&gt;<br>
                &gt;&gt; On 11/19/2013 02:45 PM, Michal Linhard wrote:<br>
                &gt;&gt;&gt; Hi,<br>
                &gt;&gt;&gt;<br>
                &gt;&gt;&gt; This is a configuration output format
                feature proposal.<br>
                &gt;&gt;&gt;<br>
                &gt;&gt;&gt; I'd like to be able to flatten the
                infinispan cache configuration to<br>
                &gt;&gt;&gt; flat properties style so that two
                configurations can be easily comparable<br>
                &gt;&gt;&gt; in a view that displays sorted matching
                properties side by side to<br>
                &gt;&gt;&gt; quickly spot differences.<br>
                &gt;&gt;&gt;<br>
                &gt;&gt;&gt; This is useful in our internal PerfRepo app
                where I do it so far by<br>
                &gt;&gt;&gt; reflection, by patching the server or a
                radargun plugin by special<br>
                &gt;&gt;&gt; addon, but this can lead to numerous
                errors. It would be much simpler<br>
                &gt;&gt;&gt; and less error-prone process if we had it
                integrated in the upstream code.<br>
                &gt;&gt;&gt;<br>
                &gt;&gt;&gt; I proposed adding a method
                configuration.toProperties() that flattens<br>
                &gt;&gt;&gt; properties of a configuration object<br>
                &gt;&gt;&gt;
                (org.infinispan.configuration*Configuration) and
                produces<br>
                &gt;&gt;&gt; java.util.Properties. The nested
                configuration objects under the main<br>
                &gt;&gt;&gt; Configuration would recursively add their
                properties under an extended<br>
                &gt;&gt;&gt; property prefix.<br>
                &gt;&gt;&gt;<br>
                &gt;&gt;&gt; I also added a possibility to specify
                --format=properties in the info<br>
                &gt;&gt;&gt; command of the CLI so that the server
                responds with the property style<br>
                &gt;&gt;&gt; configuration of the specific cache...<br>
                &gt;&gt;&gt;<br>
                &gt;&gt;&gt; <a moz-do-not-send="true"
href="https://github.com/mlinhard/infinispan/commit/d8360f7850b67956adfa29aca86dae9dfad5c22d"
                  target="_blank">https://github.com/mlinhard/infinispan/commit/d8360f7850b67956adfa29aca86dae9dfad5c22d</a><br>
                &gt;&gt;&gt;<br>
                &gt;&gt;&gt; (I didn't implement toProperties in all
                objects, cause it's quite a lot<br>
                &gt;&gt;&gt; of changes that would be made in vain in
                case you don't like this<br>
                &gt;&gt;&gt; approach, the commit just demonstrates how
                I'd like to go about it.)<br>
                &gt;&gt;&gt;<br>
                &gt;&gt;&gt; These properties would also be exposed via
                JMX as (example values)<br>
                &gt;&gt;&gt;
jboss.infinispan:type=Cache,name="testCache(dist_sync)",manager="default",component=Cache<br>
                &gt;&gt;&gt; attribute "configurationProperties"<br>
                &gt;&gt;&gt;
                jboss.infinispan:type=CacheManager,name="default",component=CacheManager<br>
                &gt;&gt;&gt; attribute "globalConfigurationProperties"<br>
                &gt;&gt;&gt; that could be converted by any JMX client
                back to java.util.Properties<br>
                &gt;&gt;&gt;<br>
                &gt;&gt;&gt; WDYT?<br>
                &gt;&gt;&gt;<br>
                &gt;&gt;&gt; m.<br>
                &gt;&gt;&gt;<br>
                &gt;&gt;<br>
                &gt;&gt; --<br>
                &gt;&gt; Michal Linhard<br>
                &gt;&gt; Quality Assurance Engineer<br>
                &gt;&gt; JBoss Datagrid<br>
                &gt;&gt;<br>
                &gt;&gt; Red Hat Czech s.r.o.<br>
                &gt;&gt; Purkynova 99 612 45 Brno, Czech Republic<br>
                &gt;&gt; phone: <a moz-do-not-send="true"
                  href="tel:%2B420%20532%20294%20320%20ext.%208262320"
                  value="+420532294320">+420 532 294 320 ext. 8262320</a><br>
                &gt;&gt; mobile: <a moz-do-not-send="true"
                  href="tel:%2B420%20728%20626%20363"
                  value="+420728626363">+420 728 626 363</a><br>
                &gt;&gt;<br>
                &gt;&gt; _______________________________________________<br>
                &gt;&gt; infinispan-dev mailing list<br>
                &gt;&gt; <a moz-do-not-send="true"
                  href="mailto:infinispan-dev@lists.jboss.org">infinispan-dev@lists.jboss.org</a><br>
                &gt;&gt; <a moz-do-not-send="true"
                  href="https://lists.jboss.org/mailman/listinfo/infinispan-dev"
                  target="_blank">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a><br>
                &gt; _______________________________________________<br>
                &gt; infinispan-dev mailing list<br>
                &gt; <a moz-do-not-send="true"
                  href="mailto:infinispan-dev@lists.jboss.org">infinispan-dev@lists.jboss.org</a><br>
                &gt; <a moz-do-not-send="true"
                  href="https://lists.jboss.org/mailman/listinfo/infinispan-dev"
                  target="_blank">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a><br>
                <br>
                <br>
                --<br>
                Michal Linhard<br>
                Quality Assurance Engineer<br>
                JBoss Datagrid<br>
                <br>
                Red Hat Czech s.r.o.<br>
                Purkynova 99 612 45 Brno, Czech Republic<br>
                phone: <a moz-do-not-send="true"
                  href="tel:%2B420%20532%20294%20320%20ext.%208262320"
                  value="+420532294320">+420 532 294 320 ext. 8262320</a><br>
                mobile: <a moz-do-not-send="true"
                  href="tel:%2B420%20728%20626%20363"
                  value="+420728626363">+420 728 626 363</a><br>
                <br>
                _______________________________________________<br>
                infinispan-dev mailing list<br>
                <a moz-do-not-send="true"
                  href="mailto:infinispan-dev@lists.jboss.org">infinispan-dev@lists.jboss.org</a><br>
                <a moz-do-not-send="true"
                  href="https://lists.jboss.org/mailman/listinfo/infinispan-dev"
                  target="_blank">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a><br>
              </div>
            </div>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
infinispan-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:infinispan-dev@lists.jboss.org">infinispan-dev@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/infinispan-dev">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a></pre>
    </blockquote>
    <br>
  </body>
</html>