RubyConfBR recap

November 1, 2010

Last week I presented at Rubyconf here in Brazil. It was the first edition named Rubyconf, but the folks behind it already had a tradition with Rails Summit. It was a huge event, specially considering that the main focus was a programming language. I got no exact numbers, but people where talking about more than 600 attendants. The site still up and you can see for yourself that there was a lot of interesting people talking.

I was invited by Fabio Akita to speak about non-blocking I/O. It was the first time here in Brazil that I got the opportunity to talk of such topics, and I’m glad that all conferences I attended or presented this year had more technical topics than vendor related and superficial concepts related to methodologies.

I had the opportunity to talk with Jim Weirich and Blaine Cook about what they are doing, and other folks that I happen to see once in a while, even living in Brazil.

Nando Vieira‘s lightning talk was one of the best I saw, along with Blaine Cook talking about webfinger and Emerson Macedo about Node.JS

There goes my slide deck


It’s a big title, but the technology behind a simple collaborative editing textarea can be simple and interesting.

By using a derivative work from pubsub_ws along with diff match patch, it was possible to broadcast patches (yes, the same kind of patches you can create with diff -a) between peers using websockets and javascript.

The most interesting part is that I’m not a js expert, but I built the entire stack only using this language, from frontend to backend. There is also a patch to enable diff match patch to be used from node.js.

Here is the code

Twisted COMET

October 28, 2009

I was about to write a post about NGINX, Python, Twisted and COMET, but it got so long that I decided to break it in 2 or 3 parts.

The first one is a kind of follow-up to the last post . This time the subject is a script that will search for a given word in twitter, and update the results in a continuous fashion. Once you point your browser to http://localhost:8000/ it will start to receive the results from time to time, as a big download (which is what COMET is about).


Read the rest of this entry »

I’ve been looking into twisted to build a comet based app. It’s not a hard task, given that you can tune a lot of parameters (including which kind of reactor), but the basics are very interesting. Combining this approach along with a nginx based architecture has given me excellent results.

Read the rest of this entry »

I’ve been using inkscape to draw diagrams, specially abusing its import openclipart feature, but I found out that for simple sequence diagrams, there is another great tool:

Their API is clean and the text parsing very accurate.Choose “Napkin” in the style combo and click draw to see their demo.

I found it via another gem, this caching 101 page for dummies. Things like this and this ‘Threads primer’ are necessary reminder nowadays. There are a lot of butchered applications and architectures popping everywhere, and without these kind souls providing the best of them going thru basic concepts, we’re all doomed.

There goes my contribution, a kind of memcached 101, both in napkin and blue modern styles !

memcached 101 napkin style

memcached 101 napkin style

memcached 101 blue modern style

memcached 101 blue modern style

Paste the code below to generate these diagrams. Note the alt 'command' I used to put both cases in the same diagram.
Gotta love that.

Alice->Application: Asks for her Profile
Application->Memcached: is Alice profile there \?
alt Data is not cached yet
 Memcached->Application: No, it's not here
 Application->Database: get me Alice's Profile
 Database->Application: here is the data - it took me a lot of time, k \?
 Application->Memcached: set Alice Profile there
else data is already cached yay
 Memcached->Application: Got it
Application-->Alice: Response (her profile data)