Erlang/OTP Forums

Author Message

<  Open Telecom Platform (OTP)  ~  How to find out all running nodes?

jacek99
Posted: Tue Jun 02, 2009 2:01 pm Reply with quote
User Joined: 26 May 2009 Posts: 27 Location: Montreal, Canada
We have a design where we will have multiple nodes running YAWS and accumulating some data on the local file system.

An external API will provide a single point of entry from which all the nodes should be queried for the data present in their local filesystem.

From this API, how can we find out programatically what are the nodes that are running together?

Is there an OTP API to do this?
Should each node upon start up broadcast info about itself (how? multicast? add row to common Mnesia table?)
Should they all read some common config file which lists all of them by name?

etc, etc...

Any suggestions and/or pointers to best practices would be much appreciated
View user's profile Send private message
jacek99
Posted: Thu Jun 04, 2009 1:51 pm Reply with quote
User Joined: 26 May 2009 Posts: 27 Location: Montreal, Canada
Found it: it's the nodes() BIF of course Very Happy

So, a slightly more advanced question: how do I get notified if a new node attaches itself (in case I need to do some init work the first time it connects)?
View user's profile Send private message
seanmc
Posted: Thu Jun 04, 2009 2:37 pm Reply with quote
User Joined: 03 Aug 2007 Posts: 10
Hi Jacek,

As far as I know, a new node starting in the same environment will be invisible to your system. If it makes any attempt to connect to a node in your system (eg. using net_adm:ping()) then those two nodes will be aware of each other and they will appear in each others the nodes() list.

It sounds like you want your system to assign work to each new node that appears, in this case after starting a new node just ping the systems "work-assigning" node

//Sean.
View user's profile Send private message
jacek99
Posted: Thu Jun 04, 2009 5:20 pm Reply with quote
User Joined: 26 May 2009 Posts: 27 Location: Montreal, Canada
Got it. The "child" node calls the "master" asking for init info and not the other way around.
View user's profile Send private message
wuji
Posted: Mon Aug 20, 2012 7:27 am Reply with quote
User Joined: 10 Aug 2012 Posts: 654
a link to go to Netflix, you would wind up up jordan 6 up at "BudgetMatch," according to the FBI. The practice is
"click hijacking."Once the FBI got around to fixing the problem problem [h4]cheap jordans[/h4] problem in 2011, it realized it couldn't simply shut down
rogue servers because infected computers would be left without a a cheap replica *beep* a functioning DNS, leaving them virtually Internet-less. So it set
temporary servers to give malware-infected Internet users time to fix fix jordan 6 fix their computers.And time runs out on Monday, July 9.(There
a planned attack this Monday that will shut down the the imitation designer *beep* the Internet; those whose computers are already infected will lose
Band-Aid the FBI put on the problem more than a a knockoff designer *beep* a year ago.)Who Is Affected?Initially, there were more than 4
infected computers in 100 countries, including 500,000 in the United United jordan 6s United States, according to the indictment.As of July 4, there
View user's profile Send private message

Display posts from previous:  

All times are GMT
Page 1 of 1
This forum is locked: you cannot post, reply to, or edit topics.

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum