tag:blogger.com,1999:blog-18508356.post8818245295142502148..comments2026-02-13T11:24:21.556-05:00Comments on Just a little Python: Distributed Systems with ZeroMQRick Copelandhttp://www.blogger.com/profile/11612114223288841087noreply@blogger.comBlogger16125tag:blogger.com,1999:blog-18508356.post-60030791045448788682013-04-18T08:31:57.252-04:002013-04-18T08:31:57.252-04:00The only things you need are the Zeromq libraries ...The only things you need are the Zeromq libraries and the pyzmq package.Rick Copelandhttps://www.blogger.com/profile/11612114223288841087noreply@blogger.comtag:blogger.com,1999:blog-18508356.post-80127703858040889722013-04-18T06:48:53.623-04:002013-04-18T06:48:53.623-04:00actually anyone can help what are tools that need ...actually anyone can help what are tools that need to instal when we want build a zeromq program in python?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-18508356.post-5511720249769769622013-01-09T17:05:10.436-05:002013-01-09T17:05:10.436-05:00I'm not completely sure I understand the quest...I'm not completely sure I understand the question, but I'll try to answer anyway ;-)<br /><br />First off, you should *not* expose a ZeroMQ socket over the internet, so if this was in the plans for your architecture, ZMQ is a poor choice.<br /><br />Secondly, ZeroMQ has its own protocol on top of TCP, so it can't be run over HTTP. Again, if that's what the architecture calls for, ZMQ is a non-starter.<br /><br />ZeroMQ is a good choice if (and only if) you are communicating between nodes over a trusted network and want "a better socket." ZeroMQ is not a replacement for a message broker like AMQP (though it could be used to implement such a broker).<br /><br />I'm not sure if I answered your question, but I hope that helped anyway.... Thanks for the comment!Rick Copelandhttps://www.blogger.com/profile/11612114223288841087noreply@blogger.comtag:blogger.com,1999:blog-18508356.post-1098393412948675742013-01-09T11:31:16.697-05:002013-01-09T11:31:16.697-05:00How could zeromq help in the following scenario: ...How could zeromq help in the following scenario: Requests (from clients) and responses (from server) are serviced with a json-based api ie. webserver <-> server application <-> api <-> json <-> http ... <-> http <-> json <-> api <-> client. The client can be any device, OS, browser. Developers could use any programming language/tool to build the client-side application. Thx.dbvnoreply@blogger.comtag:blogger.com,1999:blog-18508356.post-15197180628418508102012-09-27T11:52:34.550-04:002012-09-27T11:52:34.550-04:00Thanks for the comment! I'd say that pickle, j...Thanks for the comment! I'd say that pickle, json, and xml are all fine from a *functional* perspective, but they'll be fairly low-performance. My personal preference is using bson (http://bsonspec.org), but protocol buffers (https://developers.google.com/protocol-buffers/docs/pythontutorial) also seem to be a good option.Rick Copelandhttps://www.blogger.com/profile/11612114223288841087noreply@blogger.comtag:blogger.com,1999:blog-18508356.post-8710499333938114472012-09-27T06:01:08.528-04:002012-09-27T06:01:08.528-04:00Hi, I'm a newbie in zmq that seems to be the p...Hi, I'm a newbie in zmq that seems to be the perfect solution for distributing tasks to workers through a PUSH/PULL pipeline, thanks to your article. What's the best practice for (un)marshalling complex and big objects (+100K) that transit through zmq sockets? pickle ? json ? xml ?<br />Thanks again for these excellent tutorials.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-18508356.post-21186995224538041402012-08-27T11:56:35.792-04:002012-08-27T11:56:35.792-04:00Great! Glad to hear that ZeroMQ's working out ...Great! Glad to hear that ZeroMQ's working out for you. Is the reporting system open-source and available anywhere?Rick Copelandhttps://www.blogger.com/profile/11612114223288841087noreply@blogger.comtag:blogger.com,1999:blog-18508356.post-10465627757204503922012-08-27T11:55:41.786-04:002012-08-27T11:55:41.786-04:00Thanks for the comment! I'll definitely check ...Thanks for the comment! I'll definitely check out PyPln!Rick Copelandhttps://www.blogger.com/profile/11612114223288841087noreply@blogger.comtag:blogger.com,1999:blog-18508356.post-80989182362567544752012-08-26T07:44:45.666-04:002012-08-26T07:44:45.666-04:00Leveraging the weather broadcast example given in ...Leveraging the weather broadcast example given in the 0mq learning guide, I'm playing with system status reporting (cpu, mem, drive space, etc) using a pub connect pattern to on the reporting systems to a centralized sub/bind socket. Seems to be working great!dn1nj4http://www.digitalninjitsu.comnoreply@blogger.comtag:blogger.com,1999:blog-18508356.post-18125556787126773102012-08-25T20:59:37.996-04:002012-08-25T20:59:37.996-04:00Hello Rick,
I'm using pyzmq on a project to di...Hello Rick,<br />I'm using pyzmq on a project to distribute jobs along a cluster -- probably in the future the code responsible for manage the cluster and the jobs will pop-up from this software and I'll create a library based on this code, so anyone can benefit of this.<br />The whole project's focus is to do [scalable] natural language processing and you can fetch it at: https://github.com/namd/pypln<br /><br />[]sTuricas' blog - criativo, né?https://www.blogger.com/profile/16031602773277862419noreply@blogger.comtag:blogger.com,1999:blog-18508356.post-78312878140640054852012-08-15T19:05:04.655-04:002012-08-15T19:05:04.655-04:00Really the only flow control problems we had were ...Really the only flow control problems we had were in figuring out the correct settings to use so we didn't buffer unlimited data on a PUSH socket when all the PULLers were busy.<br /><br />Thanks for all the info, it sounds like you really pushed the ZMQ system to its limits (which I'd expect, since you're building a high performance distributed task framework).Rick Copelandhttps://www.blogger.com/profile/11612114223288841087noreply@blogger.comtag:blogger.com,1999:blog-18508356.post-19012959696093200482012-08-15T18:39:11.747-04:002012-08-15T18:39:11.747-04:00In a nutshell, we had some issues with the socket ...In a nutshell, we had some issues with the socket shutdown function. After a shutdown, it needs some time before we could create a new connection, which slows our unit tests with delays. I agree, it's not a big deal.<br /><br />Second minor I can think of is the random port selector (binding to port *) which is really not random... It simply tries again from the beginning port and increments. We first had a topology that needed multiple connections for each node, which means looping over the same ports for each bind. The reason stated in their forum/mailing list were that they haven't thought of propagating information back from the OS socket, thus they can't let the kernel call efficiently choose a port for the library.<br />I agree again, not such a big deal since socket binding is not frequently called, but still.<br /><br />We tried to be as by-the-book as possible for our patterns so we haven't undergone any flow control issues, I guess the bandwidth tweaks, notably on the Nagle algorithm, may have had some drawbacks for you?Yannick Holdhttp://scoop.googlecode.comnoreply@blogger.comtag:blogger.com,1999:blog-18508356.post-370690964655949392012-08-15T17:28:48.947-04:002012-08-15T17:28:48.947-04:00SCOOP also looks pretty cool. I'm interested i...SCOOP also looks pretty cool. I'm interested in hearing what the minor negative points you encountered with ZeroMQ. (A few I ran across were that it behaves badly with bad input and flow control is a little tricky to configure.) Thanks for the info!Rick Copelandhttps://www.blogger.com/profile/11612114223288841087noreply@blogger.comtag:blogger.com,1999:blog-18508356.post-38596100581626880672012-08-15T15:37:28.174-04:002012-08-15T15:37:28.174-04:00We are currently using ZeroMQ in our distributed t...We are currently using ZeroMQ in our distributed task framework in Python, SCOOP (http://scoop.googlecode.com).<br /><br />ZeroMQ was chosen as the communication library because it simply works and isn't bloated. No need to implement the state-machines for common patterns in our sockets, ZMQ does it and fast. It doesn't replace a standard socket, though, it only add a layer of functionalities over it.<br /><br />We found some minor negative points while using it, but overall, ZMQ is a tool that saved us much developing time and should definitively be looked by distribution systems.Yannick Holdhttp://scoop.googlecode.comnoreply@blogger.comtag:blogger.com,1999:blog-18508356.post-27532239615303465242012-08-15T11:39:18.143-04:002012-08-15T11:39:18.143-04:00ZeroRPC looks pretty cool; definitely something I&...ZeroRPC looks pretty cool; definitely something I'll consider for future projects. Thanks, Ken!Rick Copelandhttps://www.blogger.com/profile/11612114223288841087noreply@blogger.comtag:blogger.com,1999:blog-18508356.post-19164670463264951952012-08-15T10:42:10.595-04:002012-08-15T10:42:10.595-04:00You should check out ZeroRPC http://zerorpc.dotclo...You should check out ZeroRPC http://zerorpc.dotcloud.com it handles a lot of the boilerplate code for you, when working with python and ZeroMQ when building RPC based services.Ken Cochranehttps://www.blogger.com/profile/00489335490283053907noreply@blogger.com