chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] Updating the zmq egg


From: Kristian Lein-Mathisen
Subject: Re: [Chicken-users] Updating the zmq egg
Date: Mon, 9 Mar 2015 09:06:36 +0100


Hi Matt,

Glad to hear others are experimenting with message-based systems! I did some work together with Moritz on the zmq egg and I wrote the nanomsg egg. 

The main reason I wanted to try nanomsg was that it offers Level-triggered PollingThis allows us to do thread-wait-for-i/o on a nanomsg-socket, waiting for a message while other Chicken threads are running. We couldn't solve this with zmq because the zmq_poll C call (just like all C calls) would block the Chicken world. Nanomsg is also smaller than zmq, and written in C, which makes it a little more manageable I think. Creating bindings for nanomsg was a breeze.

Problems with nanomsg is, of course, that it has a smaller community and is much less tested etc. We are still just about to test if nanomsg can solve some of our IPC needs for a commercial project.

When it comes to memory management, it's tricky. I recommend you do like Thomas Chust suggests: have zmq allocate message, copy into Scheme object, free zmq message. Perhaps not the fastest, but it's correct and relatively easy to get right.

Keep us updated on your messaging adventures!
K.

On Fri, Mar 6, 2015 at 2:30 AM, Matt Gushee <address@hidden> wrote:


On Thu, Mar 5, 2015 at 6:18 PM, Dan Leslie <address@hidden> wrote:

You might want to consider the nanomsg egg, which doesn't appear to have
a wiki page yet.

https://github.com/Adellica/chicken-nanomsg

Oh, great, yet another alternative to consider! :-/  Well, maybe. I've never heard of nanomsg before. Any idea how widely-used/well-supported it is?

PS: I still think the future of the zmq egg should be addressed, even if I end up not using it. It doesn't seem very useful to have a library binding that is two major versions behind. Unless someone is using it in production, I'd say it should either be updated or withdrawn.

Matt

_______________________________________________
Chicken-users mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/chicken-users



reply via email to

[Prev in Thread] Current Thread [Next in Thread]