Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #21987

Re: "heartbeat" approach

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.mixmin.net!news2.arglkargh.de!nuzba.szn.dk!pnx.dk!news.stack.nl!aioe.org!.POSTED!not-for-mail
From Roedy Green <see_website@mindprod.com.invalid>
Newsgroups comp.lang.java.programmer
Subject Re: "heartbeat" approach
Date Fri, 01 Feb 2013 15:20:31 -0800
Organization Canadian Mind Products
Lines 23
Message-ID <ldjog85seq7bflvn6poekd4m14scjsg125@4ax.com> (permalink)
References <0e900395-a38a-44a1-a5bf-01cc781c8728@googlegroups.com>
Reply-To Roedy Green <see_website@mindprod.com.invalid>
NNTP-Posting-Host K2Qzzs3EAqXk5RLzfhxcSw.user.speranza.aioe.org
Mime-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Transfer-Encoding 7bit
X-Complaints-To abuse@aioe.org
X-Notice Filtered by postfilter v. 0.8.2
X-Newsreader Forte Agent 6.00/32.1186
Xref csiph.com comp.lang.java.programmer:21987

Show key headers only | View raw


On Fri, 1 Feb 2013 08:11:14 -0800 (PST), bob smith
<bob@coolfone.comze.com> wrote, quoted or indirectly quoted someone
who said :

>However, that means there could be multiple threads 
writing to one socket.  Do I need to do anything special to have
multiple threads writing to one socket?  Is there a better way?

I wrote some proprietary  code for a large scale security camera
monitoring system perhaps 5 years ago that did just that.  IIRC
sockets are happy to have multiple writers. The alternative would be
to use a queue fed by multiple writers with a single reader.  I don't
recall writing any queue stuff until a year or so ago.

TCP/IP is completely silent unless you are actively transmitting data,
unlike many other protocols.  So if you can to detect a broken link,
you need some artificial traffic. That is why he needs a "heartbeat".
-- 
Roedy Green Canadian Mind Products http://mindprod.com
The first 90% of the code accounts for the first 90% of the development time.
The remaining 10% of the code accounts for the other 90% of the development 
time. 
~ Tom Cargill  Ninety-ninety Law 

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

"heartbeat" approach bob smith <bob@coolfone.comze.com> - 2013-02-01 08:11 -0800
  Re: "heartbeat" approach Knute Johnson <nospam@knutejohnson.com> - 2013-02-01 08:40 -0800
  Re: "heartbeat" approach Arne Vajhøj <arne@vajhoej.dk> - 2013-02-01 17:46 -0500
    Re: "heartbeat" approach Robert Klemme <shortcutter@googlemail.com> - 2013-02-02 00:13 +0100
      Re: "heartbeat" approach Arne Vajhøj <arne@vajhoej.dk> - 2013-02-01 18:21 -0500
      Re: "heartbeat" approach Arved Sandstrom <asandstrom2@eastlink.ca> - 2013-02-03 06:51 -0400
  Re: "heartbeat" approach Roedy Green <see_website@mindprod.com.invalid> - 2013-02-01 15:20 -0800

csiph-web