Re: [zeromq-dev] BDFL team

2019-01-03 Thread Michel Pelletier
Thank you Doron and Luca! Wish I could make it for one of those beverages :) -Michel On Thu, Jan 3, 2019 at 8:23 AM Luca Boccassi wrote: > Thanks Doron! > > As my first act as part of the team, as Arnaud suggested, I'll buy a > round of beer/ at the pre-FOSDEM meeting in a month > :-) > > On T

Re: [zeromq-dev] On hooking memory allocations

2016-11-29 Thread Michel Pelletier
On Tue, Nov 29, 2016 at 12:17 AM, Auer, Jens wrote: > Hi, > > A memory-pool with fixed blocks for incoming messages is exactly what I > have in mind. E.g. in my application, I receive messages of ~1kb at a rate > of 1/s. Right now with ZeroMQ 4.1, this is done by receiving from the > socket i

Re: [zeromq-dev] Router/Dealer configuration monopolizes CPU while idle

2016-11-20 Thread Michel Pelletier
I just did a brief scan of your code, but it looks like your controller is using poll(0) in two places in a loop. poll(0) will return immediately and your code will busy loop around the 'while True' if idle. I think a better approach would be to register the router socket with the poller and use

Re: [zeromq-dev] Bye bye Pieter

2016-10-04 Thread Michel Pelletier
Safe travels Pieter, it was an honor to know you and learn from you! On Tue, Oct 4, 2016 at 9:47 AM, Godefroid Chapelle wrote: > > December 3, 1962 according Wikipedia > -- > Godefroid Chapelle aka __gotcha http://bubblenet.be > > Le 4 oct. 2016 à 18:13, Osiris Pedroso a écrit : > > Does anybod

Re: [zeromq-dev] Question about zero-copying, local and remote clients

2016-09-14 Thread Michel Pelletier
Another good read on the topic: https://web.archive.org/web/20120929202131/http://lwn.net/Articles/179492/ On Wed, Sep 14, 2016 at 1:22 PM, Michel Pelletier < pelletier.mic...@gmail.com> wrote: > > > On Tue, Sep 13, 2016 at 12:37 PM, Mateusz Jemielity < > m.jemiel...@i

Re: [zeromq-dev] Question about zero-copying, local and remote clients

2016-09-14 Thread Michel Pelletier
On Tue, Sep 13, 2016 at 12:37 PM, Mateusz Jemielity < m.jemiel...@is-wireless.com> wrote: > Hi, > > > > I have a question about 0MQ’s internal use of zero-copy. > > > > Does 0MQ somehow know that server and client 1 are on the same machine? If > it knew, then it could, for example, use shared me

Re: [zeromq-dev] nomenclature

2016-08-25 Thread Michel Pelletier
I prefer the term Flow Graph https://en.wikipedia.org/wiki/Flow_graph_(mathematics) It might not mathematically accurate but my feeling is most distributed systems like you're describing can be modeled with a flow graph. In the example you provided your scaling points would be coefficients and b

[zeromq-dev] archives for zeromq.org, zguide.zeromq.org and hintjens.com

2016-04-23 Thread Michel Pelletier
For insurance I've mirrored and uploaded snapshots of zeromq.org, zguide.zeromq.org and hintjens.com: http://zeromq-archive.s3-website-us-west-2.amazonaws.com/zeromq.org.tgz http://zeromq-archive.s3-website-us-west-2.amazonaws.com/zguide.zeromq.org.tgz http://zeromq-archive.s3-website-us-west-2.

Re: [zeromq-dev] BDFL literally

2016-04-19 Thread Michel Pelletier
Pieter, as always thanks for the decisive guidance. Doron, I haven't heard back from LF, if I do I'll ping you, but it might be wise to start a second line of inquiry with them. Thoughts? -Michel On Tue, Apr 19, 2016 at 11:16 AM, Pieter Hintjens wrote: > Friends, > > You know I've always stee

Re: [zeromq-dev] Role of iMatix in ZeroMQ community

2016-04-18 Thread Michel Pelletier
I sent them an email asking advice. If they don't call me crazy we'll see where it goes. On Mon, Apr 18, 2016 at 8:07 PM, Pieter Hintjens wrote: > I trust Eben's judgement 100% > On 19 Apr 2016 02:34, "Michel Pelletier" > wrote: > >> I love readin

Re: [zeromq-dev] Role of iMatix in ZeroMQ community

2016-04-18 Thread Michel Pelletier
I love reading Eben's work, thanks Stephen. Pieter, does this sounds like an option to pursue? On Mon, Apr 18, 2016 at 3:49 PM, Stephen Hemminger < step...@networkplumber.org> wrote: > On Mon, 18 Apr 2016 14:46:19 -0700 > Michel Pelletier wrote: > > > The Li

Re: [zeromq-dev] Role of iMatix in ZeroMQ community

2016-04-18 Thread Michel Pelletier
The Linux Foundation's CII looks appropriate: https://applications.coreinfrastructure.org/ I think it would be worth speaking with them before applying to see if they agree on the fit. Anyone have a better contact? At least on my end their contact page is just a link to the FAQ. On Mon, Apr 18

