Wednesday, 28 August 2013

SharePoint Basic Interview Questions and Answers for Freshers and Experienced Developers

SharePoint Basic Interview Questions and Answers for Freshers and Experienced Developers

Below is the list of SharePoint basic interview questions and answers. These SharePoint interview questions and answers are meant for freshers as well as for experienced developers. So, If you going for an interview on SharePoint, I suggest you to must give a look at following SharePoint interview questions. These SharePoint interview questions are based on basic introduction to SharePoint, why we need SharePoint, MOSS, WSP, Zones in SharePoint, BDC, Field Controls, Application Pages in SharePoint, CAML etc. So lets have a look on following basic SharePoint interview questions and answers.

Q 1.What is SharePoint? 

Microsoft SharePoint is an enterprise collaboration and content management platform which enables users to connect each other and share the information across an organization. Indirectly this solves the problems in an organization to share the documents, security, business process, maintaining data etc. SharePoint 2010 has rich UI and plenty of features.

Q 2. What are the types of input forms that can be created for a workflow?

You can create four different types of input forms including
1. An association form
2. An initiation form
3. A modification form
4. A task edit form.

Q 3. What is MOSS?

Answer :  Microsoft Office SharePoint Server (MOSS) is the full version of a portal-based platform for collaboratively creating, managing and sharing documents and Web services. In MOSS additional feature add that can not in WSS 3.0.

Q 4. What is a site collection in SharePoint?

1. A site collection is a set of web sites.
2. Every site collection has top-level site, created when the site collection is created.
3. There might be multiple site collections in web application and each site collection may have a multiple child sites.

Q 5. What is WSP (Web solution package)?

When developer does any customization or enhancement in SharePoint, then there are many items that need to be deployed like assemblies, resource files, features, images, application pages, site definitions etc. It will be a very tedious task to deploy these items separately on development, staging and production. So SharePoint introduced a solution package which is powerful deployment tool. Web solution package is a cabinet file that contains assemblies, resource files, features, images, application pages, site definitions etc. into single file.

Note: A solution package is stored as a cabinet (CAB) file, with the file extension .wsp. This file contains all the files to be deployed. If you rename the file extension to .cab, you can open the solution and explore its content .It can be deployed using the command-line tool stsadm or PowerShell cmdlets.

Q 6. How will you set up a Platform for Testing SharePoint WebParts?

We would need to install :
1. WSS 3.0
2. Microsoft Office SharePoint Server 2007 installed.
3. Windows Server 2003 or 2008.
4. Visual Studio 2005 or 2008.

Q 7. What are the various zones in SharePoint?

- Zones provide the separate logical paths of authentication for the same web application.
- 5 zones can be created for each web application :
a. Default
b. Intranet
c. Extranet
d. Internet and
e. Custom

Q 8. Whats is SharePoint site collection?

A collection of SharePoint sites that share common administration pages and site settings. Site collections allow you to share content types, site columns, templates, and Web Parts within a group of SharePoint sites.

Q 9.What is Business Data Catalog or BDC?

It is a shared service that enables Office SharePoint Server 2007 to display business data from various back-end servers into a SharePoint page. Business Data Catalog or BDC provides built-in support for displaying data with various webparts and list\list columns that can help in easy creation of dashboards with data from your SQL, web services, SAP, Siebel, or any other line-of-business (LOB) applications.

Q 10. What is a Field Control?

Field controls are simple ASP.NET 2.0 server controls that provide the basic field functionality of SharePoint. They provide basic general functionality such as displaying or editing list data as it appears on SharePoint list pages.

Q 11. What are the Methods of Backup and Recovery in SharePoint 2010?

Microsoft SharePoint Server 2010 provides a broad range of levels for performing backups, including the entire farm, farm configuration information, site collections, subsites, or lists.

SharePoint Server 2010 uses two different tools to configure backup and recovery.
1. Central Administration : Central Administration provides a user interface where SharePoint Administrators will be prompted via menu structures to select the information that needs to be backed up. (see the Image below)

2. Windows PowerShell : Windows PowerShell is a command line tool that provides SharePoint administrators a way to perform backup and recovery with additional options such as file compression or working with SQL snapshots.

Q 12. What are Application Pages in SharePoint?

Unlike site pages (for example, default.aspx), a custom application page is deployed once per Web server and cannot be customized on a site-by-site basis. Application pages are based in the virtual _layouts directory. In addition, they are compiled into a single assembly DLL.

A good example of an Application Page is the default Site Settings page: every site has one, and it’s not customizable on a per site basis (although the contents can be different for sites).

