Sunday, February 28, 2010

Mashup

Mashup is a webpage or an apps that combines and uses data & functionality from two or more sources. There is 3 types of Mashup.


1) Consumer Mashup
Combines different data types, example GoogleMap and Wikipedia APIs

2) Data Mashup
Combines similar data types but different data sources to create a new distinct webservices.

3) Enterprise Mashup
Combines external data information with the enterprise own resources, applications and data creating a rich collaborative presentation view. Example Agile Development.


Architectural aspects:
- Web-based : mashup done on the web browsers
- Server-based : mashup done on the server and then transmitted as a reply to the requesting browser.

Tuesday, February 23, 2010

Cloud Model Comparison

According to the layers from top to bottom, at top most we have Software as a Service, follow by Platform as a Service and bottom most Infrastructure as a Service.

First we discuss SaaS. SaaS is essentially providing software traditionally need to be purchase by licenses into a pay as you used model.

Software as a Service(SaaS)-  Cloud Applications
Complexity : Low
Flexibility : Minimal Control, determine by apps provider, minimal customization
Consumers: End Users
Type of services: Webmails, MessageLabs, Virus Scanners, online office suite-zoho, CloudFront etc
Pricing: Price based on per used basis.
Benefits: 
  • Save Time & Cost, 
  • Budget focus of competitive advantage instead of infrasturture,
  • Utility model of pay as you used, without worrying of licenses or version upgrades
  • Faster to start use, no need to install.
  • Flexible & Scalable and 
  • Multi-tenant efficiency.
Examples: GoogleApps, Salesforce.com, Cybershift, Zoho, TurboTax Online, Microsoft Online Services, MailTrust.



PaaS provide a platform for business to quickly churn out applications without worrying about setting up servers and development tool licenses. Sometime SaaS can also ride on top of PaaS

Platform as a Service(SaaS)- Cloud Platforms
Complexity : Middle
Flexibility : Medium Control
Consumers: Developers, Programmers,
Type of services: development system, debugging and testings, deployment
Pricing: Price based on per used basis.
Benefits:
  • Multi-location development sites working together possible 
  • Multi interaction development
  • Cost reductions derived from using built-in infrastructure services
  • Cost reductions derived from using highlevel programming abstractions
  • Opensource and standardization possible
  • Multi-tenant efficiency.
Examples: Amazon Web Services, GoogleAppEngine, Force.com, WindowsAzure, engineyard(based on rails on cloud), WolfFramework
(below is the comparison chart extracted courtesy of zdnet.com article comparing "Amazon's and Google's Platform-as-a-Service (PaaS) Offerings")



IaaS abstract the computer infrastructure of a system. It can sometime be also refers as Everything as a Service model as it can also include PaaS and SaaS in it.

Infrastructure as a Service(SaaS)-  Cloud Infrastructure
Complexity :High 
Flexibility : Full Control
Consumers: Systems Administrators
Type of services: development system, debugging and testings, deployment
Pricing: Price by utilisation, size, performance.
Benefits: 
  • Resources delivered as a service
  • Dynamic scaling of infrastructure(Elasticity) 
  • Lower CapEx as infrastructure is used as service
  • Enterprise graded infastructure can be used by mid or small size company to benefit due to aggregated sharing
  • Multi-tenant efficiency.
Examples: Amazon EC2, Nebula NASA, Flexiscale



---------------------------------------------------------------------------------------------------------------
Annex A
comparison chart extracted courtesy of zdnet.com article comparing "Amazon's and Google's Platform-as-a-Service (PaaS) Offerings"

 

Sunday, February 21, 2010

Web 2.0 - Traits & Challenges

Traits:-
  • Rich User Interface
  • Users are the Points
  • Data Super Transforming-Imagining-Ability
  • Continous Improvement
Challenges:-
  • User's Interface
  • User Centrics
  • RE: Imagining your UI
  • Free your Data
Web 2.0 apps => "Applications that get better the more that people use them."


Web 2.0 Technologies:-
  • AJAX
  • AIR( prev called apollo)
  • Web Standards
  • User Centred Design
  • RSS
  • APIs
  • Blogs,Twitter,Facebook
  • Mashups
  • Social Networking
  • Tagging(Geotagging)
  • Folksonomies
  • Cloud

Saturday, February 20, 2010

What is REST?

Roy Fielding describes Representation State Transfer(or REST) as an important architectural feature that define the World Wide Web(WWW) today. 
"REST emphasizes scalability of component interactions, generality of interfaces, independent deployment of components, and intermediary components to reduce interaction latency, enforce security, and encapsulate legacy systems."

