<html><head></head><body><div style="color:#000; background-color:#fff; font-family:Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:13px"><div id="yui_3_16_0_ym19_1_1507129101941_128311" dir="ltr"><span id="yui_3_16_0_ym19_1_1507129101941_128425">I agree here. I think RPC and gen_server calls which are the same thing really should not have been included/baked in. Instead there should of been a separate OTP behavior called async/wait or something.  This behavior can turn any async message into a sync procedure. <br><br>Instead of doing  gen_server:call(name, {msg}), we do  {reply, AsyncAwait} = erlang:send(Pid, {self(), msg}, {reply, '_'}, 5000), what this means, send this message to the pid, and wait until a {reply, '_'} message comes, after 5000 ms timeout and error.   This way is much more generic, and simple.</span></div> <div class="qtdSeparateBR"><br><br></div><div class="yahoo_quoted" style="display: block;"> <div style="font-family: Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 13px;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div dir="ltr"><font size="2" face="Arial"> On Thursday, October 5, 2017 1:55 PM, Brujo Benavides <elbrujohalcon@gmail.com> wrote:<br></font></div>  <br><br> <div class="y_msg_container"><div id="yiv6788448471"><div>Hi Miles,<div class="yiv6788448471"><br clear="none" class="yiv6788448471"></div><div class="yiv6788448471"><span class="yiv6788448471Apple-tab-span" style="white-space:pre;">    </span>I would go with: <i class="yiv6788448471">because someone needed it at some point. </i>And now if you need it, too… you don’t have to reinvent it now.</div><div class="yiv6788448471"><span class="yiv6788448471Apple-tab-span" style="white-space:pre;">       </span>And to be super-precise (and a bit pedantic, I know): RPC is not <i class="yiv6788448471">in Erlang </i>(i.e. in the VM), it comes (and is implemented using) OTP. In other words: it’s a tool built with the language, it’s not a part of the language like the basic architecture of message-passing concurrency.</div><div class="yiv6788448471"><br clear="none" class="yiv6788448471"></div><div class="yiv6788448471"><span class="yiv6788448471Apple-tab-span" style="white-space:pre;">  </span>Cheers!<br clear="none" class="yiv6788448471"><div class="yiv6788448471">
<div class="yiv6788448471" style="color:rgb(0, 0, 0);font-family:'Trebuchet MS';font-size:14px;font-style:normal;font-weight:normal;letter-spacing:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;"><div class="yiv6788448471"><span class="yiv6788448471" id="yiv6788448471docs-internal-guid-e691a4cc-056a-0210-b8b7-ea8d87d888ad"><span class="yiv6788448471" style="font-size:11pt;font-family:Arial;font-weight:700;vertical-align:baseline;white-space:pre-wrap;"><br clear="none" class="yiv6788448471Apple-interchange-newline"></span></span><hr class="yiv6788448471"><div class="yiv6788448471"><b class="yiv6788448471"><i class="yiv6788448471"><a rel="nofollow" shape="rect" class="yiv6788448471" target="_blank" href="http://about.me/elbrujohalcon">Brujo Benavides</a></i></b></div></div></div><div class="yiv6788448471" style="color:rgb(0, 0, 0);font-family:'Trebuchet MS';font-size:14px;font-style:normal;font-weight:normal;letter-spacing:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;"><b class="yiv6788448471"><br clear="none" class="yiv6788448471"></b></div><br clear="none" class="yiv6788448471Apple-interchange-newline">
</div>
<br clear="none" class="yiv6788448471"><div class="yiv6788448471yqt4400648696" id="yiv6788448471yqt34059"><div><blockquote class="yiv6788448471" type="cite"><div class="yiv6788448471">On Oct 5, 2017, at 14:50, Miles Fidelman <<a rel="nofollow" shape="rect" class="yiv6788448471" ymailto="mailto:mfidelman@meetinghouse.net" target="_blank" href="mailto:mfidelman@meetinghouse.net">mfidelman@meetinghouse.net</a>> wrote:</div><br clear="none" class="yiv6788448471Apple-interchange-newline"><div class="yiv6788448471">
  
    </div></blockquote></div></div></div></div><div class="yiv6788448471yqt4400648696" id="yiv6788448471yqt44786"><div><div class="yiv6788448471"><div class="yiv6788448471">I guess an obvious question is why does Erlang have an RPC
      mechanism at all?  It's so at odds with the basic architecture of
      message-passing concurrency.</div><div class="yiv6788448471">Miles Fidelman<br clear="none" class="yiv6788448471">
    </div>
    <br clear="none" class="yiv6788448471">
    <div class="yiv6788448471moz-cite-prefix">On 10/5/17 3:02 AM, Brujo Benavides
      wrote:<br clear="none" class="yiv6788448471">
    </div>
    <blockquote class="yiv6788448471" type="cite">Only
      for io, AFAIK.<br clear="none" class="yiv6788448471">
      <div class="yiv6788448471gmail_quote">
        <div class="yiv6788448471" dir="ltr">On Thu, 5 Oct 2017 at 01:51 Arun <<a rel="nofollow" shape="rect" class="yiv6788448471" ymailto="mailto:arunp@utl.in" target="_blank" href="mailto:arunp@utl.in">arunp@utl.in</a>>
          wrote:<br clear="none" class="yiv6788448471">
        </div>
        <blockquote class="yiv6788448471gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
          <div class="yiv6788448471"><div class="yiv6788448471">Hi Brujo,</div><div class="yiv6788448471">Thanks for the information, but i have one more doubt; is
              this behavior only for io:format function calls or the
              execution of the entire function also will be happening in
              the host node.</div>
            Regards,<br clear="none" class="yiv6788448471">
            Arun P.</div>
          <div class="yiv6788448471"><br clear="none" class="yiv6788448471">
            <br clear="none" class="yiv6788448471">
            <div class="yiv6788448471m_1004515118451015374moz-cite-prefix">On Tuesday
              03 October 2017 06:50 PM, Brujo Benavides wrote:<br clear="none" class="yiv6788448471">
            </div>
            <blockquote class="yiv6788448471" type="cite"> Hi Arun,
              <div class="yiv6788448471"><br clear="none" class="yiv6788448471">
              </div>
              <div class="yiv6788448471">That’s <i class="yiv6788448471">intended</i>. It happens because of how
                Erlang redirects all IO through the process
                group_leader.</div>
              <div class="yiv6788448471"><a rel="nofollow" shape="rect" class="yiv6788448471" target="_blank" href="https://stackoverflow.com/questions/12491607/remote-nodes-group-leaders-and-printouts">This</a> is the
                best explanatory link I could find googling quickly.</div>
              <div class="yiv6788448471">Hope it helps.</div>
              <div class="yiv6788448471">
                <div class="yiv6788448471">
                  <div class="yiv6788448471" style="">
                    <div class="yiv6788448471"><span class="yiv6788448471" id="yiv6788448471m_1004515118451015374docs-internal-guid-e691a4cc-056a-0210-b8b7-ea8d87d888ad"><span class="yiv6788448471" style="font-size:11pt;font-family:Arial;font-weight:700;vertical-align:baseline;white-space:pre-wrap;">
