Re: [zeromq-dev] [PATCH] libzmq - includedir and broken VPATH builds

2011-11-15 Thread Martin Sustrik
Hi Phil, >> 2. What's the rationale for moving the header? I prefer writing #include >> to #include personally. > > The primary rational is to provide a dedicated location in which developers > can inspect the headers and view the api. One of the first things I do when > working with libraries

Re: [zeromq-dev] need help writing a test for zmq_poll

2011-11-15 Thread Martin Sustrik
Hi Chuck, > How would you suggest structuring the test so that for each legal > socket pair (REQ/REP, XREQ/REP, PUB/SUB, etc) we can verify that > zmq_poll returns immediately when there is a read or write event > waiting on the socket? I would say, write a single function that takes two sockets,

Re: [zeromq-dev] need help writing a test for zmq_poll

2011-11-15 Thread Martin Sustrik
On 11/15/2011 09:09 AM, Martin Sustrik wrote: > I would say, write a single function that takes two sockets, sends a > message to one, polls on the other with long timeout (24 hrs or such) > and recvs a message from it. In other words if the behaviour you > describe happens, the test will hang up

Re: [zeromq-dev] Another question on HWM

2011-11-15 Thread Martin Sustrik
On 11/14/2011 04:38 PM, Emmanuel TAUREL wrote: > I am using the PUB/SUB pattern > I have a HWM set on the PUB side but none on the SUB side. The SUB is > very slow to read messages. > > When I look at the network exchange with wireshark, I notice that the > PUB drops messages due to the HWM. > But

Re: [zeromq-dev] Socket type checking

2011-11-15 Thread Martin Sustrik
On 11/13/2011 09:28 PM, Paul Colomiets wrote: >> Anyone any ideas about how to do this in a backward compatible way btw? >> > Sure, introduce another message flag. Messages that contain it can be > sent at any time, and checked against topology id set as socket > option, each time such message com

Re: [zeromq-dev] Two small mistakes in zeromq-3.0.2

2011-11-15 Thread Luca Fascione
Cool, thanks! Luca On 15/11/11 8:43 PM, Martin Sustrik wrote: > Hi Luca, > >> While building zeromq I noticed two lines that could use improvement: >> >> At src/socket_base.cpp:237 >> replace >> generate_uuid ((unsigned char*) identity.data () + 1); >> with >> generate_uuid (co

Re: [zeromq-dev] Another question on HWM

2011-11-15 Thread Emmanuel TAUREL
Hello, I am sorry to continue this thread but there is definitively something that I do not understand. My PUB socket has a HWM set to 10. On the host where the PUB process is running, I also have wireshark to analyse network traffic on eth0 (it's a Linux box). I have only one SUB running on ano

Re: [zeromq-dev] [PATCH] libzmq - includedir and broken VPATH builds

2011-11-15 Thread Luca Fascione
Hello, I thought I'd leave a thought on this thread. We very much appreciate libraries that keep their headers segregated, even if they come with clean names. All our internal stuff is also segregated in such a manner. It helps in a number of small practical ways, for example to find project de

Re: [zeromq-dev] [PATCH] libzmq - includedir and broken VPATH builds

2011-11-15 Thread Mikko Koppanen
On Tue, Nov 15, 2011 at 9:56 AM, Luca Fascione wrote: > Also, note that if you have a header a.h inside zmq/ you can slightly > alter the CPPFLAGS and the files that say #include still work > fine, whereas the opposite is quite a bit harder :-) Hi, while moving the headers into their own sub-di

Re: [zeromq-dev] [PATCH] libzmq - includedir and broken VPATH builds

2011-11-15 Thread Luca Fascione
Yes. I am receptive to this point, actually. OpenEXR originally had the same arrangement, for example. In saying this, I do believe they're moving their header into a directory as part of the transition to version 2.0. Maybe this change in the layout could similarly be part of the 3.x or 4.x se

Re: [zeromq-dev] Two small mistakes in zeromq-3.0.2

2011-11-15 Thread Pieter Hintjens
On Tue, Nov 15, 2011 at 1:43 AM, Martin Sustrik wrote: >> While building zeromq I noticed two lines that could use improvement: >> At src/socket_base.cpp:237 > In any case, this code does not exist any more in the development trunk > (3.1) so it's up to Pieter (maintainer of 3.0) to decide whethe

[zeromq-dev] windows service crash memory dump analysis

2011-11-15 Thread Igor Anić
I'm using zeromq in a long running windows service and experience crash every few days. Analyzing memory dump shows that the problem is in zeromq. Service is simple publisher, and has few subscribers 2-5. Messages are sent every second or so. Messages are multipart, subject and body style. .Net co

Re: [zeromq-dev] windows service crash memory dump analysis

2011-11-15 Thread Martin Sustrik
Hi Igor, > `03d5c320 "Assertion failed: Bad address (." > `03d5c340 ".\..\..\src\tcp_socket.cpp:93)." There's some deeper bug causing this. WSAEFAULT means that the buffer supplied to send() function is not within the valid address space. Any chance of reproducing the problem?

Re: [zeromq-dev] Mission accomplished

2011-11-15 Thread Martin Lucina
sust...@250bpm.com said: > http://www.250bpm.com/blog:1 Martin, this is great! And it brings back memories. Baroque cellar indeed :-) Finally, we have a narrative of the last 5 years. Here's to the next 5 years and a big thank you to everyone involved. -mato

[zeromq-dev] [PATCH] Bug in XREP and XREQ fixed (issue 280)

2011-11-15 Thread Martin Sustrik
>From 5a6503e5c275c544e1447401e17a4746985614ea Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Tue, 15 Nov 2011 13:56:59 +0100 Subject: [PATCH] Bug in XREP and XREQ fixed (issue 280) Signed-off-by: Martin Sustrik --- src/xrep.cpp |2 +- src/xreq.cpp |2 +- 2 files changed, 2 insert

Re: [zeromq-dev] windows service crash memory dump analysis

2011-11-15 Thread Igor Anić
I'll try. Of course this is happening in production, and after many hours of working normally, but I'll try... I notice one more thing. Maybe connected with this maybe not. We are sending multipart messages. First part is the type of the message and the second is actual message body. Sometimes sub

Re: [zeromq-dev] need help writing a test for zmq_poll

2011-11-15 Thread Chuck Remes
On Nov 15, 2011, at 2:12 AM, Martin Sustrik wrote: > On 11/15/2011 09:09 AM, Martin Sustrik wrote: > >> I would say, write a single function that takes two sockets, sends a >> message to one, polls on the other with long timeout (24 hrs or such) >> and recvs a message from it. In other words if

[zeromq-dev] LIBZMQ-270 status?

2011-11-15 Thread Chuck Remes
https://zeromq.jira.com/browse/LIBZMQ-270 is a critical bug for 3.1 adoption. Any deployment that has a FORWARDER device won't work properly because the first published message will be silently dropped. This could lead to data loss or corruption if the application isn't checking to make sure it

Re: [zeromq-dev] [PATCH] libzmq - includedir and broken VPATH builds

2011-11-15 Thread Pieter Hintjens
On Tue, Nov 15, 2011 at 4:27 AM, Mikko Koppanen wrote: > While this change is easy to implement for experienced C and C++ > developers we do have large amount of user's that struggle compiling > the guide examples. This is also my opinion. It should be as simple as possible for beginners. Experi

[zeromq-dev] Building czmq on Windows

2011-11-15 Thread AJ Lewis
Just wanting to check if anyone's built czmq on Windows lately. I've hit a few errors and several warnings, and it appears that it doesn't export anything when built as a DLL on windows either. Has anyone made that work, or do I need to put time into it? Also, are the sln and vcproj files in the

Re: [zeromq-dev] Socket type checking

2011-11-15 Thread Paul Colomiets
Hi Martin, On Tue, Nov 15, 2011 at 11:19 AM, Martin Sustrik wrote: > On 11/13/2011 09:28 PM, Paul Colomiets wrote: > >>> Anyone any ideas about how to do this in a backward compatible way btw? >>> >> Sure, introduce another message flag. Messages that contain it can be >> sent at any time, and ch

[zeromq-dev] CZMQ - zclock_time() - using wall-clock time?!

2011-11-15 Thread Alexander Altshuler
Hi Current implementation of zclock_time() uses wall-clock time. The main problem with wall-clock time is - it is not monotonic and may shift back and forward because of NTP or changed by user. Here is good article about: tdistler.com/2010/06/27/high-performance-timing-on-linux-windows Alexande

[zeromq-dev] protocol design question

2011-11-15 Thread Chuck Remes
I am working on a protocol for submission to the rfc.zeromq.com site. For one of the fields (message frames) I need to define a unique sequence number. I decided upon a combination of a 64-bit integer and a 16-byte UUID. The UUID would uniquely identify each client. The sequence number would un

Re: [zeromq-dev] LIBZMQ-270 status?

2011-11-15 Thread MinRK
On Tue, Nov 15, 2011 at 09:07, Chuck Remes wrote: > https://zeromq.jira.com/browse/LIBZMQ-270 is a critical bug for 3.1 > adoption. Any deployment that has a FORWARDER device won't work properly > because the first published message will be silently dropped. This could > lead to data loss or corr

[zeromq-dev] [PATCH] libzmq: Fix-broken-VPATH-parallel-builds

2011-11-15 Thread Philip Kovacs
Attached is a separate patch that solely fixes VPATH/parallel build problems. The errors are seen when performing out of tree builds with problems in the doc, perf and tests areas. To replicate from a fresh clone: got clone git://github.com/zeromq/libzmq.git cd libzmq sh autogen.sh mkdir work c

Re: [zeromq-dev] protocol design question

2011-11-15 Thread Alexander Altshuler
Why not if you proper handle endianness? Alexander -Original Message- From: zeromq-dev-boun...@lists.zeromq.org [mailto:zeromq-dev-boun...@lists.zeromq.org] On Behalf Of Chuck Remes Sent: Tuesday, November 15, 2011 10:59 PM To: ZeroMQ development list Subject: [zeromq-dev] protocol design

Re: [zeromq-dev] protocol design question

2011-11-15 Thread MinRK
On Tue, Nov 15, 2011 at 12:30, Alexander Altshuler wrote: > Why not if you proper handle endianness? > > Alexander > > -Original Message- > From: zeromq-dev-boun...@lists.zeromq.org > [mailto:zeromq-dev-boun...@lists.zeromq.org] On Behalf Of Chuck Remes > Sent: Tuesday, November 15, 2011

Re: [zeromq-dev] protocol design question

2011-11-15 Thread Pieter Hintjens
On Tue, Nov 15, 2011 at 1:59 PM, Chuck Remes wrote: > For one of the fields (message frames) I need to define a unique sequence > number. I decided upon a combination of a 64-bit integer and a 16-byte UUID. > > The UUID would uniquely identify each client. The sequence number would > uniquely i

Re: [zeromq-dev] protocol design question

2011-11-15 Thread Chuck Remes
On Nov 15, 2011, at 2:36 PM, MinRK wrote: > e.g. > > struct sequence_id { > uint64 number; > uchar uuid[16]; > }; > > Is this all right? Or is there a better way to accomplish this framing? > > cr > > I have a general question related to this - what is the relative cost in > zeromq of the

Re: [zeromq-dev] protocol design question

2011-11-15 Thread Chuck Remes
On Nov 15, 2011, at 2:37 PM, Pieter Hintjens wrote: > On Tue, Nov 15, 2011 at 1:59 PM, Chuck Remes wrote: > >> Is it portable to pack them both into the same frame like this? I assume a C >> user could define a struct to map that frame directly. > > Sure, this is a good representation. For cla

[zeromq-dev] CZMQ fix VPATH/parallel build

2011-11-15 Thread Philip Kovacs
Pieter, I submitted a new pull request to czmq containly only the VPATH build fix. git clone git://github.com/zeromq/czmq.git cd czmq sh autogen.sh mkdir work cd work ../configure make demonstrates the error. This patch fixes only that. Phil signature.asc Description: Digital signature _

[zeromq-dev] PHP Extension For Windows

2011-11-15 Thread lanre lawal
Please i'll like to ask if there is now a DLL extension to use with PHP on windows. The last time I checked the only was possible was to do a windows build. I'll like to know if there is a DLL that could be downloaded and dumped into the extension directory of php and referenced from the php.ini

Re: [zeromq-dev] CZMQ fix VPATH/parallel build

2011-11-15 Thread Pieter Hintjens
On Tue, Nov 15, 2011 at 3:27 PM, Philip Kovacs wrote: > I submitted a new pull request to czmq containly only the VPATH build fix. This is great, thanks! -Pieter ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/l

[zeromq-dev] ASP.NET Issue

2011-11-15 Thread lanre lawal
Hi Guys,     So i've successfully completed a project with the clr-zmq binding for C# on ASP.NET. Now everything works fine when I test my project from Visual Studio 2010 (ctrl + F5). Now I want to distribute the project to other windows users, but when I drop the project folder into the C:/inet

Re: [zeromq-dev] [CZMQ PATCH] AIX, HP-UX, and SunOS needs to use rand() rather than random()

2011-11-15 Thread Pieter Hintjens
On Thu, Nov 10, 2011 at 9:00 AM, AJ Lewis wrote: > Attached is a patch required to get the selftest working for czmq on > AIX, HP-UX and SunOS (Solaris 10 Sparc). Merged into CZMQ master, thanks! -Pieter ___ zeromq-dev mailing list zeromq-dev@lists.zer

Re: [zeromq-dev] protocol design question

2011-11-15 Thread Min RK
On Nov 15, 2011, at 12:45, Chuck Remes wrote: > > On Nov 15, 2011, at 2:36 PM, MinRK wrote: > >> e.g. >> >> struct sequence_id { >> uint64 number; >> uchar uuid[16]; >> }; >> >> Is this all right? Or is there a better way to accomplish this framing? >> >> cr >> >> I have a general quest

Re: [zeromq-dev] Two small mistakes in zeromq-3.0.2

2011-11-15 Thread Luca Fascione
Pieter, when I compile this with ICC 11 there are a bunch of warnings about casting integers to narrower types. Would you like them quieted? (as in: I could go through the code and add int(somelongvalue) as appropriate, assuming the semantics are right) Luca On 16/11/11 00:45, Pieter Hintjens w

Re: [zeromq-dev] [PATCH] libzmq - includedir and broken VPATH builds

2011-11-15 Thread Philip Kovacs
* Martin Sustrik [2011-11-15 09:04:44 +0100]: > Ok, right. It's messy. However, note that the only header from the list > that belongs to core 0MQ project is zmq.h. > > The rest are from czmq project so I guess the fix should be done there. > What you would get is a single header file in /usr/

Re: [zeromq-dev] Two small mistakes in zeromq-3.0.2

2011-11-15 Thread Steven McCoy
On 15 November 2011 17:58, Luca Fascione wrote: > Pieter, > when I compile this with ICC 11 there are a bunch of warnings about > casting integers to narrower types. Would you like them quieted? > (as in: I could go through the code and add int(somelongvalue) as > appropriate, assuming the semant

Re: [zeromq-dev] Two small mistakes in zeromq-3.0.2

2011-11-15 Thread Luca Fascione
Sure, here's what I've been using -wd2304 -wd2259 -wd383 (This could be coming from our build configuration, thugh, we are very strict about some C++ stuff) Luca On 16/11/11 13:29, Steven McCoy wrote: On 15 November 2011 17:58, Luca Fascione > wrote: Pieter,

Re: [zeromq-dev] Two small mistakes in zeromq-3.0.2

2011-11-15 Thread Luca Fascione
Actually more like this: -wd2304 -wd2259 -wd383 -wd869 -wd1599 -wd593 -wd128 (In saying this, it does look like most of these could easily be quieted in the code) Luca On 16/11/11 16:06, Luca Fascione wrote: Sure, here's what I've been using -wd2304 -wd2259 -wd383 (This could be coming fr

Re: [zeromq-dev] protocol design question

2011-11-15 Thread Martin Sustrik
Hi Chuck, > The UUID would uniquely identify each client. Give some thought to what do you want to uniquely identify. Is it any client ever? If so, UUID is probably the right way to go. However, if all you need is to uniquely identify a client of a particular server instance, 32-bit integer sh