Feb 24

image At the Chicago Code Camp this last month (May 30th) I got to see a great presentation by Micah Martin (@slagyr) entitled “Ruby Kata and Sparring”.  Micah’s presentation was in a very “Zen” style and the majority of his talk was about the importance of practicing your coding skills.  He talked about how we can learn from two common types of training that are used in the various martial arts:

Kata – detailed choreographed patterns of movements practiced either solo or in pairs…most commonly known for the presence in the martial arts

Sparring – relatively ‘free-form’ fighting, with enough rules, customs, or agreements to make injuries unlikely

After he introduced the concept of Kata, he showed us a demonstration using a well known exercise called Langston’s Ant.  Micah bowed to the audience (as is typical in Kata) and proceeded to  “live code” his implementation from scratch and ended with another bow to the audience (also typical).  The Langston’s Ant has no perfect solution, so he then asked the audience to rate his code and to give him feedback on how to improve his implementation.

One of the things that struck me was how Micah answered the question “It seems like you are very practiced in writing this solution, how many times have you done this?”.  Micah told us that he had done the solution more than 50 times.  He did point out that he had not done the same implementation 50 times (as if he were practicing giving a Langston’s Ant demonstration), but had evolved his implementation over the course of his Kata sessions.  His 50th solution was “better” than the first solution as he had refined it; just like your technique should get better as you practice your martial arts.

barbell

I personally need to get a coding workout.  I am an evangelist for Microsoft, but that actually involves a lot less coding time than most people would think (the amount of time varies from individual to individual, some of my colleagues code a lot more than others).  A field evangelist for Microsoft is typically a technology generalist, having to cover a real breadth of technologies.  As you may know, Microsoft has a lot of technologies, so we spend a fair amount of time immersed in learning new things and not necessarily practicing our coding skills.

Over the course of the summer, I intend to get a coding workout; knock the rust off or sharpen the saw as it were.  I am going to practice a coding exercise every week (unless I take a week off for vacation; which I would totally unplug for).  To keep myself honest, I am going to post something about each workout up on the blog, even if it is to admit a FAIL.  Look for the first post next week: Coding Workout: A twitter badge using jQuery.

Note: I have been on an un-planned blogging hiatus for the last 2+ months.  It is not that I have not had things I have wanted to say, but have just been short of time to say them.  For those of you who have stuck around (kept me in your RSS reader or checked the site for updates), I thank you for your patience. I did want to write a “Sorry for not blogging” post (I hate those – just start blogging!).

Jul 13

Holidays in beautiful Umbria (Italy) give the opportunity to do some reading. With a strong interest in clould computing, I read Cloud Application Architectures by Georges Reese this summer. Around the same time last year (2008), I read Programming Amazon Web Services by James Murty.

The book “Programming Amazon Web Services” was really good in 2008. It describes the different Amazon offerings and how to invoke the API’s using Ruby. But Amazon is extending its offering a a rapid pace, e.g. with fixed IP addresses and block storages (like NAS). So James Murty’s book is in need for a 2nd edition.

“Cloud Application Architecture” goes up the stack to a higher abstraction level and explains how to deploy (“architect”) application on the Amazon cloud. Georges Reese has gained practical experience while deploying the Valtira (Web Marketing) application on Amazon.

Reese covers some very interesting topics:

  • Load balancing with software load balancer in the cloud vs. HW load balancer on premise
  • Cost comparison with sample calculation; : making the comparison with operating application on own hardware or in the cloud
  • (High) Availability with some sample calculations
  • Use of stateless application servers
  • (Virtual) Machine images: outweihing generic vs. specific machine images; the use of startup-scripts with user-data
  • Privacy: example on how to separate private information and encrypt it with key generated for each customer/partner/…
  • Database management: outweighing clustering vs replication, whereby replication is usually considered the better option; the slave(s) can be used for read operations and backups; solutions for primary key generation and optimistic locking
  • Data Security: e.g. through file system encryption
  • Network security: security groups as alternative to firewalls, the fact that network intrusion detection cannot be used in Amazon context, why network level encryption still makes sense even if machine cannot see eachother’s traffic at Amazon, system hardening (Bastille), Host intruction detection (OSSEC), anti-virus
  • Disaster Recovery, backups, recovery, redundancy,
  • Scaling & capacity planning, the non-sense of auto-scaling

A real joy to read, but sometimes I would have loved that the author went into some more depth. One thing definitely became clear to me: deploying application on the (Amazon) cloud requires specific approaches and skills with obviously a sound and well-thought architecture. Also specific tools will be helpful and needed: Rightscale and enStratus are mentioned in the book. That’s probably the reason why Reese is also the CTO of enStratus.

We may expect many more cloud books in the coming months but “Cloud Application Architectures” brings quality content well ahead of the pack.

PS: podcast with interview of George Reese available here, same quality and content

Apr 16

Invoking services within the Intranet was in the design of Azure from the start. The .Net Services Bus of Azure allows local services to be called from the cloud.

A connection is setup from within the corporate firewall to the Azure servers in the cloud. This bidirectional connection is used to invoke services on the Intranet. The Services Bus is much more advanced than the Secure Data Connector from Google.

Azure is not limited to .Net, there are also Ruby and Java SDK for .Net Services available! To learn a bit, I downloaded and installed the Java chat sample. Encountered the error “The subscription cannot be created” during my first experiments. But waiting a while resolved the issue: probably the service didn’t unregister correctly during my first runs and the service bus needs to detect that the service was no longer present.

In the Chat example, client and service are running in the same application (multi-threaded). No need to deploy the service implementation in an application server. Also nice to see how the JAX-WS API is leveraged to create the service.

Connecting from Azure to Amazon (or the other way around) should be trivial. But integrating Azure with AppEngine (or Force.com) is a different story. Both cloud have there own version and solution for integration and interoperability. A ESB hosted in the cloud or behind the corporate firewall will bring that interoprability.