SlideShare a Scribd company logo
SQL, NoSQL & BigData
            in
     Data Architecture


       Venu Anuganti
               Nov 2012
          http://scalein.com/
         http://venublog.com/
Who am I
• Data Architect, Technology Advisor & Seed Investor

• Design, Implement & Support SQL, NoSQL and BigData
  Solutions

   – Industry: Databases, Games, Social, Video, SaaS, Analytics,
     Warehouse, Web, Financial, Telco, Mobile, Advertising & SEM
     Marketing


   – Consulted for more than 22+ from Fortune-500 companies


• http://scalein.com/
Agenda
• Current trends in SQL, NoSQL and BigData

• Why “data architecture” is key for every company

• Key factors in getting the right solution

• Typical Big “Data Architecture”

• Overview of popular data sources, quick comparison

• How to build “data analytics” for “data science”
Data Trends
Current Trends
• Lot of dynamics in the market, too much data

• SQL, NoSQL, BigData & Analytics – Buzz including
  investors

• NoSQL, BigData is becoming hot topic for every engineer,
  team, company & management

• Nothing less to the current tablet war between Apple,
  Microsoft, Google, Amazon and Samsung

• Very good sign as technology is evolving. But lot of people
  getting confused. What solution should I start with ?

   – Confusion makes a slow start for lot of startups and even for
     leaders in the industry to make a shift
Current Trends - SQL
• SQL is slowing down.. not really
   – OLTP can’t be replaced easily

• Key factors - Pros
   – Transactional, Concurrency, Consistency & Durability
   – Proven, SQL, JDBC/ODBC, native protocols
   – Widely adopted, fits for all & interoperability
   – Legacy, risk free, easy adoption & expert community
   – Low latency response times, almost ~0 secs
   – Very good for small data-sets, takes advantage of bleeding hardware
     (SSD, Flash cards, high memory, latest CPUs, cloud enabled)
   – Easy read scaling, writes needs application logic


• Key factors – Cons
   –   Transactional, Concurrency, Consistency & Durability
   –   Scalability, Clustering, Distributed
   –   Fixed schema, online management
   –   Built-in clustering is hard due to the nature of ACID
   –   Bound by hardware, Scale-UP
Current Trends - NoSQL
• NoSQL is racing

• Key factors - Pros
   –   Overcomes known SQL limitations
   –   Eventually consistent
   –   Clustering, Scalability, Distributed (not all)
   –   Schema free
   –   Each solves it’s own specific problem
   –   Easy to adopt

• Key factors – Cons
   –   Consistency (varies), Durability
   –   Maturity, major solutions are not yet “production” grade
   –   Does not fit for all, individual solution for each problem
   –   Response time, depends on each solution
   –   95% relays on application logic to explore data store data
Current Trends - BigData
• BigData is the latest industry buzz, trend or …

• Gartner – 28B in 2012 & 34B in 2013 spend
   – 2013 top-10 technology trends – 6th place

• Solves large data problems that existed for years
   – Social, User, Mobile growth demanded such a solution (FB
     crossed 1B users, classic example)
   – Google “BigTable” is the key, and new papers like Dremel drives
     it further
   – Amazon “Dynamo” follows
   – Hadoop & ecosystem is becoming synonym for BigData

• Combines vast structured/un-structured data
   – Overcomes from legacy warehouse model
   – Brings data analytics & data science
   – Real-time, mining, insights, discovery & complex reporting
Current Trends - BigData
• Key factors - Pros

   –   Can handle any size
   –   Commodity hardware
   –   Scalable, Distributed, Highly Available
   –   Ecosystem & growing community

• Key factors – Cons

   –   Latency
   –   Redundancy, Durability, Maturity
   –   Tradeoff on consistency
   –   Hardware evolution, even though designed for commodity
Data Architecture
Data Architecture
• No standard solution that fits to all

• Business and data defines the right solution

• It’s all about solving “business” problems

• You need to find the right tool that does the job

   – If company X uses MySQL to scale their 500M users, does not
     mean you can use MySQL to scale your 100M users

   – If company Y uses MongoDB for storing 100M user profile
     data, does not mean you can also take it for granted
Key Factors
• Resources are the key
  – A good engineer can make bad product to work
  – A bad engineer can make good product to suck

