Diagrams, cache and threads 101 (and a little ranting)

December 3, 2008

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: http://www.websequencediagrams.com/.

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
end
Application-->Alice: Response (her profile data)

Advertisements

One Response to “Diagrams, cache and threads 101 (and a little ranting)”

  1. lustyscripps Says:

    good to know about websequencediagrams.com, it’ll be much useful to create sip diagrams.


Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: