I've been working with ZeroMQ lately and I think I've fallen in love.
It's rare that a technology or framework just jumps out at you, but here is one that will get your head spinning on the different ways that it can make your architecture more scalable, more powerful, and all the while offering a frictionless way of achieving this.
I've been building distributed, multi-threaded applications since college, and ZeroMQ has changed everything for me.
It initially started with a need to build a distributed event processing engine. I had wanted to try implementing it in WCF using peer-to-peer and/or MSMQ endpoints, but the thought of the complexity of managing that stack along with the configuration and setup seemed like it would be at least fruitful to look into a few other alternatives.
RabbitMQ and ZeroMQ were the clear front-runners for me. I really liked the richness of documentation and examples with RabbitMQ and if you look at some statistics, it has a much greater rate of mentions on Stack so we can assume that it has a higher rate of adoption. But at the core of it, I think that there really is no comparison between these two except for the fact that they both have "MQ" in their names.
It's true that one could build RabbitMQ like functionality on top of ZeroMQ, but to a degree, I think that would be defeating the purpose. The beauty of ZeroMQ is that it's so lightweight and so fast that it's really hard to believe; there's just one reference to add to your project. No central server to configure. No single point of failure. No configuration files. No need to think about failovers and clustering. Nothing. Just plug and go. But there is a cost to this: a huge tradeoff in some of the higher level features that -- if you want -- you have to build yourself.
If you understand your use cases and you understand the limitations of ZeroMQ and where it's best used, you can find some amazing ways to leverage it to make your applications more scalable.
One such use case I've been thinking about is using it to build a highly scalable web-request processing engine which would allow scaling by adding lots of cheap, heterogeneous nodes. You see, with ASP.NET, unless you explicitly build a concurrency-oriented application, your web server processing is single-threaded per request and you can only ever generate output HTML at the sum of the costs of generating each sub part of your view. To get around this, we could consider a processing engine that would be able to parse controls and send the processing off -- in parallel -- to multiple processors and then reassemble the output HTML before feeding it back to the client. In this scenario, the cost of rendering the page is the overhead of the request plus the cost of the most expensive part of the view generation.
The following diagram conceptualizes this in ZeroMQ:
Even if an ASP.NET application is architected and programmed for concurrency from the get-go, you are limited by the constraints of the hardware (# of concurrent threads). Of course, you can add more servers and put a load balancer in front of them, but this can be an expensive proposition. Perhaps a better architecture would be to design a system that allows adding cheap, heterogeneous server instances that do nothing but process parts of a view.
In such an architecture, it would be possible to scale the system at any level by simply adding more nodes -- at any level. They could be entirely heterogeneous; no need for IIS, in fact, the servers don't even have to be Windows servers. The tradeoff is that you have to manage the session information yourself and push the relevant information down through the pipeline or at least make it accessible via a high speed interface (maybe like a Redis or Memcached?).
But the net gain is that it would allow for concurrent processing of a single web request and build an infrastructure for handling web requests that is easily scaled with cheap, simple nodes.
Wired has a fascinating article which focuses on the world's dwindling supply of plutonium-238, a veritable super fuel in the field of deep space exploration:
In 1977, the Voyager 1 spacecraft left Earth on a four-year mission to explore Jupiter and Saturn. Thirty-six years later, the car-size probe is still exploring, still sending its findings home. It has now put more than 19 billion kilometers between itself and the sun. Last week NASA announced that Voyager 1 had become the first man-made object to reach interstellar space.
None of this would be possible without the spacecraft’s three batteries filled with plutonium-238. In fact, Most of what humanity knows about the outer planets came back to Earth on plutonium power. Cassini’s ongoing exploration of Saturn, Galileo’s trip to Jupiter, Curiosity’s exploration of the surface of Mars, and the 2015 flyby of Pluto by the New Horizons spacecraft are all fueled by the stuff.
But there’s a problem: We’ve almost run out.
Most of the US supply of plutonium-238 was a byproduct of producing bomb-grade nuclear material. Nowadays, the material is in incredibly short supply with demand, unyielding.
Of course, we have the capability to make more, except for the reality that pitiful funding that is required has been so difficult to obtain:
Since 1994, scientists have pleaded with lawmakers for the money to restart production. The DOE believes a relatively modest $10 to 20 million in funding each year through 2020 could yield an operation capable of making between 3.3 and 11 pounds of plutonium-238 annually — plenty to keep a steady stream of spacecraft in business.
It took countless scientists and their lobbyists more than 15 years just to get lawmakers’ attention. Congressional committees squabbled over if and how to spend $20 million of taxpayers’ money — it took them three years to make up their minds
Any hiccups in funding for plutonium-238 production could put planetary science into a tailspin and delay, strip down, or smother nuclear-powered missions.
Support science and share this story!
While there has been a lot of chirping about the shifting racial makeup of Americans, Republicans already have a very big problem that crushes any discussion of the Latino or minority vote.
The Latino-American vote issue is going to start to pop up, but states like Texas are in no danger of turning Democratic for at least 4-5 more cycles. On the other hand, Republicans are losing the battle for women today by a big margin.
The real wakeup call should be Republican messaging and policies when it comes to the female vote -- it's the single largest block of voters by population and participation and it broke for Democrats by 11 points.
It is time to marginalize those who, even when not directly resorting to violence, use hatred of America or the West or Israel as the central organizing principle of politics, for that only gives cover and sometimes makes an excuse for those who do resort to violence. That brand of politics, one that pits East against West and South against North, Muslims against Christians and Hindu and Jews, can't deliver on the promise of freedom.
To the youth, it offers only false hope. Burning an American flag does nothing to provide a child an education. Smashing apart a restaurant does not fill an empty stomach. Attacking an embassy won't create a single job. That brand of politics only makes it harder to achieve what we must do together, educating our children and creating the opportunities that they deserve, protecting human rights and extending democracy's promise.
...when you strip all away, people everywhere long for the freedom to determine their destiny; the dignity that comes with work; the comfort that comes with faith; and the justice that exists when governments serve their people and not the other way around.
The United States of America will always stand up for these aspirations for our own people and for people all across the world. That was our founding purpose. That is what our history shows. That is what Chris Stevens worked for throughout his life.
What could be more boring than mathematical equations? The majority of folks would be hard pressed to find something to answer that hypothetical query. Myself included I'll be honest, I'm a math minor and I picked up this book on a whim in a bookstore thinking to myself "Now why would anyone want to write or buy a book on 17 equations?" I flipped through it and immediately knew that I had to consume the rest of this book.
What Stewart is able to do is to take these 17 equations that manifest in everything we do, everything we observe, everything bit of space around us and bring life to them. He presents the opening of each chapter with a concise summary of these equations that helps immensely in revealing the underlying nature of the equations and then goes into the history of the creation (discovery?) of each of these equations and it's been an eye-opening read.
As an example, having majored in computer science, I worked constantly with logarithms and natural logs (there's lumber joke here somewhere) but never once understood the nature of logarithms. How did they come about? Why do they exist? What problem do they address? Just what in the heck is a logarithm? I knew them only in the abstract -- as operations that yielded a result; I knew them as a general pattern but not the nature of the logarithm. The second chapter simply blew me away with the clarity and simplicity with which Stewart was able to pull back the covers on what logarithms actually mean. No one in my years of formal education had bothered to explain it in the same way that Stewart does in this book.
While I cannot say that this book is for everyone, I will say that I find it is surprisingly approachable for most folks who are scientifically or mathematically inclined. Certainly, there are many equations and plenty of mathematics (and it gets especially complex (pun intended in the later chapters. However, I think this book is still immensely readable and approachable, even for those who have never ventured deep into the vast field of mathematics or have long moved past their days of calculus, linear algebra, and so on. I, for one, will make sure that my daughter reads the chapter on logarithms as it starts to seep into her curriculum one day to make sure she understands the "why" and so that she has an appreciation for all of the history and magic behind that little "log n" button on her calculator.
This book is incredibly well written, well presented such that it is approachable for a large audience, an entertaining read, and highly recommended. If you've read this review to this point, you should probably just go ahead and by this book!
Ever since my trip out to Switzerland, I've been jonesing for an espresso machine. After a lot of research, checking out lots of youtube videos, almost pulling the trigger various times, I ended up purchasing the DeLonghi ESAM5600 SL from JL Hufford. I briefly considered Nespresso machines, but without recycling centers nearby, it seemed like very wasteful and not to mention the cost of the pods would be expensive over the lifetime of the machine. Besides: I like to be able to choose my own beans.
We'll see how this DeLonghi holds up over time. I expect to get a lot of use out of it
It's finally happened! My pineapple is finally flowering WOOOOOOOOOOO! I can't even believe it. I didn't even notice it until I randomly looked over and took note that I probably need to water it.
I started this plant some 3-4 years ago now (after my previous one died due to exposure to the cold) and it's FINALLY bearing a flower (in the middle of frickin' winter no less!). I am very much looking forward to eating this pineapple
Finally got around the cleaning up my office (after 4 years...) . Love the way it turned out and much more work space with much less clutter.
For reference, this is what it looked like previously.
I've blogged about it before, but seriously, the question has to be asked: if you're a developer with limited bandwidth to focus on mastering new technologies, why would you spend that time on Silverlight?
Not only is WP7 floundering, but now the news is out: the Metro version of IE 10 in Windows 8 won't support any plugins - including Silverlight:
Windows 8 will have two versions of Internet Explorer 10: a conventional browser that lives on the legacy desktop, and a new Metro-style, touch-friendly browser that lives in the Metro world. The second of these, the Metro browser, will not support any plugins. Whether Flash, Silverlight, or some custom business app, sites that need plugins will only be accessible in the non-touch, desktop-based browser.
Should one ever come across a page that needs a plugin, the Metro browser has a button to go to that page within the desktop browser. This yanks you out of the Metro experience and places you on the traditional desktop.
The rationale is a familiar one: plugin-based content shortens battery life, and comes with security, reliability, and privacy problems. Sites that currently depend on the capabilities provided by Flash or Silverlight should switch to HTML5.
If you're not on the HTML5 boat yet, I think the writing is on the wall: the Silverlight party is over (thank goodness).