• Understand the business
  – Data sources & data growth
  – Data consumption
     • end user vs. API vs. data science vs. reporting vs. internal
  – SLA, Response time, Turn around time, Recovery times
  – Cost; Evolve as business grows, don’t over-architect from day-1
  – Capacity planning, leave enough room for failure & growth
Tradeoff – Data Architecture
• Performance vs. Scale vs. Stability

• OLTP vs. OLAP

• Internal vs. External

• Application stack

• Cloud vs. Data center

• Hardware vs. features vs. product vs. cost
Typical “Data”
  Architecture
SQL, NoSQL, BigData in Data Architecture
Choosing The Right Solution
• Store:

  – SQL, key-value, in-memory, document, graph, bigdata,
    node.js (server end service), s3, azure, file system, …

• Log:

  – Log processing tools for structured/un-structured
    (scripts, splunk, flume, scribe, chukwa, loggly, kibana, .)

• Caching:

  – File System, Use replicas, Write Through Cache (WTC),
    Read From Cache (RFC)
  – CDN/S3/Azure frequent processing, local cache
Choosing The Right Solution ..
• Platform:

  – php, ruby, java, scala, python, c/c++, client/server, rest,
    soap, http, api, etc.

• (Dev)-Operation:

  – OS, file system, automation using puppet/chef,
    security, performance metrics, monitoring, in-depth
    exposure to every layer (nagios, ganglia, zabbix, new-
    relic, tsdb, etc.)

• Search:

  – built-in, solr, elastic search, full-text
Data Store Evaluation
Evaluate – Data Store
• Key Evaluation Requirements
  –Transactional, Durability & Consistency
  –Response time
  –Functionality
  –Data characteristics
  –Scalability, Clustering
  –Failover
  –Maintenance, Online changes, Node Management
  –Maturity
  –Community, Support
  –Hosted or Managed
  –Cost, open source
  –Big “NO” to Appliance models, premium cost solutions
Decide what you need
• SQL
  – Relational, transactional processing

• NoSQL
  – Non relational, distributed, high performance and highly
    scalable

• Analytics, Warehouse, BigData
  – Data Warehousing, Analytics, Data science, and reporting

• Combination of all 3
  – Begin with SQL, NoSQL and eventually need BigData/Analytics
    platform
SQL Stores
• Disk based storage, Fixed schema

• Data is stored as table (row by row and columns – row
  store), Durable and transactional

• Mainly B-tree as the indexing mechanism

• Dynamic locking/ Lock free for concurrency control

• Write-ahead log (WAL) / transactional log for crash
  recovery
• Takes advantage of bleeding hardware (SSD, flash cards,
  CPUs, memory, cloud enabled, …)

• Concurrent read/write/update/delete same row
SQL – Good
• Simple or complex aggregation

• Statistics, reports at data store level

• Need access to more than one tuple of information

• Results based on multiple search conditions
  – SELECT foo FROM bar where X=1 and Y=2

• Fetching of ordered or array of data

• Compatible with many tools
SQL – Bad

• SQL complexity, parsing cost, client/server
  overhead

• Learning and relational model design

• Performance and Scalability

  – Strictly single node write
  – Sharding causes more trouble operationally
  – Operational maintenance, fire fighting

• Puts a break to rapid development cycles
NoSQL Stores …
• Non relational, schema free

• Highly Distributed

• Simple CLI, REST, SOAP or API driven

• Eventually consistent, depends store to store

• Ability to dynamically define new attributes

• Concurrency & Consistency – @application
NoSQL Stores …
• Multiple Types based on storage architecture

• Key Value, KV
     • Very popular for simple key-value lookups; disk/memory

• Document
     • Popular for document type of storage

• Graph
     • Connected graph with entity relationship

• Column Family
     • Key value with fixed column families, allows dynamic columns
       within column family
NoSQL Stores
• Key-Value Stores       • Column Family

  – Dynamo Clones          – BigTable Clones

     •   Membase              • Cassandra
     •   Riak                 • HBase
     •   Redis                • HyperTable
     •   Tokyo Cabinet
     •   Voldemort

• Document Stores        • Graph Databases
     • MongoDB                •   Neo4J
     • CouchDB                •   InfoGrid
     • SimpleDB               •   AllegroGraph
                              •   FlockDB