Basic Flow of simple REST implementation.
i) Online publisher made available content(e.g in XML)
ii) Subscriber, using the URL, read the XML via browser, 
iii) data gets interpreted and reformatted and re-packaged to be use.

REST has advocate the requirement for a uniform interface.
REST requires the use of a common, generalized, generic interface. It does not permit application-specific interfaces. 

In the WWW, the REST interface is defined by the HTTP interface, which supports four basic application methods: GET, POST, PUT, and DELETE."

Friday, February 19, 2010

Service-Oriented Architecture- Definition

SOA or service-oriented architecture basically is a collection of services focusing on services. It has been around for many years now. In my opinion, it is a concept and future post I will try to explore the value of SOA.
There are many SOA frameworks/models define and available on the net. As for now I leave the post with this definition found on wiki.

One of the strong member for SOA,OASIS defines SOA as the following:
A paradigm for organizing and utilizing distributed capabilities that may be under the control of different ownership domains. It provides a uniform means to offer, discover, interact with and use capabilities to produce desired effects consistent with measurable preconditions and expectations

WOA - Web Oriented Achitecture

From wiki,

Web Oriented Architecture (WOA) is a style of software architecture that extends service-oriented architecture (SOA) to web based applications, and is sometimes considered to be a light-weight version of SOA. WOA is also aimed at maximizing the browser and server interactions by use of technologies such as REST and POX.

The build systems of arbitrary complexity, much of the similarity ends there. Here are some of the most significant contrasts between the two approaches:
  • SOAs tend to have a small and well-defined set of endpoints through which many types of data and data instances can pass. WOAs tend to have a very large and open-ended number of endpoints; one for each individual resource. Not an endpoint for each type of resource, but a URI-identified endpoint for each and every resource instance.
  • Traditional SOA builds a messaging layer above HTTP using SOAP and providing unique and sometimes prohibitive constraints to the Web developer, while WOA finds HTTP and related transfer mechanisms to be the ideal layer of abstraction for most applications.
  • SOA was designed from the top-down by vendors to be tool friendly, while WOA was emerged form the bottom up from the Web naturally and has the best support in simple procedural code and an XML parser.
  • SOA uses WS-Security and other sophisticated standards for security, while WOA tends to just use HTTPS.
  • SOA must contend with the vagaries of XML Schemas for service contracts, while WOA largely ignores the issue and lets Web services naturally represent whatever formats are desired.
  • Traditional SOA is fairly cumbersome to consume in the browser and in mashups while WOA is extremely easy to consume just about anywhere

Hello Web 2.0

I just like the title to call my first post on Web 2.0. (It reminds me of the countless hello world examples)

I was recently asked to prepare a presentation on a subject of  Web 2.0 to my fellow colleague in a month time. As I was researching on this subject, I can't help but to get lost in this world of Web 2.0. There so many interpretations of what is Web 2.0, and some even say it does not exist or a hype.

Actually no one coined the term web 1.0 prior to web 2.0.
So the story goes like, once upon a time there was just the Internet as it is/was or we call it the arrival of Internet.(Now the IT community refers it as Web 1.0)
Web 2.0 essentially is second revolution or next phase of internet world, which is happening now.

In my opinion web 2.0 should encompase the following:-
  • User or community involvements. (allow participation and content creation)
  • Real time (or near realtime web interaction)
  • Service Focus ( Web apps is build following Service Oriented Architecture)
  • Network effect ( which include enabling techniques like AJAX & cloud computing)

I will stop here for now on the brief glance at web 2.0.

Thursday, February 18, 2010

Puppet : What, Why & How

What's the intention?
  • To help the sysadmin community to build and share tools.

 Why use Puppet?
  • Provides a powerful framework to simplify the technical tasks that sysadmins need to perform.
  • Sysadmin work is written as Puppet’s custom language code which is shareable and reusable.
  • Written as a comprehensive CM(configuration management) tool.

How to implement the architecture.

A simple star topology architecture as follow can be a good point to start
- A versioning server is required to assist in the CM.
- One server as the master Puppet Server.
- Other client server running the puppetd agent.

Introduction to Puppet

Puppet a sysadmin tool look set to be the "in" thing for sysadmin. It helps to handle configuration management and it is opensource.


From reductivelabs definitions:

Puppet is an open-source next-generation server automation tool. It is composed of a declarative language for expressing system configuration, a client and server for distributing it, and a library for realizing the configuration.

