"No one is harder on a talented person than the person themselves" - Linda Wilkinson ; "Trust your guts and don't follow the herd" ; "Validate direction not destination" ;

September 29, 2013

Exploring Hortonworks Sandbox - Part I (on Windows 7)

Setup Steps
  1. Downloaded Virtual Box from Link
  2. Howtonworks windows tutorial Link
  3. Download 1.8GB Hortonworks Sandbox from Link 
  4. After Configuring it, Ran through the first tutorial - Link
  5. Started the Server and Open-up in browser IP address http://192.168.56.101:8000/ from Win7 Machine
  6. Sandbox was setup and configured to use 192 series IP Address. Was able to use the Win7 browser interface to perform file upload, query operations
  7. Credentials to logon on Server Login: root, Password: hadoop
  8. Command to shutdown is poweroff

First Example Notes
  • Downloaded example data from Link 
  • Upload worked in Google Chrome not in IE
  • Poweroff is the command to poweroff the sandbox machine
  • Uploading data, running basic Select queries worked fine
More Info Tutorials
My Feedback
  • Impressive easy setup and easy to use
  • Got Started in < 2 hrs
  • Good Learning Start
More Reads

WTF does a Data Scientist do all day?

How do I become a data scientist?

What are some software and skills that every Data Scientist should know?

Read Quote of Joe Blitzstein's answer to Data Science: What is it like to design a data science class? on Quora

Read Quote of Nishant Neeraj's answer to Big Data: What should be ideal size, skill set and composition of team for a successful Big Data implementation in an organization? on Quora

Read Quote of Sean Owen's answer to Job Interviews: How can a computer science graduate student prepare himself for data scientist/machine learning intern interviews? on Quora

Read Quote of Pronojit Saha's answer to Data Science: What are some software and skills that every Data Scientist should know? on Quora

Read Quote of Ye Zhao's answer to How do I become a data scientist? on Quora

How does one begin to learn data science?

Harvard Data Science Course  

Software engineer's guide to getting started with data science


Happy Learning!!!

September 20, 2013

Advanced Cloud Computing 2013 Notes


Advanced Cloud Computing 2013 Notes. Yesterday I attended ACC2013 held @ Nimhans. Every conference provides a lot of inspiration and motivation to try out new things.

Session #1 - Inauguration Talk

Inauguration was done by Padma Bushan  Rajaram. He explained cloud computing in very simple terms. Cloud computing is utility computing in simple terms. It was coined by a management professor named Chellapa.
He had earlier written a paper in 2005 on challenges in utility computing. He recollected his experiences with new jargon's/ technical abbreviations. He provided several examples on BYOD keyword. BYOD - Bring Your Own Drinks, BYOD - Bring Your Own Dope, BYOD - Bring Your Own Device (Recent usage). Storage and processing costs have come down. This has become a business potential for Amazon and Google to leverage it by outsourcing their excess storage and processing infrastructure.

He stressed on several areas to standardize the cloud for leverage the complete potential of it. Example- SLA to provide the required performance while hosting / sharing the infrastructure, Developing a universally usable cloud, interoperability between cloud providers

Session #2 - This was Talk by Karanataka's IT secretary VidyaShankar.IAS

He mentioned on developing trends Virtualization, Cloud and 3D Technologies. He mentioned
couple of products cloudmagic, cubby.

Session #3 - Connected Systems, Cloud beginner tech talk by Vikas Agarwal (Tally)

This talk pretty much focused on evolution of cloud computing. He tracked from the very beginning PC Era to cloud computing.
  •  Stage 1 - Mainframe Systems
  •  Stage 2 - PC Era (Moving data to personal systems)
  •  Stage 3 - LAN (Locally connected systems) - Intranets
  •  Stage 4 - Connected Era, WANs
  •  Stage 4 - Evolution of Internet (Globally Connected)
  •  Stage 5 - Cloud (Shared computing, storage) - Access anytime / anywhere
Challenges / Features in Cloud
  •  Pooling Optimization
  •  Elasticity
  •  Efficiency
Session #4 - Big Data in Safety & Security Domain, Tech talk by Bob Brewin (Tyco)

This talk focused on basics of cloud computing, challenges and applications in Fire and Security Domain. Key notes covered were
  • Fallacies in Distributed computing
  • Current Challenges in Fire & Security Domain are
  • Identifying False Positives
  • Predictive Analytics to identify and isolate false positives
  • Real time monitoring
Session #5 - Cloud Services in Yahoo by Jothi Padmanabhan

Yahoo has its own private cloud, Author provided details on Yahoo infrastructure and their software stack
 Challenges
  • Scaling systems as per growing data
  • Data Partitioning
  • Data Consistency
  • Hardware provisioning
