Re: [zeromq-dev] sending messages to a specific peer
Mike, I have an application where the server needs to send occasional messages to a specific peer (because the peers control individual, distinct, and geographically distributed hardware resources). The obvious solution is a ZMQ_PUB/ZMQ_SUB pair with a unique topic per client, but my understanding is that in such a case the all messages are in fact distributed to all subscribers and the filtering happens only on the subscriber's side. Given the network topology and limited bandwidth of the clients in our application, this is unsuitable. One solution which may work is to use XREP/XREQ sockets: the client sets its identity on connect and then proceeds to ignore the usual REP/REQ pattern in favor of just waiting for messages from the server. A minimal implementation of this pattern (in Ruby) is at https://gist.github.com/748886. This seems to work, but it also seems like an abuse of XREP/XREQ. Any thoughts on this problem? Should I use the XREP/XREQ pattern described here, or is there something better that I am overlooking? If this problem is well-known and has already been discussed, then pointers to such previous discussion would be much appreciated. If you want to speak to individual peers rather than managing a set of peers as an opaque resource, you should either use raw TCP instead of 0MQ, or alternatively, you can create a separate 0MQ socket per peer. Martin ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev
[zeromq-dev] Fwd: Re: Who said that?
On 12/20/2010 09:21 PM, Oliver Smith wrote: Martin Sustrik said the following on 12/17/2010 5:15 AM: By bad data you mean malformed 0MQ frames? With 2.1 those are discarded silently and the connection is closed. We should also report the problem via sys://log. No, it's probably data getting reused before it is transmitted - i.e. my issue, but it's very hard to track down because I don't know which of the many nodes is sending it :) The only way I can track that down is to send everything to separate ports and collate at the receiver, until I'm done debugging, and then reunify all of them again. Ok. So what's needed is message tracking for debugging purposes. Fair enough. So what about, for example, writing a simple wrapper over zmq_send() that would attach a message part containing identity of the particular node to every message? Martin ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev
[zeromq-dev] [patch] 0001-Added-support-for-latest-OpenPGM-5.1.99-on-OSX10.6.patch
Hey folks... I added support for OpenPGM on OS X 10.6 (Snow Leopard), here's what it involved: 1) latest openpgm -- configure.in conditionally pulls it out of openpgm's svn repo 2) configure.in -- added --with-pgm-trunk option to pull openpgm from svn 3) src/Makefile.am -- Added appropriate OSX conditional -Defines to src/Makefile.am Conditionally including two new source files that are part of the latest openpgm lib. While I was at it, I also stuck some endif reminders 4) src/pgm_socket.cpp -- Added conditional include of pgm/in.h if building on OSX to fix a forward reference issue. I feel like this is on the edge of wanting to be a branch, so I'll leave it up to you who've been working on this project eons more than me. And to set expectations correctly, this builds, and doesn't immediately crash, but I've yet to do much (any) in the way of testing. But I'd rather get your feedback sooner than later, so I can do this in a way that is most compatible w/ the awesome zeromq ethos! -Scott --patch follows inline below-- From 167544fb9e3622781e89d05fead5754e147710f8 Mon Sep 17 00:00:00 2001 From: Scott Watson sc...@disney.com Date: Tue, 21 Dec 2010 00:20:40 -0800 Subject: [PATCH] Added support for latest OpenPGM (5.1.99) on OSX10.6 Configure.in modified to pull latest openpgm from svn when seeing --with-pgm-trunk Added new AM Conditionals ON_DARWIN and PGM_TRUNK src/Makefile.am modified to include new pgm source files and use appropriate CFLAGS for OSX10.6 src/pgm_socket.cpp added OSX conditional source of pgm/in.h to address forward reference error in pgm Signed-off-by: Scott Watson sc...@disney.com --- configure.in | 32 +--- src/Makefile.am| 49 + src/pgm_socket.cpp |7 ++- 3 files changed, 76 insertions(+), 12 deletions(-) diff --git a/configure.in b/configure.in index 9c03518..df65b2e 100644 --- a/configure.in +++ b/configure.in @@ -118,6 +118,7 @@ case ${host_os} in CPPFLAGS=-D_DARWIN_C_SOURCE $CPPFLAGS ac_zmq_pedantic=no ac_zmq_werror=no +ac_zmq_on_darwin=yes AC_DEFINE(ZMQ_HAVE_OSX, 1, [Have DarwinOSX OS]) AC_LANG_PUSH([C++]) AC_ZMQ_CHECK_LANG_FLAG_PREPEND([-Wno-uninitialized]) @@ -268,12 +269,14 @@ ac_zmq_pgm_ext=no pgm_basename=libpgm-5.0.92~dfsg -AC_SUBST(pgm_basename) - AC_ARG_WITH([pgm], [AS_HELP_STRING([--with-pgm], [build libzmq with PGM extension [default=no]])], [with_pgm_ext=yes], [with_pgm_ext=no]) +AC_ARG_WITH([pgm-trunk], [AS_HELP_STRING([--with-pgm-trunk], +[build libzmq with OPEN PGM TRUNK [default=no]])], +[with_pgm_trunk=yes], [with_pgm_trunk=no]) + if test x$with_pgm_ext != xno; then if test x$ac_cv_prog_cc_c99 = xno; then @@ -329,17 +332,38 @@ if test x$with_pgm_ext != xno; then AC_MSG_ERROR([python is required for building the PGM extension.]) fi +# remember where we are +ac_zmq_pwd=`pwd` + +if test x$with_pgm_trunk != xyes; then + # Unpack libpgm AC_MSG_NOTICE([Unpacking ${pgm_basename}.tar.gz]) -ac_zmq_pwd=`pwd` cd foreign/openpgm if ! (gzip -dc ${pgm_basename}.tar.gz || echo failed) | ${am__untar}; then AC_MSG_ERROR([cannot unpack the foreign/openpgm/${pgm_basename}.tar.gz file]) fi + +fi + +if test x$with_pgm_trunk = xyes; then + +pgm_basename=openpgm-read-only +AC_MSG_NOTICE([Using latest Openpgm Trunk Snapshot -- FETCHING OpenPGM TRUNK via: ]) +AC_MSG_NOTICE([cd foreign/openpgm/; svn checkout http://openpgm.googlecode.com/svn/trunk/ ${pgm_basename} ]) + +cd foreign/openpgm +if ! (svn checkout http://openpgm.googlecode.com/svn/trunk/ openpgm-read-only || echo failed) ; then +AC_MSG_ERROR([cannot get latest version of openpgm from svn checkout http://openpgm.googlecode.com/svn/trunk/ openpgm-read-only]) +fi + +fi + cd ${ac_zmq_pwd} # Success! +AC_SUBST(pgm_basename) AC_DEFINE(ZMQ_HAVE_OPENPGM, 1, [Have OpenPGM extension]) ac_zmq_pgm_ext=yes @@ -365,6 +389,8 @@ AC_LANG_POP([C++]) AM_CONDITIONAL(BUILD_PGM, test x$ac_zmq_pgm_ext = xyes) AM_CONDITIONAL(ON_MINGW, test x$ac_zmq_on_mingw32 = xyes) +AM_CONDITIONAL(ON_DARWIN, test x$ac_zmq_on_darwin = xyes ) +AM_CONDITIONAL(PGM_TRUNK, test x$with_pgm_trunk = xyes ) # Subst LIBZMQ_EXTRA_CFLAGS CXXFLAGS LDFLAGS AC_SUBST(LIBZMQ_EXTRA_CFLAGS) diff --git a/src/Makefile.am b/src/Makefile.am index 0b00f1c..a74723a 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -6,6 +6,11 @@ pkgconfig_DATA = libzmq.pc include_HEADERS = ../include/zmq.h ../include/zmq.hpp ../include/zmq_utils.h if BUILD_PGM + +PGMEXTRASOURCE = \ + ../foreign/openpgm/@pgm_basename@/openpgm/pgm/getprotobyname.c \ + ../foreign/openpgm/@pgm_basename@/openpgm/pgm/getnetbyname.c + noinst_LTLIBRARIES = libpgm.la nodist_libpgm_la_SOURCES = ../foreign/openpgm/@pgm_basename@/openpgm/pgm/thread.c \ @@ -49,7
Re: [zeromq-dev] I've written a completely new C# API for ZeroMQ
Hi Alex, I have quite a few gripes with clrzmq and clrzmq2, and NZMQ is incomplete in several areas, so over a few weekends this past month I've written a new C# API for ZeroMQ based on the 2.0.10 release of zmq.h. Great! I would suggest adding a link to your project to www.zeromq.org. It's wiki, so you can do so yourself. You can add the link to existing .NET binding page or create a new page. If the page name starts with binding: it will be added to the list of bindings automatically. A few things that make this sample stand out from the other two ZeroMQ C# libraries- * There's no need to manage your ZeroMQ context; it's taken care of on a per-AppDomain basis using refcounting. I am not familiar with CLR. Doesn't the problem the context is solving (i.e. zeromq being used from two libraries that are later on linked into a single application and step on each other toes) occur with .NET as well? * There is no message object because it provides no added benefit in C#. Messages are simply Byte[]s, with overloads throughout the API that accept Strings. Fair enough. If there's no support for zero-copy, simply using byte arrays is the best way to go. * First-class support for .NET events programming, implemented using zmq_poll() (but that's completely transparent to the user). Nice. I'd love some feedback. I'm just starting to use it in a project I'm working on, and so far it all seems to be working smoothly and at high throughput, but I'm releasing it as beta because I don't feel that it has enough real-world experience yet. A side issue: Wouldn't it make sense for you clrzmq, clrzmq2, NZMQ and Interop guys to at least start working on integration of all the projects? I mean, writing the code is easy, maintaining it and fixing the bugs is hard. If the projects are integrated into a single one you could support four time more features, fix four time more bug, make the whole binding four times more stable. Aside of that, having a community is much more fun than working alone :) Martin ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev
Re: [zeromq-dev] [patch] 0001-Added-support-for-latest-OpenPGM-5.1.99-on-OSX10.6.patch
Well... after a little testing, I find that it's exploding when I try to do a connect(epgm://en1;293.192.192.192:5000), so we're not quite there yet! At the same time openpgm does compile and complete its tests. However, I'd still appreciate some feedback regarding the format of the changes, or if folks think I should make an OSX branch? On Tue, Dec 21, 2010 at 12:26 AM, Scott alcoholi...@gmail.com wrote: Hey folks... I added support for OpenPGM on OS X 10.6 (Snow Leopard), here's what it involved: 1) latest openpgm -- configure.in conditionally pulls it out of openpgm's svn repo 2) configure.in -- added --with-pgm-trunk option to pull openpgm from svn 3) src/Makefile.am -- Added appropriate OSX conditional -Defines to src/Makefile.am Conditionally including two new source files that are part of the latest openpgm lib. While I was at it, I also stuck some endif reminders 4) src/pgm_socket.cpp -- Added conditional include of pgm/in.h if building on OSX to fix a forward reference issue. I feel like this is on the edge of wanting to be a branch, so I'll leave it up to you who've been working on this project eons more than me. And to set expectations correctly, this builds, and doesn't immediately crash, but I've yet to do much (any) in the way of testing. But I'd rather get your feedback sooner than later, so I can do this in a way that is most compatible w/ the awesome zeromq ethos! -Scott --patch follows inline below-- From 167544fb9e3622781e89d05fead5754e147710f8 Mon Sep 17 00:00:00 2001 From: Scott Watson sc...@disney.com Date: Tue, 21 Dec 2010 00:20:40 -0800 Subject: [PATCH] Added support for latest OpenPGM (5.1.99) on OSX10.6 Configure.in modified to pull latest openpgm from svn when seeing --with-pgm-trunk Added new AM Conditionals ON_DARWIN and PGM_TRUNK src/Makefile.am modified to include new pgm source files and use appropriate CFLAGS for OSX10.6 src/pgm_socket.cpp added OSX conditional source of pgm/in.h to address forward reference error in pgm Signed-off-by: Scott Watson sc...@disney.com --- configure.in | 32 +--- src/Makefile.am | 49 + src/pgm_socket.cpp | 7 ++- 3 files changed, 76 insertions(+), 12 deletions(-) diff --git a/configure.in b/configure.in index 9c03518..df65b2e 100644 --- a/configure.in +++ b/configure.in @@ -118,6 +118,7 @@ case ${host_os} in CPPFLAGS=-D_DARWIN_C_SOURCE $CPPFLAGS ac_zmq_pedantic=no ac_zmq_werror=no + ac_zmq_on_darwin=yes AC_DEFINE(ZMQ_HAVE_OSX, 1, [Have DarwinOSX OS]) AC_LANG_PUSH([C++]) AC_ZMQ_CHECK_LANG_FLAG_PREPEND([-Wno-uninitialized]) @@ -268,12 +269,14 @@ ac_zmq_pgm_ext=no pgm_basename=libpgm-5.0.92~dfsg -AC_SUBST(pgm_basename) - AC_ARG_WITH([pgm], [AS_HELP_STRING([--with-pgm], [build libzmq with PGM extension [default=no]])], [with_pgm_ext=yes], [with_pgm_ext=no]) +AC_ARG_WITH([pgm-trunk], [AS_HELP_STRING([--with-pgm-trunk], + [build libzmq with OPEN PGM TRUNK [default=no]])], + [with_pgm_trunk=yes], [with_pgm_trunk=no]) + if test x$with_pgm_ext != xno; then if test x$ac_cv_prog_cc_c99 = xno; then @@ -329,17 +332,38 @@ if test x$with_pgm_ext != xno; then AC_MSG_ERROR([python is required for building the PGM extension.]) fi + # remember where we are + ac_zmq_pwd=`pwd` + + if test x$with_pgm_trunk != xyes; then + # Unpack libpgm AC_MSG_NOTICE([Unpacking ${pgm_basename}.tar.gz]) - ac_zmq_pwd=`pwd` cd foreign/openpgm if ! (gzip -dc ${pgm_basename}.tar.gz || echo failed) | ${am__untar}; then AC_MSG_ERROR([cannot unpack the foreign/openpgm/${pgm_basename}.tar.gz file]) fi + + fi + + if test x$with_pgm_trunk = xyes; then + + pgm_basename=openpgm-read-only + AC_MSG_NOTICE([Using latest Openpgm Trunk Snapshot -- FETCHING OpenPGM TRUNK via: ]) + AC_MSG_NOTICE([cd foreign/openpgm/; svn checkout http://openpgm.googlecode.com/svn/trunk/ ${pgm_basename} ]) + + cd foreign/openpgm + if ! (svn checkout http://openpgm.googlecode.com/svn/trunk/ openpgm-read-only || echo failed) ; then + AC_MSG_ERROR([cannot get latest version of openpgm from svn checkout http://openpgm.googlecode.com/svn/trunk/ openpgm-read-only]) + fi + + fi + cd ${ac_zmq_pwd} # Success! + AC_SUBST(pgm_basename) AC_DEFINE(ZMQ_HAVE_OPENPGM, 1, [Have OpenPGM extension]) ac_zmq_pgm_ext=yes @@ -365,6 +389,8 @@ AC_LANG_POP([C++]) AM_CONDITIONAL(BUILD_PGM, test x$ac_zmq_pgm_ext = xyes) AM_CONDITIONAL(ON_MINGW, test x$ac_zmq_on_mingw32 = xyes) +AM_CONDITIONAL(ON_DARWIN, test x$ac_zmq_on_darwin = xyes ) +AM_CONDITIONAL(PGM_TRUNK, test x$with_pgm_trunk = xyes ) # Subst LIBZMQ_EXTRA_CFLAGS CXXFLAGS LDFLAGS AC_SUBST(LIBZMQ_EXTRA_CFLAGS) diff --git a/src/Makefile.am b/src/Makefile.am index
Re: [zeromq-dev] [patch] 0001-Added-support-for-latest-OpenPGM-5.1.99-on-OSX10.6.patch
On Tue, Dec 21, 2010 at 8:49 AM, Scott alcoholi...@gmail.com wrote: Well... after a little testing, I find that it's exploding when I try to do a connect(epgm://en1;293.192.192.192:5000), so we're not quite there yet! At the same time openpgm does compile and complete its tests. However, I'd still appreciate some feedback regarding the format of the changes, or if folks think I should make an OSX branch? Hi Scott, overall the patch looks good. Following things came into mind when skimming through it: 1) rather than having a switch to checkout directly from openpgm svn it might make more sense to add --with-pgm-source=/path/to switch that would allow specifying a path in the filesystem. This approach would allow testing local changes a lot more easily and doesn't break if openpgm decides to change repository location in the future. What do you think? 2) The automake conditional uses ON_DARWIN but the code uses ZMQ_HAVE_OSX. I think it would be safe to use ON_OSX in automake as well. 3) PGMEXTRASOURCE should be PGM_EXTRA_SOURCE or even AC_ZMQ_PGM_EXTRA_SOURCE. 4) libpgm_diff_flags inside ON_DARWIN should be one per line. I think the plan is to add support for building libzmq with openpgm on Solaris and FreeBSD as well. It might even make sense to split operating system specifics into their respective automake files and include based on operating system. It might be a bit cleaner approach than using conditionals. I am not sure whether this is possible just by doing AC_CONFIG_FILES([foreign/Makefile.linux.am]) or something similar. Can you send the patch as attachment as well so that I can properly test it? It seems that my mail client doesn't handle inline patches very well. -- Mikko Koppanen ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev
Re: [zeromq-dev] [patch] 0001-Added-support-for-latest-OpenPGM-5.1.99-on-OSX10.6.patch
On 21 December 2010 16:26, Scott alcoholi...@gmail.com wrote: + +PGMEXTRASOURCE = \ + ../foreign/openpgm/@pgm_basename@/openpgm/pgm/getprotobyname.c \ + ../foreign/openpgm/@pgm_basename@/openpgm/pgm/getnetbyname.c + noinst_LTLIBRARIES = libpgm.la nodist_libpgm_la_SOURCES = ../foreign/openpgm/@pgm_basename@/openpgm/pgm/thread.c \ @@ -49,7 +54,8 @@ nodist_libpgm_la_SOURCES = ../foreign/openpgm/@pgm_basename@/openpgm/pgm/thread. ../foreign/openpgm/@pgm_basename@/openpgm/pgm/galois_tables.c \ ../foreign/openpgm/@pgm_basename@/openpgm/pgm/wsastrerror.c \ ../foreign/openpgm/@pgm_basename@/openpgm/pgm/histogram.c \ -../foreign/openpgm/@pgm_basename@/openpgm/pgm/version.c +../foreign/openpgm/@pgm_basename@/openpgm/pgm/version.c \ +$(PGMEXTRASOURCE) I'm not seeing the prevalence for PGMEXTRASOURCE? +if ON_DARWIN +libpgm_diff_flags = \ + -DCONFIG_BIND_INADDR_ANY \ ... + -DCONFIG_HAVE_ALLOCA_H \ + -DCONFIG_HAVE_BACKTRACE \ + -DCONFIG_HAVE_PROC \ -DCONFIG_HAVE_GETTIMEOFDAY=1 -DCONFIG_HAVE_FTIME I don't think these should be here for Darwin, the latter two are covered by pgm/impl/features.h. +else libpgm_diff_flags = \ -DCONFIG_HAVE_GETPROTOBYNAME_R2 \ -DCONFIG_HAVE_ISO_VARARGS \ @@ -225,8 +256,10 @@ libpgm_diff_flags = \ -DCONFIG_HAVE_SPRINTF_GROUPING \ -DCONFIG_HAVE_VASPRINTF \ -DCONFIG_BIND_INADDR_ANY \ --DCONFIG_HAVE_GETOPT -endif +-DCONFIG_HAVE_GETOPT \ +-DPGM_GNUC_INTERNAL= +endif !ON_DARWIN +endif !ON_MINGW You should add for the default case (Linux Solaris) -DCONFIG_HAVE_POSIX_SPINLOCK, and -DCONFIG_HAVE_GETNETENT should be in there even though I messed it up upstream. On 21 December 2010 16:49, Scott alcoholi...@gmail.com wrote: Well... after a little testing, I find that it's exploding when I try to do a connect(epgm://en1;293.192.192.192:5000), so we're not quite there yet! At the same time openpgm does compile and complete its tests. Run with PGM_MIN_LOG_LEVEL=TRACE for extra output, DEBUG level only works in debug build and will give you even more output. I'm assuming that 293.192.192.192 is a typo, valid multicast addresses are 224.0.0.0 to 239.255.255.255. -- Steve-o ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev
Re: [zeromq-dev] [patch] 0001-Added-support-for-latest-OpenPGM-5.1.99-on-OSX10.6.patch
On 21 December 2010 16:26, Scott alcoholi...@gmail.com wrote: + -DCONFIG_HAVE_ALLOCA_H \ + -DCONFIG_HAVE_BACKTRACE \ Ok, you can get away with these two it seems, alloca is defined in both alloca.h and stdlib.h it doesn't affect the build. backtrace doesn't work on FreeBSD which is why it is ignored upstream, but Apple added it in 10.5; backtrace is only used in the example code. + -DCONFIG_HAVE_PROC \ This one kinda funny too, without a usable TSC it doesn't matter. A/proc/cpuinfois required to read the clock frequency and status flags. OS X by default doesn't have a /proc file system and it masks out calls to RDTSC which makes the results useless. -- Steve-o ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev
Re: [zeromq-dev] I've written a completely new C# API for ZeroMQ
Great job Alex, your implementation is very clean and simple, I liked it. Vinicius Chiele 2010/12/21 Alex Forster a...@alexforster.com I have quite a few gripes with clrzmq and clrzmq2, and NZMQ is incomplete in several areas, so over a few weekends this past month I've written a new C# API for ZeroMQ based on the 2.0.10 release of zmq.h. ZeroMQ Interop v0.8.190.10354 (beta) http://zeromq.codeplex.com * Feature-complete * MIT licensed * Targeted at both Microsoft and Mono .NET 2.0 CLRs (though it does require a 3.5 compatible compiler, basically for lambda syntax) * Includes binaries for both 32 and 64bit platforms (without any #ifdefs) Here's an example using Pub/Sub sockets- // Set up a publisher. var publisher *=* new *ZmqPublishSocket* { Identity *=* *Guid**.**NewGuid*()*.**ToByteArray*(), RecoverySeconds *=* 10 }; publisher*.**Bind*( address: tcp://127.0.0.1:9292 ); // Set up a subscriber. var subscriber *=* new *ZmqSubscribeSocket*(); subscriber*.**Connect*( address: tcp://127.0.0.1:9292 ); subscriber*.**Subscribe*( prefix: ); // subscribe to all messages // Add a handler to the subscriber's OnReceive event subscriber*.**OnReceive* *+=* () *=* { *String* message; subscriber*.**Receive*( out message, nonblocking: true ); *Console**.**WriteLine*( message ); }; // Publish a message to all subscribers. publisher*.**Send*( Hello world! ); A few things that make this sample stand out from the other two ZeroMQ C# libraries- * There's no need to manage your ZeroMQ context; it's taken care of on a per-AppDomain basis using refcounting. * There is no message object because it provides no added benefit in C#. Messages are simply Byte[]s, with overloads throughout the API that accept Strings. * First-class support for .NET events programming, implemented using zmq_poll() (but that's completely transparent to the user). I'd love some feedback. I'm just starting to use it in a project I'm working on, and so far it all seems to be working smoothly and at high throughput, but I'm releasing it as beta because I don't feel that it has enough real-world experience yet. Alex Forster ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev
[zeromq-dev] 0mq scheduler
Hello 0mq community, I am at the point of starting to create some cron-alike scheduler. The idea is to write specified message to specified socket(s) at specified time. The question is if anyone did it before. Christmas is not the best time for bicycles - I'd rather reinvent something more useful at the moment ;) -- Best regards, Ilja Golshtein. ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev
Re: [zeromq-dev] 0mq scheduler
21.12.10, 15:46, Ilja Golshtein ilej...@narod.ru: I am at the point of starting to create some cron-alike scheduler. .. in C++ -- Best regards, Ilja Golshtein. ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev
[zeromq-dev] Monitoring and management question
Hello. First of all, thank for reading and congratulations for ZMQ. We are considering using ZMQ to implement a communication library for all our applications, which are almost always distributed. We make telephonic applications. All our clients require us to inform, usually through SNMP, the state of all the links that the application establishes. ZMQ has non connected protocols, which is good. But we also need information about the visibility of the remote peers. The question is: Is there any plan to add some observability to ZMQ library? Something like a getsockopt that list the visibility state of the endpoints the socket is connected to? Thank in advance. Juan Carlos Franzoy Licenciado en Sistemas ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev
Re: [zeromq-dev] Monitoring and management question
On 21 December 2010 21:12, Juan Carlos Franzoy jfran...@gmail.com wrote: Is there any plan to add some observability to ZMQ library? Something like a getsockopt that list the visibility state of the endpoints the socket is connected to? The general reply is that 0mq is a messaging middleware not a streaming middleware, therefore there is no link state. You could technically have an equivalent to Linux netlink sockets providing link layer notifications as a workaround. The more useful statistic would be to have a decaying indicator of last response from each peer. http://en.wikipedia.org/wiki/Netlink -- Steve-o ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev
Re: [zeromq-dev] 0mq scheduler
i know is a little old fashioned, if you do decide to build a scheduler, could you post a condensed manual page for it first? that way you might get some more focussed feedback. On Dec 21, 2010, at 5:46 AM, Ilja Golshtein wrote: Hello 0mq community, I am at the point of starting to create some cron-alike scheduler. The idea is to write specified message to specified socket(s) at specified time. The question is if anyone did it before. Christmas is not the best time for bicycles - I'd rather reinvent something more useful at the moment ;) -- Best regards, Ilja Golshtein. ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev -- Andrew Hume (best - Telework) +1 623-551-2845 and...@research.att.com (Work) +1 none currently ATT Labs - Research; member of USENIX and LOPSA ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev
Re: [zeromq-dev] [patch] 0001-Added-support-for-latest-OpenPGM-5.1.99-on-OSX10.6.patch
All great suggestions. I'll work on implementing them. Once I slept on it, I came to a similar conclusion that you should just be able to point at a version of openpgm, so I'll make that happen. The single line of diff flags was because features.h blows up when building from zeromq current build, and this supresses the inclusion of impl/features.h Thanks for the useful feedback. This is my first time in autotools land and it's a little overwhelming. :) On Tue, Dec 21, 2010 at 1:28 AM, Mikko Koppanen mikko.koppa...@gmail.com wrote: On Tue, Dec 21, 2010 at 8:49 AM, Scott alcoholi...@gmail.com wrote: Well... after a little testing, I find that it's exploding when I try to do a connect(epgm://en1;293.192.192.192:5000), so we're not quite there yet! At the same time openpgm does compile and complete its tests. However, I'd still appreciate some feedback regarding the format of the changes, or if folks think I should make an OSX branch? Hi Scott, overall the patch looks good. Following things came into mind when skimming through it: 1) rather than having a switch to checkout directly from openpgm svn it might make more sense to add --with-pgm-source=/path/to switch that would allow specifying a path in the filesystem. This approach would allow testing local changes a lot more easily and doesn't break if openpgm decides to change repository location in the future. What do you think? 2) The automake conditional uses ON_DARWIN but the code uses ZMQ_HAVE_OSX. I think it would be safe to use ON_OSX in automake as well. 3) PGMEXTRASOURCE should be PGM_EXTRA_SOURCE or even AC_ZMQ_PGM_EXTRA_SOURCE. 4) libpgm_diff_flags inside ON_DARWIN should be one per line. I think the plan is to add support for building libzmq with openpgm on Solaris and FreeBSD as well. It might even make sense to split operating system specifics into their respective automake files and include based on operating system. It might be a bit cleaner approach than using conditionals. I am not sure whether this is possible just by doing AC_CONFIG_FILES([foreign/Makefile.linux.am]) or something similar. Can you send the patch as attachment as well so that I can properly test it? It seems that my mail client doesn't handle inline patches very well. -- Mikko Koppanen ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev
Re: [zeromq-dev] [patch] 0001-Added-support-for-latest-OpenPGM-5.1.99-on-OSX10.6.patch
On Tue, Dec 21, 2010 at 1:44 AM, Steven McCoy steven.mc...@miru.hk wrote: On 21 December 2010 16:26, Scott alcoholi...@gmail.com wrote: + +PGMEXTRASOURCE = \ + ../foreign/openpgm/@pgm_basename@/openpgm/pgm/getprotobyname.c \ + ../foreign/openpgm/@pgm_basename@/openpgm/pgm/getnetbyname.c + noinst_LTLIBRARIES = libpgm.la nodist_libpgm_la_SOURCES = ../foreign/openpgm/@pgm_basename@/openpgm/pgm/thread.c \ @@ -49,7 +54,8 @@ nodist_libpgm_la_SOURCES = ../foreign/openpgm/@pgm_basename@/openpgm/pgm/thread. ../foreign/openpgm/@pgm_basename@/openpgm/pgm/galois_tables.c \ ../foreign/openpgm/@pgm_basename@/openpgm/pgm/wsastrerror.c \ ../foreign/openpgm/@pgm_basename@/openpgm/pgm/histogram.c \ - ../foreign/openpgm/@pgm_basename@/openpgm/pgm/version.c + ../foreign/openpgm/@pgm_basename@/openpgm/pgm/version.c \ + $(PGMEXTRASOURCE) I'm not seeing the prevalence for PGMEXTRASOURCE? These are files that are in the new version of the openpgm library, so this was how I made them conditional. +if ON_DARWIN +libpgm_diff_flags = \ + -DCONFIG_BIND_INADDR_ANY \ ... + -DCONFIG_HAVE_ALLOCA_H \ + -DCONFIG_HAVE_BACKTRACE \ + -DCONFIG_HAVE_PROC \ -DCONFIG_HAVE_GETTIMEOFDAY=1 -DCONFIG_HAVE_FTIME I don't think these should be here for Darwin, the latter two are covered by pgm/impl/features.h. Yes they are - but pgm/impl/features.h is incorrectly (I believe) interpreting the _POSIX or __POSIX flags and setting CONFIG_HAVE_CLOCK_GETTIME +else libpgm_diff_flags = \ -DCONFIG_HAVE_GETPROTOBYNAME_R2 \ -DCONFIG_HAVE_ISO_VARARGS \ @@ -225,8 +256,10 @@ libpgm_diff_flags = \ -DCONFIG_HAVE_SPRINTF_GROUPING \ -DCONFIG_HAVE_VASPRINTF \ -DCONFIG_BIND_INADDR_ANY \ - -DCONFIG_HAVE_GETOPT -endif + -DCONFIG_HAVE_GETOPT \ + -DPGM_GNUC_INTERNAL= +endif !ON_DARWIN +endif !ON_MINGW You should add for the default case (Linux Solaris) -DCONFIG_HAVE_POSIX_SPINLOCK, and -DCONFIG_HAVE_GETNETENT should be in there even though I messed it up upstream. OK - I'll add them, but I can't test them. Which reminds me, I have a question about how we're linking with openpgm that I'll put in it's own thread. On 21 December 2010 16:49, Scott alcoholi...@gmail.com wrote: Well... after a little testing, I find that it's exploding when I try to do a connect(epgm://en1;293.192.192.192:5000), so we're not quite there yet! At the same time openpgm does compile and complete its tests. Run with PGM_MIN_LOG_LEVEL=TRACE for extra output, DEBUG level only works in debug build and will give you even more output. I'm assuming that 293.192.192.192 is a typo, valid multicast addresses are 224.0.0.0 to 239.255.255.255. Well spotted, yep - typo. Should have been 239.192.192.192 In general, super impressed with the whole zeromq library! -- Steve-o ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev
[zeromq-dev] OpenPGM build process
(OK - I did a little googling before opening my mouth and saw some discussion about this prior) I guess I'm starting with the assumption that tracking the latest version of openpgm is a good idea. I have zero experience with it, so that may be naive (and wrong!). Regardless can someone comment on the following build ideas: 1) doing a full build / install in the openpgm tree and then using libpgm-pic.a or libpgm.a if static linking is faster. This would seem to get a lot of the cross project dependencies out. Is there a problem with this approach (again, I'm new around here!)? For instance, having to add the extra source files for the latest version in the zeromq Makefile.am makes me think I'm doing it wrong! :) 2) If we want to support more platforms and link directly, maybe rip out the good stuff from the OS specific SConstruct.* files in openpgm, and put them somewhere in the zeromq tree in an autotools friendly manner, so it would keep them from interfering with each other, and it would make tracking the openpgm folks easier. -Scott ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev
Re: [zeromq-dev] Monitoring and management question
2010/12/21 Steven McCoy steven.mc...@miru.hk On 21 December 2010 21:12, Juan Carlos Franzoy jfran...@gmail.com wrote: Is there any plan to add some observability to ZMQ library? Something like a getsockopt that list the visibility state of the endpoints the socket is connected to? The general reply is that 0mq is a messaging middleware not a streaming middleware, therefore there is no link state. You could technically have an equivalent to Linux netlink sockets providing link layer notifications as a workaround. The more useful statistic would be to have a decaying indicator of last response from each peer. http://en.wikipedia.org/wiki/Netlink I understand it is a messaging middleware, but wouldn't it be a good thing if you can monitor the state of the middleware? : - state of connection - visibility of peers - occupation of internal queues - any other already known data ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev
Re: [zeromq-dev] I've written a completely new C# API for ZeroMQ
Great! I would suggest adding a link to your project to www.zeromq.org. It's wiki, so you can do so yourself. Gladly, done. I am not familiar with CLR. Doesn't the problem the context is solving (i.e. zeromq being used from two libraries that are later on linked into a single application and step on each other toes) occur with .NET as well? That is a very good question that I don't know if I can answer. I figured the problem it was solving essentially boiled down to no global variables. Where is there an opportunity for undesirable interaction? A side issue: Wouldn't it make sense for you clrzmq, clrzmq2, NZMQ and Interop guys to at least start working on integration of all the projects? I mean, writing the code is easy, maintaining it and fixing the bugs is hard. If the projects are integrated into a single one you could support four time more features, fix four time more bug, make the whole binding four times more stable. Aside of that, having a community is much more fun than working alone :) I'd be up for it. How active is clrzmq2? NZMQ seems to have stalled 3-4 months ago. ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev
Re: [zeromq-dev] I've written a completely new C# API for ZeroMQ
On 12/21/2010 07:07 PM, Alex Forster wrote: I am not familiar with CLR. Doesn't the problem the context is solving (i.e. zeromq being used from two libraries that are later on linked into a single application and step on each other toes) occur with .NET as well? That is a very good question that I don't know if I can answer. I figured the problem it was solving essentially boiled down to no global variables. Where is there an opportunity for undesirable interaction? For example, the names of inproc endpoints are stored in the context. If library A uses inproc endpoint named X and library B accidentally uses endpoint X as well, they start messining with each other. A side issue: Wouldn't it make sense for you clrzmq, clrzmq2, NZMQ and Interop guys to at least start working on integration of all the projects? I mean, writing the code is easy, maintaining it and fixing the bugs is hard. If the projects are integrated into a single one you could support four time more features, fix four time more bug, make the whole binding four times more stable. Aside of that, having a community is much more fun than working alone :) I'd be up for it. How active is clrzmq2? NZMQ seems to have stalled 3-4 months ago. I don't know. Try pinging the authors... Martin ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev
Re: [zeromq-dev] I've written a completely new C# API for ZeroMQ
I'm the primary author and maintainer of clrzmq2, it monitor for issue and will endeavour to resolve them when they arise. I monitor the mailing list and drop into #zeromq now and then. I notice NUZQ seems to use lambdas, these were introduced in .NET 3.0, I purposely kept clrzmq2 targeting .net 2.0. The fact is a 2.0 is the prevalent .NET framework, many large organization will actually only be using that. The application I maintain as a day job is targeted at 2.0 and I work for a very large investment bank. On Tue, 2010-12-21 at 13:07 -0500, Alex Forster wrote: Great! I would suggest adding a link to your project to www.zeromq.org. It's wiki, so you can do so yourself. Gladly, done. I am not familiar with CLR. Doesn't the problem the context is solving (i.e. zeromq being used from two libraries that are later on linked into a single application and step on each other toes) occur with .NET as well? That is a very good question that I don't know if I can answer. I figured the problem it was solving essentially boiled down to no global variables. Where is there an opportunity for undesirable interaction? A side issue: Wouldn't it make sense for you clrzmq, clrzmq2, NZMQ and Interop guys to at least start working on integration of all the projects? I mean, writing the code is easy, maintaining it and fixing the bugs is hard. If the projects are integrated into a single one you could support four time more features, fix four time more bug, make the whole binding four times more stable. Aside of that, having a community is much more fun than working alone :) I'd be up for it. How active is clrzmq2? NZMQ seems to have stalled 3-4 months ago. ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev
Re: [zeromq-dev] Monitoring and management question
Juan, I understand it is a messaging middleware, but wouldn't it be a good thing if you can monitor the state of the middleware? : - state of connection - visibility of peers - occupation of internal queues - any other already known data There's an internal monitoring system built into 0MQ/2.1, so yes, this can be done. However, what I fear is that exposing this kind of info would immediately result in people using it to drive business logic rather then using it for system monitoring. That in turn breaks the not-connected design of 0MQ, severely hurts scalability etc. My feeling is that not having monitoring is less harmful than introducing features that directly defeat the goals of the project. Martin ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev
Re: [zeromq-dev] sending messages to a specific peer
mike castleman said the following on 12/20/2010 1:50 PM: One solution which may work is to use XREP/XREQ sockets: the client sets its identity on connect and then proceeds to ignore the usual REP/REQ pattern in favor of just waiting for messages from the server. A minimal implementation of this pattern (in Ruby) is at https://gist.github.com/748886. This seems to work, but it also seems like an abuse of XREP/XREQ. My understanding was that XREP/XREQ are basically abuse-friendly variants of REP/REQ, for exactly this kind of use case :) - Oliver ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev
Re: [zeromq-dev] I've written a completely new C# API for ZeroMQ
For example, the names of inproc endpoints are stored in the context. If library A uses inproc endpoint named X and library B accidentally uses endpoint X as well, they start messining with each other. That's a very good point, I'll definitely have to address that. I'm willing to jump through hoops to keep automatic context management, since it's such a perfect fit for RAII-esque language features, and API simplicity was my main motivation for a rewrite. Are there any other specific points of contention you can think off off-hand, or are there any fundamental issues that completely prevent it from working stably this way? ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev
Re: [zeromq-dev] I've written a completely new C# API for ZeroMQ
You do know that clrzmq2 supported all of what you mentioned besides the reference counting. If you had of submitted a patch for clrzmq2 it would have been very welcome. On Tue, 2010-12-21 at 09:00 -0200, Vinicius Chiele wrote: Great job Alex, your implementation is very clean and simple, I liked it. Vinicius Chiele 2010/12/21 Alex Forster a...@alexforster.com I have quite a few gripes with clrzmq and clrzmq2, and NZMQ is incomplete in several areas, so over a few weekends this past month I've written a new C# API for ZeroMQ based on the 2.0.10 release of zmq.h. ZeroMQ Interop v0.8.190.10354 (beta) http://zeromq.codeplex.com * Feature-complete * MIT licensed * Targeted at both Microsoft and Mono .NET 2.0 CLRs (though it does require a 3.5 compatible compiler, basically for lambda syntax) * Includes binaries for both 32 and 64bit platforms (without any #ifdefs) Here's an example using Pub/Sub sockets- // Set up a publisher. var publisher = new ZmqPublishSocket { Identity = Guid.NewGuid().ToByteArray(), RecoverySeconds = 10 }; publisher.Bind( address: tcp://127.0.0.1:9292 ); // Set up a subscriber. var subscriber = new ZmqSubscribeSocket(); subscriber.Connect( address: tcp://127.0.0.1:9292 ); subscriber.Subscribe( prefix: ); // subscribe to all messages // Add a handler to the subscriber's OnReceive event subscriber.OnReceive += () = { String message; subscriber.Receive( out message, nonblocking: true ); Console.WriteLine( message ); }; // Publish a message to all subscribers. publisher.Send( Hello world! ); A few things that make this sample stand out from the other two ZeroMQ C# libraries- * There's no need to manage your ZeroMQ context; it's taken care of on a per-AppDomain basis using refcounting. * There is no message object because it provides no added benefit in C#. Messages are simply Byte[]s, with overloads throughout the API that accept Strings. * First-class support for .NET events programming, implemented using zmq_poll() (but that's completely transparent to the user). I'd love some feedback. I'm just starting to use it in a project I'm working on, and so far it all seems to be working smoothly and at high throughput, but I'm releasing it as beta because I don't feel that it has enough real-world experience yet. Alex Forster ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev
Re: [zeromq-dev] Who said that?
Martin Sustrik said the following on 12/21/2010 2:08 AM: On 12/20/2010 09:21 PM, Oliver Smith wrote: Martin Sustrik said the following on 12/17/2010 5:15 AM: By bad data you mean malformed 0MQ frames? With 2.1 those are discarded silently and the connection is closed. We should also report the problem via sys://log. No, it's probably data getting reused before it is transmitted - i.e. my issue, but it's very hard to track down because I don't know which of the many nodes is sending it :) The only way I can track that down is to send everything to separate ports and collate at the receiver, until I'm done debugging, and then reunify all of them again. Ok. So what's needed is message tracking for debugging purposes. Fair enough. So what about, for example, writing a simple wrapper over zmq_send() that would attach a message part containing identity of the particular node to every message? Ah - I was arguing this particular incident as one of several reasons why it might be beneficial to have access to the prior-hop information above (i.e. in the application) the zmq_recv(). Another being WAN-transit cases where you do want to avoid exposing any form of internal network-state information from the sender into the packet beyond what is already deducible. That is: you don't actually care what the IP address and port of the last-sender/forwarder are, just that one is different than the other. [Image: An application calling recv() on a single zmq::socket which is abstracting multiple bsd::socket or inproc sockets connected to any number/type of sources] Another use case: cache efficiency. lastSrc = None cache = None while True: msg = zmqSock.recv() src = msg.socketMuxDistinguisher() if src != lastSrc: cache = cacheForSrc[lastSrc] doWork(msg, cache) if itsTimeForACacheCheck(): expireOldCaches() It could be made exceedingly clear that this is NOT any form of a source/return address by allowing the user to provide the local distinguisher. I'm not proposing, in any way or form, that this provide a value that the user ever pass to any ZMQ function. ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev
Re: [zeromq-dev] Who said that?
Erh: cache = cacheForSrc[src] lastSrc = src doWork(msg, cache) ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev
Re: [zeromq-dev] I've written a completely new C# API for ZeroMQ
You do know that clrzmq2 supported all of what you mentioned besides the reference counting. If you had of submitted a patch for clrzmq2 it would have been very welcome. I certainly didn't mean to offend. I'll admit that, while I did have some different ideas as to what a C#-ified ZeroMQ API should look like, the biggest motivator for my rewrite was to become more familiar with ZeroMQ. You'll notice that the p/invoke class (ZeroMQ.Interop) is heavily documented and tested - that was purely for my benefit. ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev
Re: [zeromq-dev] [patch] 0001-Added-support-for-latest-OpenPGM-5.1.99-on-OSX10.6.patch
On 22 December 2010 01:34, Scott alcoholi...@gmail.com wrote: -DCONFIG_HAVE_GETTIMEOFDAY=1 -DCONFIG_HAVE_FTIME I don't think these should be here for Darwin, the latter two are covered by pgm/impl/features.h. Yes they are - but pgm/impl/features.h is incorrectly (I believe) interpreting the _POSIX or __POSIX flags and setting CONFIG_HAVE_CLOCK_GETTIME There is a separate section just for Darwin at the bottom of features.h? #if defined(__APPLE__) # define CONFIG_HAVE_FTIME1 # define CONFIG_HAVE_GETTIMEOFDAY 1 #endif -- Steve-o ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev
Re: [zeromq-dev] I've written a completely new C# API for ZeroMQ
I notice NUZQ seems to use lambdas, these were introduced in .NET 3.0, I purposely kept clrzmq2 targeting .net 2.0. The fact is a 2.0 is the prevalent .NET framework, many large organization will actually only be using that. The application I maintain as a day job is targeted at 2.0 and I work for a very large investment bank. While the project requires a .NET 3.5 compiler to transform the source into IL, the resulting assembly will run on any ECMA-334 (.NET 2.0) compatible CLI. The new language features added to C# in 3.5 all essentially boil down to syntactical sugar. As long as you don't reference any core assemblies that are 3.5-specific (System.Linq, System.Windows, System.ServiceModel, etc) your resulting assembly is .NET 2.0 compatible. http://www.hanselman.com/blog/HowDoExtensionMethodsWorkAndWhyWasANewCLRNotRequired.aspx ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev
Re: [zeromq-dev] [patch] 0001-Added-support-for-latest-OpenPGM-5.1.99-on-OSX10.6.patch
The issue was that the top part with POSIX defines was evaluating TRUE and setting CONFIG_HAVE_CLOCK_GETTIME to 1. Even if the the other part evaluated, I was trying suppress the include of features.h, w/o modifying the openpgm code. On Tue, Dec 21, 2010 at 4:55 PM, Steven McCoy steven.mc...@miru.hk wrote: On 22 December 2010 01:34, Scott alcoholi...@gmail.com wrote: -DCONFIG_HAVE_GETTIMEOFDAY=1 -DCONFIG_HAVE_FTIME I don't think these should be here for Darwin, the latter two are covered by pgm/impl/features.h. Yes they are - but pgm/impl/features.h is incorrectly (I believe) interpreting the _POSIX or __POSIX flags and setting CONFIG_HAVE_CLOCK_GETTIME There is a separate section just for Darwin at the bottom of features.h? #if defined(__APPLE__) # define CONFIG_HAVE_FTIME1 # define CONFIG_HAVE_GETTIMEOFDAY 1 #endif -- Steve-o ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev
[zeromq-dev] Consistent Hashing 0MQ
Hi, As an exercice to familiarize myself with 0MQ, I try to code a simple Memcached-like distributed in-memory key-value store. The most staightforward architecture I could figure is a OMQ device distributing requests to backends, which are simple processes managing a data structure that store key-value pairs. The problem is that I want to use consistent hashing to balance the load between the backends but 0MQ XREQ sockets use round-robin to thid end. So, is there a simple way to use consistent hashing instead of round-robin with XREQ sockets ? ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev
Re: [zeromq-dev] [patch] 0001-Added-support-for-latest-OpenPGM-5.1.99-on-OSX10.6.patch
On what version of OSX? I'm on 10.6.5 and this is never raised: --- include/impl/features.h (revision 1244) +++ include/impl/features.h (working copy) @@ -35,6 +35,7 @@ # define CONFIG_HAVE_GETTIMEOFDAY 1 # endif # if (_POSIX_C_SOURCE - 0) = 199309L || (__POSIX_VISIBLE - 0) = 199309L +#error clock_gettime # define CONFIG_HAVE_CLOCK_GETTIME 1 # endif #endif -- Steve-o On 22 December 2010 09:18, Scott alcoholi...@gmail.com wrote: The issue was that the top part with POSIX defines was evaluating TRUE and setting CONFIG_HAVE_CLOCK_GETTIME to 1. Even if the the other part evaluated, I was trying suppress the include of features.h, w/o modifying the openpgm code. On Tue, Dec 21, 2010 at 4:55 PM, Steven McCoy steven.mc...@miru.hkwrote: On 22 December 2010 01:34, Scott alcoholi...@gmail.com wrote: -DCONFIG_HAVE_GETTIMEOFDAY=1 -DCONFIG_HAVE_FTIME I don't think these should be here for Darwin, the latter two are covered by pgm/impl/features.h. Yes they are - but pgm/impl/features.h is incorrectly (I believe) interpreting the _POSIX or __POSIX flags and setting CONFIG_HAVE_CLOCK_GETTIME There is a separate section just for Darwin at the bottom of features.h? #if defined(__APPLE__) # define CONFIG_HAVE_FTIME1 # define CONFIG_HAVE_GETTIMEOFDAY 1 #endif -- Steve-o ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev
Re: [zeromq-dev] [patch] 0001-Added-support-for-latest-OpenPGM-5.1.99-on-OSX10.6.patch
On 21 December 2010 16:26, Scott alcoholi...@gmail.com wrote: Hey folks... I added support for OpenPGM on OS X 10.6 (Snow Leopard), here's what it involved: I manually applied bits of the patch and it built correctly with the attached patch. Note that CONFIG_HAVE_GETNETENT actually fails to build and needs 5.1.100, oh well. Just remove the definition for '99. Patch released under MIT/X11 license. It's a regular diff, not a git-diff as I don't have git on OSX. -- Steve-o 0mq-pgm-osx.patch Description: Binary data ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev