<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel rdf:about="http://blog.gmane.org/gmane.network.zeromq.devel">
    <title>gmane.network.zeromq.devel</title>
    <link>http://blog.gmane.org/gmane.network.zeromq.devel</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.network.zeromq.devel/14864"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.network.zeromq.devel/14863"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.network.zeromq.devel/14857"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.network.zeromq.devel/14856"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.network.zeromq.devel/14853"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.network.zeromq.devel/14845"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.network.zeromq.devel/14841"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.network.zeromq.devel/14838"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.network.zeromq.devel/14836"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.network.zeromq.devel/14825"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.network.zeromq.devel/14821"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.network.zeromq.devel/14817"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.network.zeromq.devel/14815"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.network.zeromq.devel/14812"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.network.zeromq.devel/14807"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.network.zeromq.devel/14805"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.network.zeromq.devel/14804"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.network.zeromq.devel/14799"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.network.zeromq.devel/14795"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.network.zeromq.devel/14794"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://comments.gmane.org/gmane.network.zeromq.devel/14864">
    <title>nzmqt question: how to stop?</title>
    <link>http://comments.gmane.org/gmane.network.zeromq.devel/14864</link>
    <description>&lt;pre&gt;Hello,

when my Qt application ends the zmq engine is still running.
The examples provided hasn't any destructor or stop method.

As far as I know the QRunnable class doesn't have a way to stop. So I 
tried to inherit QThread which has the quit slot.

In my application I use other QThread classes and there is no problem to 
terminate on exit.

Only the zmq class remains active.
Here my constructor:

explicit FemtoClient(QObject* parent) : QThread(parent) {
     m_address = "tcp://blablabla";
     ZMQContext* context = createDefaultContext(this);
     context-&amp;gt;start();
     m_socket = context-&amp;gt;createSocket(ZMQSocket::TYP_DEALER);
     connect(m_socket, SIGNAL(messageReceived(const QList&amp;lt;QByteArray&amp;gt; 
&amp;amp;)), this, SLOT(requestReceived(const QList&amp;lt;QByteArray&amp;gt; &amp;amp;)));
     timerout = new QTimer(this);
     timerout-&amp;gt;setInterval(2500);
     timerout-&amp;gt;setSingleShot(true);
     connect(timerout, SIGNAL(timeout()), this, SLOT(timerout_timeout()));
}

the run() and stop() slot:

void run() {
     m_socket-&amp;gt;connectTo(m_serverAddr);
     timerout-&amp;gt;start();
     this-&amp;gt;exec();
}

void stop() {
     timerout-&amp;gt;stop();
     m_socket-&amp;gt;close();
     this-&amp;gt;quit();
}

How to start zmq:

client = new FemtoClient(this);
client-&amp;gt;start();

in the destructor I call:

client-&amp;gt;stop();


What do you recommend to avoid this issue?

Thanks!
Marco
&lt;/pre&gt;</description>
    <dc:creator>Marco Trapanese</dc:creator>
    <dc:date>2012-05-26T15:41:06</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.network.zeromq.devel/14863">
    <title>Support multipart with SNDMORE and RCVMORE?</title>
    <link>http://comments.gmane.org/gmane.network.zeromq.devel/14863</link>
    <description>&lt;pre&gt;Hi, all.

     Please consider below items.
     I.
            If is a short msg, It can be handle in one time with zmq_send
and zmq_recv, This will match 80%.
    2.
           If to process a long message,(may be 1G size) and result is
short,(just like do a message digest), client can send more times with
SNDMORE, and server will reply only onces to get result,  2 plus 1 with
match 98%.

         CLIENT       -----------------------------------   SERVER
        send(msg_p1, MORE)      -&amp;gt;                           recv

 digest(msg_p1)
        send(msg_p2, MORE)      -&amp;gt;                           recv

 digest(msg_p2)
        send(msg_pn)      -&amp;gt;                                        recv

  mdvalue = digest_result(msg_pn)
            recv                             &amp;lt;----
send(mdvalue)
   3.
          If to process a long message and result is long too, just think
