[zeromq-dev] zeromq, rewritten in Rust

Charles Remes lists at chuckremes.com
Mon Mar 3 19:26:11 CET 2014


There was a little twitter chat over the weekend regarding an attempt at writing a ground-up zeromq library using the new systems language Rust. If you haven’t heard of Rust, it is a new language under development by the good folks at Mozilla. It’s original designer has said that he has learned quite a few things from implementing dozens of languages over the years that he felt he could solve some new problems and create a cleaner language. Rust is his attempt at such a feat.

It supposedly solves the problem by borrowing the best from many popular languages.

	* OOP of C++ without the large, unwieldy syntax

	* performance of C while providing good namespacing, OOP, safe memory (i.e. no dangling pointers)

	* the functional expressiveness of Haskell but not at the expense of imperative forms

	* the massive concurrency of Erlang but with a better syntax and a more flexible memory model (borrowed pointers, immutable defaults, etc)

I recently did a small test project to learn the syntax. The language is still evolving, so it’s a bit of a moving target. It’s at release 0.9 with a 1.0 slated for later this year, but they’ve already slipped on delivering a 1.0 for at least a year so I assume it will slip again.

Anyway, I’d like to volunteer to try and spike a simple example to get things started. However, I’d like to start a thread here to discuss “lessons learned” from the existing codebase. We already have a great write-up from Martin Sustrik (primary author of earlier versions of zeromq) here:  

http://250bpm.com/blog:4

http://250bpm.com/blog:8

I’m hoping that others who have read through the source have additional insights that they’d like to share. For instance, I have seen comments that zeromq might have more consistent performance it it was wrapped around a Disruptor (google for that pattern if it’s new to you). People also seem to really dislike the concept of the context (nanomsg has already eliminated this… it still exists but is hidden by the library).

Any other insights?

cr




More information about the zeromq-dev mailing list