[zeromq-dev] JZMQ Windows Instructions

2014-02-13 Thread Jörg Specht

Hello ZMQ staff,

I think the JZMQ binding documentation for Windows needs some work, as 
it just took me 4 hours to get ZMQ up and running on Windows, even 
though I already had it working on Linux. At least the following point 
needs to be rewritten or updated:


Note that ØMQ and JDK header file has to be on include path 
(/Tools|Options|Projects and Solutions|VC++ Directories|Include files/) 
and ØMQ libraries have to be on library path (/Tools|Options|Projects 
and Solutions|VC++ Directories|Library files/):


These options no longer exists in MSVC 2010 and newer, which are 
basically required since the JZMQ project is a 2012 project.


I can't really say, why I had so much trouble building the libraries, 
but I simply had.


You might also add this little instruction to it:
http://stackoverflow.com/questions/11455588/how-to-run-zeromq-with-java
 since - if I read correctly - it was written by one of your devs.

Kind regards,
Jörg Specht
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] Protocol Plugins

2014-02-13 Thread Pieter Hintjens
On Wed, Feb 12, 2014 at 3:05 AM, Lyle Thompson lthomp...@ixiacom.com wrote:

 I guess nobody is interested in pluggable protocols. Thanks anyway.

Making pluggable protocols in the core library is just a very hard
thing. It would require some major redesigns.

People have added transports, and it's doable. They're not pluggable
though, in the sense we usually mean.

I built a simple framework for pluggable protocols over inproc
bridges, some years ago: https://github.com/hintjens/vtx. It didn't
get much attention.

-Pieter
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] CAN Bus

2014-02-13 Thread Goswin von Brederlow
On Wed, Feb 12, 2014 at 10:05:43AM -, Florian Pichlmeier wrote:
 Hello,
 
 so far i have been using zeromq in some small pet projects, but have not yet 
 worked directly
 on the library.
 
 In some other project there is the need to communicate over the CAN bus, 
 everything on Linux.
 I was wondering if it would be feasible to extend zeromq for this use case?
 
 Best regards,
 
 Florian

As in using the CAN bus as transport for the zmq protocol?

MfG
Goswin
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


[zeromq-dev] Sandstorm: 55 Gbps at 72% load

2014-02-13 Thread Steven McCoy
This might be of interest, if rather hilarious as an implementation of
anything.  Basically a static content webserver that stores content as
a tcpdump
and just replays the packets bypassing any serious CPU effort.

http://highscalability.com/blog/2014/2/12/paper-network-stack-specialization-for-performance.html

-- 
Steve-o
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] What differentiates connected peers on a ZMTP point of view ?

2014-02-13 Thread Laurent Alebarde
I have finally managed to proxy ZMTP over a ZMQ_STREAM socket tunel, 
with several clients and several workers, with the following architecture:



___client A___ 
server_

proxy  __worker B __
_tunel A__ _midpoint_
Client  tcp frontend   /   backend tcp frontend / 
backend ---tcp Worker
DEALER  ZMQ_STREAM  DEALER ROUTER 
ZMQ_STREAMDEALER

CURVE   NULL NULL  CURVE

I have to admit I have had a very hard time to achieve this.

Thanks again Goswin.

Laurent



Le 11/02/2014 10:02, Goswin von Brederlow a écrit :

On Mon, Feb 10, 2014 at 05:31:34PM +0100, Laurent Alebarde wrote:

Le 10/02/2014 10:43, Goswin von Brederlow a écrit :

On Thu, Feb 06, 2014 at 04:34:03PM +0100, Laurent Alebarde wrote:

Hi Devs,

I wonder please what differentiates connected peers on a ZMTP point
of view ?

To be more clear, let's consider this network:

Client 1 205.23.12.47
 Server
Client 2 102.12.88.254 --/

In ZMTP internals, I assume it creates a pipe associated with each
origin address, and on an API side, it provides one identity
associated to each one. So it creates one mechanism for each pipe
and knows which instance to use every time in the stateful handcheck
process. Is it correct ? there is a bijective association between
the origin address and the identity ?

Let's say that now we have a proxy in between:


Client 1 205.23.12.47 --- Proxy
--- Server
Client 2 102.12.88.254 --/92.123.321.22