Re: [zeromq-dev] Role of iMatix in ZeroMQ community

2016-04-18 Thread Michel Pelletier
This is terrible news Pieter, there's no easy way to say that I hope you are comfortable and enjoying your time with friends and family. Would a 0MQ foundation make sense? Something that can accept charitable donations for the upkeep of things like domains and web resources. Unfortunately this re

Re: [zeromq-dev] State of libzmq versioning

2016-02-17 Thread Michel Pelletier
Read the docs is fantastic, I used it for pyczmq and it works great. Also it's not just software or a hosting service, the author (a local here in my neck of the woods) hosts "write the docs" conferences focusing on writing and producing good documentation: http://www.writethedocs.org/ All toget

Re: [zeromq-dev] malamute python2 bindings -- advice needed

2016-01-25 Thread Michel Pelletier
On Mon, Jan 25, 2016 at 6:47 AM, Aaron Sokoloski wrote: > Hi folks, > > > Maybe the right thing to do is to change zproject to also generate a CFFI > version of the python bindings. Then the malamute CFFI bindings could > interact with pyczmq easily. However, this is a bit more work so I wanted

Re: [zeromq-dev] Python bindings strings and bytes

2015-11-11 Thread Michel Pelletier
buffer would be great, both bytes and bytearray implement it. I think it can be used with mmap objects as well. +1 -Michel > > We could generate less cryptic exceptions indeed. > > Rg, > > Arnaud > > On 2015-11-11 17:42, Michel Pelletier wrote: > > My personal opinion is

Re: [zeromq-dev] Python bindings strings and bytes

2015-11-11 Thread Michel Pelletier
My personal opinion is that the API should use bytes, and only bytes, and never return or accept any unicode objects. It's a bit brutal but then at least the rules are simple. Pass unicode, get a clear exception. On Wed, Nov 11, 2015 at 3:43 AM, Arnaud Loonstra wrote: > This is a frequent issu

Re: [zeromq-dev] Deadlock with ctx_term

2015-11-06 Thread Michel Pelletier
On Fri, Nov 6, 2015 at 3:12 AM, Alexander Kampmann < s9alk...@stud.uni-saarland.de> wrote: > hey, > I am using ZeroMQ in Java with PUSH and PULL sockets. > > Basically everything is working as excepted, however, sometimes the call > to close() on the context deadlocks (jzmq makes that a term() cal

Re: [zeromq-dev] zproto python support?

2015-04-25 Thread Michel Pelletier
t; to get some examples of GSL generating python code and combine that > understanding with what you can learn from the other language ports of > zproto. > > Good luck on a python port of zproto - I think it would be great to bring > the vibrant python zmq community in on the zproto fun

Re: [zeromq-dev] Problem with lost clients

2015-04-23 Thread Michel Pelletier
; behavior that I missed? Should I assume that a message being dropped by the > ROUTER implies that all queued messages were already dropped? > > Regards. > > On Wed, Apr 22, 2015 at 1:10 PM, Michel Pelletier < > pelletier.mic...@gmail.com> wrote: > >> There&#

Re: [zeromq-dev] zproto python support?

2015-04-23 Thread Michel Pelletier
Generating pyzmq is one approach, another to consider is generating a python C wrapper around the zproto C generation with ctypes or cffi. That way it just becomes a thin layer on top of an already proven one. I've briefly looked at the latter but haven't had time to spike the idea out any furthe

Re: [zeromq-dev] Problem with lost clients

2015-04-22 Thread Michel Pelletier
There's good information in the guide about solving these kinds of problems. In particular: http://zguide.zeromq.org/hx:chapter7#State-Machines But read the whole chapter, it will explain credit based flow control and heartbeating as well. -Michel On Wed, Apr 22, 2015 at 8:01 AM, Diego Fons w

Re: [zeromq-dev] ZeroMQ and NORM

2015-03-11 Thread Michel Pelletier
I guess my approach doesn't help if you're looking to add special configure args like --with-norm, MinRK, do you know of a way to pass those args to the bundling configure call? A quick glance at setup.py didn't give me any good ideas. -Michel On Wed, Mar 11, 2015 at 10:40 AM, M

Re: [zeromq-dev] ZeroMQ and NORM

2015-03-11 Thread Michel Pelletier
I've found the best way to avoid these kind of problems (version mismatch with existing system libzmq) is to use a virtual environment and then do a bundled pyzmq build: $ virtualenv foo $ . foo/bin/activate (foo)$ pip install --install-option --zmq=bundled pyzmq (foo)$ python -c 'import

Re: [zeromq-dev] Firewall Tunneling

2015-02-27 Thread Michel Pelletier
It isn't conceptually different than trying to connect any tcp stream behind firewalls http://en.m.wikipedia.org/wiki/TCP_hole_punching On Feb 27, 2015 2:14 PM, "Kenneth Adam Miller" wrote: > So, as per the title, I have two regular machines working underneath > different firewalls, and I need t

Re: [zeromq-dev] Notes from a hackathon

2015-02-06 Thread Michel Pelletier
he fence in this case. Putting a mutex inside of the >>> libzmq socket, essentially doubles the overhead for no gain in useful >>> functionality and runs completely counter to one of C and C++'s overarching >>> principles: "don't pay for what you don't us

Re: [zeromq-dev] Notes from a hackathon

2015-02-04 Thread Michel Pelletier
a thread safe construct and the skill required of a programmer to use "unsafe" construct in a safe manner. I still think if the concrete problem is very short lived threads causing slow joiner problems, then the simple solution is pools (troupes of actors?). -Michel > > > >

Re: [zeromq-dev] Notes from a hackathon

2015-02-04 Thread Michel Pelletier
I think Brian has some good points here, there are numerous unrelated issues being discussed in this thread. A few points that I have: Multi part messages have also bothered me. However as a Python programmer i see Min's points about the expense of buffer creation. To my knowledge zproto does n

Re: [zeromq-dev] A design question

2014-12-18 Thread Michel Pelletier
Modern Linux doesn't actually map stack space into real memory unless the thread accesses the virtual memory addresses on demand. I presume it's the same for Windows. Garrett Smith pointed this out to me when I made the same claim at the Chicago meetup a couple years ago. -Michel On Thu, Dec 18

Re: [zeromq-dev] SOLUTION-- Encryption failure problem and wireless connectivity

2014-12-15 Thread Michel Pelletier
You'll likely see this behavior on any TCP stream over a high packet loss transport. At some point the retransmissions and re-retransmissions will bring the effective throughput to zero. -Michel On Mon, Dec 15, 2014 at 11:40 AM, Steve Murphy wrote: > > Pieter-- > > I'm sorry if I gave the wrong

Re: [zeromq-dev] ZeroMQ connctor for Tiny LISP environment

2014-10-01 Thread Michel Pelletier
Hi Jerome, Picolisp has an excellent FFI interface, so it's straightforward to call zmq/czmq functions from it. I wrote a simple binding for Picolisp you can find here: https://github.com/michelp/0pl -Michel On Wed, Oct 1, 2014 at 8:37 AM, jerome moliere wrote: > Hi all ZeroMQ afficionados,

Re: [zeromq-dev] ARM cross compiled ZeroMQ zstr_rcv() gives segmentation fault

2014-09-29 Thread Michel Pelletier
On Mon, Sep 29, 2014 at 6:41 AM, Ranganath Gunawardane wrote: > Indeed. Again, thanks for the prompt response. I actually posted this > question (with a minimal code sample) earlier today in SO but there weren't > a lot of activity so headed over here. Couldn't figure out how to post the > code he

Re: [zeromq-dev] ELI5: Why can't I get the IP address of the machine that sent a message?

2014-09-24 Thread Michel Pelletier
IP addresses are easily spoofed, they should not be used as a security mechanism. If you want security, you have to either trust all your networks or use curvemq security or some other authentication mechanism like a vpn. 0mq doesn't expose the IP because this is an implementation detail of the t

Re: [zeromq-dev] Scaling ZeroMQ

2014-09-11 Thread Michel Pelletier
On Thu, Sep 11, 2014 at 2:23 PM, Mohit Anchlia wrote: > > 4) process request - Now this is the place I think application is performing > some work. This step looks like it's blocking, in other words the control > will not get transferred to step 2) until this step is done. Now are all the > reques

Re: [zeromq-dev] Concurrent send/receive with a ROUTER socket - efficient and idiomatic solution

2014-08-31 Thread Michel Pelletier
On Sun, Aug 31, 2014 at 1:56 AM, Eyal Arubas wrote: > Thanks Sean. > Having the send and receive operations in the same thread indeed avoids the > concurrency issue, but still we are left with polling the socket every few > milliseconds. > I think it's pretty much equivalent to using threads + mut

Re: [zeromq-dev] zyre chat example

2014-08-28 Thread Michel Pelletier
On Thu, Aug 28, 2014 at 7:54 AM, Chad Koski wrote: > Hi All, > > I’ve rewritten the zyre chat example to use a zactor instead of zthread. > Why? The chat program isn't working as-is (at least not for me). When I > started digging in, I saw the comments in zactor.c indicating that this class

Re: [zeromq-dev] zeromq, abort(), and high reliability environments

2014-08-12 Thread Michel Pelletier
On Tue, Aug 12, 2014 at 2:42 PM, Michi Henning wrote: > > That seems a bit too simplistic to me. It's possible for an application to > have some code path that is tickled only under highly unusual circumstances > then causing invalid arguments to passed, even though the application is > otherwi

Re: [zeromq-dev] Advice on server sync architecture

2014-08-12 Thread Michel Pelletier
Check out the 0mq guide. It contains a number of useful patterns. It sounds like what you want is called the clone pattern. -Michel On Tue, Aug 12, 2014 at 1:45 AM, Gerry Weaver wrote: > Hello All, > > > > Well… I guess it’s time to call it a night. The information provided about > the require

Re: [zeromq-dev] zeromq, abort(), and high reliability environments

