concurrency(?) in rpc:multicall()

HP Wei hp@REDACTED
Tue Jun 27 15:47:08 CEST 2006


Thank you, Vlad and Thomas, for clarifying the
meaning of  the documentation.

The reason that I asked in the first place was that
I saw the phrase
'all requests are sent at the same time'
and I thought
wow, this should be what I need when I want to trigger
an event on all machines at the same time!!
Apparently, this 'at the same time' is not what I thought
it is.

I understand that
for a small number of target machines, the
effect of rpc:multicall()
is a good approximation to 'simultaneous' triggering...

Thanks
HP



On Tue, 27 Jun 2006, Vlad Dumitrescu wrote:

> Hi,
>
> The meaning is that the requests are all sent before even trying to
> receive an answer. The sequentioal alternative is to send a request,
> wait for the answer, send the next request, and so on.
>
> regards,
> Vlad
>
>
> On 6/27/06, HP Wei <hp@REDACTED> wrote:
> >
> > According to the manual,
> > "
> >    It is semantically the same as iteratively making a series
> >    of RPCs on all the nodes,
> >    but the multicall is faster as all the requests
> >    are sent at the same time...
> > "
> >
> > I do NOT understand the last part:
> > "
> >    all the requests are sent at the same time
> > "
> >
> > I trace the source code for rpc:multicall().
> > It boils down to gen_server:send_nodes(),
> > whose function head reads:
> >    send_nodes([Node|Tail], ...)
> >
> > Apparently, multicall sends out the requests to the
> > target processes 'one by one'  (not at the same time).
> >
> >
> > Is there a typo in the manual for rpc:multicall() ???
> >
> > --HP
> >
> >
>



More information about the erlang-questions mailing list