Cloud Computing Simplified (Part II)

This is a continuation of my last post (Cloud Computing Simplified (Part I)).

I was still standing there in front of my friend. I got many questions answered and well-articulated inside my head. But, just like taking a test, thoughts are useless if the oval corresponding to the right answer on the answer sheet is not filled. Her original question was regarding her company’s website, and whether it was a SaaS or cloud. Before I enter what it appears to be a brain-trap, I need to define what a SaaS is. After all, I used to tell my students that if they could not explain any highly technical concept to their grandmas, then it is an indication that they don’t understand it themselves. I am standing here in front of a younger version of my grandma, but the statement is the same. The easy explanation of SaaS is simply “Software as a Service”. Great. Case closed. Not really. What the hell is a software? And what the hell is a service? And what does it meant to provide software as a service? We know what software is. It is any application that you use day to day. Service means that you have a black box sitting somewhere else (cloud?) that takes an input from a user and produces an answer. Think of something like a calculator. It takes numbers, and operators and produces the answer. There are a few characteristics of services. First, it has to be stateless (it does not remember you the second time you call it, and it doesn’t discriminate against who is calling it). Secondly, it has to produce one answer, which is consistent (no matter how many times and what time of the day you call the same service with the same arguments, you should always end up with the same answer – unless you are calling the getCurrentTime service :)). The last property of the service is that it is reachable via TCP/IP calls (not via mailed-letter using the post office).

So, providing the application or software as a service that is accessible from anywhere (since the web runs on a wrapper protocol (HTTP) above TCP/IP protocol), by anyone (no discrimination principle), and always consistent, is what SaaS is all about. The fact that you provide that software as a service that is callable by anyone from anywhere, then you can also create code that calls this software from another piece of software! This provides for a powerful concept on the cloud where applications are interoperable using proprietary-free calls. This allows for not only scalability across regions on the Internet but also interoperability among different cloud service providers (such as Microsoft, Amazon and RackSpace)!

The same definition of SaaS applies to all the other ?aaS resources. IaaS is nothing but offering hardware/infrastructure resources via TCP/IP API calls (S3 by Amazon is a leader in this space). PaaS is offering enabling platforms (such as Force.com and Google Apps Engine) which allow developers to create SaaS on top of those platforms on the cloud (such as SalesForce.com and Google Apps). You have other ?aaS such as DaaS (which stands for data as a service if you are talking to a data provider, or desktop as a service if you are talking to Citrix, Cisco and VMWare), etc.

The reason why ?aaS are provided via publicly-accessible API is to provide the power of management to the end user (as opposed to the IT administrator that has been hogging the power over computing resources for a long time). Those public APIs allowed many third party companies created pluggable easy-to-use management tools to manipulate those ?aaS resources on the fly. Yes, that is right, the cloud changes the concept of the Internet (or evolves it?) from a relationship where the end user is helpless recipient of what is given to him, to a more empowered user that has the ability to interact with the website and public service albeit at a minimal level (via Web 2.0 and ajax-driven applications) to being completely in control where he not only manipulates what the service has to say, but also how much resources are available to it, etc. via a user-friendly interface to the cloud service provider’s data center. Much like Turbotax, user-friendly interfaces to cloud service provider’s websites empower average cyber-joes to design their own data center and their public applications with a 16 digit magic code (a.k.a. credit card number). Although I think those “user-friendly” interfaces have a long way before they become friendly, but what we have today is a good start.

That is it, I made my friend wait too long, and if I don’t let the words out soon, I may as well switch the topic and improvise a weather joke that includes the word “cloud” in it. She did ask whether her website is a SaaS. Let’s examine this for a second. Is a website a software? That seems much harder to answer than it seems. Wikipedia defines software as “… a general term primarily used for digitally stored data such as computer programs and other kinds of information read and written by computers.” This implies that websites are considered software. This is not a typical thing from a developer’s perspective as websites seem to be just an outcome or result of a software. I actually agree with this intuition and declare that websites are results of software and not software by themselves. Just like this blog is not considered software but a few paragraphs of text. So, since a website is not software, it cannot be SaaS. However, the code that produces the website is software and is running on a server somewhere. However, although it is running on a host somewhere, it (the software itself) is not available as a service. No one interacts with this software itself. Users interact with the results of the software (i.e. website). Users cannot create code that plugs into the server side code of the web site to modify it or use it. Thus, it is not SaaS. But wait a minute, does that mean that gmail is not a SaaS? Not entirely true. It is SaaS because although it has a relatively constant interface that users cannot modify 100%, it is provided publicly as a set of APIs that can be plugged into by third party libraries to not only change the interface of gmail for particular users completely, but also extract email and most of gmail’s functionality and integrate those into a third-party application. That is something you cannot do with a third-party website.