2014-08-11 Thread Michel Pelletier
On Mon, Aug 11, 2014 at 5:15 PM, Dylan Cali wrote: >> Must not throw an assertion there. An exception in the highlevel >> bindings (if the language has any) could be ok. That's a matter of >> taste and language style. > > The problem with assertions/aborts from a user's perspective is that > they

Re: [zeromq-dev] zmq::ctx_t::terminate hang

2014-08-08 Thread Michel Pelletier
Check out the ZMQ_LINGER option: http://api.zeromq.org/4-0:zmq-setsockopt More information is also in the guide. -Michel On Fri, Aug 8, 2014 at 12:56 AM, wrote: > hi all > > zmq I used is zeromq-4.0.4.tar.gz > > I met a problem. I have a server and client. > > After close server I still u

Re: [zeromq-dev] Client broken but the tcp connection still ESTABLISHED

2014-07-31 Thread Michel Pelletier
The connection is still established because that's the state the connection was in when you terminated the client abruptly by powering it off, how is the server supposed to know it went away? There are several answers on stackoverflow that explain this. I would also suggest reading "Internetworki

Re: [zeromq-dev] Edge-triggered polling vs Level-triggered. Which one ZMQ is using? Why?

2014-07-30 Thread Michel Pelletier
On Mon, Jul 21, 2014 at 11:23 AM, Goswin von Brederlow wrote: > On Mon, Jul 14, 2014 at 08:42:14AM -0700, Michel Pelletier wrote: > > I think it is a big issue. > > On read a level trigger is better because when you didn't consume all > input then the next zmq_poll() sho

Re: [zeromq-dev] Note on help in IRC [constructive criticism, I hope]

2014-07-24 Thread Michel Pelletier
Ah, those days do get short don't they. I am not the person Jonas interacted with in the IRC channel, but I did see it go by. I would like to take this opportunity to point out that that you are a very helpful member of the community who I have witnessed help many people solve their problems, and

Re: [zeromq-dev] Edge-triggered polling vs Level-triggered. Which one ZMQ is using? Why?

2014-07-14 Thread Michel Pelletier
There are some discussions here: http://lwn.net/Articles/25137/ http://www.kegel.com/c10k.html A quick scan of nanomsg source indicates it can use epoll, kqueue, or poll. The first two are edge-triggered and the third is level-triggered. nanomsg appears in the first two cases to keep an intern

Re: [zeromq-dev] Paranoid Pirate Troubles

2014-06-26 Thread Michel Pelletier
Do you have a firewall running? Can you connect to your service from any process? (telnet, netcat, etc...) On Thu, Jun 26, 2014 at 10:40 AM, Riskybiz wrote: > I’m using Visual Studio Express 2012 to build the Paranoid Pirate Pattern > examples in Visual C++ on Windows. > > > > > http://zguide

Re: [zeromq-dev] need to lower memory usage

2014-06-23 Thread Michel Pelletier
ctx_underlying() won't be useful. > > > murf > > > > On Mon, Jun 23, 2014 at 9:41 PM, Steve Murphy wrote: > >> Thanks, Michel-- >> >> missed that function in the zctx set! >> Many thanks! >> >> murf >> >> >> >> On

Re: [zeromq-dev] need to lower memory usage

2014-06-23 Thread Michel Pelletier
You can use zctx_underlying to get the low level context object. Here is an example using pyczmq: >>> from pyczmq import zctx, zsocket, zmq >>> s = zctx.new() >>> zctx.underlying(s) # None until a socket is made >>> p = zsocket.new(s, zmq.PUSH) >>> zmq.ctx_set(zctx.underlying(s), zmq.MAX_SOCKETS

Re: [zeromq-dev] zsock test hangs in pyczmq

2014-06-13 Thread Michel Pelletier
On Fri, Jun 13, 2014 at 11:08 AM, Pieter Hintjens wrote: > On Fri, Jun 13, 2014 at 7:55 PM, Michel Pelletier > wrote: > > > Some gdb adventures shows I was calling zsock_new with filename and > line_nbr > > args defaulting to NULL and 0 out of sheer laziness. >

Re: [zeromq-dev] zsock test hangs in pyczmq

2014-06-13 Thread Michel Pelletier
Some gdb adventures shows I was calling zsock_new with filename and line_nbr args defaulting to NULL and 0 out of sheer laziness. When I set them (to anything) the program exits normally. I can easily get the file and line nbr of the Python caller so I'll just shove those in there. Should have t

[zeromq-dev] zsock test hangs in pyczmq

2014-06-12 Thread Michel Pelletier
I'm working on adding zsock and zactor support to pyczmq, and I have most of the work done, but my test for zsock is hanging. The test runs and works, zsock_destroy is called correctly (not that it would matter the default linger is 0) but the process never exits. gdb says it hanging on poll in z

Re: [zeromq-dev] How to view current SUBs and their filters from PUB side?

2014-06-11 Thread Michel Pelletier
' address > info(IP + TCP port). Is that possible? > Regards, > Zhichang > > > 2014-06-12 9:40 GMT+08:00 Michel Pelletier : > > Subscriptions are received in the form of incoming messages you get by >> calling recv on the xpub socket. >> >> http://api.z

Re: [zeromq-dev] How to view current SUBs and their filters from PUB side?

2014-06-11 Thread Michel Pelletier
Subscriptions are received in the form of incoming messages you get by calling recv on the xpub socket. http://api.zeromq.org/3-2:zmq-socket "Same as ZMQ_PUB except that you can receive subscriptions from the peers in form of incoming messages. Subscription message is a byte 1 (for subscriptions)

Re: [zeromq-dev] Gossip discovery in CZMQ

2014-06-02 Thread Michel Pelletier
This would be cool, and be quite useful for your distributed pipes idea. -Michel On Mon, Jun 2, 2014 at 3:48 AM, Pieter Hintjens wrote: > Yes, something like that. Right now we're using beaconing for > discovery on local networks. This is simple but doesn't scale very > well. So my idea is to

Re: [zeromq-dev] Welcome to the "zeromq-dev" mailing list

2014-06-02 Thread Michel Pelletier
On Mon, Jun 2, 2014 at 5:59 AM, Jeremy Richemont wrote: > Hi Tim. I agree, a message can only be deemed to have been 'sent' if an > acknowledgement for it is received. As soon as no ack is received the > server must start backing up messages - but only for that client. It's > perfectly possible t

Re: [zeromq-dev] Welcome to the "zeromq-dev" mailing list

2014-05-30 Thread Michel Pelletier
On Fri, May 30, 2014 at 7:21 AM, Jeremy Richemont wrote: > > If I could just query PUB and get a list of clients plus a notification > when one drops that'd solve the problem I think. But how to do that? > > "when one drops" is a difficult concept to define. The only way to know that your messag

Re: [zeromq-dev] ZMQ 2.2.1 / JNI / High water mark does have no effect

2014-05-02 Thread Michel Pelletier
ed thru the > libzmq code, to see if there was any way to > monitor the "fullness" of the buffer... > and didn't find anything. Am I missing > anything? It might be nice to see how many > items are buffered, how many have been tossed, > stuff like that...? >

Re: [zeromq-dev] ZMQ 2.2.1 / JNI / High water mark does have no effect

2014-05-01 Thread Michel Pelletier
Your using a pretty old version of zeromq. This is likely a problem that has been fixed in future versions. I rewrote your example in Python with the latest pzmq and zeromq 4.1.0, and send blocked unless I passed zmq.NOBLOCK, as expected. https://gist.github.com/michelp/bc20aadc554c6331608f -Mi

Re: [zeromq-dev] Reply-Request Pattern: Accessing a specific server method with a client request message?

2014-04-28 Thread Michel Pelletier
0mq only works with messages. If you want to messages to indicate functions to be called or arguments to be passed, you have to do that work yourself. 0mq doesn't know what a Python function is, or how to serialize a list of arguments. Thankfully it is relatively straightforward in Python and in

Re: [zeromq-dev] Distributed pipes

2014-04-24 Thread Michel Pelletier
On Thu, Apr 24, 2014 at 1:40 PM, Pieter Hintjens wrote: > On Thu, Apr 24, 2014 at 10:32 PM, Michel Pelletier > wrote: > > I haven't used it, but ZeroVM looks pretty cool, process containers in > > general are getting a lot of press lately. I can see how a distributed

Re: [zeromq-dev] Distributed pipes

2014-04-24 Thread Michel Pelletier
:10 PM, Pieter Hintjens wrote: > Yes, it's a nice Unixy distribution pattern. The pull is coming from > ZeroVM (no relation) which Rackspace is putting a lot of work into. > Their VMs interconnect over pipes, so distributed pipes will let them > create VM clusters. > >

Re: [zeromq-dev] Distributed pipes

2014-04-24 Thread Michel Pelletier
Distributed pipes are an interesting idea. I started work on something similar, but from the other direction, wrapping processes and capturing or teeing their stdin/out and other metadata (memory, cpu usage) and sending that up to a central broker. This 'nerve' process wrapper mimics the Python P

Re: [zeromq-dev] Strange problem with Openpgm. Help us!

2014-04-18 Thread Michel Pelletier
I'm afraid I can't help you with you specific pgm problem, but if you don't mind me playing devil's advocate for a second, it seems like you're doing a lot of engineering work to distribute a file to 20 servers. Have you considered using an existing multicast tool like uftp or udpcast to distribut

Re: [zeromq-dev] zmq with ssh

2014-02-14 Thread Michel Pelletier
You would need to use a java ssh client, like jsch, here's a blog post in tunneling similar to the paramiko example benjamin posted: http://www.beanizer.org/site/index.php/en/Articles/Java-ssh-tunneling-with-jsch.html -Michel On Fri, Feb 14, 2014 at 8:34 AM, artemv zmq wrote: > hi benjamin, >

Re: [zeromq-dev] Handling high socket or connection counts

2014-02-06 Thread Michel Pelletier
I was wrong by a similar order of magnitude, it's per port per client. http://stackoverflow.com/questions/2332741/what-is-the-theoretical-maximum-number-of-open-tcp-connections-that-a-modern-lin It's basically unlimited. -Michel On Thu, Feb 6, 2014 at 9:41 AM, Michel Pelletier wr