ZMTP on server side has no way to differentiate between Client1 and
2. Every message arrives in the same pipe which is the one
corresponding to its closest peer: the proxy and its address. The
only way for the server to differentiate the clients is at
application level, when identities are stacked in the former frames
of each message ?

I am a bit confused. Can someone clarify for me please and point in
the libzmq code what is taken into account to identify the pipes ?

http://zguide.zeromq.org/page:all#The-Extended-Reply-Envelope

A zmq message does not have just one identity. It has any number of
identity frames followed by an empty delimiter frame followed by data
frames. Normaly on each hop an identity frame is added. Depending on
the socket type when sending the first identity is used to decied
where to send the message and on recieve the identity of the sender is
added to show where it came from:

Client 1 sends:'' 'request'  # REQ adds ''
Proxy recieves:client 1 '' 'request'   # ROUTER adds id
Proxy sends:   client 1 '' 'request'   # DEALER
Server recieves:   proxy client 1 '' 'request'   # REP handles ids
Server replies proxy client 1 '' 'reply' # REP handles ids
Proxy recieves:client1 '' 'reply'  # DEALER
Proxy sends:   client1 '' 'reply'  # ROUTER strips id
Client 1 recieves: '' 'reply'# REQ strips ''

The REP/REQ sockets handle the identity frames for you so the
appliction never sees them. ROUTER adds/strips the first identity
automatically while DEALER lets you see them all.

Thanks Goswin,

My question here is on the internals of libzmq: how it manages
identities ws pipes.
Continued below.

So, if my above hypothesis are right, as I want to manage to proxy a
ZMTP mechanism like in the following:

___client A___
server_
proxy  __worker B __
 _tunel A__ _midpoint_
Client  --inproc--- frontend   /   backend tcp frontend /
backend --inproc-- Worker
DEALER  ZMQ_STREAM  DEALER ROUTER  ZMQ_STREAM
DEALER
CURVE |  CURVE
|

I have to create a pool of sockets in the proxy backend, say 1,000
if I want to authorize 1,000 simultaneous connexions, and dispatch
the clients to a sticky socket, and one and only one client per
socket.
\|/
Client 1 -- socket 1:
port 10001
Client 2 -- socket 2:
port 10002
Client 1000 -- socket
1000: port 11000

So, the worker is binded to all these ports. Still, does it work
here ?  Does ZMTP creates a pipe per address on the worker side,
even if they are binded to the same socket (the answer looks obvious
but I prefer a confirmation) ?


Cheers,


Laurent

No. You use one socket for everything and add the identity of the
client to the message as you proxy it. Then on the reply you get the
identity of the client back so you know where to send it. Since ROUTER
adds the identity implicitly all a proxy has to do is real all message
frames 

[zeromq-dev] performance ressource tradeoff for sockets ws threads ?

2014-02-13 Thread Laurent Alebarde

Hi all,

In a server, I want to assign one socket per client (CURVE). What is the 
best in terms of performance  ressources ? Say I want to deal with 
1,000 simultaneous clients.


1. one socket per thread with an avarage cpu load 1%, and 1,000 threads ?
2. 100 sockets per thread with an avarage cpu load near 100%, and 10
   threads ?
3. anything between ?

Some service delivery latency is acceptable.


Laurent
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] Protocol Plugins

2014-02-13 Thread Lyle Thompson
OK. Thanks for your feedback, Pieter. I think, then, that I will just do it the 
simple way.

Regards,
Lyle

-Original Message-
From: zeromq-dev-boun...@lists.zeromq.org 
[mailto:zeromq-dev-boun...@lists.zeromq.org] On Behalf Of Pieter Hintjens
Sent: Thursday, February 13, 2014 12:30 AM
To: ZeroMQ development list
Subject: Re: [zeromq-dev] Protocol Plugins

On Wed, Feb 12, 2014 at 3:05 AM, Lyle Thompson lthomp...@ixiacom.com wrote:

 I guess nobody is interested in pluggable protocols. Thanks anyway.

Making pluggable protocols in the core library is just a very hard thing. It 
would require some major redesigns.

People have added transports, and it's doable. They're not pluggable though, in 
the sense we usually mean.

I built a simple framework for pluggable protocols over inproc bridges, some 
years ago: https://github.com/hintjens/vtx. It didn't get much attention.

