Idempotent is defined as the ability to remain “unchanged when multiplied by itself.1” This is a concept with which Twitter appears to be unfamiliar.
A little background. I finally decided to jump on the Twitter bandwagon. Going to Twitter.com to create an account, I was happy to discover my name was available. I created the account, PaulKlinker, eagerly hit submit, waited a bit, and got the fail whale screen. Not to be deterred by a fail whale, I hit the back button, reentered by data, submitted the request, and got the fail whale again. Once again, I backed the browser up, entered the data, submitted and...Success! I was now the proud owner of a twitter account.
Going into my account, I put in my cell phone number so I could get text messages. Next, I followed John C. Dvorak, and then entered some profile info. I sent a test tweet and finally was all ready to start receiving messages. A couple days later a colleague of mine even started following me.
But, I began to realize I wasn't getting any tweets. Hmm? Checking my email I noticed I had two new Twitter account confirmations. Uh oh. Logging into Twitter confirmed that two accounts were created for PaulKlinker. Apparently one account can send Tweets and the other can receive.
So I had two accounts, with the same name, created during my new account creation process. This is where the importance of idempotence comes in. Looking again at the definition of idempotent, “unchanged when multiplied by itself", means no matter how many times you submit the request to create an account using the same parameters, it only creates one account. When developing network based applications certain operations must be idempotent and Twitter developers need to learn this concept, or at least implement it correctly. I am still dealing with the mess, but more on that later.
Tuesday, February 10, 2009
Subscribe to:
Posts (Atom)