NoSQL - Good
• Fits very well for volatile data

• High read or write throughput

• Automatic horizontal scalability (Consistent hashing)

• Simple to implement, no investment for schema design

• Application logic defines object model

• Support of MVCC in some form

• Compaction and un-compaction happens at app tier

• In-memory or disk based or combination @performance penalty
NoSQL - Good
• Rapid development cycles, programmer friendly

• Reduces the footprint at data store level

• NoSQL in general faster than SQL

• Supports INSERT, DELETE, SELECT

• Data is distributed by KEY over nodes (depends on solution)

• Lists, sets, queues, pub-sub are also supported by some NoSQL –
  Redis, Riak
NoSQL - Bad
• Packing and Un-packing of each key

• Lack of relation from one key to another

• Need whole value from the key even when you need 1-byte

• Concurrency for latest copy is your take

• Data store is merely a storage layer, can’t be used for:

   –   Analytics
   –   Reporting
   –   Aggregation
   –   Ordered values
SQL/NoSQL – Good and Bad
• Performance mainly depends on amount of memory

• Disk bound both takes a hit

   – SQL has advantage due to sequential and read-ahead

• Optimization towards frequently accessed data

   – SQL engines maintain LRU, buffer pool
   – Read from slave nodes, may not be up2date

• SQL Engines are proven and widely in use

• People use WTC – NoSQL & SQL
Analytic Stores
• Data warehousing, mainly for processing large data
  sets

• Data marts, Dimensional, Fact and Aggregate
  tables

• ETL, BI, Reporting, Analytics

• Columnar, Distribution and Compression is the key
Data Analytics
• Data Analytics is critical for every business

  – Combine heterogeneous data sources
     • Weblogs, user activity, transactional data, purchase history,
       user profile, crm, marketing, campaign performance, …
  – Complex Reporting
  – Understand user behavior, geo, interest levels
  – Recommendation
  – User (re)targeting
  – Product usage, features most (not) liked
  – Increase ROI, user satisfaction

• It helps business in every aspect to inspect,
  understand, implement, apply – Waterfall model
Data Science
• Large data helps to build good models due to high
  probability
  –Statistics
  –Predictions
  –Data Analysis
  –Build test models, continuously
     •   AB test
     •   Apply slowly to selected users or clients
     •   Fine tune it
     •   Adopt globally
Analytic Stores
• Columnar data warehouse solutions

  – GreenPlum (EMC, DCA appliance)
  – Vertica (HP, appliance coming)
  – ParAccel
  – InfoBright (MySQL based)
  – InfiniDB (open source, Calpont appliance)
  – Netezza (IBM, appliance)
  – XtremeData dbX (appliance)
  – TeraData
Analytic Stores - BigData
• Hadoop is leading the BigData platform

• Rapidly Growing - Analytics Platform

  – HDFS, Map Reduce direct processing
  – HIVE
  – HBASE
  – IMPALA - Cloudera announced last week based on
    Google’s Dremel
  – DRILL – Apache open source version, in works
  – Google BigQuery
Document Store
•Document Stores

  – Supports complex data model than KV
  – Good at handling content management, session,
    profile data
  – Multi index support
  – Dynamic schemas, Nested schemas
  – Auto distributed, eventual consistency
  – MVCC (CouchDB) or app logic (MongoDB)

•MongoDB, SimpleDB: widely adopted in this space

•Use Case: Search by complex patterns & CRUD apps
Column Family Store

• Hbase (Apache), Cassanda (Facebook) and HyperTable (Bidu)

   – Hbase – CA
   – Cassandra – AP

• Model consists of rows and columns

• Scalability: Splitting of both rows and columns

   – Rows are split across nodes using primary key, range
   – Columns are distributed using groups
   – Horizontal and vertical partitioning can be used simultaneous

• Extension of document store
Graph Store
• Social Graph

• Relationship between entities

• Data modeling on social networks

• Common Use Cases

  –List of friends, Shared with common property
  –Recommendation system
  –Following
  –Followers
  –Common Connections