With application pages, you can also add inline code. With site pages, you cannot add inline code.

Q 13. What is CAML?

CAML stands for Collaborative Application Markup Language and is an XML-based languagethat is used in Microsoft Windows SharePoint Services to define sites and lists, including, for Eg, fields, views, or forms, but CAML is also used to define tables in the Windows SharePoint Servies database during site provisioning. Developers mostly use CAML Queries to retrieve data from Lists\libraries.

Q 14. Whats New with SPAlerts in SharePoint 2010?

In SharePoint 2007, alerts were send only through e-mails, but in SharePoint 2010 users can also send an alert to mobile devices as SMS Message. A New property DeliveryChannels is introduced to indicate, whether the alert is delivered as E-mail or as an SMS Message.

Q 15. What is the difference between a Site Definition and a Site Template?

Site Definitions are stored on the hard drive of the SharePoint front end servers. They are used by the SharePoint application to generate the sites users can create. Site Templates are created by users as a copy of a site they have configured and modified so that they do not have to recreate lists, libraries, views and columns every time they need a new instance of a site.

Q 16. How to Export a Site or List in SharePoint 2010?

SharePoint Server 2010 provides several new features that provide a granular level of backup for various components of site content. This includes content at the site, subsite, and list level.

Through Central Administration(Granular level Back-up) a SharePoint Administrator can configure a backup of a subsite or list. An Administrator can choose a site and a specific list to be exported.The administrators can also choose to export security and select the different versions that will be exported with the list.

Q 17. What is LINQ. How is it used in SharePoint?

LINQ is a feature of the programming languages C# 3.0 and Visual Basic .NET. LINQ allows you to query in an object-oriented way, supports compile-time check, gives you intellisense support in Visual Studio and defines a unified, SQL like syntax to query any data source. But unlike other languages and query syntaxes which vary from one type of data source to another, LINQ can be used to query, in principle, any data source whatsoever. It is commonly used to query objects collections, XML and SQL server data sources.

The LINQ to SharePoint Provider is defined in the Microsoft.SharePoint.Linq namespace. It translates LINQ queries into Collaborative Application Markup Language (CAML) queries.

Q 18. What is claims based authentication?

Claims is a new authentication method that SharePoint 2010 can utilize. This allows a single authentication store for multiple types of authentication (Windows NTLM, SQL FBA, LDAP, etc) which allows all of these types of authentication to access SharePoint under a single URL.

Claims creates a SAML token based on the sign-in, that contains the user’s identity.

Q 19. How will you deploy files such as CSS, JS in SharePoint 2010?

The most preferable way to deploy files in SharePoint is by using the solution package. In SharePoint 2010 you can create an empty project with VS 2010 and then add a new SharePoint Mapped folder in it. This will give the desired location in 14 hive where you can then add a file to deploy.

Q 20. What are Parallel and Serial actions?

When you have more than one action associated with a condition, the actions can be set up to run at the same time (parallel) or one after another (serial), the default.

Q 21. When should you dispose SPWeb and SPSite objects? And even more important, when not?

You should always dispose them if you created them yourself, but not otherwise. You should never dispose SPContext.Current.Web/Site and you should normally not dispose SPWeb if IsRootWeb is true. More tricky constructs are things along the line of SPList.ParentWeb.

Q 22. What security levels are assigned to users?

Security levels are assigned by the administrator who is adding the user. There are four levels by default and additional levels can be composed as necessary.

*Reader – Has read-only access to the Web site.
*Contributor – Can add content to existing document libraries and lists.
* Web Designer – Can create lists and document libraries and customize pages in the Web site.
* Administrator – Has full control of the Web site.

Q 23. What does a SPWebApplication object represent?

The SPWebApplication objects represents a SharePoint Web Application, which essentially is an IIS virtual server. Using the class you can instigate high level operations, such as getting all the features of an entire Web Application instance, or doing high level creation operations like creating new Web Applications through code. 

Q 24. Difference between SharePoint designer workflows and custom workflows?

Only sequential workflows can be created in SharePoint Designer; state machine workflows cannot be created in SharePoint Designer.
Deployment and moving is easy in custom workflows when compared to SharePoint designer workflows.
Visual Studio can have code-behind.
Visual Studio generates a workflow template which can be easily be deployed, SharePoint Designer workflows are typically built against specific lists and sites.
Visual Studio allows for debugging!!

Q 25. What is Windows Powershell?

