IRC Log

Monday November 7, 2011

[Time] NameMessage
[02:14] dublisk A single zmq_socket can correspond to several actual sockets ?
[02:19] batouzo hi, what are alternative libraries similar to zeromq?
[02:20] dublisk what is it about zeromq that makes you want an alternative/
[02:20] batouzo dunno if it is best :)
[02:21] batouzo actually my goal would be following: in C++, allow easy way to have few peers talking to eachother, in encrypted and signed way, without worring about implementation details, it should work on ipv4, ipv6 and so on... local socket? etc
[02:23] dublisk I think zeromq would be good for that probably, but I'm a total beginner to zeromq, just starting to look at it
[02:23] fsaintjacques except for the encryption part.
[02:27] dublisk if you do zmq_send with ZMQ_NOBLOCK, is there anyway to tell when the send operation finished?
[03:24] dublisk I don't get the asynchronous aspect of zeromq...e.g. doing an asynchronous receive how do you know when the data has been received?
[03:25] dublisk I'm looking at e.g. http://zguide.zeromq.org/cpp:msreader and it makes no sense to me
[03:27] fsaintjacques what are you trying to accomplish
[03:27] dublisk just understand whats going on
[03:28] dublisk the recv call returns immediately, so how can you 'process the task'
[03:29] fsaintjacques http://api.zeromq.org/2-1:zmq-recv
[03:30] dublisk I read that
[03:31] dublisk I'm reading this section http://zguide.zeromq.org/page:all#Handling-Multiple-Sockets
[03:31] fsaintjacques well it won't process the task
[03:31] fsaintjacques since recv will return != 0
[03:31] dublisk It has the line if ((rc = zmq_recv (receiver, &task, ZMQ_NOBLOCK)) == 0) { // process task }
[03:32] fsaintjacques and the recv man page says what about return code?
[03:33] dublisk Say there is a message available to be read
[03:33] fsaintjacques to be precise
[03:33] fsaintjacques "The zmq_recv() function shall return zero if successful. Otherwise it shall return -1 and set errno to one of the values defined below."
[03:33] dublisk yes I read that, so?
[03:34] dublisk Its (supposedly) asycnhronous
[03:34] fsaintjacques if you set NOBLOCK and there is no message
[03:34] fsaintjacques it will return -1
[03:34] dublisk yes, so say there IS a message
[03:34] fsaintjacques and you won't have to process the non-existing message
[03:34] fsaintjacques well, if there is a message
[03:34] fsaintjacques you process it.
[03:34] dublisk is the message read before zmq_recv returns?
[03:34] dublisk how the hell is that asynchronous then
[03:34] dublisk thats just polling, that's not asynchronous
[03:38] fsaintjacques I don't think they're implying thatmsreader is asynchronous, but only nonblocking.
[03:41] dublisk I guess I got confused because the guide keeps saying zeromq uses an asynchronous I/O model
[03:51] fsaintjacques they async implementation is in chapter 3
[03:51] fsaintjacques http://api.zeromq.org/2-1:zmq-recv
[03:55] dublisk wrong link ?
[04:28] fsaintjacques yes sorry
[04:28] fsaintjacques http://zguide.zeromq.org/page:all#Asynchronous-Client-Server
[15:36] MadeR Greetings, I have a question on the "ipc" transport, many processes on the same machine. Is a message "shared" among these processes, or does each process have its own copy? i.e. Does zeromq's ipc use copy_on_write?
[15:44] mikko MadeR: on ipc there is a copy
[15:44] mikko MadeR: i would assume
[15:44] mikko MadeR: as it goes over a pipe
[15:44] sustrik yes, there's a copy
[15:44] sustrik it doesn't use shmem
[15:45] MadeR thank you to you both
[16:52] corto quit