Re: [zeromq-dev] C++ syntax for new ZMQ objects

2012-12-15 Thread Mikko Koppanen
On Sun, Dec 16, 2012 at 12:34 AM, Claudio Carbone wrote: > On 15/12/12 16:28, Claudio Carbone wrote: > > > Exact failing point is in socket_base.cpp at line 323: > *rc = parse_uri (addr_, protocol, address); > if (rc != 0) > return -1;* > > Even if rc is effectively 0 (checked in

[zeromq-dev] a question about ZMQ_POlL and usage pattern

2012-12-15 Thread dev
Hello I have some questions about ZMQ_POL : I am not sure I understand fully the usage pattern of ZMQ_POLL :) For me zmq_poll is about blocking on a number of sockets waiting for a set of specifics events. (from http://api.zeromq.org/2-1:zmq-poll) But I often see the following usage pattern

[zeromq-dev] General understanding of ZMQ and architecture advices

2012-12-15 Thread dev
Hello. We are building data mapping tool that gather several sources of information and try to fit them in a common document model for further consumption. Stage one was to design the "mapping machinery" and it was in our mind from the start to distribute the workload among processes and machi

Re: [zeromq-dev] C++ syntax for new ZMQ objects

2012-12-15 Thread Claudio Carbone
On 15/12/12 16:28, Claudio Carbone wrote: Exact failing point is in socket_base.cpp at line 323: /rc = parse_uri (addr_, protocol, address); if (rc != 0) return -1;/ Even if rc is effectively 0 (checked in GDB), the if (don't know why) returns true. I'm at a loss here... My

Re: [zeromq-dev] C++ syntax for new ZMQ objects

2012-12-15 Thread Claudio Carbone
On 15/12/12 15:49, Pieter Hintjens wrote: The straight C semantics are easiest to map to arbitrary languages. The C++ binding could have built abstractions on top but never accomplished this. Ironically the C binding (CZMQ) is somewhat higher-level than the C++ binding. -Pieter Mmm ok but the

Re: [zeromq-dev] Actor Model

2012-12-15 Thread Gleb Peregud
Erlang solves this the following way: - one OS thread is run per cpu core (such thread is called a scheduler) - each erlang actor (called "process") is a very lightweight thread - each scheduler has it's own independent run queue - Erlang virtual machine handles load balancing of erlang processes b

Re: [zeromq-dev] Actor Model

2012-12-15 Thread Bennie Kloosteman
>1. Each thread has one socket. You hash the unique name of the actor and >assign it accordingly to a thread. advantages: no contention. disadvantages: it cannot work if actors have different processing needs. You rely on the randomization of the hash function to balance the work. this is pretty

Re: [zeromq-dev] C++ syntax for new ZMQ objects

2012-12-15 Thread Pieter Hintjens
On Sat, Dec 15, 2012 at 10:18 AM, Claudio Carbone wrote: > I got it now, it's easy looking at the C++ headers: > the C++ bindings are just a C++ styled wrapper of the underlying C > functions. > So the functionality and concept of C is maintained in a C++ syntax. > May I ask what was the reasonin

Re: [zeromq-dev] Actor Model

2012-12-15 Thread Apostolis Xekoukoulotakis
This question is of interest to me as well. Let me give some answers, I havent really implemented them yet: 1. Each thread has one socket. You hash the unique name of the actor and assign it accordingly to a thread. advantages: no contention. disadvantages: it cannot work if actors have different

Re: [zeromq-dev] Actor Model

2012-12-15 Thread Min Yu
Akka on zeromq would be an another fun for you. http://doc.akka.io/docs/akka/snapshot/scala/zeromq.html Thanks Min Dec 15, 2012 9:01 PM Gleb Peregud 작성: If you want the most natural way to code your program according to actor model, just use Erlang. It has a zeromq library, hence you can comm

Re: [zeromq-dev] Actor Model

2012-12-15 Thread Gleb Peregud
If you want the most natural way to code your program according to actor model, just use Erlang. It has a zeromq library, hence you can communicate with outside world using zmq. On Sat, Dec 15, 2012 at 12:27 PM, wrote: > > hi peeps, > > i would like to ask you for some ideas/hints on an actor-mo

Re: [zeromq-dev] Actor Model

2012-12-15 Thread Bennie Kloosteman
I wouldn't like to build an actor model directly on ZeroMQ as you can do better for in memory transport than ZeroMQ and you may want to place some actors on the same server .. as the implementation for an abstract Actor framework is fine just don't tie it to the implementation. Regarding threads

[zeromq-dev] Actor Model

2012-12-15 Thread wilfried
hi peeps, i would like to ask you for some ideas/hints on an actor-model design on top of zeromq. zeromq ships with everything i need, a mailbox, message routing, i don't have to worry about threads etc. i think the straightforward way would be to give every actor one or more sockets for sending

Re: [zeromq-dev] C++ syntax for new ZMQ objects

2012-12-15 Thread Claudio Carbone
On 14/12/12 19:15, Claudio Carbone wrote: > Hello all. > > I'm surely a noob in C++, so I am having difficulties managing ZMQ in > this language. > I got it now, it's easy looking at the C++ headers: the C++ bindings are just a C++ styled wrapper of the underlying C functions. So the functionality

Re: [zeromq-dev] Unable to use PGM (compiled yet "protocol not supported")

2012-12-15 Thread Claudio Carbone
On 15/12/12 02:51, Ian Barber wrote: On Fri, Dec 14, 2012 at 5:15 PM, Claudio Carbone > wrote: Pass the --with-pgm flag on the configure. Ian Thank you Ian, that made it work. Claudio ___ zeromq-dev mailing list zerom