Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7770215
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T16:21:21+00:00 2026-06-01T16:21:21+00:00

I have multiple nodes, of 2 types. One type of node, will do one

  • 0

I have multiple nodes, of 2 types.

One type of node, will do one work on a specific server, the other one will do something else.

Let’s call them “type1” and “type2”.

I’m launching them with :

erl -pa ebin -name type1@sub1.mydomain.com -setcookie abc
erl -pa ebin -name type2@sub2.mydomain.com -setcookie abc
erl -pa ebin -name type1@sub3.mydomain.com -setcookie abc

sub1.mydomain.com, sub2.mydomain.com and sub3.mydomain.com are 3 different servers over internet.

Clearly, type2 node is here to interconnect both type1 together. Type2 server is the only “sure” node that is alive for the whole thing to work.

Type1 servers are dynamic, so everytime I run a new type1 server, it will ping type2 server in order to connect to all other nodes.

Thing is, when at least 2 type1 node are up and running, I need to cluster the work.

So I would like to determine from the nodes() return, which node are type1…

I would be able to get the string from atom_to_string, and then check the type1 with the returned string, but it seems like a wrong way to do it… Also using specific ports is not possible due to limitations.

Any suggestions would be appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T16:21:22+00:00Added an answer on June 1, 2026 at 4:21 pm

    In Erlang, node names are atoms and atoms are constant literals, so you won’t be able to pattern match on parts of an atom (in Greek, “a-tomos” means “unsplittable”).

    Unfortunately, you’ll have to do something like converting each atom to a string (a list of chars) and then apply your regexp to it (it seems you’re already doing so).

    Said that, I would suggest you to have a look to:

    http://learnyousomeerlang.com/distributed-otp-applications

    OTP will help you with many of the things you’re trying to achieve with your distributed application.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a content type that references multiple nodes, and I need a way
I have a select dropdown list from a taxonomy applied to multiple node types
I have an XML valued column that has multiple parent nodes. I need to
I have a XmlString which contains multiple elements with their nodes. ie <Element> <AccountName>My
I want to have a tree in memory, where each node can have multiple
I have multiple selects: <select id=one> <option value=1>one</option> <option value=2>two</option> <option value=3>three</option> </select> <select
I would like to have a special sub-node that could be attached to other
I have a join clause with multiple conditions, one being a static value, however
What i want to be able to do is have a server which one
I have a custom 'Player' node type in Drupal with a CCK file field

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.