that do  3des-cbc encrypt a big file, It make me fool, I can't find a
solution.

         CLIENT       -----------------------------------   SERVER
        send(msg_p1, MORE)      -&amp;gt;                           recv

 encrypt(msg_p1) as part1
                  ?                            &amp;lt;-
send(e_msg_p1,[MORE])    will failed.

        send(msg_p2, MORE)      -&amp;gt;                           recv

       any advice to help me handle this.

 Thanks.
_______________________________________________
zeromq-dev mailing list
zeromq-dev&amp;lt; at &amp;gt;lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev
&lt;/pre&gt;</description>
    <dc:creator>zhiguo zhao</dc:creator>
    <dc:date>2012-05-26T15:19:07</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.network.zeromq.devel/14857">
    <title>Pub/Sub over PGM with many topics</title>
    <link>http://comments.gmane.org/gmane.network.zeromq.devel/14857</link>
    <description>&lt;pre&gt;Hi, I'm new to zeroMQ and am trying to understand how pub.sub over multicast would work in my scenario.
I want to have one publisher which publishes say 10k different topics.  I can have N subscriber processes, each of which can subscribe to multiple topics
So, use case example.  Say my publisher is publishing market data for 10k different instruments, my subscriber app only handles 100 stocks so it only want to get messages for those 100 stocks.  In addition, I don't want to have my app do any type of topic resolution, but if possible let zeromq handle the topic multiplexing.
So I was thinking on the subscriber side, for every topic I have it looks like I would have to create a separate SUB socket to the same pgm multicast channel, but set with a different SUBSCRIBE topic.  Then I would have to poll on all sockets ( essentially, all topics ) and then dish out to the appropriate pollitem ( which in this case would be my object, so say data for AAPL would be subscribed to my an AAPL pollitem handler which knows what it is / no lookup necessary. ( This is all somewhat trying to mimick what Rendezvous can do )

A few questions here:
- first of all, is this at all proper?
- if I do need to create a socket per topic, and I subscribe to lets say 1000 topics, does that mean I need 1000 sockets, and then for every single poll() iterate through all 1000 sockets? That doesn't seem right / inefficient, so im hoping I'm thinking about this incorrectly
- whats the deal with multipart messages and topics? They seem very intertwined and a bit confusing.  On the publisher side it just sends a multipart message to send a specific topic? But on the receiver side it has to subscribe to said topic in sockopts, and then process the message as a multipart message ( again, I would prefer not to even process the multipart message but just get a regular message for the bound topic )

Hope these questions are clear, thanks in advance

- Rob


This email is confidential and subject to important disclaimers and
conditions including on offers for the purchase or sale of
securities, accuracy and completeness of information, viruses,
confidentiality, legal privilege, and legal entity disclaimers,
available at http://www.jpmorgan.com/pages/disclosures/email.  _______________________________________________
zeromq-dev mailing list
zeromq-dev&amp;lt; at &amp;gt;lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev
&lt;/pre&gt;</description>
    <dc:creator>Ambalu, Robert</dc:creator>
    <dc:date>2012-05-25T14:00:07</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.network.zeromq.devel/14856">
    <title>PUSH/PULL not working in this example</title>
    <link>http://comments.gmane.org/gmane.network.zeromq.devel/14856</link>
    <description>&lt;pre&gt;
Hi Folks,


I ve the following client server executables that arent working on my machine (attached)


please, note: 
- replace boost  calls with std::cout if you dont use boost in your dev env.


the reciever seems to wait forever, and the sender exit without waiting for the message being processed.
if you uncomment the _sleep(1) on the sending side things works just fine.


I wondering if there is any logical explanation to this simple senario?




Kind Regards


Brownviper1966






       _______________________________________________
zeromq-dev mailing list
zeromq-dev&amp;lt; at &amp;gt;lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev
&lt;/pre&gt;</description>
    <dc:creator>Sam Zaroug</dc:creator>
    <dc:date>2012-05-25T08:01:15</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.network.zeromq.devel/14853">
    <title>3.1 stability status</title>
    <link>http://comments.gmane.org/gmane.network.zeromq.devel/14853</link>
    <description>&lt;pre&gt;Hello,

I plan to bring ZeroMQ into my codebase to start testing out its pub/sub
capabilities. I had brought in ZeroMQ 2.1 in a former project and found
it a bit painful to resolve the uuid dependency on the embedded Linux
platform we use. I hear 3.1 no longer contains that dependency and am
interested in jumping to that revision if it is fairly stable. There are
also some other features in 3.1 that I could benefit from. Is there a
timeframe as to when 3.1 will be considered the new "stable release"?
Are there any big issues with it today?

 

/Jon

 

_______________________________________________
zeromq-dev mailing list
zeromq-dev&amp;lt; at &amp;gt;lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev
&lt;/pre&gt;</description>
    <dc:creator>Jonathan.Meran&lt; at &gt;schneider-electric.com</dc:creator>
    <dc:date>2012-05-25T14:24:13</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.network.zeromq.devel/14845">
    <title>several binds on the same ipc</title>
    <link>http://comments.gmane.org/gmane.network.zeromq.devel/14845</link>
    <description>&lt;pre&gt;Hey

I am trying to solve an issue I have with a broker that opens a zmq 
router socket and just relay calls to workers via a socket dealer.

The problem is that I don't know how to prevent a second broker to bind 
itself to the same ipc.

Consider the following scripts where I isolate the issue:

The server: http://tarek.pastebin.mozilla.org/1649175
The client: http://tarek.pastebin.mozilla.org/1649176

If I run them they happily interact. Now I can run a second server. It 
will bind the socket but won't do anything or even error out.

If I stop the first server, the client will simply lock, as it seems to 
have a sticky connection to the first server - and won't communicate
with the second server until I restart it.

As far as I understand, we can only bind() *once*, which make sense.

So my question is - shouldn't the second attempt to bind() the socket 
raise an error ? maybe this is related to the python binding ?

If not, how can I know if there's already a socket bound to the ipc ?

Cheers
Tarek
&lt;/pre&gt;</description>
    <dc:creator>Tarek Ziadé</dc:creator>
    <dc:date>2012-05-24T12:17:58</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.network.zeromq.devel/14841">
    <title>exhausting limited FDs</title>
    <link>http://comments.gmane.org/gmane.network.zeromq.devel/14841</link>
    <description>&lt;pre&gt;I have a non-hypothetical concern re: FD usage with ZMQ.  Admittedly,
I am a typical programmer having implemented most inter-proc comm via
bare sockets.

As I understand the general use-model, a program would would use
multiple TCP ports for the various message-types to be sent between
servers and clients, PUB/SUB, REQ/REP, PUSH/PULL.  That being the
case, comm between two procs, a server could easily use 2 or more
sockets for each client.  If a proc is limited to 5k FDs then the
number of clients simultaneously connected is limited to less than
2.5k before it has to start managing those FDs with some kind of LRU
algorith with reconnects as necessary.

That seems to be the inevitable outcome of not being able to map an
endpoint to multiple sockets.  Is that correct?

What's the solution?   Is that actually acceptable?

Thank you.

FWIW, ZMQ seems very promising to use in my current project.  I have
two key concerns re: it; this is one of them.

CZC
&lt;/pre&gt;</description>
    <dc:creator>Chick Corea</dc:creator>
    <dc:date>2012-05-24T03:02:25</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.network.zeromq.devel/14838">
    <title>Downloads site - removed historic folder</title>
    <link>http://comments.gmane.org/gmane.network.zeromq.devel/14838</link>
    <description>&lt;pre&gt;Hi all,

We used to move old versions of 0MQ tarballs into /historic.

People rightly complained because this kept breaking things for anyone
linking to a tarball.

I've killed that folder and all past and present releases of 0MQ and
related projects are now simply in the main downloads directory at
http://download.zeromq.org/

-Pieter

Ps. if you were linking to a tarball in /historic sorry, you'll have
one last fix to make.
&lt;/pre&gt;</description>
    <dc:creator>Pieter Hintjens</dc:creator>
    <dc:date>2012-05-23T16:11:05</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.network.zeromq.devel/14836">
    <title>ZeroMQ for Android</title>
    <link>http://comments.gmane.org/gmane.network.zeromq.devel/14836</link>
    <description>&lt;pre&gt;I've successfully compiled and tested libzmq v2.2 for Android using
latest ndk (r8). I've used static linking for libuuid and libzmq, so I
have only one native file to copy on the device: libjzmq. I believe it;s
better than compile al libraries to .so because on android all such
files are private to the application and separate files just slows down
startup of the application.

Should I write new description of the build process on android page?

_______________________________________________
zeromq-dev mailing list
zeromq-dev&amp;lt; at &amp;gt;lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev
&lt;/pre&gt;</description>
    <dc:creator>Boris Gulay</dc:creator>
    <dc:date>2012-05-23T14:20:19</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.network.zeromq.devel/14825">
    <title>June meetup / drinkup in Bay Are?</title>
    <link>http://comments.gmane.org/gmane.network.zeromq.devel/14825</link>
    <description>&lt;pre&gt;Hi all,

Any interest in a meetup in the Bay Area on the 9th of June?

We have office space downtown SF.

-Pieter
&lt;/pre&gt;</description>
    <dc:creator>Pieter Hintjens</dc:creator>
    <dc:date>2012-05-22T20:58:01</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.network.zeromq.devel/14821">
    <title>Code-style question</title>
    <link>http://comments.gmane.org/gmane.network.zeromq.devel/14821</link>
    <description>&lt;pre&gt;Hello,

currently I'm using zmq on several projects to control remote 
applications. In fact, I send 'commands' rather 'data'.

The architecture of the whole software is pretty simple. There are the 
basic functions that do the hard job (my own API). Let's call 'em 
func1(), func2() ...

Then I wrote a raw protocol to call these functions through the zmq 
connection. After a message is received, I check the first part to 
decode the command and the followings to get the parameters (if any). 
Something like this:

void parseMessage() {
// receive the message, get cmd, argc and argv[]

switch (cmd) {
case CMD1:
func1();
break;

case CMD2:
if (argc == 1) func2(argv[0]);
break;
}
}


I wonder how do you implement such an interface. Do you use a method 
like this or there is something more flexible/elegant?

Thanks
Marco
&lt;/pre&gt;</description>
    <dc:creator>Marco Trapanese</dc:creator>
    <dc:date>2012-05-22T18:11:51</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.network.zeromq.devel/14817">
    <title>Android configuration scripts</title>
    <link>http://comments.gmane.org/gmane.network.zeromq.devel/14817</link>
    <description>&lt;pre&gt;Hello on this list,

At my work I had to generate an Android-compatible .so that could be loaded
directly in an APK, and use Jzmq.

The result, a collection of harmless configuration scripts, is presented
there:

http://iso3103.blogspot.jp/2012/05/java-zeromq-for-android.html
and associated github
https://github.com/vperron/android-jzeromq

I've seen quite a lot of questions about this matter on the web, so maybe
that could be of any help.

I have a few questions though :
- Do you zmq devs think it is an acceptable way to go ?
- Do you, people interested with zeromq on Android, meet issues using this ?
- Wouldn't it be more useful converted in some other way, for e.g a post on
the :build wiki or a 'target' in the distribution ?
- Am I totally wrong and there is a straightforward way ?

Thanks a lot ,
best regards


&lt;/pre&gt;</description>
    <dc:creator>Victor Perron</dc:creator>
    <dc:date>2012-05-22T02:56:17</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.network.zeromq.devel/14815">
    <title>std::numeric_limits &lt;size_t&gt; invalid</title>
    <link>http://comments.gmane.org/gmane.network.zeromq.devel/14815</link>
    <description>&lt;pre&gt;Not supported with MSVC, needs an alternative method.  C99 route is an
alternative:  SIZE_MAX.  I'm sure something old hates that.

https://github.com/zeromq/libzmq/blob/master/src/decoder.cpp#L117

&lt;/pre&gt;</description>
    <dc:creator>Steven McCoy</dc:creator>
    <dc:date>2012-05-22T01:54:33</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.network.zeromq.devel/14812">
    <title>Newbie question: How to reroute messages to differentworkers (C#)</title>
    <link>http://comments.gmane.org/gmane.network.zeromq.devel/14812</link>
    <description>&lt;pre&gt;_______________________________________________
zeromq-dev mailing list
zeromq-dev&amp;lt; at &amp;gt;lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev
&lt;/pre&gt;</description>
    <dc:creator>Frank Gynnild</dc:creator>
    <dc:date>2012-05-21T19:15:47</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.network.zeromq.devel/14807">
    <title>zermoq java bindings - docs</title>
    <link>http://comments.gmane.org/gmane.network.zeromq.devel/14807</link>
    <description>&lt;pre&gt;Hello,

Just started using the java bindings to zeromq. Where are the docs for
using the api ? 

Specifically, is there a way to send an empty message ?

Thanks,
David Stark
&lt;/pre&gt;</description>
    <dc:creator>David Starkweather</dc:creator>
    <dc:date>2012-05-21T15:49:16</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.network.zeromq.devel/14805">
    <title>Build fails on Solaris / Sun C++: multimap::insert insocket_base.cpp:550</title>
    <link>http://comments.gmane.org/gmane.network.zeromq.devel/14805</link>
    <description>&lt;pre&gt;Hello!

libzmq master fails to compile with Sun C++ on Solaris. I used just
./autogen.sh &amp;amp;&amp;amp; ./configure &amp;amp;&amp;amp; gmake

The error is:

"socket_base.cpp", line 550: Error: Could not find a match for
std::multimap&amp;lt;std::string, zmq::own_t*, std::less&amp;lt;std::string&amp;gt;,
std::allocator&amp;lt;std::pair&amp;lt;const std::string,
zmq::own_t*&amp;gt;&amp;gt;&amp;gt;::insert(std::pair&amp;lt;std::string, zmq::own_t*&amp;gt;) needed in
zmq::socket_base_t::add_endpoint(const char*, zmq::own_t*).

Please, see config.log and full build output here:
https://zeromq.jira.com/browse/LIBZMQ-368

It seems like the solution is to use insert(endpoints_t::value_type(first,
second)) instead of insert(std::make_pair(first, second))
Please, see pull request https://github.com/zeromq/libzmq/pull/342


--- a/src/socket_base.cpp
+++ b/src/socket_base.cpp
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -547,7 +547,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; void zmq::socket_base_t::add_endpoint (const char
*addr_, own_t *endpoint_)
{
    //  Activate the session. Make it a child of this socket.
    launch_child (endpoint_);
-   endpoints.insert (std::make_pair (std::string (addr_), endpoint_));
+   endpoints.insert (endpoints_t::value_type (std::string (addr_),
endpoint_));
}

int zmq::socket_base_t::term_endpoint (const char *addr_)


Regards,
Ivan
_______________________________________________
zeromq-dev mailing list
zeromq-dev&amp;lt; at &amp;gt;lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev
&lt;/pre&gt;</description>
    <dc:creator>Ivan Pechorin</dc:creator>
    <dc:date>2012-05-20T12:36:12</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.network.zeromq.devel/14804">
    <title>Paxos &amp; ZeroMQ</title>
    <link>http://comments.gmane.org/gmane.network.zeromq.devel/14804</link>
    <description>&lt;pre&gt;At today's ZeroMQ meetup in Chicago, a surprising amount of interest
was expressed in a Paxos/ZeroMQ side project I've been working on for
the past few months. At the request of several of the attendees, I've
made the code publicly available on GitHub for the perusal of anyone
that's interested.

There are two separate repositories. One repository contains a pure
Paxos implementation that is independent of any particular application
domain or networking infrastructure. The lack of such a library was
the biggest stumbling block for me, personally, when it came to
understanding how Paxos worked and how to put it into practice.
Hopefully others in the community will find it useful.

The second repository uses the pure Paxos library in conjunction with
ZeroMQ to implement a simple, distributed key-value database. This
project was born out of my frustration with the lack of a simple,
embeddable database for which there is no single point of failure. As
it stands, the code doesn't quite solve that problem yet but it's
definitely a step in the right direction.

The current quality of the code is reasonably on par with that of a
mid-level alpha release. The basic tests pass, and, so far as I can
tell, there are no glaring omissions. It's still pretty early in the
development phase though. Perfect, perhaps, for someone interested in
the topic to jump in, steal the code, and make it useful. Generally
speaking, I prefer to get a bit further down the development and
documentation path before releasing code for public consumption.
However, given the feedback from the 0MQ meetup, it seemed as though
there may be sufficient interest to overlook the poor documentation
and as-yet-unremoved debugging print statements.

The Paxos implementation (in Python) may be found at:
https://github.com/cocagne/paxos

The distributed database using the Paxos implementation in conjunction
with ZeroMQ (also in Python) may be found at:
https://github.com/cocagne/zpax

Tom
&lt;/pre&gt;</description>
    <dc:creator>Tom Cocagne</dc:creator>
    <dc:date>2012-05-20T06:40:43</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.network.zeromq.devel/14799">
    <title>Strict aliasing problem</title>
    <link>http://comments.gmane.org/gmane.network.zeromq.devel/14799</link>
    <description>&lt;pre&gt;I cannot compile the master branch with g++ 4.4 because of this commit:

https://github.com/zeromq/libzmq/commit/c995de65847d8a97dc75294fb1b9b6a057fd3c1d

I get errors like this:

options.cpp: In member function ‘int zmq::options_t::setsockopt(int, 
const void*, size_t)’:
options.cpp:328:52: error: dereferencing type-punned pointer will break 
strict-aliasing rules

Actually, these kind of errors is what the abovementioned commit is
trying to fix, but it did not get it right.

I can see three possible solutions:

1. As the only standards-compliant way "casting" between
    pointer-to-object and pointer-to-function is through a union, the
    zmq_monitor_fn type could be changed to something like:

    typedef union
    {
      void *object;
      void (*function)(void *s, int event, zmq_event_data_t *data);
    } zmq_monitor_fn;

    and the various places where the monitor function is used, must be
    changed appropriately.

    This is not a good solution because it creates an awkward API for
    callback functions.

2. Add a separate zmq_setsockopt() that takes a pointer-to-function
    instead of pointer-to-object.

    It might be even better to add explicit getters and setters for the
    various options, rather than having to rely on va_args to create a
    "fake" overloading in C.

3. The problem with strict aliasining is more or less theoretical. Posix
    requires that pointer-to-object and pointer-to-function must have the
    same representation. We could therefore lower the strictness of the
    aliasing checking for g++. I have attached a patch just in case.
_______________________________________________
zeromq-dev mailing list
zeromq-dev&amp;lt; at &amp;gt;lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev
&lt;/pre&gt;</description>
    <dc:creator>Bjorn Reese</dc:creator>
    <dc:date>2012-05-17T09:14:38</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.network.zeromq.devel/14795">
    <title>Is there advantage of using zmq_device comparable withpolling</title>
    <link>http://comments.gmane.org/gmane.network.zeromq.devel/14795</link>
    <description>&lt;pre&gt;Hello! 

I trying to figure out is there any advantage(except more compact
notation) of using ZMQ_FORWARDER device as long same stuff can be build
using zmq_poll.

Serg



_______________________________________________
zeromq-dev mailing list
zeromq-dev&amp;lt; at &amp;gt;lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev
&lt;/pre&gt;</description>
    <dc:creator>Serg V. Gulko</dc:creator>
    <dc:date>2012-05-16T22:03:49</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.network.zeromq.devel/14794">
    <title>Using closed socket with JZMQ</title>
    <link>http://comments.gmane.org/gmane.network.zeromq.devel/14794</link>
    <description>&lt;pre&gt;JZMQ dev suggest me to post here, since he has not had time to look into yet.

Hi everyone,
I'm recently playing with Zmq (v2.2.0) and its Java binder (v1.0.0),
and I run into a problem.

On Windows, I was getting a crash as an unhandled exception in javaw.exe.

This was due to my fault, because I was trying to send data through an
already closed ZMQ socket,
but it takes me lot of time to find the problem because the crash
wasn't giving me
any details on what was going on (the call stack location reported the
runtime library msvcr).

So I wrote two little spike both using the java binder and the plain
zmq api, and, surprise, I wasn't getting
any excetpion with the plain zmq. Just the zqm_send it's returing -1
when I try to send data to a closed socket.

Furthermore, I tested the java spike code on Linux too, and the
behaviour is different again: the
program ends with

java: Socket.cpp:543: void* get_socket(JNIEnv, _jobject, int):
Assertion `s' failed.

Here the two spikes I used

**** JZMQ spike****

package tests;
import org.zeromq.ZMQ;

public class TestZMQSocketClosed {
    public static void main(String[] args) {


        ZMQ.Context msgContext = ZMQ.context(1);

        System.out.println("Connecting to hello world server\n");
        ZMQ.Socket clientSocket = msgContext.socket(ZMQ.REQ);
        clientSocket.connect("tcp://localhost:5600");

        String request = "Hello";

        System.out.println("Sending Hello on Open Socket\n");
        boolean sent = clientSocket.send( request.getBytes(), 0);
        System.out.println("send: " + sent + "\n");

        clientSocket.setLinger(0);
        clientSocket.close();

        System.out.println("Sending Hello on Closed Socket\n");
        sent = clientSocket.send( request.getBytes(), 0);
        System.out.println("send: " + sent + "\n");

    }
}

**** ZMQ spike ****

#include "zmq.h"
#include &amp;lt;string.h&amp;gt;
#include &amp;lt;stdio.h&amp;gt;

int main (void)
{
    void *context = zmq_init (1);

    printf ("Connecting to hello world server\n");
    void *requester = zmq_socket (context, ZMQ_REQ);
    zmq_connect (requester, "tcp://localhost:5600");

    zmq_msg_t request;
    zmq_msg_init_size (&amp;amp;request, 5);
    memcpy (zmq_msg_data (&amp;amp;request), "Hello", 5);
    printf ("Sending Hello on Open Socket\n");
    int send = zmq_send (requester, &amp;amp;request, ZMQ_NOBLOCK);
    zmq_msg_close (&amp;amp;request);

    printf("Send : %d\n", send);

    int linger = 0;
    zmq_setsockopt (requester, ZMQ_LINGER, &amp;amp;linger, sizeof linger);

    zmq_close (requester);

    zmq_msg_init_size (&amp;amp;request, 5);
    memcpy (zmq_msg_data (&amp;amp;request), "Hello", 5);
    printf ("Sending Hello on Closed Socket\n");
    send = zmq_send (requester, &amp;amp;request, ZMQ_NOBLOCK);
    zmq_msg_close (&amp;amp;request);

    printf("Send : %d\n", send);

    zmq_term (context);
    return 0;
}

It seems this kind of error is not correctly managed, both on Windows
and on Linux, what do you think?
&lt;/pre&gt;</description>
    <dc:creator>motoplux</dc:creator>
    <dc:date>2012-05-16T14:00:10</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.network.zeromq.devel/14786">
    <title>Compilation warning on GCC 4.4</title>
    <link>http://comments.gmane.org/gmane.network.zeromq.devel/14786</link>
    <description>&lt;pre&gt;When compiling on GCC 4.4+ the following warning message is issued:

ctx.hpp:56: note: the mangling of 'va_list' has changed in GCC 4.4

Is everything OK?

_______________________________________________
zeromq-dev mailing list
zeromq-dev&amp;lt; at &amp;gt;lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev
&lt;/pre&gt;</description>
    <dc:creator>Boris Gulay</dc:creator>
    <dc:date>2012-05-15T15:15:33</dc:date>
  </item>
  <textinput rdf:about="http://search.gmane.org/?group=$group=gmane.network.zeromq.devel">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.network.zeromq.devel</link>
  </textinput>
</rdf:RDF>

