My Pages

Monday 18 July 2011

Cloud Computing

Introduction

What is Cloud Computing ? Trying to define cloud computing is not as straight forward as it seems. First we’ll discuss what cloud computing is so that a common understanding is reached. Cloud computing get its name from the cloud network diagram. The cloud icon abstracts all the stuff that makes the Internet (network) work. Cloud computing promotes itself by cutting operational costs and let an organisation focus on strategic projects rather than focusing on keeping a datacenter running. But cloud computing is more than just the Internet. To recap cloud computing is a construct that allows for the access to an application that resides at a location other than your computer or to an Internet-connected device. Mostly the application would be residing in a datacenter. The benefits that emerge from such a construct are quite tangible for example to install an application such as Microsoft Office you either insert a CD or configure a software distribution server, using cloud computing the Microsoft Office installation would already be hosted and handled by the company offering cloud services. For a company to offer cloud computing services mean that that company will host your applications, handle costs of servers, manage software updates and depending on an agreement pay less.
Network diagram for an organisation offering cloud services

Like everything cloud services have their pros and cons. If you take a look at the diagram above one can easily notice that the lines connecting to Internet are both potential points of failure. When Internet problems occur all the cloud services provided will be down. Application hosted cannot be accessed. This problem is usually countered by allowing local installations for some of the more critical applications.


Components in Cloud Computing

A cloud computing infrastructure is composed from a number of element;
  • Clients
  • Datacenter
  • Distributed servers

Components for a cloud computing solution

Clients

Clients in a cloud computing setup are the same as that found in current scenarios i.e. normal LANs. Clients are the terminal from which work is done. Clients fall into three categories which are ;
  • Mobile: Mobile devices like PDA or Smartphones
  • Thin: Computers that do not have hard drives and work directly on the datacenter
  • Thick: Computer using a web browser to connect to the cloud.


Thin clients are becoming more popular due to the lower hardware costs, security and ease of repair or replacement.

Datacenter

A datacenter is a group of servers which host the applications required by an organisation. A growing trend is virtualised servers which is the creation of multiple servers on one scalable machine through a program called the hypervisor.
Distributed Servers

There are cases were servers are not housed at the same location. Through a cloud computing setup these distributed servers are visible to the end user as one. For example Amazon has multiple datacenters around the world for disaster recovery.

Virtualisation

Virtualisation is a technique by which one or more machines are installed on one machine. This provides a system which all running software is within a virtualised server.  This sort of deployment allows for different operating systems to run from the same host server. Virtualisation is relevant to cloud computing since through virtualisation cloud services can be accessed.

Cloud Services

Services offered through cloud computing is the concept with which a company can reuse components from a company offering such services. Services provided are categorised into three main categories;
  • Software services
  • Platform services
  • Hardware services


Software services implies applications hosted as a service which can then be accessed through an internet connection. Using software services through cloud removes maintainability and support for that software from the user’s hands. upgrading of the software is done from the cloud services provider. This type of services can have it’s disadvantages especially when a company requires that a given software needs to be integrated with other software.

Platform services as opposed to software services provide the required resources for application building without having to install them. This type of services is usually required when development, testing or hosting is required by the end-company.

Hardware services is actually the simplest and can be thought of as remote resources. Imagine that instead of buying a server and placing it in your datacenter, said server would be installed, maintained and supported at the company providing the cloud services.
Cloud Services Providers

There are some vendors who offer cloud services. Each vendor varies in the type of services offered as well as their pricing modules.

Amazon

Amazon was one of the very first companies which implemented cloud computing. Some of the services offered by Amazon are;

ServiceDescription
EC2Virtual machines and CPU
S3Storage up to 5GB in size
SQSAllows for virtualised machines to talk to each other
SimpleDBA web service for running queries on databases in real time.


Amazon’s virtual machines are versions of Linux which might be a bit tough for companies who are used to Microsoft products.

Google

Google offer cloud services through Google’s App Engine. Using App Engine one cannot write a file in his own directory. The file writing feature was removed due to security issues. Writing data must take place in Google’s own database. Google offers online documents, spreadsheets. Developers can build features for these products.

Microsoft

Microsoft’s cloud computing is called Windows Azure. Windows Azure is an operating system that allows organisations to run Windows applications using Microsoft’s datacenters. Azure Services Platform allow for developers to write custom modules for a given company.

ServiceDescription
Windows AzureProvide service hosting and management
Microsoft SQl ServicesProvides database services and reporting
Microsoft .NET ServicesProvides a service based .NET framework for development
Live ServicesUsed to share, store unstructured data
Microsoft Sharepoint services and Dynamics CRM servicesUsed for business content and collaboration


Conclusion

My take on Cloud computing is that cloud computing has been with us for quite some time. The only difference is that now big companies are giving it names and offering it to other companies. This doesn’t mean that I find cloud computing to be just a hype on the contrary I find it suitable for certain companies that fall within a certain criteria. For example if a company requires a lot of flexibility in terms of its software and integration with existing applications security problems, speed and reliability become an issue. Also when one is contemplating on working on the cloud one should take into consideration Internet connection speed and reliability. My final point on cloud computing is the legal issues where in lies the concern for the sensitivity of private date. Data protection laws on data hosted on the cloud is freer that data hosted on private server.