Benefits of Private Cloud
  • Developers can focus on Application logic instead of designing for crash / recovery scenarios
  • Focus on appealing content for users (UX Exp)
Requirements for Cloud
Multitenancy
  • Several applications will share the same hardware and software
  • Resources can be shared but there should not be performance conflict between resources
  • Multiple Apps will be running in parallel
  • Spike in resource consumption of one app should not affect other application's performance
  • SLA defined for performance need to be met for all hosted apps
Elasticity
  • Applications will have projected capacity vs actual capacity
  • Based on a ball park figure but actual load will be measure when the product is implemented
  • Scale as you need
Scalable
  • Process several requests, Store Huge data, Analytics on top of data are offerings
Other key aspects include Availability, Security, Metering, Global APIs, Load Balancing, Simple API's

More Detailed Architecture is explained in paper link
  • Overview of Open Stack
  • Apache Traffic Server used as caching proxy server
  • Proxy (Route Traffic through intermediate steps)
  • Reverse proxy vs Forward Proxy (Several Variations)
  • Yahoo has 25K Clusters and 40K Servers
  • Mobstor (Storage for large unstructured files)
  • Sherpa (NOSQL solution from Yahoo)

Happy Learning!!!

September 01, 2013

pyCon India 2013 - Day 2 Session Notes

Please find second day session notes
Session #1 – Rasberry PI basics by Sudar Muthu
Good basic session. Speaker presented the content and demo very well. Notes from the session
  • Simplest helloworld program on Rasberry PI is a light blink program
  • Speaker also spoke about controlling devices
  • Using PWM (Pulse width modulation) devices can be managed
  • PWM.py – pull up (Higher Voltage), pull down (Lower Voltage)
  • Protocols – I2C, SPI, Serial. These protocols can be used to talk to devices
  • Interacting with web cam using PyGame
More Reads -  Distributed Computing Tutorials, Author website – HardwareforFun
Session #2 – Robotics Demo
  •  ROS (Robotics Operating System)
  • Author used RasberryPi and arduino Node
Tools
  • Speech Synthesis – Festival and pyFestival
  • Speech Recognition – Gstreamer, Pocket Sphinx
  • Artificial Intelligence – AIML, pyAIML (Artifical Intelligence Markup language)
  • GUI – QT and pyQT
Author site – Technolabz, Lentin Joseph
Session #3 – arduino and Internet of Things
Arduino – Open Source Electronics Prototyping platform
Advantages of arduino
  • Easy to use
  • Cheap
  • Open Hardware
  • Open Documents
Components
  • Hw: device : electronic prototyping board
  • Sw:bootloader
  • Sw:libraries
  • Sw: IDE
  • Interfacing – Connected to computer using Bluetooth / USB
Tools
Use Cases
  • Talk over Serial, RF, Ethernet
  • Attach Sensor and relay other readings
  • Attach Actuators and make things move
  • Connecting devices through web
  • Security Sensor, email on touch
  • Author - Avik Dhupar
  • http://www.arduino.cc/
Session #4 - Testing tools Sessions (Open Source Tools)
  • Fabric for distributed testing (This deployment tool can be used for distributed computing testing  )
  • STAF IBM Test Automation Framework Tool -
  • Nitrate Test case management tools -
  • Test link – Test case management tool
  • Beaker Project – Managing Automated Tests
Session #5 – Web Scraping
  • Author used http://scrapy.org/
  • Pablo Hoffman is the scappy developer
  • Author Anuvrat Parashar provided examples on crawaling web, collecting data, extracting information from collected data 
More Tools

Happy Learning!!!

August 31, 2013

Day1 - pyCon2013 Notes


Hello World!!
After a long time updating my notes, learning’s in this post.
Some good one liner’s from Pycon2013
  • WLT – We Love Typing
  • DRY – Don’t Repeat Yourself
Today I attended Pycon 2013. This was my first python focussed learning session. Sessions were pretty good. Summarizing my notes of today's session
Session #1 - The first session was log management in inmobi 
  • They have a framework built to store, manage all kinds of logs (Web Server Logs, DB Logs, Application logs, Cron Tab Logs) 
  • Three steps were followed in collecting logs
  • Collection of Logs – Apply Patterns – Fetch Logs
  • Tools used include logstash, grok (ships with parse patterns) - http://logstash.net/ 
Author also provided other alternatives and tools for implementation
  • Transport – flume, rsyslog, conduit, scribe
  • Search and Analytics – hadoop, graylogz, elsa
  • Storage – HDFS, Cassandra, Elastic Search
  • Apache Falcon
