<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <br>
    <div class="moz-cite-prefix">On 03/16/2015 05:19 PM, Antoine
      Sabot-Durand wrote:<br>
    </div>
    <blockquote
      cite="mid:37A9AF8E-D899-451A-B495-3B9A9A36B561@sabot-durand.net"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      <br class="">
      <div>
        <blockquote type="cite" class="">
          <div class="">Le 16 mars 2015 à 10:33, Jozef Hartinger &lt;<a
              moz-do-not-send="true" href="mailto:jharting@redhat.com"
              class="">jharting@redhat.com</a>&gt; a écrit :</div>
          <br class="Apple-interchange-newline">
          <div class="">
            <div class="moz-cite-prefix" style="font-family: Helvetica;
              font-size: 12px; font-style: normal; font-variant: normal;
              font-weight: normal; letter-spacing: normal; line-height:
              normal; orphans: auto; text-align: start; text-indent:
              0px; text-transform: none; white-space: normal; widows:
              auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;
              background-color: rgb(255, 255, 255);"><br
                class="Apple-interchange-newline">
              On 03/12/2015 01:56 PM, Antoine Sabot-Durand wrote:<br
                class="">
            </div>
            <blockquote
              cite="mid:C24390F8-63BB-478A-A188-69CDEDE14026@sabot-durand.net"
              type="cite" style="font-family: Helvetica; font-size:
              12px; font-style: normal; font-variant: normal;
              font-weight: normal; letter-spacing: normal; line-height:
              normal; orphans: auto; text-align: start; text-indent:
              0px; text-transform: none; white-space: normal; widows:
              auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;
              background-color: rgb(255, 255, 255);" class="">Hi all,
              <div class=""><br class="">
              </div>
              <div class="">I compiled all the feedback and decision we
                took regarding async events and updated the Google Doc
                : <a moz-do-not-send="true"