Cloud Data Stores
• “Database As Service” Models:

  – Amazon RDS, DynamoDB, SimpleDB, PostgreSQL
  – Xeround (MySQL)
  – Microsoft SQL Azure Database (SQL Server)
  – Google App Engine (NoSQL)
  – SalesForce Database.com (Oracle)
  – ClearDB (MySQL)
  – Cloudant(CouchDB)
Finally …

 SQL
Works great, can’t easily scale

 NoSQL
Works great, can’t fit for all

 Analytics, BigData
Every business need it
Questions ?

•http://scalein.com/
•http://venublog.com/
•venu@venublog.com
•Twitter: @vanuganti

More Related Content

PPTX
Relational databases vs Non-relational databases
PPT
SQL/NoSQL How to choose ?
PDF
Nosql data models
PPTX
What is NoSQL and CAP Theorem
PDF
Big Challenges in Data Modeling: NoSQL and Data Modeling
PPTX
Rdbms vs. no sql
DOCX
Sql vs NO-SQL database differences explained
PPTX
Sql vs NoSQL
Relational databases vs Non-relational databases
SQL/NoSQL How to choose ?
Nosql data models
What is NoSQL and CAP Theorem
Big Challenges in Data Modeling: NoSQL and Data Modeling
Rdbms vs. no sql
Sql vs NO-SQL database differences explained
Sql vs NoSQL

What's hot (20)

PDF
SQL vs NoSQL: Big Data Adoption & Success in the Enterprise
PPTX
NoSQL Data Architecture Patterns
PDF
NoSQL Now! NoSQL Architecture Patterns
PPTX
NoSQL Architecture Overview
PPTX
SQL vs NoSQL
PPTX
Colorado Springs Open Source Hadoop/MySQL
PPTX
Selecting best NoSQL
PDF
Oracle vs NoSQL – The good, the bad and the ugly
PPTX
NoSQL databases - An introduction
PPTX
Sql vs nosql
PPTX
Hadoop vs. RDBMS for Advanced Analytics
PPT
SQL or NoSQL, that is the question!
PPTX
Practical guide to architecting data lakes - Avinash Ramineni - Phoenix Data...
PPTX
Should I move my database to the cloud?
PPTX
Trusted advisory on technology comparison --exadata, hana, db2
PPTX
SQL vs. NoSQL. It's always a hard choice.
PPTX
Webinar: ROI on Big Data - RDBMS, NoSQL or Both? A Simple Guide for Knowing H...
PPT
Choosing the Right Big Data Tools for the Job - A Polyglot Approach
PPTX
Big Data Technologies and Why They Matter To R Users
PPTX
Non relational databases-no sql
SQL vs NoSQL: Big Data Adoption & Success in the Enterprise
NoSQL Data Architecture Patterns
NoSQL Now! NoSQL Architecture Patterns
NoSQL Architecture Overview
SQL vs NoSQL
Colorado Springs Open Source Hadoop/MySQL
Selecting best NoSQL
Oracle vs NoSQL – The good, the bad and the ugly
NoSQL databases - An introduction
Sql vs nosql
Hadoop vs. RDBMS for Advanced Analytics
SQL or NoSQL, that is the question!
Practical guide to architecting data lakes - Avinash Ramineni - Phoenix Data...
Should I move my database to the cloud?
Trusted advisory on technology comparison --exadata, hana, db2
SQL vs. NoSQL. It's always a hard choice.
Webinar: ROI on Big Data - RDBMS, NoSQL or Both? A Simple Guide for Knowing H...
Choosing the Right Big Data Tools for the Job - A Polyglot Approach
Big Data Technologies and Why They Matter To R Users
Non relational databases-no sql
Ad

Viewers also liked (7)

PDF
Apache Hivemall @ Apache BigData '17, Miami
PPTX
Hadoop bigdata overview
PDF
Bio bigdata
PDF
Data Analytics Practice at Paxcel
PDF
Jubatus: Realtime deep analytics for BIgData@Rakuten Technology Conference 2012
PDF
Introducing Agile Scrum XP and Kanban
PPTX
BDaas- BigData as a service
Apache Hivemall @ Apache BigData '17, Miami
Hadoop bigdata overview
Bio bigdata
Data Analytics Practice at Paxcel
Jubatus: Realtime deep analytics for BIgData@Rakuten Technology Conference 2012
Introducing Agile Scrum XP and Kanban
BDaas- BigData as a service
Ad