Re: [zeromq-dev] Handling high socket or connection counts

2014-02-06 Thread Michel Pelletier
On Thu, Feb 6, 2014 at 7:09 AM, Goswin von Brederlow wrote: > On Thu, Feb 06, 2014 at 01:38:48PM +0100, Olaf Mandel wrote: > > Hello, > > > > But what if you don't use threads? Then inproc won't work. But also > you don't have a limit of 1024 sockets. Only 1024 file descriptors per > executable.

Re: [zeromq-dev] zmq memory useage issue

2014-02-04 Thread Michel Pelletier
It's not a bug. Redhat 6 comes with a new version of glibc that does per-thread memory arena allocation. Each thread's pre-allocated heap is aligned to 64MB. -Michel On Mon, Feb 3, 2014 at 6:24 AM, jin.wu wrote: > Hi, all > > I meet a big issue when use zmq at RHEL 6.4, 64bits, it occupies t

Re: [zeromq-dev] Using pyczmq for zcert/zauth only

2014-02-03 Thread Michel Pelletier
On Mon, Feb 3, 2014 at 9:30 AM, Greg Ward wrote: > Hi all -- > > But that doesn't work: > > $ cat shadow-ctx.py > import zmq > from pyczmq import zctx > > ctx1 = zmq.Context() > ctx2 = zctx.shadow_zmq_ctx(ctx1) > > > Arghghh. Impedance mismatch. Any idea how to make that wrapper work? > Hmm, I t

Re: [zeromq-dev] Oops! I broke pyczmq

2014-02-03 Thread Michel Pelletier
I have a branch which reverts your import changes and switches to cffi.verify(), which speeds up the import time significantly. -Michel On Mon, Feb 3, 2014 at 7:42 AM, Greg Ward wrote: > Oops: I submitted a pull request to pyczmq last week which broke > isolated imports. Example: > > $ pytho

Re: [zeromq-dev] Custom refactoring of ZeroMQ to work with pintools...

2014-01-24 Thread Michel Pelletier
We as a community have probably provided the most that can be reasonable expected. You're working with a new, apparently closed source library that few of us, or perhaps none at all, have heard of. If it's not possible to provide us with an isolated test case then there's likely little we can do

Re: [zeromq-dev] Problems with pyczmq.zstr (was Re: pyczmq and ctx.set_linger())

2014-01-18 Thread Michel Pelletier
News On Jan 17, 2014 11:34 PM, "Pieter Hintjens" wrote: > > Yes, I thought it was cool to make a few of the string functions, like > zstr_send, accept printf formats. I've also been bitten more than once > by that. > > Perhaps we can consider this API style to be broken, and dangerous, > and remov

Re: [zeromq-dev] Problems with pyczmq.zstr (was Re: pyczmq and ctx.set_linger())

2014-01-17 Thread Michel Pelletier
Ugh, gmail screwed up my paste: https://gist.github.com/michelp/8482432 -Michel On Fri, Jan 17, 2014 at 1:51 PM, Michel Pelletier < pelletier.mic...@gmail.com> wrote: > It wasn't the recv that was truncating the string, it was the send. > > For string that contain null c

Re: [zeromq-dev] Problems with pyczmq.zstr (was Re: pyczmq and ctx.set_linger())

2014-01-17 Thread Michel Pelletier
ata) zframe.send(out_frame, req, 0) in_frame = zframe.recv(rep) in_data = bytearray(zframe.data(in_frame)) assert in_data == out_data, "expected %r, got %r" % (out_data, in_data) On Fri, Jan 17, 2014 at 1:20 PM, Michel Pelletier < pelletier.mic...@gmail.com> wrote: > Ah yo

Re: [zeromq-dev] Problems with pyczmq.zstr (was Re: pyczmq and ctx.set_linger())

2014-01-17 Thread Michel Pelletier
ed string, I'll have to think about that one. I'm open to suggestions. -Michel On Fri, Jan 17, 2014 at 12:55 PM, Greg Ward wrote: > On 17 January 2014, Michel Pelletier said: > > zstr however is how you turn messages into strings. It is not an > > implementation

Re: [zeromq-dev] pyczmq and ctx.set_linger()

2014-01-17 Thread Michel Pelletier
On Fri, Jan 17, 2014 at 12:13 PM, Greg Ward wrote: > On 17 January 2014, MinRK said: > > > Would it make sense for pyzmq to wrap CZMQ as well? > > > > I don't think it would. Most of the things czmq adds to libzmq are more > > logically reimplemented in Python, rather than exposed by linking > an

Re: [zeromq-dev] pyczmq import overhead

2014-01-17 Thread Michel Pelletier
On Fri, Jan 17, 2014 at 8:06 AM, MinRK wrote: > > > If you use cffi.verify, you can also do the compilation at build time, as > recommended > by > cffi. > PyZMQ does > this

Re: [zeromq-dev] pyczmq and ctx.set_linger()