Created by Luke Kanies Reductivelabs

Puppet is a system for automating system administration tasks.

Links

Introduction to AJAX

AJAX or Asynchronous Javascript And XML is technology that facilitate the interaction with database or other external data without the need to reload the webpage.

This is made possible by the DOM API called xmlHttpRequest, which allows HTTP/HTTPS requests to be initiated and handled from within Javascript.

Simple Example of AJAX implementations
Reference from (Sample from cloudwisp.net)

Components
  • HTML with embedded Javascript file (*.js)
  • Database Table(e.g shoutOutTable)
  • PHP/ASP file to query the table (e.g PHP-getShoutOut.php)


/////////////////////
//function to place in your .js(javascript) file for the current document(html)
////////////////////
function xmlRequest(){
var xmlHttp=null;
if (window.XMLHttpRequest) {
// code for IE7+, Firefox, Chrome, Opera, Safari
xmlHttp=new XMLHttpRequest();
}
else if (window.ActiveXObject) {
// code for IE6, IE5
xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
} else {
alert("Your browser does not support XMLHTTP!");
}
return xmlHttp;
}

function getShoutOuts(){
 var xmlObject=new xmlRequest();
 xmlObject.open("GET","getShoutOuts.php",true);
 xmlObject.send(null);
 xmlObject.onreadystatechange=function(){
  if (xmlObject.readyState==4){
   var returnString=xmlObject.responseText.split("|");
   if (returnString[0]=="OK"){
    //query was successful
    var returnedHTML=returnString[1];
    document.getElementById( ishoutContainer).innerHTML=returnedHTML;
   } else if (returnString[0]=="ERROR"){
    //query failed in php and reported an error
    alert(returnString[1]);
   }
  }
 }
 var t=setTimeout(getShoutOuts,10000);
}
/////////////////////

Database Table(shoutOutTable) in mysql

soID(int,auto_increment),userName(varchar 50),shoutOutMsg(varchar 255)


PHP File (getShoutOuts.php)


include "connect.php";
$sql="SELECT * FROM shoutOutTable ORDER BY soID DESC LIMIT 10";
$result=mysql_query($sql);
if (mysql_errno()){
 echo "ERROR|".mysql_error();
} else {
 echo "OK|";
 for ($row=mysql_fetch_assoc($result)){
  echo "".$row['userName'].": ".$row['shoutOutMsg']."";
 }
}

// this will return latest 10 shoutouts




Additional Info

xmlObject.readyState

The "readyState" property keeps track of the current stage of the request by returning an integer:
  • 0: uninitialized
  • 1: loading
  • 2: loaded
  • 3: interactive
  • 4: complete

Cloud Service Model

 Software as a Service (SaaS). The capability provided to the consumer is to use the provider’s applications running on a cloud infrastructure. The applications are accessible from various client devices through a thin client interface such as a web browser (e.g., web-based email). The consumer does not manage or control the underlying cloud infrastructure including network, servers, operating systems, storage, or even individual application capabilities, with the possible exception of limited user-specific application configuration settings.


Platform as a Service (PaaS). The capability provided to the consumer is to deploy onto the cloud infrastructure consumer-created or acquired applications created using programming languages and tools supported by the provider. The consumer does not manage or control the underlying cloud infrastructure including network, servers, operating systems, or storage, but has control over the deployed applications and possibly application hosting environment configurations.



Infrastructure as a Service (IaaS). The capability provided to the consumer is to provision processing, storage, networks, and other fundamental computing resources where the consumer is able to deploy and run arbitrary software, which can include operating systems and applications. The consumer does not manage or control the underlying cloud infrastructure but has control over operating systems, storage, deployed applications, and possibly limited control of select networking components (e.g., host firewalls).

[ This definition is provided from NIST(National Institute of Standards & Technology -US)]

Wednesday, February 17, 2010

What is Cloud Computing?

What is cloud computing? definitely it is not a hype..so what is it? I like to think that it is an Idea.

As a Cloud User:
  • No worry of control of underlying IT infrastructure.
  • Cloud systems is elastics can expand and shrink as required.

As Cloud Service Provider
  • A new IT service delivery model based on consumption( more like power/water utiliities).
  • Need to provision highly scalable and virtualised IT resources.


Definition quoted from NIST website

Cloud computing is a model for enabling convenient, on-demand network access to a shared pool of configurable computing resources (e.g., networks, servers, storage, applications, and services) that can be rapidly provisioned and released with minimal management effort or service provider interaction