Similar to SQL, NoSQL, BigData in Data Architecture (20)

PDF
SQL? NoSQL? NewSQL?!? What’s a Java developer to do? - JDC2012 Cairo, Egypt
PPTX
Big Data (NJ SQL Server User Group)
PPTX
NoSQL: An Analysis
PPTX
Lviv EDGE 2 - NoSQL
PDF
SQL, NoSQL, Distributed SQL: Choose your DataStore carefully
PPTX
NoSQL and The Big Data Hullabaloo
PPTX
NoSQL A brief look at Apache Cassandra Distributed Database
PPTX
NoSQL for the SQL Server Pro
PPTX
A Practical Look at the NOSQL and Big Data Hullabaloo
PPT
No sql
PDF
Database Revolution - Exploratory Webcast
PDF
Database revolution opening webcast 01 18-12
PDF
Scaling the Web: Databases & NoSQL
PPTX
No SQL- The Future Of Data Storage
PPTX
No sql databases
PPTX
Big Data Overview 2013-2014
PPTX
Navigating NoSQL in cloudy skies
PPTX
PDF
Preparing yourdataforcloud
PPTX
The Rise of NoSQL and Polyglot Persistence
SQL? NoSQL? NewSQL?!? What’s a Java developer to do? - JDC2012 Cairo, Egypt
Big Data (NJ SQL Server User Group)
NoSQL: An Analysis
Lviv EDGE 2 - NoSQL
SQL, NoSQL, Distributed SQL: Choose your DataStore carefully
NoSQL and The Big Data Hullabaloo
NoSQL A brief look at Apache Cassandra Distributed Database
NoSQL for the SQL Server Pro
A Practical Look at the NOSQL and Big Data Hullabaloo
No sql
Database Revolution - Exploratory Webcast
Database revolution opening webcast 01 18-12
Scaling the Web: Databases & NoSQL
No SQL- The Future Of Data Storage
No sql databases
Big Data Overview 2013-2014
Navigating NoSQL in cloudy skies
Preparing yourdataforcloud
The Rise of NoSQL and Polyglot Persistence

Recently uploaded (20)

PDF
cuic standard and advanced reporting.pdf
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Machine learning based COVID-19 study performance prediction
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Encapsulation theory and applications.pdf
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
cuic standard and advanced reporting.pdf
Agricultural_Statistics_at_a_Glance_2022_0.pdf
The Rise and Fall of 3GPP – Time for a Sabbatical?
Machine learning based COVID-19 study performance prediction
“AI and Expert System Decision Support & Business Intelligence Systems”
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Reach Out and Touch Someone: Haptics and Empathic Computing
Encapsulation theory and applications.pdf
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Per capita expenditure prediction using model stacking based on satellite ima...
Chapter 3 Spatial Domain Image Processing.pdf
Mobile App Security Testing_ A Comprehensive Guide.pdf
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Understanding_Digital_Forensics_Presentation.pptx
Building Integrated photovoltaic BIPV_UPV.pdf
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
The AUB Centre for AI in Media Proposal.docx
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...