Windows PowerShell is Microsoft’s task automation framework, consisting of a command-line shell and associated scripting language built on top of, and integrated with the .NET Framework. PowerShell provides full access to COM and WMI, enabling administrators to perform administrative tasks on both local and remote Windows systems.

Tuesday, 27 August 2013

DOTNET MVC 4 Basic Interview Questions and Answers for Developers

DOTNET MVC 4 Basic Interview Questions and Answers for Freshers and Experienced Developers

Below is the list of dotnet MVC 4 basic interview questions and answers. These MVC interview questions and answers are meant for freshers as well as for experienced developers. So, If you going for an interview on MVC, I suggest you to must give a look at following MVC interview questions. These MVC interview questions are based on basic introduction to MVC, why we need MVC, components of MVC, MVC namespaces, lifecycle of MVC application and a lot more. So lets have a look on following basic dotnet MVC interview questions and answers.

1. What is MVC?

MVC is a framework methodology that divides an application’s implementation into three component roles: models, views, and controllers.

Main components of an MVC application?

1. M - Model
2. V - View
3. C - Controller

“Models” in a MVC based application are the components of the application that are responsible for maintaining state. Often this state is persisted inside a database (for example: we might have a Product class that is used to represent order data from the Products table inside SQL).

“Views” in a MVC based application are the components responsible for displaying the application’s user interface. Typically this UI is created off of the model data (for example: we might create an Product “Edit” view that surfaces textboxes, dropdowns and checkboxes based on the current state of a Product object).

“Controllers” in a MVC based application are the components responsible for handling end user interaction, manipulating the model, and ultimately choosing a view to render to display UI. In a MVC application the view is only about displaying information – it is the controller that handles and responds to user input and interaction.

2- What does Model, View and Controller represent in an MVC application?

Model: Model represents the application data domain. In short the applications business logic is contained with in the model.

View: Views represent the user interface, with which the end users interact. In short the all the user interface logic is contained with in the UI.

Controller: Controller is the component that responds to user actions. Based on the user actions, the respective controller, work with the model, and selects a view to render that displays the user interface. The user input logic is contained with in the controller.

3- In which assembly is the MVC framework defined?

System.Web.Mvc

4- What is the greatest advantage of using asp.net mvc over asp.net webforms?

It is difficult to unit test UI with webforms, where views in mvc can be very easily unit tested.

5- Which approach provides better support for test driven development - ASP.NET MVC or ASP.NET Webforms?

ASP.NET MVC

6- What is Razor View Engine?

Razor view engine is a new view engine created with ASP.Net MVC model using specially designed Razor parser to render the HTML out of dynamic server side code. It allows us to write Compact, Expressive, Clean and Fluid code with new syntax to include server side code in to HTML.

7- What are the advantages of ASP.NET MVC?

Advantages of ASP.NET MVC:

1. Extensive support for TDD. With asp.net MVC, views can also be very easily unit tested.
2. Complex applications can be easily managed
3. Separation of concerns. Different aspects of the application can be divided into Model, View and Controller.
4. ASP.NET MVC views are light weight, as they don't use viewstate.

8- Is it possible to unit test an MVC application without running the controllers in an ASP.NET process?

Yes, all the features in an asp.net MVC application are interface based and hence mocking is much easier. So, we don't have to run the controllers in an ASP.NET process for unit testing.

9- What is namespace of ASP.NET MVC?

ASP.NET MVC namespaces and classes are located in the System.Web.Mvc assembly.

System.Web.Mvc namespace 

Contains classes and interfaces that support the MVC pattern for ASP.NET Web applications. This namespace includes classes that represent controllers, controller factories, action results, views, partial views, and model binders.

System.Web.Mvc.Ajax namespace 

Contains classes that support Ajax scripts in an ASP.NET MVC application. The namespace includes support for Ajax scripts and Ajax option settings.

System.Web.Mvc.Async namespace 

Contains classes and interfaces that support asynchronous actions in an ASP.NET MVC application.

System.Web.Mvc.Html namespace 

Contains classes that help render HTML controls in an MVC application. The namespace includes classes that support forms, input controls, links, partial views, and validation.

10- Is it possible to share a view across multiple controllers?

Yes, put the view into the shared folder. This will automatically make the view available across multiple controllers.

11- What is the role of a controller in an MVC application?

The controller responds to user interactions, with the application, by selecting the action method to execute and selecting the view to render.

12- Where are the routing rules defined in an asp.net MVC application?

In Application_Start event in Global.asax

13- Name a few different return types of a controller action method?

The following are just a few return types of a controller action method. In general an action method can return an instance of a any class that derives from ActionResult class.

