After you learn the basic concepts of the cloud, you need to assess the applicability of cloud computing for your application(s). In this article, I discuss some of the aspects of cloud computing that you must take into consideration before you start the development process and go too deep into cloud integration. I am not going to rewrite the "Gang of Four" Design Patterns book for cloud, but I will touch on some of the key aspects of a cloud environment that you need to consider:
- "State" of your VM
We have been looking at Amazon EC2, and we will tailor our discussion towards that for the rest of this article.
Cloud Consideration #1: State of Your VM
Even if you're using the Amazon EC2 platform's bullet-proof Amazon Machine Image (AMI), you need to consider the before and after states of the environment in which your application task(s) will be running. Think of it as a contract (Design by Contract) that every piece of work that you run on the remote node must honor. The contract is simple:
Leave the state exactly as you found it -- don't change anything.
In other words, your task must be idempotent; simple, but a very powerful notion. The internals of your environment much not change from one task to the next. You can run pre-scripts to set up the environment and post-scripts to clean up what you messed up, if you choose to. But never, ever change the state of the environment, and never leave it for the next task to clean up. There are many reasons for this, but the one that I really care about is that debugging will become unpredictable and virtually impossible.
Cloud Consideration #2: Security
With cloud computing, security is a bigger challenge and problem than it is in standard environments. Your packets are going over the public Internet and can be snooped. You need to consider securing the communication channel or the packets -- or both!
Any security measure you take will have a negative impact on your performance, however. This tradeoff is usually put off to a later part of the application lifecycle, but for cloud computing it must be addressed early.
Cloud Consideration #3: Communication
As previously mentioned, cloud computing requires you to communicate over the public Internet. Your packet traverses through many routers, switches, and so on as it travels to a remote datacenter in the middle of nowhere. You don't really care where that datacenter is, but you do need to think about the much higher latencies than you would otherwise experience if you were communicating to a dedicated datacenter with dedicated network bandwidth.
Communication is unpredictable despite your best efforts. Your performance numbers could very well change from one day to the next. If you have a tight service level agreement (SLA) to meet, you need to look elsewhere.
Cloud Consideration #4: Service Level Agreements
It all comes down to SLA. Cloud computing offers lots of benefits, but it also introduces uncertainty into your application and in turn into the SLAs you offer your clients. If you have tight performance constraints, a cloud-only solution might not be the way to go, and you need to look at cloud as the spill-over environment. This is a very difficult design decision, one that I will explore in future articles.
I wrote this article to level-set developers and development teams about some of the things to consider when considering a move to the cloud.