SQL, NoSQL, BigData in Data Architecture

  • 1. SQL, NoSQL & BigData in Data Architecture Venu Anuganti Nov 2012 http://scalein.com/ http://venublog.com/
  • 2. Who am I • Data Architect, Technology Advisor & Seed Investor • Design, Implement & Support SQL, NoSQL and BigData Solutions – Industry: Databases, Games, Social, Video, SaaS, Analytics, Warehouse, Web, Financial, Telco, Mobile, Advertising & SEM Marketing – Consulted for more than 22+ from Fortune-500 companies • http://scalein.com/
  • 3. Agenda • Current trends in SQL, NoSQL and BigData • Why “data architecture” is key for every company • Key factors in getting the right solution • Typical Big “Data Architecture” • Overview of popular data sources, quick comparison • How to build “data analytics” for “data science”
  • 5. Current Trends • Lot of dynamics in the market, too much data • SQL, NoSQL, BigData & Analytics – Buzz including investors • NoSQL, BigData is becoming hot topic for every engineer, team, company & management • Nothing less to the current tablet war between Apple, Microsoft, Google, Amazon and Samsung • Very good sign as technology is evolving. But lot of people getting confused. What solution should I start with ? – Confusion makes a slow start for lot of startups and even for leaders in the industry to make a shift
  • 6. Current Trends - SQL • SQL is slowing down.. not really – OLTP can’t be replaced easily • Key factors - Pros – Transactional, Concurrency, Consistency & Durability – Proven, SQL, JDBC/ODBC, native protocols – Widely adopted, fits for all & interoperability – Legacy, risk free, easy adoption & expert community – Low latency response times, almost ~0 secs – Very good for small data-sets, takes advantage of bleeding hardware (SSD, Flash cards, high memory, latest CPUs, cloud enabled) – Easy read scaling, writes needs application logic • Key factors – Cons – Transactional, Concurrency, Consistency & Durability – Scalability, Clustering, Distributed – Fixed schema, online management – Built-in clustering is hard due to the nature of ACID – Bound by hardware, Scale-UP
  • 7. Current Trends - NoSQL • NoSQL is racing • Key factors - Pros – Overcomes known SQL limitations – Eventually consistent – Clustering, Scalability, Distributed (not all) – Schema free – Each solves it’s own specific problem – Easy to adopt • Key factors – Cons – Consistency (varies), Durability – Maturity, major solutions are not yet “production” grade – Does not fit for all, individual solution for each problem – Response time, depends on each solution – 95% relays on application logic to explore data store data
  • 8. Current Trends - BigData • BigData is the latest industry buzz, trend or … • Gartner – 28B in 2012 & 34B in 2013 spend – 2013 top-10 technology trends – 6th place • Solves large data problems that existed for years – Social, User, Mobile growth demanded such a solution (FB crossed 1B users, classic example) – Google “BigTable” is the key, and new papers like Dremel drives it further – Amazon “Dynamo” follows – Hadoop & ecosystem is becoming synonym for BigData • Combines vast structured/un-structured data – Overcomes from legacy warehouse model – Brings data analytics & data science – Real-time, mining, insights, discovery & complex reporting
  • 9. Current Trends - BigData • Key factors - Pros – Can handle any size – Commodity hardware – Scalable, Distributed, Highly Available – Ecosystem & growing community • Key factors – Cons – Latency – Redundancy, Durability, Maturity – Tradeoff on consistency – Hardware evolution, even though designed for commodity
  • 11. Data Architecture • No standard solution that fits to all • Business and data defines the right solution • It’s all about solving “business” problems • You need to find the right tool that does the job – If company X uses MySQL to scale their 500M users, does not mean you can use MySQL to scale your 100M users – If company Y uses MongoDB for storing 100M user profile data, does not mean you can also take it for granted
  • 12. Key Factors • Resources are the key – A good engineer can make bad product to work – A bad engineer can make good product to suck • Understand the business – Data sources & data growth – Data consumption • end user vs. API vs. data science vs. reporting vs. internal – SLA, Response time, Turn around time, Recovery times – Cost; Evolve as business grows, don’t over-architect from day-1 – Capacity planning, leave enough room for failure & growth
  • 13. Tradeoff – Data Architecture • Performance vs. Scale vs. Stability • OLTP vs. OLAP • Internal vs. External • Application stack • Cloud vs. Data center • Hardware vs. features vs. product vs. cost
  • 14. Typical “Data” Architecture
  • 16. Choosing The Right Solution • Store: – SQL, key-value, in-memory, document, graph, bigdata, node.js (server end service), s3, azure, file system, … • Log: – Log processing tools for structured/un-structured (scripts, splunk, flume, scribe, chukwa, loggly, kibana, .) • Caching: – File System, Use replicas, Write Through Cache (WTC), Read From Cache (RFC) – CDN/S3/Azure frequent processing, local cache
  • 17. Choosing The Right Solution .. • Platform: – php, ruby, java, scala, python, c/c++, client/server, rest, soap, http, api, etc. • (Dev)-Operation: – OS, file system, automation using puppet/chef, security, performance metrics, monitoring, in-depth exposure to every layer (nagios, ganglia, zabbix, new- relic, tsdb, etc.) • Search: – built-in, solr, elastic search, full-text
  • 19. Evaluate – Data Store • Key Evaluation Requirements –Transactional, Durability & Consistency –Response time –Functionality –Data characteristics –Scalability, Clustering –Failover –Maintenance, Online changes, Node Management –Maturity –Community, Support –Hosted or Managed –Cost, open source –Big “NO” to Appliance models, premium cost solutions
  • 20. Decide what you need • SQL – Relational, transactional processing • NoSQL – Non relational, distributed, high performance and highly scalable • Analytics, Warehouse, BigData – Data Warehousing, Analytics, Data science, and reporting • Combination of all 3 – Begin with SQL, NoSQL and eventually need BigData/Analytics platform
  • 21. SQL Stores • Disk based storage, Fixed schema • Data is stored as table (row by row and columns – row store), Durable and transactional • Mainly B-tree as the indexing mechanism • Dynamic locking/ Lock free for concurrency control • Write-ahead log (WAL) / transactional log for crash recovery • Takes advantage of bleeding hardware (SSD, flash cards, CPUs, memory, cloud enabled, …) • Concurrent read/write/update/delete same row
  • 22. SQL – Good • Simple or complex aggregation • Statistics, reports at data store level • Need access to more than one tuple of information • Results based on multiple search conditions – SELECT foo FROM bar where X=1 and Y=2 • Fetching of ordered or array of data • Compatible with many tools
  • 23. SQL – Bad • SQL complexity, parsing cost, client/server overhead • Learning and relational model design • Performance and Scalability – Strictly single node write – Sharding causes more trouble operationally – Operational maintenance, fire fighting • Puts a break to rapid development cycles
  • 24. NoSQL Stores … • Non relational, schema free • Highly Distributed • Simple CLI, REST, SOAP or API driven • Eventually consistent, depends store to store • Ability to dynamically define new attributes • Concurrency & Consistency – @application
  • 25. NoSQL Stores … • Multiple Types based on storage architecture • Key Value, KV • Very popular for simple key-value lookups; disk/memory • Document • Popular for document type of storage • Graph • Connected graph with entity relationship • Column Family • Key value with fixed column families, allows dynamic columns within column family
  • 26. NoSQL Stores • Key-Value Stores • Column Family – Dynamo Clones – BigTable Clones • Membase • Cassandra • Riak • HBase • Redis • HyperTable • Tokyo Cabinet • Voldemort • Document Stores • Graph Databases • MongoDB • Neo4J • CouchDB • InfoGrid • SimpleDB • AllegroGraph • FlockDB
  • 27. NoSQL - Good • Fits very well for volatile data • High read or write throughput • Automatic horizontal scalability (Consistent hashing) • Simple to implement, no investment for schema design • Application logic defines object model • Support of MVCC in some form • Compaction and un-compaction happens at app tier • In-memory or disk based or combination @performance penalty
  • 28. NoSQL - Good • Rapid development cycles, programmer friendly • Reduces the footprint at data store level • NoSQL in general faster than SQL • Supports INSERT, DELETE, SELECT • Data is distributed by KEY over nodes (depends on solution) • Lists, sets, queues, pub-sub are also supported by some NoSQL – Redis, Riak
  • 29. NoSQL - Bad • Packing and Un-packing of each key • Lack of relation from one key to another • Need whole value from the key even when you need 1-byte • Concurrency for latest copy is your take • Data store is merely a storage layer, can’t be used for: – Analytics – Reporting – Aggregation – Ordered values
  • 30. SQL/NoSQL – Good and Bad • Performance mainly depends on amount of memory • Disk bound both takes a hit – SQL has advantage due to sequential and read-ahead • Optimization towards frequently accessed data – SQL engines maintain LRU, buffer pool – Read from slave nodes, may not be up2date • SQL Engines are proven and widely in use • People use WTC – NoSQL & SQL
  • 31. Analytic Stores • Data warehousing, mainly for processing large data sets • Data marts, Dimensional, Fact and Aggregate tables • ETL, BI, Reporting, Analytics • Columnar, Distribution and Compression is the key
  • 32. Data Analytics • Data Analytics is critical for every business – Combine heterogeneous data sources • Weblogs, user activity, transactional data, purchase history, user profile, crm, marketing, campaign performance, … – Complex Reporting – Understand user behavior, geo, interest levels – Recommendation – User (re)targeting – Product usage, features most (not) liked – Increase ROI, user satisfaction • It helps business in every aspect to inspect, understand, implement, apply – Waterfall model
  • 33. Data Science • Large data helps to build good models due to high probability –Statistics –Predictions –Data Analysis –Build test models, continuously • AB test • Apply slowly to selected users or clients • Fine tune it • Adopt globally
  • 34. Analytic Stores • Columnar data warehouse solutions – GreenPlum (EMC, DCA appliance) – Vertica (HP, appliance coming) – ParAccel – InfoBright (MySQL based) – InfiniDB (open source, Calpont appliance) – Netezza (IBM, appliance) – XtremeData dbX (appliance) – TeraData
  • 35. Analytic Stores - BigData • Hadoop is leading the BigData platform • Rapidly Growing - Analytics Platform – HDFS, Map Reduce direct processing – HIVE – HBASE – IMPALA - Cloudera announced last week based on Google’s Dremel – DRILL – Apache open source version, in works – Google BigQuery
  • 36. Document Store •Document Stores – Supports complex data model than KV – Good at handling content management, session, profile data – Multi index support – Dynamic schemas, Nested schemas – Auto distributed, eventual consistency – MVCC (CouchDB) or app logic (MongoDB) •MongoDB, SimpleDB: widely adopted in this space •Use Case: Search by complex patterns & CRUD apps
  • 37. Column Family Store • Hbase (Apache), Cassanda (Facebook) and HyperTable (Bidu) – Hbase – CA – Cassandra – AP • Model consists of rows and columns • Scalability: Splitting of both rows and columns – Rows are split across nodes using primary key, range – Columns are distributed using groups – Horizontal and vertical partitioning can be used simultaneous • Extension of document store
  • 38. Graph Store • Social Graph • Relationship between entities • Data modeling on social networks • Common Use Cases –List of friends, Shared with common property –Recommendation system –Following –Followers –Common Connections
  • 39. Cloud Data Stores • “Database As Service” Models: – Amazon RDS, DynamoDB, SimpleDB, PostgreSQL – Xeround (MySQL) – Microsoft SQL Azure Database (SQL Server) – Google App Engine (NoSQL) – SalesForce Database.com (Oracle) – ClearDB (MySQL) – Cloudant(CouchDB)
  • 40. Finally …  SQL Works great, can’t easily scale  NoSQL Works great, can’t fit for all  Analytics, BigData Every business need it