So, finally I got to the first question and I have an answer. No, a website is not considered SaaS. Phew! That only took about two blog entries to answer! What about a website being The cloud? No, a website is not the cloud. However, it can be running on a cloud (has all the benefits of infinite scalability, FA, HA, clustering, etc.) But wait a minute. A website is not a SaaS, but it can be run on the cloud? How is that possible? Well, did you ever (as a developer) write non-OOP (object oriented program) code using an OOP language? What about forcing SOAP to manage sessions? You get the point. It is not ideal to have an application running on the cloud that is not highly service-oriented. If you end up running such a badly-designed application then you will end up not utilizing the full power of the cloud, and instead you would be using it as a simple host provider for your site. Which is what many companies do after all. The reason I say that you will not realize the full benefit of being on the cloud using a non-service oriented application (such as a website), is because if your web site has poor session management (non-distributed), then scaling it out is going to be really hard (how will you make sure when the new request goes to another instance that it will have access to the original session started on another instance? Can a user withdraw money ten times just because she hit ten different instances that are out of sync with each other?) Remember, the cloud is not something magical (outside of the context of Care Bears and their magic clouds (Care-a-Lot)). So, you must make sure that your application is SaaS ready before you can realize all the benefit of the cloud. Otherwise, you are deploying your application to one physical server on the cloud and will never realize scalability or clustering powers that are available to you for a small fee. So, a website can run on the cloud, and will utilize scalability and clustering capabilities of the cloud if and only if it is designed in such a way that makes it service-oriented. You can still have session management, but that needs to be designed to be distributed and managed outside of the services that your website server side code uses. This way, you can scale out the components that are stateless, and replicate the stateful cache.

So, in summary, the cloud continues to have the same concept it had before (as a UML-like component on a blackboard) by continuing to be the important but irrelevant part of the system. And, coming a full circle, I open my mouth, and this time I am confident that I have covered all the possible paths a curve-ball may take. I told her that her company’s website can actually be run on the cloud. In this case, it would be her company’s host provider. However, the cloud is not a one-technology thing, it is a mixture of solutions and resources. And, depending on what her company requires the web site do/offer, and the guarantees they provide to their customers about the website availability and up-time, you may have to review which cloud service provider offers the best contract (SLA – service license agreement), and she may need to check with her developers that the web site is cloud-ready and will leverage full advantage of those guarantees. She followed up with a question: “I see, so what is SaaS?” Oh man! Sometimes I wish I can copy and paste my thoughts into speech so I won’t have to repeat what I said in this blog to her again. But, it may actually be good that I will talk about it again, because this time I will have to describe what SaaS is in even simpler terms. So, I said: Well, if your web site offers a service that your customers use on the website, and would also like them to be able to use that same service on the iPhone, iPad, Droid, etc. as well as offer that exact same service to THEIR customers on their web site, then you have to provide that one service as a SaaS. Which means that your developers have to know how to design it in such a way to enable it to be detachable from your web site and available to be called and used by other third-party (your customers’) applications. Your website will use that service as well. It is good to design all those usable services as such when you go to the cloud because it will enable you to take advantage of what the cloud provides such as scalability (you can handle spikes in user requests).

She seemed to follow my statements and logic. So, maybe I did pass the “explain-it-to-your-grandma” test! Although I may have hurt my chances of having better luck having her call me back after I give her my business card so I can provide consultation on how to design such as a cloud-ready application, since my answers seemed to draw a pretty and easy picture of this whole complex cloud concept! The cloud can offer pretty much anything anybody needs on the web (because of its “potential” to be proprietary-free, interoperable, and pluggable), except the opportunity to take back what you just said to someone else 🙂

Advertisements

Tags: , , , , , , , , , , , , ,

Leave a Reply

Fill in your details below or click an icon to log in:

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: