6) Do I understand correctly that the zeromq.node could be alternatively re-done as a thin layer on top of zmq-stream? Just create socket, subscribe to 'readable' event, emit 'message' event with read messages. Drain and write error code is ignored in this case. 7) Does it work well with pub/sub? I don't see subscribe/unsibscribe, only the options. So I'm not sure if it's really available.
суббота, 9 февраля 2013 г., 0:45:32 UTC+7 пользователь Michael Schoonmaker написал: > > I want to make sure I'm not unnecessarily duplicating effort. > > The existing ZeroMQ library (https://npmjs.org/package/zmq) is > _perfect_ for a significant number of use cases. It handles a lot of > the low-level socket management for you, automatically emitting > 'message' events as new messages arrive. Awesome. > > While it was invaluable for developing the current version of Shuttle, > for the next version I want to further utilize the existing queue > mechanics inherent to ZeroMQ, and pull from sockets _manually_, rather > than automatically. (For reasons and examples, see the Guide. It's a > delightful read: http://zguide.zeromq.org/page:all) > > I'm planning on building a new set of ZeroMQ bindings that take > inspiration from the streams2 Duplex class, albeit reading and writing > in _messages_ rather than bytes (although it would be simple to write > a set of Transforms to make these pseudo-Duplexes behave more like > true streams2 Duplexes, fracturing the message frames back into > bytestreams. It seems like an odd use case, but is fortunately > workable). > > Is anyone planning on similar work, or should I continue unabated? > > -Schoon > -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
