Thursday, May 23, 2013

Big data = Volume + Variety+ Velocity

Big data enables organizations to store, manage, and manipulate vast amounts of disparate data at the right speed and at the right time. To gain the right insights, big data is typically broken down by three characteristics:

Volume: How much data ?

Velocity: How fast data is processed ?

Variety: The various types of data


▪  Volume – is that huge amount of digital data created by all sources – companies, individuals and devices.  (What constitutes “big” varies by perspective and will certainly change over time.)

▪  Variety - comes from increasing types of data – some structured, as in databases, much of it unstructured text or video and some semi-structured data like social media data, location-based data, and log-file data.

▪  Velocity – is the speed of creation, which in turn drives interest in real-time analytics and automated decision-making.

While it is convenient to simplify big data into the three Vs, it can be misleading and overly simplistic. For example, you may be managing a relatively small amount of very disparate, complex data or you may be processing a huge volume of very simple data. That simple data may be all structured or all unstructured.

Big data incorporates all the varieties of data, including structured data and unstructured data from e-mails, social media, text streams, and so on. This kind of data management requires companies to leverage both their structured and unstructured data.

Some products which are there in this area:
SAP HANA
Oracle Exalytics
Hadoop


Thread-dump-of-running-java-process

Friday, May 17, 2013

JavaScript Learning #6 - Ways to call a function

This article helps in understanding the importance of  "this", global objects and ways to call a function.

Very nice article @ http://devlicio.us/blogs/sergio_pereira/archive/2009/02/09/javascript-5-ways-to-call-a-function.aspx


Examples:


//Type#1 :
function makeArray(arg1, arg2) {
return [this, arg1, arg2];
}
makeArray("one", "two"); //output: window, one, two
window.makeArray("one", "two"); //output: window, one, two


alert( typeof window.methodThatDoesntExist );
// => undefined
alert( typeof window.makeArray);
// => function


//Type#2: creating the object
var arrayMaker = {
myName: 'Kondal Kolipaka',
make: makeArray
};
arrayMaker.make("one", "two");  //output: [arrrayMaker, one, two]
arrayMaker['make']("one", "two");  //output: [arrrayMaker, one, two]



//Type#3 : 
var arrayMaker2 = {
myName: 'Kondal Kolipaka',
make: function (arg1, arg2) {
    return [this, arg1, arg2];
}
};
arrayMaker2.make("one", "two"); //output: arrayMaker2, one, two



//Type#4
(function () {
   function make(arg1, arg2) {
       return [this, arg1, arg2];
   }
   alert(typeof make);
   // function

   alert(typeof this.make);
   // undefined

   alert(typeof window.make);
   // undefined
})();

alert(typeof make);
// undefined

alert(typeof this.make);
// undefined

alert(typeof window.make);
// undefined


//Type#5
(function(){
/* code */
}());

(function(){
/* code */
})();



Thursday, May 16, 2013

JavaScript Learning #5 - Extending Built-In Objects with Prototype

Prototype can also be used to extend JavaScript's built-in objects.
The displayed code uses an anonymous function to add the negate property to JavaScript's Number type; the new property reverses the sign of any numeric value.

Example:


var myValue = 345.62;

Number.prototype.negate = function() {
return -1* this;
};
console.log(myValue.negate());

Number.prototype.half = function() {
return this/2;
};

console.log(myValue.half());


Output:
-345.62

172.81

JavaScript Learning #4 - Using the 'prototype' keyword


A big advantage of using objects is the ability to re-use already-written code in a new context. JavaScript supports extending and inheriting objects via the prototypekeyword

Example:


function Person(personName){
this.name = personName;
this.info = "This person is called " + this.name;
this.showInfo = function(){
console.log(this.info);
};
}

Person.prototype.sayHello = function(){
console.log(this.name + " says Hello");
};

var name = prompt("Who are you?");
person1 = new Person(name);

person1.showInfo();
person1.sayHello();


Output:

This person is called kkondal
kkondal says Hello


JavaScript Learning #3 - Using a Constructor Function

An object constructor function creates a kind of 'template' from which other, similar objects can be created.

Example:


function Person(personName){
this.name = personName;
this.info = "I'm a person called " + this.name;
this.showInfo = function(){
console.log(this.info);
};
}

var name = prompt("Who are you?");
person1 = new Person(name);

// add code to create another Person object called person2, again via a prompt
// You'll need code similar to the two lines above.

function Person2(personName) {
    this.name = personName;
    this.info = "I am person called "+ this.name;
    this.showInfo = function () {
      console.log(this.info);  
    };
    
}

var name2 = prompt("Who are you buddy??");
var person2 = new Person2(name2);

person1.showInfo();
person2.showInfo();


Output:


I'm a person called kondal
I am person called kolipaka

JavaScript Learning #2 - Creating a new Object



**
 *  JS has built in object simply called "Object", which you can     use as a kind of blank canvas for creating any new object.
 * example:
 * my newcar = new Object();
 * newcar.color = "red";
 *
 * /


var manager = new Object();

//Assigning variable
manager.role = "People management";

function Team () {
    console.log ("Team has been called");
}

//Assigning function
manager.team = Team;


console.log("Manager role "+ manager.role);
console.log(manager.team());



Output:
Manager role People management
Team has been called