1. ViewResult
2. JavaScriptResult
3. RedirectResult
4. ContentResult
5. JsonResult

14- What is the ‘page lifecycle’ of an ASP.NET MVC?

Following process are performed by ASP.Net MVC page:

1) App initialization
2) Routing
3) Instantiate and execute controller
4) Locate and invoke controller action
5) Instantiate and render view

15- What is the significance of NonActionAttribute?

In general, all public methods of a controller class are treated as action methods. If you want prevent this default behavior, just decorate the public method with NonActionAttribute.

16- What is the significance of ASP.NET routing?

ASP.NET MVC uses ASP.NET routing, to map incoming browser requests to controller action methods. ASP.NET Routing makes use of route table. Route table is created when your web application first starts. The route table is present in the Global.asax file.

17- How route table is created in ASP.NET MVC?

When an MVC application first starts, the Application_Start() method is called. This method, in turn, calls the RegisterRoutes() method. The RegisterRoutes() method creates the route table.

18- What are the 3 segments of the default route, that is present in an ASP.NET MVC application?

1st Segment - Controller Name
2nd Segment - Action Method Name
3rd Segment - Parameter that is passed to the action method

Example: http://google.com/search/label/MVC

Controller Name = search
Action Method Name = label
Parameter Id = MVC

19- ASP.NET MVC application, makes use of settings at 2 places for routing to work correctly. What are these 2 places?

1. Web.Config File : ASP.NET routing has to be enabled here.
2. Global.asax File : The Route table is created in the application Start event handler, of the Global.asax file.

20- What is the adavantage of using ASP.NET routing?

In an ASP.NET web application that does not make use of routing, an incoming browser request should map to a physical file. If the file does not exist, we get page not found error.

An ASP.NET web application that does make use of routing, makes use of URLs that do not have to map to specific files in a Web site. Because the URL does not have to map to a file, you can use URLs that are descriptive of the user's action and therefore are more easily understood by users.

21- What are the 3 things that are needed to specify a route?

1. URL Pattern - You can include placeholders in a URL pattern so that variable data can be passed to the request handler without requiring a query string.
2. Handler - The handler can be a physical file such as an .aspx file or a controller class.
3. Name for the Route - Name is optional.

22- Is the following route definition a valid route definition?

{controller}{action}/{id}
No, the above definition is not a valid route definition, because there is no literal value or delimiter between the placeholders. Therefore, routing cannot determine where to separate the value for the controller placeholder from the value for the action placeholder.

23- What is the use of the following default route?

{resource}.axd/{*pathInfo}
This route definition, prevent requests for the Web resource files such as WebResource.axd or ScriptResource.axd from being passed to a controller.

24- What is the difference between adding routes, to a webforms application and to an mvc application?

To add routes to a webforms application, we use MapPageRoute() method of the RouteCollection class, where as to add routes to an MVC application we use MapRoute() method.

25- How do you handle variable number of segments in a route definition?

Use a route with a catch-all parameter. An example is shown below. * is referred to as catch-all parameter.
controller/{action}/{*parametervalues}

26- What are the 2 ways of adding constraints to a route?

1. Use regular expressions
2. Use an object that implements IRouteConstraint interface

27- Give 2 examples for scenarios when routing is not applied?

1. A Physical File is Found that Matches the URL Pattern - This default behaviour can be overriden by setting the RouteExistingFiles property of the RouteCollection object to true.
2. Routing Is Explicitly Disabled for a URL Pattern - Use the RouteCollection.Ignore() method to prevent routing from handling certain requests.

28- What is the use of action filters in an MVC application?

Action Filters allow us to add pre-action and post-action behavior to controller action methods.

29- If I have multiple filters implemented, what is the order in which these filters get executed?

1. Authorization filters
2. Action filters
3. Response filters
4. Exception filters

30- What are the different types of filters, in an asp.net mvc application?

1. Authorization filters
2. Action filters
3. Result filters
4. Exception filters

31- Give an example for Authorization filters in an asp.net mvc application?

1. RequireHttpsAttribute
2. AuthorizeAttribute

32- Which filter executes first in an asp.net mvc application?

Authorization filter

33- What are the levels at which filters can be applied in an asp.net mvc application?

1. Action Method
2. Controller
3. Application

34- Is it possible to create a custom filter?

Yes

35- What filters are executed in the end?

Exception Filters

36- Is it possible to cancel filter execution?

Yes

37- What type of filter does OutputCacheAttribute class represents?

Result Filter

38- What are the 2 popular asp.net mvc view engines?

1. Razor
2. .aspx

39- What is difference between Viewbag and Viewdata in ASP.NET MVC?

The basic difference between ViewData and ViewBag is that in ViewData instead creating dynamic properties we use properties of Model to transport the Model data in View and in ViewBag we can create dynamic properties without using Model data.

40- What symbol would you use to denote, the start of a code block in razor views?

@

41- What symbol would you use to denote, the start of a code block in aspx views?

<%= %>

In razor syntax, what is the escape sequence character for @ symbol?
The escape sequence character for @ symbol, is another @ symbol

42- When using razor views, do you have to take any special steps to protect your asp.net mvc application from cross site scripting (XSS) attacks?

No, by default content emitted using a @ block is automatically HTML encoded to protect from cross site scripting (XSS) attacks.

43- When using aspx view engine, to have a consistent look and feel, across all pages of the application, we can make use of asp.net master pages. What is asp.net master pages equivalent, when using razor views?

To have a consistent look and feel when using razor views, we can make use of layout pages. Layout pages, reside in the shared folder, and are named as _Layout.cshtml

44- What are sections?

Layout pages, can define sections, which can then be overriden by specific views making use of the layout. Defining and overriding sections is optional.

45- What are the file extensions for razor views?

1. .cshtml - If the programming lanugaue is C#
2. .vbhtml - If the programming lanugaue is VB

46- How do you specify comments using razor syntax?

Razor syntax makes use of @* to indicate the begining of a comment and *@ to indicate the end. 

47- What is Routing?

A route is a URL pattern that is mapped to a handler. The handler can be a physical file, such as an .aspx file in a Web Forms application. Routing module is responsible for mapping incoming browser requests to particular MVC controller actions.

48- Is it possible to combine ASP.NET webforms and ASP.MVC and develop a single web application?

Yes, it is possible to combine ASP.NET webforms and ASP.MVC and develop a single web application.

49. How do you avoid XSS Vulnerabilities in ASP.NET MVC?

Use the syntax in ASP.NET MVC instead of using .net framework 4.0.

Can Developers do Programming or Coding without Googling?

Can Developers do Programming or Coding without Googling?

Can you imagine development without using google search? At least I can't!! I keep on opening google.com while development because I need it every time. It is very difficult to do programming or coding without googling as per me. Also, its not only my story, all the programmers / coders sitting around me, cannot do anything without google. Once internet was shut in my company for an hour accidentally, we all developers were looking at each other helplessly and waiting for internet to resume.

Once there were days when I was doing my Computer Science Engineering. I learned C/C++/Java during my B.E.(Bachelors in Engineering). All I learned from books and never used internet. When our tutor used to give us problems, we try to solve them our own without seeking any help from internet. Those were our logic building days.  

But now the picture has changed. When you enter in the profession, start doing job, you see the things with different angle. Below are some points which I have figured out why we need to google every time while programming?

1. Frequent Changes in Programming Languages

Programming languages have become so advanced and new things are coming everyday, every week. As a software developer, you must keep yourself updated with these changes. In race of learning new things, we keep on forgetting basic things, basic language syntax etc. and we need to google every time.

2. Tight Deadlines

When you are working on a project, you have some tight deadline in your mind given by the management. So, when you stuck at any point, you don't want to invest any time in thinking the solution and just google your problem to save your time. Every problem is solved by google search that we all know. So by just typing the problem on google search, you get the ready-made solution in front of your eyes and just you have to copy paste the solution. Most of the answers to my problems are given by stackoverflow and codeproject.

3. Laziness

We know that ready-made solution is there on internet which can be easily accessed by just typing on google search, then why to waste our energy on pondering over the problem. This lazy thinking makes us to depend totally on google. Due to this laziness, we never try to practice the code and remember the syntax and depend totally on google.

My Suggestion:

I am trying to give you the suggestion not to depend on google so much, but I think I need to follow this suggestion much more than you :). If we practice some code daily, try to remember the syntax which we daily use, then I think we can decrease our dependency on google search. I know its hard but I think only this is the way...

Never Switch to Small IT Company from Large One!!

Never Switch to Small IT Company from Large One!!

This article is dedicated to all my software engineer friends. I will try to figure out pros and cons of large and small IT companies. I will try to compare work environment, job satisfaction and frustration, salary packages, job security etc. in small and large companies.

I am a six years experienced software engineer from India and will talk about Indian IT companies. I have worked with one of the largest IT companies (service based) of the India and also with the small companies. As per my experience, one should stay in the large company as compared to the smaller one although the packages offered in large companies are comparatively less. I will share my own experience. I will term large company (my previous company) as L and smaller one as S without naming them public.

