<html><head></head><body><div style="color:#000; background-color:#fff; font-family:Courier New, courier, monaco, monospace, sans-serif;font-size:13px"><div dir="ltr" id="yui_3_16_0_ym18_1_1459386238114_3983">I am talking about some external authenticators (MIT Kerberos or SecurID) when KC will wait for the response which can take a few seconds (the thread executing that call sits idle during that time) -and it makes perfect sense in those cases to use async model. The same applies to Identity Broker when KC opens up http connection to an external Identity Provider (say ADFS - there could be delay of few seconds for the response to come back). I had a quick look at the KC code and it appears that normal http blocking calls are being made. Shifting to async will definitely help KC handle many more user requests. See the below text from Apache http components website on when async model makes sense. Whether you consider shifting to async or not is totally your call but shifting to async model (infact using modern web frameworks/servers like Vertx) will future proof KC functionality.</div><div id="yui_3_16_0_ym18_1_1459386238114_4299"><br></div><div dir="ltr" id="yui_3_16_0_ym18_1_1459386238114_3983"><span style="font-family: Verdana, Helvetica, Arial, sans-serif; font-size: small; line-height: 16.9px;" id="yui_3_16_0_ym18_1_1459386238114_4186">The blocking I/O model may be more appropriate for data intensive, low latency scenarios, whereas the non-blocking model may be more appropriate for high latency scenarios where raw data throughput is less important than the ability to handle thousands of simultaneous HTTP connections in a resource efficient manner.</span><br></div><div class="qtdSeparateBR" id="yui_3_16_0_ym18_1_1459386238114_3981"><br></div><div class="yahoo_quoted" id="yui_3_16_0_ym18_1_1459386238114_3814" style="display: block;">  <div style="font-family: Courier New, courier, monaco, monospace, sans-serif; font-size: 13px;" id="yui_3_16_0_ym18_1_1459386238114_3813"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;" id="yui_3_16_0_ym18_1_1459386238114_3812"> <div dir="ltr" id="yui_3_16_0_ym18_1_1459386238114_3980"> <font size="2" face="Arial" id="yui_3_16_0_ym18_1_1459386238114_3979"> <hr size="1" id="yui_3_16_0_ym18_1_1459386238114_4683"> <b><span style="font-weight:bold;">From:</span></b> Bill Burke &lt;bburke@redhat.com&gt;<br> <b id="yui_3_16_0_ym18_1_1459386238114_4727"><span style="font-weight: bold;" id="yui_3_16_0_ym18_1_1459386238114_4726">To:</span></b> keycloak-dev@lists.jboss.org <br> <b id="yui_3_16_0_ym18_1_1459386238114_4729"><span style="font-weight: bold;" id="yui_3_16_0_ym18_1_1459386238114_4728">Sent:</span></b> Wednesday, March 30, 2016 9:43 AM<br> <b id="yui_3_16_0_ym18_1_1459386238114_3978"><span style="font-weight: bold;" id="yui_3_16_0_ym18_1_1459386238114_3977">Subject:</span></b> Re: [keycloak-dev] Async HTTP Request Processing<br> </font> </div> <div class="y_msg_container" id="yui_3_16_0_ym18_1_1459386238114_3811"><br><div id="yiv3760649847"><div id="yui_3_16_0_ym18_1_1459386238114_3810">
    JAX-RS async can be enabled per resource, so its really up to you to
    decide if Authz needs it. <br clear="none">
    <br clear="none">
    Async doesn't make sense for core KC autthentication.&nbsp; KC Identity
    broker does not wait/block for a response on a login.&nbsp;
    Authenticators are not waiting/blocking for responses either.&nbsp;
    Waiting/blocking only happens on backchannel logouts and background
    admin operations.&nbsp; Somebody is going to have to show me real
    tangible benefits before we switch core KC to use Async JAX-RS or
    some async event driven SPI, because right now, with our currently
    functionality and our roadmap, there is no need for an async model.<br clear="none">
    <br clear="none">
    <br clear="none">
    <br clear="none">
    <div class="yiv3760649847yqt8925551358" id="yiv3760649847yqt78756"><div class="yiv3760649847moz-cite-prefix" id="yui_3_16_0_ym18_1_1459386238114_4730">On 3/29/2016 9:57 PM, Raghuram Prabhala
      wrote:<br clear="none">
    </div>
    <blockquote type="cite" id="yui_3_16_0_ym18_1_1459386238114_5217">
      <div style="color:#000;background-color:#fff;font-family:Courier New, courier, monaco, monospace, sans-serif;font-size:13px;" id="yui_3_16_0_ym18_1_1459386238114_5216">
        <div dir="ltr" id="yiv3760649847yui_3_16_0_ym18_1_1459302142803_4062"><span id="yiv3760649847yui_3_16_0_ym18_1_1459302142803_4061">+1. Makes sense
            for even KC (as Identity broker waiting for a response from
            Identity provider or as Identity provider waiting for a
            response from Authenticators)</span></div>
        <div class="yiv3760649847qtdSeparateBR" id="yiv3760649847yui_3_16_0_ym18_1_1459302142803_4060"><br clear="none">
          <br clear="none">
        </div>
        <div class="yiv3760649847yahoo_quoted" id="yiv3760649847yui_3_16_0_ym18_1_1459302142803_3969" style="display:block;">
          <div id="yiv3760649847yui_3_16_0_ym18_1_1459302142803_3968" style="font-family:Courier New, courier, monaco, monospace, sans-serif;font-size:13px;">
            <div id="yiv3760649847yui_3_16_0_ym18_1_1459302142803_3967" style="font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px;">
              <div dir="ltr" id="yiv3760649847yui_3_16_0_ym18_1_1459302142803_3966">
                <font id="yiv3760649847yui_3_16_0_ym18_1_1459302142803_3965" size="2" face="Arial">
                  </font><hr size="1"> <b><span style="font-weight:bold;">From:</span></b>
                  Pedro Igor Silva <a rel="nofollow" shape="rect" class="yiv3760649847moz-txt-link-rfc2396E" ymailto="mailto:psilva@redhat.com" target="_blank" href="mailto:psilva@redhat.com">&lt;psilva@redhat.com&gt;</a><br clear="none">
                  <b><span style="font-weight:bold;">To:</span></b>
                  keycloak-dev <a rel="nofollow" shape="rect" class="yiv3760649847moz-txt-link-rfc2396E" ymailto="mailto:keycloak-dev@lists.jboss.org" target="_blank" href="mailto:keycloak-dev@lists.jboss.org">&lt;keycloak-dev@lists.jboss.org&gt;</a> <br clear="none">
                  <b><span style="font-weight:bold;">Sent:</span></b>
                  Tuesday, March 29, 2016 9:47 PM<br clear="none">
                  <b><span style="font-weight:bold;">Subject:</span></b>
                  [keycloak-dev] Async HTTP Request Processing<br clear="none">
                 </div>
              <div class="yiv3760649847y_msg_container" id="yiv3760649847yui_3_16_0_ym18_1_1459302142803_4176"><br clear="none">
                Hi,<br clear="none">
                <br clear="none">
                &nbsp; &nbsp; I'm working with the AuthZ Java API in order to make
                it more event-driven and non-blocking. During our F2F,
                I've discussed some very interesting requirements with
                Marc Savy around that.<br clear="none">
                <br clear="none">
                &nbsp; &nbsp; I would like to know if makes sense to enable JAX-RS
                Async support to some AuthZ REST endpoints, which are
                basically using this API to evaluate policies using
                different providers (where these providers can be
                executed in parallel).<br clear="none">
                <br clear="none">
                Regards.<br clear="none">
                Pedro Igor<br clear="none">
                _______________________________________________<br clear="none">
                keycloak-dev mailing list<br clear="none">
                <a rel="nofollow" shape="rect" id="yiv3760649847yui_3_16_0_ym18_1_1459302142803_4177" ymailto="mailto:keycloak-dev@lists.jboss.org" target="_blank" href="mailto:keycloak-dev@lists.jboss.org">keycloak-dev@lists.jboss.org</a><br clear="none">
                <a rel="nofollow" shape="rect" target="_blank" href="https://lists.jboss.org/mailman/listinfo/keycloak-dev">https://lists.jboss.org/mailman/listinfo/keycloak-dev</a><br clear="none">
                <br clear="none">
                <br clear="none">
              </div>
            </div>
          </div>
        </div>
      </div>
      <br clear="none">
      <fieldset class="yiv3760649847mimeAttachmentHeader"></fieldset>
      <br clear="none">
      <pre>_______________________________________________
