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

  • Home
  • SEARCH
  • 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 4075982
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T17:22:03+00:00 2026-05-20T17:22:03+00:00

I have to build a heartbeat system (i.e. some(about 10) nodes on a network

  • 0

I have to build a heartbeat system (i.e. some(about 10) nodes on a network send regular “heartbeats” every few seconds to a central node). These nodes are ubuntu machines. So what would you suggest for the following choices :

  • TCP/UDP?
  • Language/software to send the messages?
  • Server architecture – multiple threads or multiple processes etc.?

The aim of the heartbeats is to quickly find any nodes that go down, or if nodes can’t communicate with the central server. Performance on the client nodes is an issue, so I don’t want to use java (because that would require installing a jvm).

PS: We may later need to also pass some text with the “heartbeat” messages, so we want to develop the system keeping that in mind.

  • 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-05-20T17:22:03+00:00Added an answer on May 20, 2026 at 5:22 pm

    A really simple one-directional “ping” application should suffice. I’d use a single UDP socket at the server, listing for incoming messages on port foo and send “i’m alive” messages from the clients with a single UDP socket at each client with sendTo in an infinite loop with a sleep. No fancy threads/processes needed.

    You can distinguish the clients at the server either by their recvFrom address or by including a client id in the packet payload. You can then keep track of the last time each client sent a ping. You might need more than one thread on the server to make use of blocking receives while checking for timeouts. Or use select and a small timeout/pause to poll the socket.

    Beej has an excellent guide how to do all of this in C: http://beej.us/guide/bgnet/output/html/multipage/index.html

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

Sidebar

Related Questions

Every time I have to build a form with a DateTime field I try
I have build server inside our domain (and it needs to be because it
I have a build script and as part of that script it copies a
I have a build server running CruiseControl.NET. It works well for the 7 projects
I have to build small (for now) admin app in Silverlight2, and would like
I have to build an HTML table that shows data for users versus pages
We have to build Strings all the time for log output and so on.
I have to build a GUI application on Windows Mobile, and would like it
I'm going to have to build a custom control for a WinForms application. But
In our current database development evironment we have automated build procceses check all the

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.