I was never satisfied with my job while working with L as my salary was very low although I had got onsite opportunity but only for one month. When I got offer from the small company S, it offered me the great package that I could not deny and moved to it. Although I was getting much more money in my monthly salary as compared to my previous company L, my life became hell. 

Let me tell you what smaller companies do to get the projects and how bad the management is there?

1. Misguide the client about Team Size 

If there are 8 members in the team for a project in company L, company S will put only 4-5 members in the team for the same project and bill the client for 8 team members. In this way, the guys in the team have to do double work in the project as client will assume there are 8 members in the team and he is paying for 8 members and will want his work done as per the efforts of 8 guys but behind the scene, there are only 4-5 guys.

2. Misguide the client about Team Efficiency and Skill Sets

Smaller companies share exaggerated CVs of the team members to the client in order to get the projects. When client gets attracted by those CVs and approves the project, those poor guys have to learn the technology in which they have never done any kind of work (but was written in their CVs which was shared with the client) and also meet the deadline otherwise they are dead.

3. Work on weekends and late nights

As per above two points, its obvious that if one software engineer is doing work of two guys and also new in that technology, he is going to bear sleepless nights and is forced to work on Saturdays and Sundays to meet the deadline.

4. No appreciation, no awards

Once the project is delivered, you will be shown the errors and bugs reported in your delivery and will never get appreciated for what you have done right.

5. No job satisfaction, no job security in a small company

Management can kick your ass at any time when they feel that you are worthless now for them. And if there is a project failure due to any reason, developer is always the victim. They need you to devote your 24 hours to the project and forget all about your family and health.

Lets come to me again. What happened in my case? My S company took a project from a client with impossible deadlines. Deadlines were too short to deliver the project on time. The project was in WPF and a team was formed of four .NET guys who had never worked on WPF. The guys were from ASP.NET. Now we did not know WPF and we had to meet the deadlines too. Our manager dictated us that you all should learn WPF as soon as possible and deliver the project on time otherwise there may happen anything to your job and then don't blame me for the consequences. Even the client knew that deadlines were not practical, but company charged him double and made we developers to work like donkeys. We were under a lot of mental pressure. We used to work late nights, Saturdays and Sundays. 

Even we had spent 9-10 nights in the office. We work late night and when we come late in morning, HR used to mark us half day. That 1.5 months, we had lived like hell. I got totally depressed. 

But my days changed and I got a call from a very good company. I gave interview there and got selected and finally KICKED OFF that S company. HR tried to stop me from leaving and tempted me with huge hike but I just refused to talk to him anything. Now finally, I am at good place and thank my god every day and night for taking me out of that hell. 

At the end of story, I will only suggest you never to switch to the small company in any case. Never get tempted by huge packages they offer. Always maintain healthy relationship between your job and life.

Well, these were my personal remarks, your opinions may be different from me and I am not generalizing my thinking. If you have some words to add, please share them in comments below.

BTW, Thanks for reading.....

Monday, 12 August 2013

Cloud Computing vs Grid Computing: Similarities and Differences between Cloud Computing and Grid Computing

Cloud Computing vs Grid Computing: Similarities and Differences between Cloud Computing and Grid Computing

In this article on cloud computing "Cloud Computing vs Grid Computing", we will discuss cloud computing service types and the similarities and differences between cloud and grid computing. We look at why cloud computing may be advantageous over grid computing, what issues to consider in both, and some security concerns. We use Amazon Web Services as an example.

To get cloud computing to work, you need three things: thin clients (or clients with a thick-thin switch), grid computing, and utility computing. Grid computing links disparate computers to form one large infrastructure, harnessing unused resources. Utility computing is paying for what you use on shared servers like you pay for a public utility (such as electricity, gas, and so on).

With grid computing, you can provision computing resources as a utility that can be turned on or off. Cloud computing goes one step further with on-demand resource provisioning. This eliminates over-provisioning when used with utility pricing. It also removes the need to over-provision in order to meet the demands of millions of users.

Infrastructure as a Service and more

A consumer can get service from a full computer infrastructure through the Internet. This type of service is called Infrastructure as a Service (IaaS). Internet-based services such as storage and databases are part of the IaaS. Other types of services on the Internet are Platform as a Service (PaaS) and Software as a Service (SaaS). PaaS offers full or partial application development that users can access, while SaaS provides a complete turnkey application, such as Enterprise Resource Management through the Internet.