Sunday 10 July 2011

Social Networking - Google+


Introduction


When people are asked what social networking is immediately some web site allowing for social networking comes to mind such as Facebook or Twitter. But if we want to be precise a social network is a social structure made up of individuals (or group of individuals) which are tied together by one or more relationship or interdependency such as friendship or common interest. Social networking is something that can take place physically as well as on the web. Granted that with the introduction of the Internet, social networking took on a life of its own.

Different social networking web sites offer services which allow for social interaction. Services offered are similar between web sites but then there are certain sites which offer additional features. Some such services are ;

  • Creation of user profiles
  • Blog entries
  • Search for users with similar interests or according to geolocation
  • Sharing of information
  • Post comments on friends or user profiles
  • Instant Messaging


Additional features may include;

  • Creation of groups
  • Group Discussions


Social networking is now available in mobile phones which increased the popularity of social networking sites. As social networking is becoming more popular more technologies are being developed that make use of such services such as live broadcasting of news on social networking sites.

Some of the most popular social networking sites are;
  • Facebook
  • Twitter
  • Bebo
  • Hi5
  • LinkedIn


This blog post will focus on the introduction of Google’s new social networking portal called Google+.
Tasks Overview


Throughout this blog post we will be exploring Google+ and compare it to one of the most popular social networking site Facebook.

  • Introduction to Google+
  • Demonstrating and discuss Google+


Introduction to Google+


The Google+ services have been launched on 28th June 2011 as an invite only phase. Invited people can then create their account and invite their friends to join. The invite phase was paused for some time due to the large demand for accounts. Not all services offered by Google+ are new such as Google Buzz. Google managed to integrate existing social networking services with new ones and provide a holistic experience. Some of the services provided by Google+ are;

  • Google Buzz
  • Google Profiles
  • Circles
  • Hangouts
  • Sparks
  • Huddles



Demonstrating and Discussing Google+


I received my invitation through my web technologies Tutor and was eager to see what all the hype is all about.  Once logged in the first thing I noticed was my name at the front of the top menu Google provides in all their services.


Clicking on your name takes you to the G+ (for short) account. The first time I logged into G+ I had to set my profile information and privacy settings. These settings can be revisited by accessing the button on the far right on the top menu.


When I logged in I also notice that the style used for G+ is different that the style I am accustomed to. Personally I found it cleaner and much more readable.

Adding People To Circles

The home page is the landing page of G+. The first thing I decided to do was to find people so I went to the top search bar  next to the navigation options and started typing some names. While I was typing I noticed that people who are already added are stated as such in auto suggested list.


A circle represents a group of people with whom you have a specific relationship such as work mates or cooking class mates :). Also one does not need to accept add requests since all that is required is to just add them back. When both users have added each other a relationship is formed between the two users.


Adding people is very easy to do from the Circles tab which is the last button in the navigation bar.  Adding people is achieved by dragging a profile from the sorted listed to a circle of your preference.


The Home Page

The main section in the home page is the stream which is very similar to the Facebook Feed. The stream section allows for people in your circles to write comments, upload images and videos etc. To the left hand side of the stream is a list of contacts available for instant messaging. To the right hand side of the stream suggestions and hangouts are displayed.

Sparks

Sparks allows you to add your interests and receive information and news about them. A list of featured interests are shown as well as a search bar which allows you to search about anything you are interested in.



Hangouts

The hangout is a nifty and cool feature which allows for multiple friends to chat together. This feature that audio and video and really easy to set up. At the bottom of the hangout window a button to invite other friends is available  as well as to chat. One could also add a you tube video as part of a conversation by clicking on the You Tube button.



Photos

One of the options available at the navigation bar is photos. This allows you to see photos shared by people in your circles. The photo stream allows you to tag photos using Picasa. Comments can be posted on the right hand side of the opened photo.



The Profile


The profile is quite self explanatory with the exception of 1’s. This 1’s button works like the “like” button on Facebook.  Anything which is tagged throughout the web is listed here. The profile allows you to see your own profile from another user’s perspective by writing the user’s name in the text with the placeholder text “View profile as”.

The posts section allows you to post messages,comments or stories on your profile. The edit post menu allows you to block sharing or commenting on your posts. The fact that one can edit post creates a bit of a dilemma since one can tag your post +1 and then you can edit the post to say something entirely different or worse the complete opposite.

Conclusion

Google+ has great potential when it comes to an online social networking experience. Google might need to make G+ more integrated as there is a lot of potential in other Google apps which can be of great use to the overall experience. As for usability, clarity and the rest as usual Google rocks.

Wednesday 22 June 2011

Mobile Web Development - Geolocation

Introduction


Mobiles have become ubiquitous in today’s modern life style. Mobiles started out as a portable telephone used to make mobile telephone calls across a geographic area . Technological advances in both mobile technology and mobile web standards brought the Internet in the palm of our hands. There are limitations when one compares Internet browsing from a PC or a laptop to a mobile such as navigation and speed.

