| Author |
Message |
< Erlang ~ No node identifier whithin link function |
| ErlangN00b |
Posted: Tue Mar 30, 2010 2:35 pm |
|
|
|
Joined: 30 Mar 2010
Posts: 3
|
Hi,
I'm new to Erlang and I have a short question...If I have two processes on two different nodes how can I link them together? The link function takes only a PID but no node identifier? Is it always assured that the PID is globally unique? If I want to send a message to a remote process, I have to write {PID, Node} ! message ... so why does not exist an appropriate link function?
Thanks in advance |
|
|
| Back to top |
|
| zajda |
Posted: Tue Mar 30, 2010 7:22 pm |
|
|
|
User
Joined: 22 Aug 2009
Posts: 83
|
Pid says it self if it is local or not, i.e. <0.44.0> would be local and without zero at the beginning <5499.66.0> would be remote.
To link to remote process, send local pid of some process to the one you want to link. When it will be delivered (as pid() type) it will be already translated and will be recognized as remote one. And then just use link/1 with this remote pid.
MichaĆ Zajda
------------------
Erlang Solutions Ltd |
|
|
| Back to top |
|
| ErlangN00b |
Posted: Wed Mar 31, 2010 6:40 am |
|
|
|
Joined: 30 Mar 2010
Posts: 3
|
Thank you so much for your quick reply. So, does this PID translation also work during message passing between PIDs on different nodes, i.e. that I do not need to write {PID, Node} ! message but only PID ! message??
regards |
|
|
| Back to top |
|
| Michal Ptaszek |
Posted: Wed Mar 31, 2010 8:17 am |
|
|
|
User
Joined: 01 May 2008
Posts: 35
Location: Krakow
|
yes, that's correct.
Pids provides you some nice location transparency layer, so
Pid ! Msg
will work for both local and remote processes.
Note that it does not apply to the registered processes, when you use a name instead of Pid itself. |
|
|
| Back to top |
|
| ErlangN00b |
Posted: Wed Mar 31, 2010 8:46 am |
|
|
|
Joined: 30 Mar 2010
Posts: 3
|
Thanks for your help!
best regards |
|
|
| Back to top |
|
| yeti |
Posted: Sat Sep 01, 2012 6:01 am |
|
|
|
User
Joined: 01 Sep 2012
Posts: 17
Location: fgf
|
| Welcome to our cheap *beep* outlet, where you can always buy the most affordable price to a your favorite cheap purses. These cheap designer *beep*. The Bella Ziptop Satchel features 2 exterior cell phone pockets and is a combination of classic and modern style cheap designer purses.These are hand crafted in Italian tradition and the collection comes in timeless shapes styles that highlight the richness of the leather. |
|
|
| Back to top |
|
| wuji |
Posted: Mon Sep 17, 2012 6:34 am |
|
|
|
User
Joined: 10 Aug 2012
Posts: 654
|
cost of sparking a Constitution crisis," Doft said.The most likely, likely, cheap real jordans likely, and politically feasible, scenario is that Romney will not
to act unilaterally and instead will use his presidential bully bully replica designer *beep* bully pulpit to encourage Congress to repeal the bill."He's not
hapless giant by any means," said Stephen Hess, a senior senior cheap polo shirts senior fellow emeritus at the Brookings Institution. "He's more powerful
any other single individual around, but it's a system that that replica designer *beep* that doesn't allow him to just go ahead and do
with a major act of Congress."With 47 Republicans in the the [h3]cheap designer *beep*[/h3] the Senate and 60 votes required to repeal in the
chamber, even a great night on Nov. 6, 2012, is is knockoff designer *beep* is unlikely to produce a filibuster-proof GOP Senate majority. When |
|
|
| Back to top |
|
| dongdongwu |
Posted: Wed Sep 19, 2012 3:21 am |
|
|
|
User
Joined: 19 Sep 2012
Posts: 236
|
| Girls would refuse to even leave their replicas behind. specifically when the product beats the complete meaning of the Christian Louboutin men outlet; in conditions of good quality and detailing.If Cinderella was residing in your twenty primary century as opposed to the aged a single then there would not be any 'Happy actually after'. properly appears like girls nowadays are as well fond of the strong;Christian Louboutin Men Shoes to leave them in your center of nowhere.Christian Louboutin for men Shoes would arrive true handy being a excellent handbag using the glimpse and really feel belonging to the authentic but at a very much lesser price tag adding as very much as types picture in your process. |
|
|
| Back to top |
|
|
|