</span></span><hr class="yiv6788448471">
                      <div class="yiv6788448471"><b class="yiv6788448471"><i class="yiv6788448471"><a rel="nofollow" shape="rect" class="yiv6788448471" target="_blank" href="http://about.me/elbrujohalcon">Brujo
                              Benavides</a></i></b></div>
                    </div>
                  </div>
                  <div class="yiv6788448471" style=""><b class="yiv6788448471"></b></div>
                </div>
                <div class="yiv6788448471">
                  <blockquote class="yiv6788448471" type="cite">
                    <div class="yiv6788448471">On Oct 3, 2017, at 10:10, Arun <<a rel="nofollow" shape="rect" class="yiv6788448471" ymailto="mailto:arunp@utl.in" target="_blank" href="mailto:arunp@utl.in">arunp@utl.in</a>>
                      wrote:</div>
                    <div class="yiv6788448471">
                      <div class="yiv6788448471">Hi all,
                        I have two distributed applications running on
                        two different nodes. And from one node I tried
                        to call the function on the remote node by doing
                        RPC, and its been observed that all the debug
                        prints given in the application running on the
                        remote node is getting printed on the host
                        node's console.
                        Can somebody please tell me in detail why this
                        is happening and how the RPC in erlang works. ?
                        Thanks in advance.
                        Arun P.
                        _______________________________________________
                        erlang-questions mailing list
                        <a rel="nofollow" shape="rect" class="yiv6788448471" ymailto="mailto:erlang-questions@erlang.org" target="_blank" href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a>
                        <a rel="nofollow" shape="rect" class="yiv6788448471m_1004515118451015374moz-txt-link-freetext" target="_blank" href="http://erlang.org/mailman/listinfo/erlang-questions">http://erlang.org/mailman/listinfo/erlang-questions</a>
                      </div>
                    </div>
                  </blockquote>
                </div>
              </div>
            </blockquote>
          </div>
        </blockquote>
      </div>
      <div class="yiv6788448471" dir="ltr">-- <br clear="none" class="yiv6788448471">
      </div>
      <div class="yiv6788448471gmail_signature">
        <div class="yiv6788448471" dir="ltr">elbrujohalcon @ iPhone</div>
      </div>
      <br clear="none" class="yiv6788448471">
      <fieldset class="yiv6788448471mimeAttachmentHeader"></fieldset>
      <br clear="none" class="yiv6788448471">
      <pre class="yiv6788448471">_______________________________________________
erlang-questions mailing list
<a rel="nofollow" shape="rect" class="yiv6788448471moz-txt-link-abbreviated" ymailto="mailto:erlang-questions@erlang.org" target="_blank" href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a>
<a rel="nofollow" shape="rect" class="yiv6788448471moz-txt-link-freetext" target="_blank" href="http://erlang.org/mailman/listinfo/erlang-questions">http://erlang.org/mailman/listinfo/erlang-questions</a>
</pre>
    </blockquote>
    <br clear="none" class="yiv6788448471">
    <pre class="yiv6788448471moz-signature">-- 
In theory, there is no difference between theory and practice.
In practice, there is.  .... Yogi Berra</pre>
  </div>

_______________________________________________<br clear="none" class="yiv6788448471">erlang-questions mailing list<br clear="none" class="yiv6788448471"><a rel="nofollow" shape="rect" class="yiv6788448471" ymailto="mailto:erlang-questions@erlang.org" target="_blank" href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br clear="none" class="yiv6788448471">http://erlang.org/mailman/listinfo/erlang-questions<br clear="none" class="yiv6788448471"><br clear="none" class="yiv6788448471"></div></div></div><div class="yqt4400648696" id="yqt63474">_______________________________________________<br clear="none">erlang-questions mailing list<br clear="none"><a shape="rect" ymailto="mailto:erlang-questions@erlang.org" href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br clear="none"><a shape="rect" href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br clear="none"></div><br><br></div>  </div> </div>  </div></div></body></html>