[zeromq-dev] How to detect if a remote socket has closed
David.Briant at ubs.com
David.Briant at ubs.com
Tue Aug 17 17:04:30 CEST 2010
>>Ironically, it seems rare that people understand what 0MQ really
provides until they've used it for some work. I'm trying to make this
learning process easier with the user guide and lots of examples.
I appreciate that. I've been trying to explain the idea of peer-to-peer
messaging but few people get it. I also use your website to help
convince people the value of messaging.
Two other things are coming up.
1) Can I check that all socket types are meant to rebind automatically.
2) Also the REQ socket appears to cause python to use 100% cpu if the
REP socket isn't running. I assume that shouldn't be the case?
On that CPU 100% thing I have strange things happening on reconnect - it
looks like a tight poll loop with a little sleep (just guessing). CPU
usage is reported at 100% but computer still works albeit slowly.
So it looks like I should have a directory service that can mediate PAIR
connections between peers, I need a SUB connection to the directory and
a REQ connection to initially connect to it on a well known port. The
directory a service is registered with PUBs any state changes such as
service crashes. It will also PUB a restart (of itself) on the same
channel. The only situation I don't have covered is if a directory crash
means the directory starting on a different IP but a slow heartbeat
mechanism should sort that.
Do you recommend PGM for the PUB/SUB part? - initially there'll only be
a few apps so TCP might be fine.
-----Original Message-----
From: zeromq-dev-bounces at lists.zeromq.org
[mailto:zeromq-dev-bounces at lists.zeromq.org] On Behalf Of Pieter
Hintjens
Sent: Tue 17-Aug-2010 14:13
To: 0MQ development list
Subject: Re: [zeromq-dev] How to detect if a remote socket has closed
On Tue, Aug 17, 2010 at 3:07 PM, <David.Briant at ubs.com> wrote:
> chrs. Newbie Q. A DEVICE is a ZMQ concept right? presumable
implemented in
> C/C++?
Please read the user guide links I sent, it's explained in detail.
The broker example I sent (one page of code) is a device.
> I'm used to doing all the application stuff (heartbeats, resource
discovery)
> over the one channel rather than needing to have several sockets to
get the
> overall functionality.
0MQ encourages you to untangle different flows. That lets you solve
them more easily.
> I thought about re-implementing it but came across zmq that I am still
> hoping will provide all the bits and bobs.
Ironically, it seems rare that people understand what 0MQ really
provides until they've used it for some work. I'm trying to make this
learning process easier with the user guide and lots of examples.
-
Pieter Hintjens
iMatix - www.imatix.com
_______________________________________________
zeromq-dev mailing list
zeromq-dev at lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev
Visit our website at http://www.ubs.com
This message contains confidential information and is intended only
for the individual named. If you are not the named addressee you
should not disseminate, distribute or copy this e-mail. Please
notify the sender immediately by e-mail if you have received this
e-mail by mistake and delete this e-mail from your system.
E-mails are not encrypted and cannot be guaranteed to be secure or
error-free as information could be intercepted, corrupted, lost,
destroyed, arrive late or incomplete, or contain viruses. The sender
therefore does not accept liability for any errors or omissions in the
contents of this message which arise as a result of e-mail transmission.
If verification is required please request a hard-copy version. This
message is provided for informational purposes and should not be
construed as a solicitation or offer to buy or sell any securities
or related financial instruments.
UBS Limited is a company registered in England & Wales under company
number 2035362, whose registered office is at 1 Finsbury Avenue,
London, EC2M 2PP, United Kingdom.
UBS AG (London Branch) is registered as a branch of a foreign company
under number BR004507, whose registered office is at
1 Finsbury Avenue, London, EC2M 2PP, United Kingdom.
UBS Clearing and Execution Services Limited is a company registered
in England & Wales under company number 03123037, whose registered
office is at 1 Finsbury Avenue, London, EC2M 2PP, United Kingdom.
UBS reserves the right to retain all messages. Messages are protected
and accessed only in legally justified cases.
More information about the zeromq-dev
mailing list