keycloak-dev mailing list
<a rel="nofollow" shape="rect" class="yiv3760649847moz-txt-link-abbreviated" ymailto="mailto:keycloak-dev@lists.jboss.org" target="_blank" href="mailto:keycloak-dev@lists.jboss.org">keycloak-dev@lists.jboss.org</a>
<a rel="nofollow" shape="rect" class="yiv3760649847moz-txt-link-freetext" target="_blank" href="https://lists.jboss.org/mailman/listinfo/keycloak-dev">https://lists.jboss.org/mailman/listinfo/keycloak-dev</a></pre>
    </blockquote></div>
    <br clear="none">
    <pre class="yiv3760649847moz-signature">-- 
Bill Burke
JBoss, a division of Red Hat
<a rel="nofollow" shape="rect" class="yiv3760649847moz-txt-link-freetext" target="_blank" href="http://bill.burkecentral.com/">http://bill.burkecentral.com</a></pre>
  </div></div><br><div class="yqt8925551358" id="yqt63001">_______________________________________________<br clear="none">keycloak-dev mailing list<br clear="none"><a shape="rect" ymailto="mailto:keycloak-dev@lists.jboss.org" href="mailto:keycloak-dev@lists.jboss.org">keycloak-dev@lists.jboss.org</a><br clear="none"><a shape="rect" href="https://lists.jboss.org/mailman/listinfo/keycloak-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/keycloak-dev</a></div><br><br></div> </div> </div>  </div></div></body></html>