href="https://docs.google.com/document/d/1Tm_fZWS6569YqCH9lGxuqBGzS9gfupic-vv1dyKCUxk/edit?usp=sharing"
                  class="">https://docs.google.com/document/d/1Tm_fZWS6569YqCH9lGxuqBGzS9gfupic-vv1dyKCUxk/edit?usp=sharing</a></div>
              <div class=""><br class="">
              </div>
              <div class="">The following point stays open. I’d like to
                close them (if possible) during the next meeting on
                Tuesday</div>
              <div class=""><br class="">
              </div>
              <div class="">1) Async delivery mechanism (comment by
                Jozef)</div>
              <div class="">Should we write in the spec about how
                threads for events delivery should be used? Personally
                I’d rather not: I think this should be let to
                implementation, the specification should only describe
                the expected behavior (concurrency or not). now I may
                have missed something.</div>
            </blockquote>
            <span style="font-family: Helvetica; font-size: 12px;
              font-style: normal; font-variant: normal; font-weight:
              normal; letter-spacing: normal; line-height: normal;
              orphans: auto; text-align: start; text-indent: 0px;
              text-transform: none; white-space: normal; widows: auto;
              word-spacing: 0px; -webkit-text-stroke-width: 0px;
              background-color: rgb(255, 255, 255); float: none;
              display: inline !important;" class="">We should not
              specify technical details assuming we clearly define what
              guarantees are/are not available regarding ordering,
              visibility, concurrency, effects of exceptions,
              CDI/security/transactional context propagation and perhaps
              others I missed.</span><br style="font-family: Helvetica;
              font-size: 12px; font-style: normal; font-variant: normal;
              font-weight: normal; letter-spacing: normal; line-height:
              normal; orphans: auto; text-align: start; text-indent:
              0px; text-transform: none; white-space: normal; widows:
              auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;
              background-color: rgb(255, 255, 255);" class="">
          </div>
        </blockquote>
        <div><br class="">
        </div>
        <div>We’re saying the same : these will come from the specified
          behavior ;)</div>
        <br class="">
        <blockquote type="cite" class="">
          <div class="">
            <blockquote
              cite="mid:C24390F8-63BB-478A-A188-69CDEDE14026@sabot-durand.net"
              type="cite" style="font-family: Helvetica; font-size:
              12px; font-style: normal; font-variant: normal;
              font-weight: normal; letter-spacing: normal; line-height:
              normal; orphans: auto; text-align: start; text-indent:
              0px; text-transform: none; white-space: normal; widows:
              auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;
              background-color: rgb(255, 255, 255);" class="">
              <div class=""><br class="">
              </div>
              <div class="">2) Exception Handling (comment by Jozef)</div>
              <div class="">I didn’t write anything about exception and
                we should decide what happens if an exception occurs in
                an observer during async event dispatch. I think that it
                shouldn’t impact other observers and that we should
                stick to the way CompletionStage API works today.</div>
            </blockquote>
            <br style="font-family: Helvetica; font-size: 12px;
              font-style: normal; font-variant: normal; font-weight:
              normal; letter-spacing: normal; line-height: normal;
              orphans: auto; text-align: start; text-indent: 0px;
              text-transform: none; white-space: normal; widows: auto;
              word-spacing: 0px; -webkit-text-stroke-width: 0px;
              background-color: rgb(255, 255, 255);" class="">
            <span style="font-family: Helvetica; font-size: 12px;
              font-style: normal; font-variant: normal; font-weight:
              normal; letter-spacing: normal; line-height: normal;
              orphans: auto; text-align: start; text-indent: 0px;
              text-transform: none; white-space: normal; widows: auto;
              word-spacing: 0px; -webkit-text-stroke-width: 0px;
              background-color: rgb(255, 255, 255); float: none;
              display: inline !important;" class="">What does it mean?
              CompletionStage API allows you to handle (a single)
              Exception. Would those exceptions be swallowed or provided
              to the caller somehow?</span><br style="font-family:
              Helvetica; font-size: 12px; font-style: normal;
              font-variant: normal; font-weight: normal; letter-spacing:
              normal; line-height: normal; orphans: auto; text-align:
              start; text-indent: 0px; text-transform: none;
              white-space: normal; widows: auto; word-spacing: 0px;
              -webkit-text-stroke-width: 0px; background-color: rgb(255,
              255, 255);" class="">
          </div>
        </blockquote>
        <div><br class="">
        </div>
        <div>suggestion are welcome. How could we handle multiple
          exception at the caller level ?</div>
      </div>
    </blockquote>
    I don't know. How did you plan to handle those in your proposal?<br>
    <blockquote
      cite="mid:37A9AF8E-D899-451A-B495-3B9A9A36B561@sabot-durand.net"
      type="cite">
      <div><br class="">
        <blockquote type="cite" class="">
          <div class="">
            <blockquote
              cite="mid:C24390F8-63BB-478A-A188-69CDEDE14026@sabot-durand.net"
              type="cite" style="font-family: Helvetica; font-size:
              12px; font-style: normal; font-variant: normal;
              font-weight: normal; letter-spacing: normal; line-height:
              normal; orphans: auto; text-align: start; text-indent:
              0px; text-transform: none; white-space: normal; widows:
              auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;
              background-color: rgb(255, 255, 255);" class="">
              <div class=""><br class="">
              </div>
              <div class="">3) Async event activation on both ends</div>
              <div class="">We all agree that we need to explicitly fire
                event asynchronously on the producer side (fireAsync()).
                The discussion in 8.1 is about adding a way to accept
                async call on the consumer (observer) side.</div>
              <div class="">a) As events are often triggered in other
                parts of the application than the parts that consume
                them (most CDI framework lib fire events foe end user
                code) preventing user to decide if an observer can be
                called asynchronously could lead to issues and will
                prevent library developper to use fireAsync() (in a
                defensive coding approach).</div>
              <div class="">b) On the other hand, when placed in the
                same application, it’ll be very confusing for user to
                have to fireAsync() and enable async observer to
                activate this new feature.</div>
              <div class=""><br class="">
              </div>
              <div class="">I propose an opt-out approach. We add
                ‘asyncSupported' member to ‘@Observes' annotation with
                ‘true’ as default value. So in case of b) the end user
                won’t have to explicitly activate async on observer and
                i case of a) user detecting issue coming from async
                treatment of an event can explicitly declares one or
                more observer not compatible with async resolution with
                @Observes(asyncSupported=False)</div>
              <div class=""><br class="">
              </div>
              <div class="">4) Support observer ordering with async
                events</div>
              <div class="">I think we should keep event ordering for
                synchronous event and ignore this feature in async
                event. I don’t see obvious use case to be async and
                ordered.</div>
            </blockquote>
            <span style="font-family: Helvetica; font-size: 12px;
              font-style: normal; font-variant: normal; font-weight:
              normal; letter-spacing: normal; line-height: normal;
              orphans: auto; text-align: start; text-indent: 0px;
              text-transform: none; white-space: normal; widows: auto;
              word-spacing: 0px; -webkit-text-stroke-width: 0px;
              background-color: rgb(255, 255, 255); float: none;
              display: inline !important;" class="">if an observer O1
              defines priority P1 and a different observer O2 defines P2
              where P2 &gt; P1 then it probably does that for a reason.
              Most likely because O2 depends on the state changes
              possibly performed by O1. I think this holds true no
              matter if the event is fired synchronously or
              asynchronously. Therefore, I think we should respect
              priority in both cases.</span><br style="font-family:
              Helvetica; font-size: 12px; font-style: normal;
              font-variant: normal; font-weight: normal; letter-spacing:
              normal; line-height: normal; orphans: auto; text-align:
              start; text-indent: 0px; text-transform: none;
              white-space: normal; widows: auto; word-spacing: 0px;
              -webkit-text-stroke-width: 0px; background-color: rgb(255,
              255, 255);" class="">
            <br style="font-family: Helvetica; font-size: 12px;
              font-style: normal; font-variant: normal; font-weight:
              normal; letter-spacing: normal; line-height: normal;
              orphans: auto; text-align: start; text-indent: 0px;
              text-transform: none; white-space: normal; widows: auto;
              word-spacing: 0px; -webkit-text-stroke-width: 0px;
              background-color: rgb(255, 255, 255);" class="">
            <span style="font-family: Helvetica; font-size: 12px;
              font-style: normal; font-variant: normal; font-weight:
              normal; letter-spacing: normal; line-height: normal;
              orphans: auto; text-align: start; text-indent: 0px;
              text-transform: none; white-space: normal; widows: auto;
              word-spacing: 0px; -webkit-text-stroke-width: 0px;
              background-color: rgb(255, 255, 255); float: none;
              display: inline !important;" class="">In addition, the
              observer ordering concept will be simpler if we treat
              observers the same way in both sync and async.</span><br
              style="font-family: Helvetica; font-size: 12px;
              font-style: normal; font-variant: normal; font-weight:
              normal; letter-spacing: normal; line-height: normal;
              orphans: auto; text-align: start; text-indent: 0px;
              text-transform: none; white-space: normal; widows: auto;
              word-spacing: 0px; -webkit-text-stroke-width: 0px;
              background-color: rgb(255, 255, 255);" class="">
          </div>
        </blockquote>
        <div><br class="">
        </div>
        <div>That’s why your input is precious, previous discussion
          brought us with the opposite pov. Personally the simpler to
          implement is the right choice...</div>
      </div>
    </blockquote>
    No, I mean simpler to explain and for users to take in.
    Implementation complexity is way less important.<br>
    <blockquote
      cite="mid:37A9AF8E-D899-451A-B495-3B9A9A36B561@sabot-durand.net"
      type="cite">
      <div><br class="">
        <blockquote type="cite" class="">
          <div class="">
            <blockquote
              cite="mid:C24390F8-63BB-478A-A188-69CDEDE14026@sabot-durand.net"
              type="cite" style="font-family: Helvetica; font-size:
              12px; font-style: normal; font-variant: normal;
              font-weight: normal; letter-spacing: normal; line-height:
              normal; orphans: auto; text-align: start; text-indent:
              0px; text-transform: none; white-space: normal; widows:
              auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;
              background-color: rgb(255, 255, 255);" class="">
              <div class=""><br class="">
              </div>
              <div class="">5) Context propagation</div>
              <div class=""> I understand that propagating contexts in
                async event would impact easily context API. My only
                concern here is to be define async event to keep this
                feature possible.</div>
              <div class=""><br class="">
              </div>
              <div class="">If I forgot points please comment this mail
                and the doc so we can take final decision during next
                meeting.</div>
              <div class=""><br class="">
              </div>
              <div class="">Thank you</div>
              <div class=""><br class="">
              </div>
              <div class=""><br class="">
              </div>
              <div class="">Antoine</div>
              <div class=""><br class="">
              </div>
              <br class="">
              <fieldset class="mimeAttachmentHeader"></fieldset>
              <br class="">
              <pre class="" wrap="">_______________________________________________
cdi-dev mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:cdi-dev@lists.jboss.org">cdi-dev@lists.jboss.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/cdi-dev">https://lists.jboss.org/mailman/listinfo/cdi-dev</a>

Note that for all code provided on this list, the provider licenses the code under the Apache License, Version 2 (<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://www.apache.org/licenses/LICENSE-2.0.html">http://www.apache.org/licenses/LICENSE-2.0.html</a>). For all other ideas provided on this list, the provider waives all patent and other intellectual property rights inherent in such information.</pre>
            </blockquote>
            <br style="font-family: Helvetica; font-size: 12px;
              font-style: normal; font-variant: normal; font-weight:
              normal; letter-spacing: normal; line-height: normal;
              orphans: auto; text-align: start; text-indent: 0px;
              text-transform: none; white-space: normal; widows: auto;
              word-spacing: 0px; -webkit-text-stroke-width: 0px;
              background-color: rgb(255, 255, 255);" class="">
            <br class="Apple-interchange-newline">
          </div>
        </blockquote>
      </div>
      <br class="">
    </blockquote>
    <br>
  </body>
</html>