2014-01-17 Thread Michel Pelletier
On Fri, Jan 17, 2014 at 8:49 AM, MinRK wrote: > > > > I think making sure the low-level pointers are available in such a way > that you can comfortably pass the zmq sockets and contexts in between the > two libraries would be useful, and should be fairly easy. > pyczmq exposes both zctx_shadow_z

Re: [zeromq-dev] pyczmq and ctx.set_linger()

2014-01-17 Thread Michel Pelletier
On Fri, Jan 17, 2014 at 12:32 AM, Pieter Hintjens wrote: > On Thu, Jan 16, 2014 at 9:01 PM, Michel Pelletier > wrote: > > > Yes, pyczmq is very much a literal 1 to 1 wrapper around the czmq C > > interface. > > > > Note that there is also an "object oriente

Re: [zeromq-dev] pyczmq and ctx.set_linger()

2014-01-17 Thread Michel Pelletier
On Fri, Jan 17, 2014 at 6:34 AM, Greg Ward wrote: > On 17 January 2014, Pieter Hintjens said: > > On Thu, Jan 16, 2014 at 9:01 PM, Michel Pelletier > > wrote: > > > > > Yes, pyczmq is very much a literal 1 to 1 wrapper around the czmq C > > > interface.

Re: [zeromq-dev] pyczmq import overhead

2014-01-16 Thread Michel Pelletier
Hmm, I don't have any strong feelings either way. All python imports seems slow to me on almost all useful libraries, I use a lot of numpy, scipy, pandas, and scikit-learn for my job and I'm used to multi-second startup times. Even ipython takes a second or two on my new macbook. For long runnin

Re: [zeromq-dev] pyczmq and ctx.set_linger()

2014-01-16 Thread Michel Pelletier
Yes, pyczmq is very much a literal 1 to 1 wrapper around the czmq C interface. Note that there is also an "object oriented" interface: from pyczmq import Context c = Context() c.set_linger(1000) -Michel On Thu, Jan 16, 2014 at 9:43 AM, Greg Ward wrote: > On 16 January 2014, I said: > > afte

Re: [zeromq-dev] CZMQ language bindings

2014-01-15 Thread Michel Pelletier
This is the link I meant: http://www.erlang-factory.com/conference/show/conference-6/home/#garret-smith On Wed, Jan 15, 2014 at 3:13 PM, Michel Pelletier < pelletier.mic...@gmail.com> wrote: > This has gotta be confusing the hell out of a lot of people: > > http://www.erl

Re: [zeromq-dev] CZMQ language bindings

2014-01-15 Thread Michel Pelletier
This has gotta be confusing the hell out of a lot of people: http://www.erlang-factory.com/conference/show/conference-6/home/ Reminds me years ago I worked at this place and they hired a guy named Michael Pelletier. One letter makes all the difference. -Michel __

Re: [zeromq-dev] CZMQ language bindings

2014-01-15 Thread Michel Pelletier
Good I was hoping it wasn't this: http://www.erlang-factory.com/conference/show/conference-6/home/ $1100! -Michel On Wed, Jan 15, 2014 at 2:51 PM, Garrett Smith wrote: > Site's not live yet -- I'll post as soon as it's finalized. > > On Wed, Jan 15, 2014

Re: [zeromq-dev] CZMQ language bindings

2014-01-15 Thread Michel Pelletier
Gotta link? On Wed, Jan 15, 2014 at 1:57 PM, Garrett Smith wrote: > Rock on! > > CZMQ is going to get some love at the San Fran Erlang conference in March. > > On Wed, Jan 15, 2014 at 3:21 PM, Pieter Hintjens wrote: > > Oh, forgot two more: > > > > * https://github.com/nddrylliog/ooczmq - ooc

Re: [zeromq-dev] CZMQ language bindings

2014-01-15 Thread Michel Pelletier
There is a Python cffi wrapper (I hesitate to call it a binding): https://github.com/zeromq/pyczmq I don't know of any others. What language are you looking for? -Michel On Wed, Jan 15, 2014 at 11:17 AM, Garrett Smith wrote: > I'm looking for a list of language bindings that integrate the C

Re: [zeromq-dev] gist: using signalfd with zloop - synchronous signal delivery

2014-01-14 Thread Michel Pelletier
Awesome! On Tue, Jan 14, 2014 at 1:32 PM, Michael Haberler wrote: > since it's a bit tricky (or rather I didnt get it right first time..): > > here is an example for using signalfd(2) for synchronous signal delivery > in a zloop reactor > > the key steps are: > - disable czmq signal handling by

Re: [zeromq-dev] zmq_poll() error

2014-01-06 Thread Michel Pelletier
As the docs say: http://api.zeromq.org/4-1:zmq-poll "EINTR The operation was interrupted by delivery of a signal before any events were available." I assume if you want to ignore the signal then just looping back over zmq_poll() again would be fine. You could also set a signal mask to ignore wh

Re: [zeromq-dev] Google Summer of Code 2014

2013-12-30 Thread Michel Pelletier
I have to agree with Pieter. GSOC is a recriting tool for google. They are paying students a pittence to see who among the hoard of respondents rises above the rest so they can court the tiny fraction of those with merit before any other companies. They offload the cost of vetting those candidat