Jordan Sissel is the brain behind logstash. His video session is also available in link
Session #2 – Django Framework beyond Basics
It was a well presented session. Although this was my first session on Django I could get the feel of the framework. Presenter Arun (http://Arunrocks.com)
Django – Web Framework. This is built on principles of Rapid App Development. How a typical web request is handled in Django framework 
  • Models – Matter
  • Views – Thinkers
  • Templates – Should be dumb
Good Things about Django Framework
  • Good Admin Interface
  • Security
  • Great Documentation
  • Stable
  • Batteries Included
Basic Definitions of Query Set (Object that interfaces with DB), Media Separate etc. Python implements class based views. Earlier it was function based generic views
Tools Discussed
  • IDE – Pychan, PyDev, Emacs, Vi, Sublimetext
  • Deployment Tools – Chef, Puppet, fabric
  • Security Checks – ponycheckup.com for Django based sites
  • ORM – SQLAlchemy
Session #3 – Third Session was Rapid development & integration of Real Time Communication in Websites
The session as pretty interactive. Demonstrating realtime video chat using google webrtc. https://github.com/cjgiridhar
Demonstrated the setup
  • End User Requests sent to Tornado Web Server
  • Using Web Socket / Ajax communication happens (video chat / live chat)
  • Chat messages saved in Redis database
Tools
  • Webserver – flask, bottle, tornado
  • Javascript and webRTC
Chetan’s website - link
More Links - pythontutor

Happy Learning!!!

July 16, 2013

HSQLDB - Getting Started

This post is on learning HSQLDB. HSQLDB is Rdbms db written in java
  1. Download HSQLDB from link 
  2. Getting started guide useful from link 
  3. Java is already installed on my laptop. Adding JAVA_HOME , PATH and CLASSPATH provided in link
Lets get started and try out some basic examples
Step 1 - To Start and create a DB
  
From command line
 
 Command text -  C:\Program Files\Java\jre7\bin>java.exe -cp "E:\HSQLDB\hsqldb-2.3.0\hsqldb-2.3.0\hsqldb\lib\hsqldb.jar" org.hsqldb.server.Server --database.0 file:mydb --dbname.0 xdb
Step 2 - DB files would be created as below
 
 
Step 3 - Opening the DB Manager
 
 
Command text - C:\Program Files\Java\jre7\bin>java.exe -cp "E:\HSQLDB\hsqldb-2.3.0\hsqldb-2.3.0\hsqldb\lib\hsqldb.jar" org.hsqldb.util.DatabaseManagerSwing
 
Command text - Connecting to DB Instance
jdbc:hsqldb:hsql://localhost/xdb

Step 4 - Basics on Table Creation

The three types of persistent tables are MEMORY tables, CACHED tables and TEXT tables
  • Memory Tables - Data stored in Files
  • Cached Tables - Cached detail remains in memory not in File
  • Text Files - Use CSV Supported Files
Step 5 - Table Creation
 
CREATE TABLE PUBLIC.TEST_TABLE
 (COL1 INTEGER NOT NULL,
 COL2 VARCHAR(25) NOT NULL,
 PRIMARY KEY (COL1))
 
Step 6 - Load Data and Select Query
 
INSERT INTO "PUBLIC"."TEST_TABLE"( "COL1", "COL2" ) VALUES ( 10, 'Test')
INSERT INTO "PUBLIC"."TEST_TABLE"( "COL1", "COL2" ) VALUES ( 20, 'Ram')
INSERT INTO "PUBLIC"."TEST_TABLE"( "COL1", "COL2" ) VALUES ( 30, 'Raj')
INSERT INTO "PUBLIC"."TEST_TABLE"( "COL1", "COL2" ) VALUES ( 40, 'Ravi')
INSERT INTO "PUBLIC"."TEST_TABLE"( "COL1", "COL2" ) VALUES ( 50, 'Raja')
 
SELECT * FROM "PUBLIC"."TEST_TABLE"
 
Step 7 - MVCC Basics
 
Reading only committed data, Driven by isolation level settings. More details in link

Supported Isolation levels
  • SET TRANSACTION READ ONLY
  • SET TRANSACTION ISOLATION LEVEL SERIALIZABLE
  • SET TRANSACTION READ WRITE, ISOLATION LEVEL READ COMMITTED 

Step 8 - MVCC Example

Start Two Instances of Data Manager

Window1 - Run below query

SET TRANSACTION ISOLATION LEVEL READ COMMITTED;
SET DATABASE TRANSACTION CONTROL MVCC;
set autocommit false;
INSERT INTO "PUBLIC"."TEST_TABLE"( "COL1", "COL2" ) VALUES ( 10, 'Test')
INSERT INTO "PUBLIC"."TEST_TABLE"( "COL1", "COL2" ) VALUES ( 20, 'Ram')
INSERT INTO "PUBLIC"."TEST_TABLE"( "COL1", "COL2" ) VALUES ( 30, 'Raj')
INSERT INTO "PUBLIC"."TEST_TABLE"( "COL1", "COL2" ) VALUES ( 40, 'Ravi')
INSERT INTO "PUBLIC"."TEST_TABLE"( "COL1", "COL2" ) VALUES ( 50, 'Raja')
commit
INSERT INTO "PUBLIC"."TEST_TABLE"( "COL1", "COL2" ) VALUES ( 70, '7Ravi')
INSERT INTO "PUBLIC"."TEST_TABLE"( "COL1", "COL2" ) VALUES ( 80, '8Raja')
 
Window2 - Run below query

SET TRANSACTION ISOLATION LEVEL READ COMMITTED;
SELECT * FROM PUBLIC.TEST_TABLE;

The Result from Window2 will not include 70, and 80 the uncommitted records


Step 9 - Explore the system created files - mydb.script, mydb.log file using notepad, You would see details on DB Settings and properties

References

Happy Learning!!!

  

June 26, 2013

TSQL Learning

This post is based on very good reading from Article T-SQL Misconceptions - JOIN ON vs. WHERE. These are new learning's for me


1. For Readability - Refrain from using search arguments in the ON clause, and use the WHERE clause instead
2. When Outer Join is Converted to Inner Join - Adding references to the table in the right side of a JOIN to the WHERE clause will convert the OUTER JOIN to an INNER JOIN. I'm trying out Example Code to reproduce the scenario. This Shows the behavior when Left Join in Query is Converted to Inner Join during Execution.


Step 1 - Create Tables

CREATE TABLE Table1(Col1 INT IDENTITY(1,1) PRIMARY KEY, Col2 VARCHAR(40), Col3 VARCHAR(50))

CREATE TABLE Table2(Col1 INT IDENTITY(1,1) PRIMARY KEY, Col2 VARCHAR(40), Col3 VARCHAR(50))


Step 2 - Populate Data

DECLARE @J INT
 SET @J = 1
 WHILE 1 = 1
 BEGIN
 IF @J < 1000
     INSERT INTO Table1(Col2, Col3)
     VALUES((CONVERT(VARCHAR(20),@J)+'VALUE'), (CONVERT(VARCHAR(20),@J)+'VALUE'))
     INSERT INTO Table2(Col2, Col3)
     VALUES((CONVERT(VARCHAR(20),@J)+'VALUE'), (CONVERT(VARCHAR(20),@J)+'VALUE'))
     SET @J = @J + 1
     IF @J > 1000
     BREAK;
 END


Step 3 - Run Queries

SELECT
 N1.Col1, N2.Col2
 FROM Table1 N1
 LEFT JOIN Table2 N2
 ON N1.Col1 = N2.Col1
 WHERE N2.Col1 = 100
 

SELECT
 N1.Col1, N2.Col2
 FROM Table1 N1
 LEFT JOIN Table2 N2
 ON N1.Col1 = N2.Col1
 WHERE N1.Col1 = 120


Step 4 - Execution Plan


Happy Learning!!!

June 21, 2013

Big Data Updates

Interesting Big Data Updates


[Good Read] - Big Data Analysis Takes a Big Bite Out of HPC Workloads: IDC
Summary - High Performance Servers used to run / benchmark big data workloads

[Learning Resource] - Hadoop 101: Programming MapReduce with Native Libraries

[Good Read] - Big Data Transforming Traditional DW Ecosystem - Why Hadoop and Solr in DataStax Enterprise?

Summary 
  • NOSQL feasible alternative competing OLTP Space
  • Big Data Replacing OLAP Ecosystem
Happy Reading!!!

MYSQL Exercises

Couple of learning exercises while working on MYSQL. Earlier MYSQL post please refer link
Learning #1 - Load data from flat file
Created a Temp table, Loaded bulk data using command - LOAD DATA LOCAL INFILE

CREATE TABLE TestTable2 ( A INT NOT NULL, B INT NOT NULL, C INT NOT NULL, D INT NOT NULL );

Dataset looks as below



LOAD DATA LOCAL INFILE 'E:\\DataUpload50K.txt' INTO TABLE TestTable2 FIELDS TERMINATED BY ','  LINES TERMINATED BY '\n';

Reference - link1 , link2
Learning #2 - Enable Remote Access to MYSQL

Execute the Grant All Privileges command by specifying username, IP Address of remote host and password to logon
GRANT ALL PRIVILEGES ON *.* TO 'username'@'XX.XX.XX.XX' IDENTIFIED BY 'pwd';
Encountered error codes 1130, 1045
Reference - link1, link2, link3

Learning #3 - Show System Configuration Settings
Command - SHOW VARIABLES
Reference - link1

Happy Learning!!!