-Pieter
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


[zeromq-dev] Export Control Classification number for zero MQ

2014-02-13 Thread Fabien
Hi,

We are looking at using zeroMQ and NetMQ in one of our commercial software.
We would like to know what is the country of origin for zeroMQ/NetMQ.  If
USA origin, what is the export control classification number (ECCN and/or
CCATS or any other export control designation) for this component?  If not,
does this component perform any encryption (other than that used for
authentication)?
 
Your help would be most appreciated.

Thanks.

Fabien

___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


[zeromq-dev] Peer to peer connection

2014-02-13 Thread Ngo Doan Lap
Hi All,
I'm going to develop peer to peer chat application using Zeromq but I can't
find a away to for connecting two peers on different network.
For example:
A CoffeShop (public IP is 173.169.213.16) has peer A (private IP is
192.168.1.15)
A university campaign (public IP is 87.96.124.16) has peer B (private IP
is 10.14.22.19)
Both A and B can access to internet freely.
How do I make connection between A and B using zeromq?
-- 
Thanks and Best Regards,
Ngo Doan Lap
Mobile: 0977.833.757
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] Protocol Plugins

2014-02-13 Thread Lindley French
I think it's a worthwhile goal. In fact, I think a lot of aspects of libzmq
which are currently hard-coded should be made more modular. There are two
issues: 1) It's a big task, as mentioned, and someone just has to do it. 2)
As a big task, it's also a big stability risk. There's a greater potential
to introduce bugs than there would be with smaller changes.


On Thu, Feb 13, 2014 at 12:34 PM, Lyle Thompson lthomp...@ixiacom.comwrote:

 OK. Thanks for your feedback, Pieter. I think, then, that I will just do
 it the simple way.

 Regards,
 Lyle

 -Original Message-
 From: zeromq-dev-boun...@lists.zeromq.org [mailto:
 zeromq-dev-boun...@lists.zeromq.org] On Behalf Of Pieter Hintjens
 Sent: Thursday, February 13, 2014 12:30 AM
 To: ZeroMQ development list
 Subject: Re: [zeromq-dev] Protocol Plugins

 On Wed, Feb 12, 2014 at 3:05 AM, Lyle Thompson lthomp...@ixiacom.com
 wrote:

  I guess nobody is interested in pluggable protocols. Thanks anyway.

 Making pluggable protocols in the core library is just a very hard thing.
 It would require some major redesigns.

 People have added transports, and it's doable. They're not pluggable
 though, in the sense we usually mean.

 I built a simple framework for pluggable protocols over inproc bridges,
 some years ago: https://github.com/hintjens/vtx. It didn't get much
 attention.

 -Pieter
 ___
 zeromq-dev mailing list
 zeromq-dev@lists.zeromq.org
 http://lists.zeromq.org/mailman/listinfo/zeromq-dev
 ___
 zeromq-dev mailing list
 zeromq-dev@lists.zeromq.org
 http://lists.zeromq.org/mailman/listinfo/zeromq-dev

___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] Peer to peer connection

2014-02-13 Thread Ahmet Kakıcı
Each peer will use other's public ip address to connect but you have to
forward ports to internal ip adresses.
A will connect to tcp://87.96.124.16: or bind to tcp://*:.
B will connect to tcp:173.169.213.16: or bind to tcp://*:.
You both have to forward  port to A's and B's internal ip:port pairs.


On Thu, Feb 13, 2014 at 3:16 PM, Ngo Doan Lap lapngod...@gmail.com wrote:

 Hi All,
 I'm going to develop peer to peer chat application using Zeromq but I
 can't find a away to for connecting two peers on different network.
 For example:
 A CoffeShop (public IP is 173.169.213.16) has peer A (private IP is
 192.168.1.15)
 A university campaign (public IP is 87.96.124.16) has peer B (private IP
 is 10.14.22.19)
 Both A and B can access to internet freely.
 How do I make connection between A and B using zeromq?
 --
 Thanks and Best Regards,
 Ngo Doan Lap
 Mobile: 0977.833.757

 ___
 zeromq-dev mailing list
 zeromq-dev@lists.zeromq.org
 http://lists.zeromq.org/mailman/listinfo/zeromq-dev