Re: [zeromq-dev] Poll on sockets OR child process

2013-12-23 Thread Michel Pelletier
> btw this Python wrapping works fine for me doing beacon unicast > reception/sending for DHCP-style discovery: > https://github.com/mhaberler/pyczmq/commits/zbeacon-unicast > > I forgot to mention, this PR is against my personal pyczmq repo, can you rebase it against the zeromq/pyczmq repo? I'll

Re: [zeromq-dev] Poll on sockets OR child process

2013-12-23 Thread Michel Pelletier
On Mon, Dec 23, 2013 at 1:05 AM, Michael Haberler wrote: > > Am 22.12.2013 um 20:33 schrieb Michel Pelletier < > pelletier.mic...@gmail.com>: > > > On Sun, Dec 22, 2013 at 12:25 AM, Michael Haberler > wrote: > > Michel, > > > > > &

Re: [zeromq-dev] Poll on sockets OR child process

2013-12-22 Thread Michel Pelletier
On Sun, Dec 22, 2013 at 12:25 AM, Michael Haberler wrote: > Michel, > > > Am 22.12.2013 um 02:58 schrieb Michel Pelletier < > pelletier.mic...@gmail.com>: > > > On Fri, Dec 20, 2013 at 1:06 AM, Michael Haberler > wrote: > > > > Am 20.12.2013 um 00:56

Re: [zeromq-dev] Poll on sockets OR child process

2013-12-21 Thread Michel Pelletier
On Fri, Dec 20, 2013 at 1:06 AM, Michael Haberler wrote: > > Am 20.12.2013 um 00:56 schrieb Michel Pelletier < > pelletier.mic...@gmail.com>: > > > So in (pyczmq) code I was thinking something like: > > > > > > @zloop.signal_callba

Re: [zeromq-dev] Poll on sockets OR child process

2013-12-19 Thread Michel Pelletier
So in (pyczmq) code I was thinking something like: @zloop.signal_callback def on_signal_event(loop, item, arg): ... loop = zloop.new() zloop.signal(loop, signal.SIGHUP, on_signal_event) -Michel On Thu, Dec 19, 2013 at 3:51 PM, Michel Pelletier < pelletier.mic...@gmail.com> wrote:

Re: [zeromq-dev] Poll on sockets OR child process

2013-12-19 Thread Michel Pelletier
ass, zproc or > somesuch; the cleanest way IMO to report events from child processes > is via ZeroMQ messages in any case. We do this in other classes which > use a message-based API. > > On Thu, Dec 19, 2013 at 10:18 PM, Michel Pelletier > wrote: > > It seems like this is something

Re: [zeromq-dev] Poll on sockets OR child process

2013-12-19 Thread Michel Pelletier
It seems like this is something that could be appropriately added to zloop? A signal registration function that internally added a signalfd an called a handler. -Michel On Thu, Dec 19, 2013 at 12:36 PM, Pieter Hintjens wrote: > Hi Greg, > > This is nice stuff. Process management is one of the

Re: [zeromq-dev] Does ZMQ handle tcp-RST?

2013-12-19 Thread Michel Pelletier
If you and your architects believe there is a better solution to the problem and that 0mq is doing it wrong, then by all means, don't use it. Create your own solution and do it right. I encourage you to open source your solution and build a community around it. You could fork 0mq and go from ther

Re: [zeromq-dev] What exact networking problems ZMQ does solve?

2013-12-10 Thread Michel Pelletier
The guide covers many, many use cases: http://zguide.zeromq.org/ -Michel On Tue, Dec 10, 2013 at 7:59 AM, artemv zmq wrote: > Hi community, > > Can you please itemize what exact networking issues ZMQ does solve? > I have count 1 -- reconnection. Ok. But can you please provide more? > > > BR >

Re: [zeromq-dev] merge commits in libzmq clutter the commit space.

2013-12-06 Thread Michel Pelletier
commits they don't want to be merged into master and the merger's responsibility to kick it back with feedback if it doesn't conform to policy. -Michel On Fri, Dec 6, 2013 at 7:44 AM, AJ Lewis wrote: > On Fri, Dec 06, 2013 at 07:41:52AM -0800, Michel Pelletier wrote: > > Fea

Re: [zeromq-dev] merge commits in libzmq clutter the commit space.

2013-12-06 Thread Michel Pelletier
Feature developers should be responsible for squashing their commits before submitting the PR. It's a simple git rebase command. -Michel On Fri, Dec 6, 2013 at 5:08 AM, Pieter Hintjens wrote: > As far as I know, it's unavoidable when we use pull requests. > > On Fri, Dec 6, 2013 at 7:54 AM, c

Re: [zeromq-dev] Hi All

2013-12-02 Thread Michel Pelletier
The two cases you are comparing are not equivalent. The socket example simple streams data from one process to another, but REQ/REP are synchronous, you are issuing a "fetch" request and waiting for the reply. That round trip takes time that your socket example does not replicate. Read the guid

  1   2   3   >