To get an idea of how Infrastructure as a Service (IaaS) is used in real life, consider The New York Times that processed terabytes of archival data using hundreds of Amazon's EC2 instances within 36 hours. If The New York Times had not used EC2, it would have taken it days or months to process the data.

The IaaS divides into two types of usage: public and private. Amazon EC2 uses public server pools in the infrastructure cloud. A more private cloud service uses groups of public or private server pools from an internal corporate data center. You can use both types to develop software within the environment of the corporate data center, and, with EC2, temporarily extend resources at low cost—say for testing purposes. The mix may provide a faster way of developing applications and services with shorter development and testing cycles.

Amazon Web services

With EC2, customers create their own Amazon Machine Images (AMIs) containing an operating system, applications, and data, and they control how many instances of each AMI run at any given time. Customers pay for the instance-hours (and bandwidth) they use, adding computing resources at peak times and removing them when they are no longer needed. The EC2, Simple Storage Service (S3), and other Amazon offerings scale up to deliver services over the Internet in massive capacities to millions of users.

Amazon provides five different types of servers ranging from simple-core x86 servers to eight-core x86_64 servers. You do not have to know which servers are in use to deliver service instances. You can place the instances in different geographical locations or availability zones. Amazon allows elastic IP addresses that can be dynamically allocated to instances.

Cloud computing

With cloud computing, companies can scale up to massive capacities in an instant without having to invest in new infrastructure, train new personnel, or license new software. Cloud computing is of particular benefit to small and medium-sized businesses who wish to completely outsource their data-center infrastructure, or large companies who wish to get peak load capacity without incurring the higher cost of building larger data centers internally. In both instances, service consumers use what they need on the Internet and pay only for what they use.

The service consumer no longer has to be at a PC, use an application from the PC, or purchase a specific version that's configured for smartphones, PDAs, and other devices. The consumer does not own the infrastructure, software, or platform in the cloud. He has lower upfront costs, capital expenses, and operating expenses. He does not care about how servers and networks are maintained in the cloud. The consumer can access multiple servers anywhere on the globe without knowing which ones and where they are located.

Grid computing

Cloud computing evolves from grid computing and provides on-demand resource provisioning. Grid computing may or may not be in the cloud depending on what type of users are using it. If the users are systems administrators and integrators, they care how things are maintained in the cloud. They upgrade, install, and virtualize servers and applications. If the users are consumers, they do not care how things are run in the system.

Grid computing requires the use of software that can divide and farm out pieces of a program as one large system image to several thousand computers. One concern about grid is that if one piece of the software on a node fails, other pieces of the software on other nodes may fail. This is alleviated if that component has a failover component on another node, but problems can still arise if components rely on other pieces of software to accomplish one or more grid computing tasks. Large system images and associated hardware to operate and maintain them can contribute to large capital and operating expenses.

Similarities and Differences between Cloud Computing and Grid Computing

Cloud computing and grid computing are scalable. Scalability is accomplished through load balancing of application instances running separately on a variety of operating systems and connected through Web services. CPU and network bandwidth is allocated and de-allocated on demand. The system's storage capacity goes up and down depending on the number of users, instances, and the amount of data transferred at a given time.

Both computing types involve multitenancy and multitask, meaning that many customers can perform different tasks, accessing a single or multiple application instances. Sharing resources among a large pool of users assists in reducing infrastructure costs and peak load capacity. Cloud and grid computing provide service-level agreements (SLAs) for guaranteed uptime availability of, say, 99 percent. If the service slides below the level of the guaranteed uptime service, the consumer will get service credit for receiving data late.

The Amazon S3 provides a Web services interface for the storage and retrieval of data in the cloud. Setting a maximum limits the number of objects you can store in S3. You can store an object as small as 1 byte and as large as 5 GB or even several terabytes. S3 uses the concept of buckets as containers for each storage location of your objects. The data is stored securely using the same data storage infrastructure that Amazon uses for its e-commerce Web sites.

While the storage computing in the grid is well suited for data-intensive storage, it is not economically suited for storing objects as small as 1 byte. In a data grid, the amounts of distributed data must be large for maximum benefit.

A computational grid focuses on computationally intensive operations. Amazon Web Services in cloud computing offers two types of instances: standard and high-CPU.

Issues to consider

Four issues stand out with cloud and grid computing: threshold policy, interoperability issues, hidden costs, and unexpected behavior.

Threshold policy

Let's suppose I had a program that did credit card validation in the cloud, and we hit the crunch for the December buying season. Higher demand would be detected and more instances would be created to fill that demand. As we moved out of the buying crunch, the need would be diminished and the instances of that resource would be de-allocated and put to other use.