___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


[zeromq-dev] coding note: redirecting libzmq/czmq library logging

2014-02-13 Thread Michael Haberler
the libraries write assertion errors to stderr (eg libzmq/src/err.hpp) or 
stdout for debugging (e.g. zclock_log())

that's a tad annoying in a daemon setup where you'd want to have that output go 
to syslog instead of a terminal

I found this neat trick, which enables redirection of FILE * operations (NB: 
not fd's like used with open/close/read/write):

   http://mischasan.wordpress.com/2011/05/25/redirecting-stderr-to-syslog/

with this it's easy to redirect log output for libzmq and czmq.

- Michael


___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] Using ZMQ for video multicast

2014-02-13 Thread George Kumar
Hi Emmanuel,

Thanks. This may be not so much ZMQ related, as PGM related. If I do PGM
over internet, how does it get delivered to end hosts. As far as I
understand, PGM requires support by intermediate routers. Or we want to use
PGM we will have to have complete control over intermediate network between
endpoints.

Thanks.
George.


On Tue, Feb 11, 2014 at 11:44 PM, Emmanuel Taurel tau...@esrf.fr wrote:

 Hi George,

 If you want to use PUB/SUB and multicast, you have to use ZMQ with PGM.
 In ZMQ, PGM is encapsulateded in UDP. Look at the so-called epgm
 (Encapsulated PGM) transport.

 Hoping this help

 Emmanuel

 Le 12.02.2014 01:24, George Kumar a écrit :
  Hi all,
 
  Sorry if this too basic a question for most for you on the list. I
  have a requirement where I need to multicast video to up to 3
  recipients. I am considering ZMQ PUB/SUB model. But ZMQ does not have
  the option of using UDP for transport. TCP is generally discouraged
  for real time data like video. So what do you folks think ?
 
  Appreciate your feedback.
  Thanks.
  George

 ___
 zeromq-dev mailing list
 zeromq-dev@lists.zeromq.org
 http://lists.zeromq.org/mailman/listinfo/zeromq-dev

___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


[zeromq-dev] How to load-balance blindly ? option to retrieve the identity assigned by the ROUTER or STREAM peer ?

2014-02-13 Thread Laurent Alebarde

Hi all,

I am designing an architecture with tens of workers, each with hundreds 
of sockets. All the sockets connect to the same address. On the broker 
point of view, nothing differentiates the connections it receives except 
their unique identity it assigns to them. If it was one worker with 
1,000 sockets or 10 workers with 100 sockets or whatever, the broker has 
no way to see it. That makes load balancing uneasy since the broker is 
blind against the workers socket repartition.


I could use a different port for each worker, but it would be a huge 
overall redesign. So I have only one port. The idea would be that each 
worker could retrieve the identity of its sockets, as assigned by the 
broker. Then each worker would transmit to the brocker via a message the 
list of its identities, and the broker would be able to elaborate a load 
per worker.


The only solution I foresee is to make use of 5 bytes of the greeting's 
filler to transmit this identity. Of course, it would be activated only 
on the activation of a new option on the broker socket, and another one 
on the workers ones to retrieve it. This would be not compatible with 
the IDENTITY. I think something like this did exist in the past ?


Does someone has a better idea ?

Cheers,


Laurent


___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] ROUTER not routing?

2014-02-13 Thread Justin Karneges
I'd like to move forward with fixing this. Can I get a confirmation that 
I should proceed? Basically I want to make it so if a connection 
reconnects, and an explicit identity is received from the peer, then it 
should overwrite any previously set identity for that peer.

Also I tried to log an item in the Jira but I'm not sure how. Maybe I 
need special access rights? I created an account at least. Also, I see 
issues in github too. Which is the right place to log things?

Thanks.

On 02/08/2014 11:53 AM, Justin Karneges wrote:
 Here's an even simpler example using REQ/ROUTER:
 https://gist.github.com/jkarneges/1fa64e9763561f53daef

 It doesn't demonstrate the routing problem but it does demonstrate the
 identity binding oddity. You can see the ROUTER side that the envelope
 id is always the first id it has ever seen, even if the id printed by
 the REQ side is different every time.

 On 02/07/2014 02:33 PM, Justin Karneges wrote:
 Here's some small sample code to reproduce the issue:
 https://gist.github.com/jkarneges/ab2b1abea1ee4cfc1332

 A (ztest1.py) creates REQ and ROUTER sockets. B (ztest2.py) creates REP
 and ROUTER sockets. B binds and provides a random identity to its ROUTER
 socket. A connects its sockets to B. A queries for B's id using the REQ
 socket, and then attempts to send a message via the ROUTER socket right
 after that. This is repeated every 2 seconds.

 A and B can be started in any order. A can be restarted and things will
 still work. If B is restarted, then A's ROUTER socket will never work
 again until A is restarted also.

 A uses ZMQ_ROUTER_MANDATORY to show that the failures are on A's side.

 On 02/07/2014 02:16 PM, Justin Karneges wrote:
 It is my understanding that being able to route requires the socket to
 have an identity mapping in its routing table for the peer.

 For peers that do not explicitly specify their own identity, then I
 believe you are correct that routing is not possible until at least one
 message has been received from the peer. It is at this point that the
 ROUTER socket will make up an identity for this peer and store it in its
 routing table.

 However, for peers that *do* explicitly specify their own identity (as I
 am doing), then this identity information is delivered immediately after
 the connection is established, allowing routing to the peer even if the
 peer has not sent a message yet.

 I should have been more clear in my original message. The B program is
 explicitly specifying a random UUID as the identity of its socket before
 binding.

 On 02/07/2014 02:06 PM, Panu Wetterstrand wrote:
 I did not quite get the problem but could this be because (I think)
 router is not able to route messages to socket from which it has not
 reveived data first...

 7.2.2014 22.51 kirjoitti Justin Karneges jus...@affinix.com
 mailto:jus...@affinix.com:

Hi,

1) ROUTER in program A is set to connect to a bind socket in 
 program B.
2) Both programs are started, and the connection is established.
3) A determines B's socket identity out-of-band, and is able to send
messages to B.
3) B is terminated and the connection is lost.
4) B is started again, and the connection is re-established.
5) A determines B's socket identity out-of-band, and is no longer 
 able
to send messages to B.

It seems this problem does not happen if B retains the same socket
identity across reconnects. However, if it uses a random identity 
 (to be
discovered out-of-band by A), then routing will never work again 
 after
the first restart of B. The A program must be restarted in order to 
 make
things right again.

My guess is that each connect queue on a ROUTER socket is somehow 
 bound
for life against the first identity it sees. Is this intentional
behavior?

Thanks,
Justin
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org mailto:zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev



 ___
 zeromq-dev mailing list
 zeromq-dev@lists.zeromq.org
 http://lists.zeromq.org/mailman/listinfo/zeromq-dev


 ___
 zeromq-dev mailing list
 zeromq-dev@lists.zeromq.org
 http://lists.zeromq.org/mailman/listinfo/zeromq-dev


 ___
 zeromq-dev mailing list
 zeromq-dev@lists.zeromq.org
 http://lists.zeromq.org/mailman/listinfo/zeromq-dev


 ___
 zeromq-dev mailing list
 zeromq-dev@lists.zeromq.org
 http://lists.zeromq.org/mailman/listinfo/zeromq-dev


___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] ROUTER not routing?

2014-02-13 Thread Ahmet Kakıcı
It's not about zmq, just imagine someone comes to you and you say him you
are x, after he left someone came too, so without his identity how will
you decide if he is the same person or not?


