Website of Martin Sústrik, creator of ZeroMQ, nanomsg, libdill, libmill and ribosome.

Feuilletons about software design, economics, complex systems and psychology of programming.

All the opinions stated here are my own. Any resemblance to opinions of other people, living or dead, is purely coincidental.

Enclave Pattern

In my last blog post I've ranted about problems with implementing intrusive containers in C++. The main problem is that to allow an object to be included into an intrusive container you have to modify the object itself, for example, add 'prev' and 'next' member variables to it. That in turn breaks the encapsulation principle. In rigorous object-oriented design the item is owned by the container, and thus the container should be aware of the item but not vice versa. There have been a lot of...

Comments: 38

Why should I have written ZeroMQ in C, not C++ (part II)

In my previous blog post I've discussed how the need for rigorous error handling in low-level infrastructure software prevents the usage of many fundamental C++ features (exceptions, constructors, destructors). The conclusion was that with such a severely limited feature set, writing the program in C yields shorter and more readable codebase. A side effect is eliminating the dependency on C++ runtime library, which shouldn't be easily dismissed, especially in embedded environments. In this blog...

Comments: 182

Does GPL hurt free software?

I've run into a problem recently. As explained elsewhere, my long-term goal was to use Crossroads/ZeroMQ as a first step on the road to messaging as native layer of the Internet stack. The idea is that in addition to routing layer like IP and reliability layer like TCP there should be a scalability layer, similar to Crossroads/ZeroMQ available out of the box, as part of operating system, everywhere and without a need to care about it. That, obviously, means that the scalability layer should be...

Comments: 26

Using likely() and unlikely()

If you ever skimmed linux kernel code may have noticed that condition expressions are often marked as either 'likely' or 'unlikely': if (likely (i == 0)) { ... } What is it good for? These directives are translated into the following GCC directives: #define likely(x) __builtin_expect ((x), 1) #define unlikely(x) __builtin_expect ((x), 0) These in turn instruct the compiler which branch of the program should be faster and which may execute slower. To understand how it works we need to...

Comments: 12

Distributed Computing: The Survey Pattern

Survey is a well established pattern both in real world and in distributed computing. Think of census. You send census forms to everyone, collect the results and move on with computing statistics or whatever. In distributed computing, the common usage of survey pattern is service discovery. You ask a generic question not aimed at a particular peer: Are there any services out there? Then you collect the responses ( I can process payments! , I can render images! , I can add two integers! ...

Comments: 5

Why should I have written ZeroMQ in C, not C++ (part I)

Just to be clear from the very beginning: This is not going to be a Torvalds-ish rant against C++ from the point of view of die-hard C programmer. I've been using C++ whole my professional career and it's still my language of choice when doing most projects. Naturally, when I started ZeroMQ project back in 2007, I've opted for C++. The main reasons were: Library of data structures and algorithms (STL) is part of the language. With C I would have to either depend on a 3rd party library or had to...

Comments: 249

Silicon Valley, Hollywood and Iceland as the New Superpower

When following the news about restrictive legislation, the likes of SOPA, PIPA and ACTA, when watching the strife between Hollywood and Silicon Valley , when thinking about the struggle between service providers and content owners, between the new and old economy, one wonders whether a country that would firmly stand behind the Silicon Valley model and lovingly embrace the emerging post-scarcity economy wouldn't reap a great benefit from doing so, the same way as England did during the...

Comments: 0

Economics of Messaging Software

It gets quite complicated to explain what's the difference between traditional business messaging (products like IBM's WebSphere MQ, APIs like JMS and protocols like AMQP or MQTT) and distributed messaging (as implemented by ØMQ). Both are the ways for applications to speak each to another easily. However, once you get to describing the differences, the discussion breaks into lots of messy technical details and the big picture disappears. To understand the big picture, I believe, one has to...

Comments: 0

ØMQ: Mission Accomplished

Last week I've refactored ØMQ codebase cutting off all the experimental features and making it more backward compatible with older versions. The refactoring resulted in a version, ØMQ/3.1, which was then selected by the community vote as a sanest way forward. The refactoring meant throwing lot of work I've done in the past months into the trash. Why had it left me with a strange craving for a bottle of champagne and a tin of caviar then? Well, it proved me wrong in assuming that ØMQ is a new...

Comments: 0

page 5 of 5« previous12345

Website powered by Wikidot.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License