To test if the program works, develop, or improve and implement, a threshold policy in a pilot study before moving the program to the production environment. Check how the policy detects sudden increases in the demand and results in the creation of additional instances to fill in the demand. Also check to determine how unused resources are to be de-allocated and turned over to other work.

Interoperability issues

If a company outsources or creates applications with one cloud computing vendor, the company may find it is difficult to change to another computing vendor that has proprietary APIs and different formats for importing and exporting data. This creates problems of achieving interoperability of applications between these two cloud computing vendors. You may need to reformat data or change the logic in applications. Although industry cloud-computing standards do not exist for APIs or data import and export, IBM and Amazon Web Services have worked together to make interoperability happen.

Hidden costs

Cloud computing does not tell you what hidden costs are. For instance, companies could incur higher network charges from their service providers for storage and database applications containing terabytes of data in the cloud. This outweighs costs they could save on new infrastructure, training new personnel, or licensing new software. In another instance of incurring network costs, companies who are far from the location of cloud providers could experience latency, particularly when there is heavy traffic.

Unexpected behavior

Let's suppose your credit card validation application works well at your company's internal data center. It is important to test the application in the cloud with a pilot study to check for unexpected behavior. Examples of tests include how the application validates credit cards, and how, in the scenario of the December buying crunch, it allocates resources and releases unused resources, turning them over to other work. If the tests show unexpected results of credit card validation or releasing unused resources, you will need to fix the problem before running the application in the cloud.

Security issues

In February 2008, Amazon's S3 and EC2 suffered a three-hour outage. Even though an SLA provides data recovery and service credits for this type of outage, consumers missed sales opportunities and executives were cut off from critical business information they needed during the outage.

Instead of waiting for an outage to occur, consumers should do security testing on their own—checking how well a vendor can recover data. The test is very simple. No tools are needed. All you have to do is to ask for old data you have stored and check how long it takes for the vendor to recover. If it takes too long to recover, ask the vendor why and how much service credit you would get in different scenarios. Verify if the checksums match the original data.

An area of security testing you should do is to test a trusted algorithm to encrypt the data on your local computer, and then try to access data on a remote server in the cloud using the decryption keys. If you can't read the data once you have accessed it, the decryption keys are corrupted, or the vendor is using its own encryption algorithm. You may need to address the algorithm with the vendor.

Another issue is the potential for problems with data in the cloud. To protect the data, you may want to manage your own private keys. Check with the vendor on the private key management. Amazon will give you the certificate if you sign up for it.

Software development in cloud

To develop software using high-end databases, the most likely choice is to use cloud server pools at the internal data corporate center and extend resources temporarily with Amazon Web services for testing purposes. This allows project managers to better control costs, manage security, and allocate resources to clouds a project is assigned to. The project managers could also assign individual hardware resources to different cloud types: Web development cloud, testing cloud, and production cloud. The cost associated with each cloud type may differ from one another. The cost per hour or usage with the development cloud is most likely lower than the production cloud, as additional features, such as SLA and security, are allocated to the production cloud.

The managers can limit projects to certain clouds. For instance, services from portions of the production cloud can be used for the production configuration. Services from the development cloud can be used for development purpose only. To optimize assets at varying stages of the project of software development, the managers can get cost-accounting data by tracking usage by project and user. If the costs are found to be high, managers can use Amazon EC2 to temporarily extend resources at a very low cost provided that security and data recovery issues have been resolved.

Environmentally friendly cloud computing

One incentive for cloud computing is that it may be more environmentally friendly. First, reducing the number of hardware components needed to run applications on the company's internal data center and replacing them with cloud computing systems reduces energy for running and cooling hardware. By consolidating these systems in remote centers, they can be handled more efficiently as a group.

Second, techniques for cloud computing promote telecommuting techniques, such as remote printing and file transfers, potentially reducing the need for office space, buying new furniture, disposing of old furniture, having your office cleaned with chemicals and trash disposed, and so on. They also reduce the need for driving to work and the resulting carbon dioxide emissions.

Conclusion

This article helps you plan ahead for working with cloud by knowing how cloud computing compares to grid computing, how you can resolve issues in cloud and grid computing, and what security issues exist with data recovery and managing private keys in a pay-on-demand environment. Potential consumers' demands for increased capacities over the Internet present a challenge for the developers and other members of a project team. Being aware of and resolving the issues of Web application design and potential security issues can make your team's experiences trouble-free.