On Fri, Feb 14, 2014 at 12:51 AM, Justin Karneges jus...@affinix.comwrote:

 I'd like to move forward with fixing this. Can I get a confirmation that
 I should proceed? Basically I want to make it so if a connection
 reconnects, and an explicit identity is received from the peer, then it
 should overwrite any previously set identity for that peer.

 Also I tried to log an item in the Jira but I'm not sure how. Maybe I
 need special access rights? I created an account at least. Also, I see
 issues in github too. Which is the right place to log things?

 Thanks.

 On 02/08/2014 11:53 AM, Justin Karneges wrote:
  Here's an even simpler example using REQ/ROUTER:
  https://gist.github.com/jkarneges/1fa64e9763561f53daef
 
  It doesn't demonstrate the routing problem but it does demonstrate the
  identity binding oddity. You can see the ROUTER side that the envelope
  id is always the first id it has ever seen, even if the id printed by
  the REQ side is different every time.
 
  On 02/07/2014 02:33 PM, Justin Karneges wrote:
  Here's some small sample code to reproduce the issue:
  https://gist.github.com/jkarneges/ab2b1abea1ee4cfc1332
 
  A (ztest1.py) creates REQ and ROUTER sockets. B (ztest2.py) creates REP
  and ROUTER sockets. B binds and provides a random identity to its ROUTER
  socket. A connects its sockets to B. A queries for B's id using the REQ
  socket, and then attempts to send a message via the ROUTER socket right
  after that. This is repeated every 2 seconds.
 
  A and B can be started in any order. A can be restarted and things will
  still work. If B is restarted, then A's ROUTER socket will never work
  again until A is restarted also.
 
  A uses ZMQ_ROUTER_MANDATORY to show that the failures are on A's side.
 
  On 02/07/2014 02:16 PM, Justin Karneges wrote:
  It is my understanding that being able to route requires the socket to
  have an identity mapping in its routing table for the peer.
 
  For peers that do not explicitly specify their own identity, then I
  believe you are correct that routing is not possible until at least one
  message has been received from the peer. It is at this point that the
  ROUTER socket will make up an identity for this peer and store it in
 its
  routing table.
 
  However, for peers that *do* explicitly specify their own identity (as
 I
  am doing), then this identity information is delivered immediately
 after
  the connection is established, allowing routing to the peer even if the
  peer has not sent a message yet.
 
  I should have been more clear in my original message. The B program is
  explicitly specifying a random UUID as the identity of its socket
 before
  binding.
 
  On 02/07/2014 02:06 PM, Panu Wetterstrand wrote:
  I did not quite get the problem but could this be because (I think)
  router is not able to route messages to socket from which it has not
  reveived data first...
 
  7.2.2014 22.51 kirjoitti Justin Karneges jus...@affinix.com
  mailto:jus...@affinix.com:
 
 Hi,
 
 1) ROUTER in program A is set to connect to a bind socket in
 program B.
 2) Both programs are started, and the connection is
 established.
 3) A determines B's socket identity out-of-band, and is able
 to send
 messages to B.
 3) B is terminated and the connection is lost.
 4) B is started again, and the connection is re-established.
 5) A determines B's socket identity out-of-band, and is no
 longer able
 to send messages to B.
 
 It seems this problem does not happen if B retains the same
 socket
 identity across reconnects. However, if it uses a random
 identity (to be
 discovered out-of-band by A), then routing will never work
 again after
 the first restart of B. The A program must be restarted in
 order to make
 things right again.
 
 My guess is that each connect queue on a ROUTER socket is
 somehow bound
 for life against the first identity it sees. Is this
 intentional
 behavior?
 
 Thanks,
 Justin
 ___
 zeromq-dev mailing list
 zeromq-dev@lists.zeromq.org mailto:
 zeromq-dev@lists.zeromq.org
 http://lists.zeromq.org/mailman/listinfo/zeromq-dev
 
 
 
  ___
  zeromq-dev mailing list
  zeromq-dev@lists.zeromq.org
  http://lists.zeromq.org/mailman/listinfo/zeromq-dev
 
 
  ___
  zeromq-dev mailing list
  zeromq-dev@lists.zeromq.org
  http://lists.zeromq.org/mailman/listinfo/zeromq-dev
 
 
  ___
  zeromq-dev mailing list
  zeromq-dev@lists.zeromq.org
  http://lists.zeromq.org/mailman/listinfo/zeromq-dev
 
 
  

Re: [zeromq-dev] ROUTER not routing?

2014-02-13 Thread Justin Karneges
The new peer asserts its own identity. There is not a question about 
whether the new peer is the same as before. The peer very clearly is or 
is not the same, based on the identity it provides. The problem is that 
remote identities are only honored for the first peer.

