[erlang-questions] Why RPC in Erlang? [was: How RPC works in erlang?]

Vans S vans_163@REDACTED
Sat Oct 7 03:50:32 CEST 2017


> So when to use rpc:call and when to send a message by RemotePID ! {call, procedure}? Is there any general guidelines?

No guidelines pretty much if you need code that requires responses from different endpoints, use RPC/custom_async_await, if you need to pass a message do that.

{:ok, ICareReply} = rpc:call(bid_node, bidder, sendBidToPolonix, [155000, 100])
bid_entered_in_books

DontCareReply = MarketScannerPid ! scan_market_price_and_enter_into_db


 

    On Friday, October 6, 2017 12:43 PM, Greg <silver.surfertab@REDACTED> wrote:
 

 So when to use rpc:call and when to send a message by RemotePID ! {call, procedure}? Is there any general guidelines?
There was these long standing debate over this http://armstrongonsoftware.blogspot.in/2008/05/road-we-didnt-go-down.html;  


On Fri, Oct 6, 2017 at 8:17 PM, zxq9 <zxq9@REDACTED> wrote:

On 2017年10月06日 金曜日 10:43:48 Roger Lipscombe wrote:
> On 6 October 2017 at 03:37, zxq9 <zxq9@REDACTED> wrote:
> > Thinking that the rpc module is specially useful for tests, CLI
> > wrappers, or when you want to execute commands on a remote node (from
> > a script or otherwise) is a bit of an odd conclusion to draw, given
> > the way that the even-arity spawn_* functions work.
>
> On occasion, we've needed to (e.g.) tweak application settings in a
> remote node, at runtime, during system tests, synchronously. Sure, I
> could do that with spawn_*, but that's a lot of plumbing I'd need to
> write. Hey, look: someone already did; it's in the rpc module.

Sure. I'm not disagreeing with that.

I'm disagreeing with the false notion that this is what "remote
procedure call" actually means.

-Craig
______________________________ _________________
erlang-questions mailing list
erlang-questions@REDACTED
http://erlang.org/mailman/ listinfo/erlang-questions


_______________________________________________
erlang-questions mailing list
erlang-questions@REDACTED
http://erlang.org/mailman/listinfo/erlang-questions


   
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20171007/aa8768f7/attachment.htm>


More information about the erlang-questions mailing list