With the introduction to HTML5 mobile web development is taking a different shape. A survey conducted by Web Directions found that 2010 saw an explosion of interest and activity by developers in HTML5, and developing native apps for mobile platforms like iOS and Android using web technologies.

This blog entry will focus on developing a mobile web application using geolocation. Geolocation is the technical term used in figuring out where you are on the map and maybe share you location if need be.  Finding your location can be achieved in numerous ways such as;

  • IP address
  • Wireless network connection
  • Cell tower connected to the phone
  • GPS hardware receiving latitude and longitude information from satellites


Privacy is a concern when talking about geolocation in fact the geolocation API which we will be discussing states that location information shouldn’t be sent to web sites without the confirmation of the user.

The geolocation API is an interface by which latitude and longitude information are available through Javascript. This information can be sent to a remote server or used to pin point your location on a map. This API is supported in most modern browsers on both desktop and mobile devices.


Task Summary


The tasks that will be demonstrated in this blog are;
  • Make use of the geolocation API to get location information
  • Display location on to google maps


W3C Geolocation API


The geolocation API offered by the W3C centers around a property of the DOM navigator object;
navigator.geolocation

The simplest use of the geolocation API looks like this;

Simplest use of the geolocation object in navigator

In the script shown above there is no error handling and no options. The web application should probably include at least the first two of those. When running this code for the first time the browser asks you one whether you want to reveal you location. This means that the browser will never force you to reveal you current physical location. User experience differs from browser to browser.

To recap when the getCurrentPosition(callbackfunc) is called the following takes place;
  • The user is asked if he/she wants to know his/her location
  • The website asking for the location
  • Can change security settings
  • Can choose to share or not share the location
  • Can choose to tell the browser to keep the choice and never ask again


The getCurrentPosition function takes a call back function which in the example shown above is show_map. The call will return immediately but doesn’t mean that you have access to the location. The location information will be available in the call back function.

passing callback function in getCurrentPosition()

The callback function will be called with a single parameter, an object with two properties coords and timestamp. The timestamp is just that, the date and time when the location was calculated. The coords object has properties like latitude and longitude that represent exactly what they sound like which is the user’s physical location. The position object’s properties are ;


PropertyDescription
coords.latitudeA double in decimal degrees
coords.longitudeA double in decimal degrees
coords.altitude A double or nulle in meters
coords.accuracyA double in meters
coords.altitudeAccuracyA double or null in meters
coords.headingA double or null in degrees clockwise
coords.speedA double or null in m/s
timestampA DOM timestamp like the Date() object


With the exception of latitude, longitude, altitude and accuracy the result from the properties might be null.

In both examples shown above no error handling is performed except when checking that the geolocation is defined. The function getCurrentPosition() takes a second argument which is an error handling callback function.
Handling errors using error callback function

In the function shown above the positionError object will contain a number if an error has occured. The number represents an error type a shown in the image above.

The remaining sections a demonstration of geolocation on Opera mobile emulator will take place. The version used in this demonstration is V11 and can be downloaded for free from download.
Page to demonstrate geolocation

To demonstrate the geolocation API I created an HTML document which at this point will host three functions;
  • Call geolocation API
  • Handle results from getCurrentPosition()
  • Handle any errors from getCurrentPosition()


Geolocation function with display and error handler functions

The function above first checks that the geolocation object in the DOM navigator is defined. Then if the getCurrentPosition() function yielded any results the display_loc(position)  function is called.

display_loc() function

This function takes the position object and displays the results in table cells by accessing the innerHTML property.  The last function created handles any errors which could result from the getCurrentPosition() function. The code used has already been shown in a previous snippet.

The following result is achieved;

Displaying location information

An interval was created so as to refresh the location information every 60 seconds. A Stop Tracking button was also added so as to stop the timer from re-executing the script.



Google Maps


I found this part of the demonstration quite interesting. At this point in our script we have all the information we need to pin point our location on a map (latitude and longitude). These two values can be passed as parameters into google static maps to show our locations. All the information I required was available at Google Static Maps API

To add the google maps feature all I had to do was to add an anchor tag which when the page loads is empty. When the geolocation function is triggered the anchor ‘s href attribute is filled with the following URL containing my latitude and longitude positions.

URL called when clicking on link.

The display_maplink(latitude,longitude) function is called from the callback function of the getCurrentPosition() function. If an error has occured while getting the positioning information the anchor tag is set to hidden from the page.

Displaying Show Map anchor
Displaying static google map using geolocation position



Conclusion


At this point we have covered the W3C geolocation API but that is not all there is on geolocation. It is well known that  there is an Open source browser plug-in from Google called Gears that provides geolocation information. The advantage of this API is that it is supported by older browsers as well as new.
This has been an informative experience from which I have learned a lot on geolocation. The drawback of such an API as I see it is different browsers. Different browsers give different experiences to the user which one might not anticipate when designing geolocation web applications for mobiles. With the slow introduction to HTML5 one can only hope that one day web technologies and markup will be standardised and make our lives a little easier.