On 02/13/2014 03:00 PM, Ahmet Kakıcı wrote:
 It's not about zmq, just imagine someone comes to you and you say him
 you are x, after he left someone came too, so without his identity how
 will you decide if he is the same person or not?


 On Fri, Feb 14, 2014 at 12:51 AM, Justin Karneges jus...@affinix.com
 mailto:jus...@affinix.com wrote:

 I'd like to move forward with fixing this. Can I get a confirmation that
 I should proceed? Basically I want to make it so if a connection
 reconnects, and an explicit identity is received from the peer, then it
 should overwrite any previously set identity for that peer.

 Also I tried to log an item in the Jira but I'm not sure how. Maybe I
 need special access rights? I created an account at least. Also, I see
 issues in github too. Which is the right place to log things?

 Thanks.

 On 02/08/2014 11:53 AM, Justin Karneges wrote:
   Here's an even simpler example using REQ/ROUTER:
   https://gist.github.com/jkarneges/1fa64e9763561f53daef
  
   It doesn't demonstrate the routing problem but it does
 demonstrate the
   identity binding oddity. You can see the ROUTER side that the
 envelope
   id is always the first id it has ever seen, even if the id printed by
   the REQ side is different every time.
  
   On 02/07/2014 02:33 PM, Justin Karneges wrote:
   Here's some small sample code to reproduce the issue:
   https://gist.github.com/jkarneges/ab2b1abea1ee4cfc1332
  
   A (ztest1.py) creates REQ and ROUTER sockets. B (ztest2.py)
 creates REP
   and ROUTER sockets. B binds and provides a random identity to
 its ROUTER
   socket. A connects its sockets to B. A queries for B's id using
 the REQ
   socket, and then attempts to send a message via the ROUTER
 socket right
   after that. This is repeated every 2 seconds.
  
   A and B can be started in any order. A can be restarted and
 things will
   still work. If B is restarted, then A's ROUTER socket will never
 work
   again until A is restarted also.
  
   A uses ZMQ_ROUTER_MANDATORY to show that the failures are on A's
 side.
  
   On 02/07/2014 02:16 PM, Justin Karneges wrote:
   It is my understanding that being able to route requires the
 socket to
   have an identity mapping in its routing table for the peer.
  
   For peers that do not explicitly specify their own identity, then I
   believe you are correct that routing is not possible until at
 least one
   message has been received from the peer. It is at this point
 that the
   ROUTER socket will make up an identity for this peer and store
 it in its
   routing table.
  
   However, for peers that *do* explicitly specify their own
 identity (as I
   am doing), then this identity information is delivered
 immediately after
   the connection is established, allowing routing to the peer
 even if the
   peer has not sent a message yet.
  
   I should have been more clear in my original message. The B
 program is
   explicitly specifying a random UUID as the identity of its
 socket before
   binding.
  
   On 02/07/2014 02:06 PM, Panu Wetterstrand wrote:
   I did not quite get the problem but could this be because (I
 think)
   router is not able to route messages to socket from which it
 has not
   reveived data first...
  
   7.2.2014 22.51 kirjoitti Justin Karneges jus...@affinix.com
 mailto:jus...@affinix.com
   mailto:jus...@affinix.com mailto:jus...@affinix.com:
  
  Hi,
  
  1) ROUTER in program A is set to connect to a bind
 socket in program B.
  2) Both programs are started, and the connection is
 established.
  3) A determines B's socket identity out-of-band, and is
 able to send
  messages to B.
  3) B is terminated and the connection is lost.
  4) B is started again, and the connection is
 re-established.
  5) A determines B's socket identity out-of-band, and is
 no longer able
  to send messages to B.
  
  It seems this problem does not happen if B retains the
 same socket
  identity across reconnects. However, if it uses a
 random identity (to be
  discovered out-of-band by A), then routing will never
 work again after
  the first restart of B. The A program must be restarted
 in order to make
  things right again.
  
  My guess is that 

[zeromq-dev] Crash in zeromq 3.2.4 Windows x64

2014-02-13 Thread Robin Scher
Hi List.

I’ve been using ZeroMQ for about 8 months and it has been working well for my 
project. Recently I’ve noticed a crash on a customer site running under 
moderately heavy use (this machine is communicating with about 850 active 
clients, but the crash seems to happen over time, not based on how many clients 
are connected at the time it happens). I didn’t get a full debug report because 
it happened when I wasn’t directly monitoring the system and the process had to 
be restarted because it is deployed in production. However, I have the call 
stack where it happened:

