2011-09-22

A Lock Free Concurrent Circular Buffer With Multiple Independent Readers

I wrote about a Lock Free Concurrent Circular Buffer about a year ago.  This has now been updated to support multiple independent readers, so many consumers can get updates to this circular buffer.

It is still lock free, so the readers won't block.  If you try to take() on a buffer with no updates a null is returned, and if you drain() a buffer with no updates you get an empty list.

The code is now on GitHub, so I recommend you give it a spin if you want a (simple) circular buffer.  It does detect buffer wraparounds, but will in this case reset the reader to the end of the buffer, losing any intermediate updates. Tune your buffer size accordingly.

Take a look at the unit tests to get an idea on how to use this buffer.

2011-09-08

Blogger has an official app for iPhone

This blog post serves as proof that it works.

Seems to do okay, but does not have rich text.

Also the labels do not auto complete.

2011-09-06

So it finally happened...

From "Who do you trust to tell you who to trust?":
The big security news of the past few days is the story of the compromise of the DigiNotar Certificate Authority and the subsequent issuing of fraudulent SSL certificates, leading to actual Man in the Middle attacks against Gmail users in Iran.
and:
When the whole trust structure for SSL was devised, there were many people who worried that it gave too much power to certification authorities. In this instance we had one that suffered a security breach, but imagine if there were a corrupt one. With hundreds of trusted certification authorities, each with the power to issue certificates for any domain, the scope for abuse is substantial. I was one of those worriers.
It is easy to say that I don’t like the system, it is much much harder to present an alternative that works better and doesn’t burden users with the task of performing their own audits of certificates or authorities. There are a number of proposals out there, and discussion of them has certainly kicked off again over the past few days. My post here has already been long enough, so I will redirect readers to a post by Mike Caldwell who proposes an idea I haven’t seen before (as well as linking to other proposals).
Well, I told you so. Basically the use of TLS to ensure trusted domain names is not trustworthy. In my opinion this problem should be solved by the Domain Naming System, not by Transport Layer Security.