Editor's Notes

  • #3: MySQL Employee 2000-2004 Database Companies MySQL SOLID ANTs Data Server ScaleDB Part of Yahoo ’s cloud initiates like Sherpa and Mobstor and a platform MySQL Geek Still contribute randomly to MySQL source
  • #5: When web is read-only, things used to scale with one or more systems with caching or LB in the front But as things change to real-time and interactive, the same architecture can ’t keep up Talk about how Facebook, Twitter, LinkedIn is evolving Public cloud sucks in performance, but offers elasticity to grow ; but you need to design systems to balance hardware, performance and scalability
  • #15: Now lets understand different types of data stores
  • #17: WTC – Write Through Cache RFC – Read From Cache
  • #18: WTC – Write Through Cache RFC – Read From Cache
  • #19: Now lets understand different types of data stores
  • #21: WTC – Write Through Cache RFC – Read From Cache
  • #22: Concurrent read/write/update to same row
  • #23: Employee or user can update his profile fields Guaranteed durability
  • #24: Employee or user can update his profile fields Guaranteed durability
  • #25: Bunch of cloud based solutions, which are bit surprising
  • #26: Bunch of cloud based solutions, which are bit surprising
  • #27: Bunch of cloud based solutions, which are bit surprising
  • #28: Gaming is a classic example for volatile data
  • #29: Gaming is a classic example for volatile data
  • #30: Gaming is a classic example for volatile data
  • #31: Gaming is a classic example for volatile data
  • #32: Widely adopted for years
  • #33: Widely adopted for years
  • #34: Widely adopted for years
  • #35: DCA Data Computing Appliance Talk about analytics and how crucial they are now
  • #36: DCA Data Computing Appliance Talk about analytics and how crucial they are now
  • #37: Gaming is a classic example for volatile data
  • #38: Gaming is a classic example for volatile data
  • #39: Gaming is a classic example for volatile data