Unhandled exception at 0x07FEFD0BBCCD (KernelBase.dll) in SmedgeMaster.exe: 
0x4015:  %hs (parameters: 0x004EF078).

KernelBase.dll!07fefd0bbccd()   Unknown
   SmedgeLib.dll!zmq::tune_tcp_socket(unsigned __int64)Unknown
SmedgeLib.dll!zmq::tcp_connecter_t::out_event(void) Unknown
SmedgeLib.dll!zmq::select_t::loop(void) Unknown
SmedgeLib.dll![thunk]:zmq::tcp_connecter_t::`vector deleting 
destructor'`adjustor{504}' (unsigned int)  Unknown
msvcr110.dll!_callthreadstartex() Line 354  C
msvcr110.dll!_threadstartex(void * ptd) Line 332C
kernel32.dll!76d5652d() Unknown
ntdll.dll!76e8c521()Unknown

The code is compiled Windows 64 bit on MSVC 11 (Visual Studio 2012). This is an 
optimized release build with debugging info. I build zmq as a static library 
that is linked into my own dynamic library. The thread in question is one of 
the threads that is started by zmq itself, not my own library or code. I’m 
afraid I didn’t get the exact instruction in the zmq code that triggered the 
exception before I had to restart it (there was some panic as the process was 
in the middle of a lot of work and clients were waiting!)

Does anyone have any idea what may be going on here? Is there some way I can 
catch whatever is failing so I can handle it more gracefully than just killing 
my entire process and potentially losing data? I’ve been having crashing like 
this every few days of operation, but this is the first time I was even able to 
get it to happen while the debugger was attached. I have the debugger attached 
again after a restart, so if it happens again I may be able to get more 
information, especially if someone can help me to know what I should be looking 
for exactly.

Thank you for any insight you can provide. 
-robin

Robin Scher
ro...@uberware.net
+1 (213) 448-0443





signature.asc
Description: Message signed with OpenPGP using GPGMail
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] Protocol Plugins

2014-02-13 Thread Pieter Hintjens
Well, large changes can always be grown incrementally. If we try a
plugin architecture there's no reason to try to replace what we have
now with new code. It can grow alongside it, without risk, then
if/when it's mature, we use it.

On Thu, Feb 13, 2014 at 7:45 PM, Lindley French lindl...@gmail.com wrote:
 I think it's a worthwhile goal. In fact, I think a lot of aspects of libzmq
 which are currently hard-coded should be made more modular. There are two
 issues: 1) It's a big task, as mentioned, and someone just has to do it. 2)
 As a big task, it's also a big stability risk. There's a greater potential
 to introduce bugs than there would be with smaller changes.


 On Thu, Feb 13, 2014 at 12:34 PM, Lyle Thompson lthomp...@ixiacom.com
 wrote:

 OK. Thanks for your feedback, Pieter. I think, then, that I will just do
 it the simple way.

 Regards,
 Lyle

 -Original Message-
 From: zeromq-dev-boun...@lists.zeromq.org
 [mailto:zeromq-dev-boun...@lists.zeromq.org] On Behalf Of Pieter Hintjens
 Sent: Thursday, February 13, 2014 12:30 AM
 To: ZeroMQ development list
 Subject: Re: [zeromq-dev] Protocol Plugins

 On Wed, Feb 12, 2014 at 3:05 AM, Lyle Thompson lthomp...@ixiacom.com
 wrote:

  I guess nobody is interested in pluggable protocols. Thanks anyway.

 Making pluggable protocols in the core library is just a very hard thing.
 It would require some major redesigns.

 People have added transports, and it's doable. They're not pluggable
 though, in the sense we usually mean.

 I built a simple framework for pluggable protocols over inproc bridges,
 some years ago: https://github.com/hintjens/vtx. It didn't get much
 attention.

 -Pieter
 ___
 zeromq-dev mailing list
 zeromq-dev@lists.zeromq.org
 http://lists.zeromq.org/mailman/listinfo/zeromq-dev
 ___
 zeromq-dev mailing list
 zeromq-dev@lists.zeromq.org
 http://lists.zeromq.org/mailman/listinfo/zeromq-dev



 ___
 zeromq-dev mailing list
 zeromq-dev@lists.zeromq.org
 http://lists.zeromq.org/mailman/listinfo/zeromq-dev

___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev