SlideShare a Scribd company logo
1 of 37
Download to read offline
PhpXperts seminar 2010,
Work for Fun!!
CodeMan!
with noSQL!
nhm tanveer hossain khan
http://hasan.we4tech.com
PhpXperts seminar 2010,
Work for Fun!!
Super heros!
PhpXperts seminar 2010,
Work for Fun!!
...So this is about
You as a CodeMan!
... CodeMan! CodeMan! help help!
PhpXperts seminar 2010,
Work for Fun!!
Now let's get back to
our discussion –
Database Stuffs!
PhpXperts seminar 2010,
Work for Fun!!
Database!
SELECT books.*
FROM books
LEFT JOIN users
ON books.user_id = users.id
WHERE
users.age < 15
Relational
Database
System
Query language!
PhpXperts seminar 2010,
Work for Fun!!
Known issues with
existing database system!
• Maintaining Relations among the
tables
• Table, Page, Row level Locking
• Huge data produces huge
Fat indexes
• Transactional Operations
• Parsing SQL query syntax
• Multi tables Joining Query
PhpXperts seminar 2010,
Work for Fun!!
So what about ?
noSQL!!
(Structured
Storage System)
PhpXperts seminar 2010,
Work for Fun!!
About noSQL ?
• NoSQL == Structured storage!
• An initiative to use
alternative of relational
database system
• Targeting on the following goals
–Performance
– Autonomous
– Minimizing cost
PhpXperts seminar 2010,
Work for Fun!!
Why structured storage over
relational database
• Getting rid of fear
–In larger expansion is
CHEAP!
–No SQL parsing overhead
–No table joining
–No relation consideration
–No single big chunk of data
PhpXperts seminar 2010,
Work for Fun!!
Let's Think
about a quite
bigger system!
PhpXperts seminar 2010,
Work for Fun!!
Our Possible context!
• Load of data
• Huge data growth
• Extensive database operations
• Extensive I/O traffic (read/write)
• Fault tolerance
• Data consistency
• Assured availability
PhpXperts seminar 2010,
Work for Fun!!
Let's check the
facts!
PhpXperts seminar 2010,
Work for Fun!!
MySQL and other noSQL
systems performance
comparison by Yahoo!
research
PhpXperts seminar 2010,
Work for Fun!!
PhpXperts seminar 2010,
Work for Fun!!
PhpXperts seminar 2010,
Work for Fun!!
What others are
talking about?
Or whoever skipped
relational
database?
PhpXperts seminar 2010,
Work for Fun!!
At facebook!
• Facebook! Around 140 nodes!
• Facebook open sourced cassandra!
PhpXperts seminar 2010,
Work for Fun!!
Digg.com declared to use cassandra!
The fundamental problem is endemic to the relational
database mindset, which places the burden of computation
on reads rather than writes. This is completely wrong
for large-scale web applications, where response time is
critical. It’s made much worse by the serial nature of
most applications. Each component of the page blocks on
reads from the data store, as well as the completion of
the operations that come before it. Non-relational data
stores reverse this model completely, because they don’t
have the complex read operations of SQL.
Read at home!
PhpXperts seminar 2010,
Work for Fun!!
Twitter moved their
statuses on cassandra!
We have a lot of data, the growth factor in that data is
huge and the rate of growth is accelerating. We have a
system in place based on shared mysql + memcached but
its quickly becoming prohibitively costly (in terms of
manpower) to operate. We need a system that can grow in
a more automated fashion and be highly available.
Read at home!
PhpXperts seminar 2010,
Work for Fun!!
Few Related References!
• Check out Yahoo! Research's
“Cloud Serving Benchmark”
• MySQL and Memcached: End of An era?
• An article on how Yoshinori scaled MySQL as
noSQL to serve 750,000 qps! Click here
PhpXperts seminar 2010,
Work for Fun!!
Time is almost running
out!! let's taste some
noSQL curry!
PhpXperts seminar 2010,
Work for Fun!!
List of available
structured databases
• Hbase - yahoo!
• Voldemort – used in LinkedIn
• MongoDB
• MemcacheDB
• Riak
• Redis
• Cassandra – facebook, twitter,
digg, Rackspace, Reddit
• HyperTable
PhpXperts seminar 2010,
Work for Fun!!
Let's go with Cassandra!
(cassandra.apache.org)
PhpXperts seminar 2010,
Work for Fun!!
Why cassandra!
• Tested (Facebook, Twitter,
Reddit, Digg, Rackspace etc..)
• Decentralized and No single point
of failure
• Flexible schema
• Elastic
• Durable, Data center and Disaster
management aware
• Highly scalable write
PhpXperts seminar 2010,
Work for Fun!!
PHP and Cassandra!
Using Phpcassa
library
PhpXperts seminar 2010,
Work for Fun!!
Install cassandra
• Go and download cassandra from here -
http://cassandra.apache.org/
• Ensure you have java runtime on your pc
•
PhpXperts seminar 2010,
Work for Fun!!
Create keyspace and column family
• Extract your download cassandra
archive
• Edit “cofig/storage-config.xml”
file in your text editor
• Go to the “Keyspaces” block
• Add “AddressBook” Keyspace
PhpXperts seminar 2010,
Work for Fun!!
Configuration!
<Keyspace Name="AddressBook">
<ColumnFamily Name='Addresses'
CompareWith="TimeUUIDType"/>
<ReplicaPlacementStrategy>org.apache.cassandr
a.locator.RackUnawareStrategy</ReplicaPlaceme
ntStrategy>
<ReplicationFactor>1</ReplicationFactor>
<EndPointSnitch>org.apache.cassandra.locator.
EndPointSnitch</EndPointSnitch>
</Keyspace>
PhpXperts seminar 2010,
Work for Fun!!
Kick start cassandra!
• $ cd apache-cassandra-0.6.x
• $ ./bin/cassandra
• Get PHP thrift library – phpcassa
• https://github.com/hoan/phpcassa/
PhpXperts seminar 2010,
Work for Fun!!
Show code!!
• Inserting data into cassandra!
• Listing all added data
• Remove an existing data
PhpXperts seminar 2010,
Work for Fun!!
More about cassandra!
• All nodes need to be in
low latency fiber connected
• Still in alpha version! Might
have issues!
• High RPM hard disk (ie. 15000,
10000)
PhpXperts seminar 2010,
Work for Fun!!
Before you move!,
you think about -
common sense!
PhpXperts seminar 2010,
Work for Fun!!
Common sense!
• Avoid Big Design Up Front !
• Benchmark your existing system performance!
• Experiment and calculate cost!
• Structured database with Dr. Eric Brewer CAP
theorem
– Consistency - Is the data I’m looking at now the same if I look at it
somewhere else?
– Availability - What happens if my database goes down?
– Partitioning - What if my data is on different networks?
PhpXperts seminar 2010,
Work for Fun!!
That's it for today :)
Thanks!
Now you guys should treat me ;)
PhpXperts seminar 2010,
Work for Fun!!
Find out the best restaurant in the
town!
Passion food reviewers community!
http://restaurant.welltreat.us
PhpXperts seminar 2010,
Work for Fun!!
- nhm tanveer hossain khan (hasan)
   IT Director, Tasawr Interactive
   hasan@tasawr.com
   Blog: http://hasan.we4tech.com
   Twitter: http://twitter.com/we4tech
   love programming, 
   used to write code in Ruby, Java and PHP!
Who am i?
PhpXperts seminar 2010,
Work for Fun!!
NOW Q/A

More Related Content

What's hot

You Got React.js in My PHP
You Got React.js in My PHPYou Got React.js in My PHP
You Got React.js in My PHPTaylor Lovett
 
Saving Time with WP-CLI
Saving Time with WP-CLISaving Time with WP-CLI
Saving Time with WP-CLITaylor Lovett
 
WordCamp 2012 - WordPress Webapps
WordCamp 2012 - WordPress WebappsWordCamp 2012 - WordPress Webapps
WordCamp 2012 - WordPress Webappstjasko
 
Modernizing WordPress Search with Elasticsearch
Modernizing WordPress Search with ElasticsearchModernizing WordPress Search with Elasticsearch
Modernizing WordPress Search with ElasticsearchTaylor Lovett
 
Javascript fatigue, 자바스크립트 피로
Javascript fatigue, 자바스크립트 피로Javascript fatigue, 자바스크립트 피로
Javascript fatigue, 자바스크립트 피로Rhio Kim
 
Speed up Your Joomla Site for Ultimate Performance
Speed up Your Joomla Site for Ultimate PerformanceSpeed up Your Joomla Site for Ultimate Performance
Speed up Your Joomla Site for Ultimate PerformanceJoomlaDay Australia
 
Webpack: What it is, What it does, Whether you need it
Webpack: What it is, What it does, Whether you need itWebpack: What it is, What it does, Whether you need it
Webpack: What it is, What it does, Whether you need itMike Wilcox
 
5 Common Mistakes You are Making on your Website
 5 Common Mistakes You are Making on your Website 5 Common Mistakes You are Making on your Website
5 Common Mistakes You are Making on your WebsiteAcquia
 
Immutable servers with Packer/Chef/AWS
Immutable servers with Packer/Chef/AWSImmutable servers with Packer/Chef/AWS
Immutable servers with Packer/Chef/AWSPavel Gabriel
 
2013 - Igor Sysoev - NGINx: origen, evolución y futuro - PHP Conference Argen...
2013 - Igor Sysoev - NGINx: origen, evolución y futuro - PHP Conference Argen...2013 - Igor Sysoev - NGINx: origen, evolución y futuro - PHP Conference Argen...
2013 - Igor Sysoev - NGINx: origen, evolución y futuro - PHP Conference Argen...PHP Conference Argentina
 
Level Up: 5 Expert Tips for Optimizing WordPress Performance
Level Up: 5 Expert Tips for Optimizing WordPress PerformanceLevel Up: 5 Expert Tips for Optimizing WordPress Performance
Level Up: 5 Expert Tips for Optimizing WordPress PerformancePantheon
 
"Turbo boost your website" aka BigPipe at Webinale 2014 in Berlin
"Turbo boost your website" aka BigPipe at Webinale 2014 in Berlin"Turbo boost your website" aka BigPipe at Webinale 2014 in Berlin
"Turbo boost your website" aka BigPipe at Webinale 2014 in BerlinTobias Zander
 
Squeeze Maximum Performance From Your Joomla Website
Squeeze Maximum Performance From Your Joomla WebsiteSqueeze Maximum Performance From Your Joomla Website
Squeeze Maximum Performance From Your Joomla WebsiteSiteGround.com
 
Here Be Dragons - Debugging WordPress
Here Be Dragons - Debugging WordPressHere Be Dragons - Debugging WordPress
Here Be Dragons - Debugging WordPressRami Sayar
 
In-browser storage and me
In-browser storage and meIn-browser storage and me
In-browser storage and meJason Casden
 

What's hot (20)

You Got React.js in My PHP
You Got React.js in My PHPYou Got React.js in My PHP
You Got React.js in My PHP
 
Apache poi
Apache poi Apache poi
Apache poi
 
Apache poi tutorial
Apache poi tutorialApache poi tutorial
Apache poi tutorial
 
Saving Time with WP-CLI
Saving Time with WP-CLISaving Time with WP-CLI
Saving Time with WP-CLI
 
WordCamp 2012 - WordPress Webapps
WordCamp 2012 - WordPress WebappsWordCamp 2012 - WordPress Webapps
WordCamp 2012 - WordPress Webapps
 
Modernizing WordPress Search with Elasticsearch
Modernizing WordPress Search with ElasticsearchModernizing WordPress Search with Elasticsearch
Modernizing WordPress Search with Elasticsearch
 
Top ten-list
Top ten-listTop ten-list
Top ten-list
 
Javascript fatigue, 자바스크립트 피로
Javascript fatigue, 자바스크립트 피로Javascript fatigue, 자바스크립트 피로
Javascript fatigue, 자바스크립트 피로
 
Speed up Your Joomla Site for Ultimate Performance
Speed up Your Joomla Site for Ultimate PerformanceSpeed up Your Joomla Site for Ultimate Performance
Speed up Your Joomla Site for Ultimate Performance
 
MongoDB
MongoDBMongoDB
MongoDB
 
Webpack: What it is, What it does, Whether you need it
Webpack: What it is, What it does, Whether you need itWebpack: What it is, What it does, Whether you need it
Webpack: What it is, What it does, Whether you need it
 
5 Common Mistakes You are Making on your Website
 5 Common Mistakes You are Making on your Website 5 Common Mistakes You are Making on your Website
5 Common Mistakes You are Making on your Website
 
Immutable servers with Packer/Chef/AWS
Immutable servers with Packer/Chef/AWSImmutable servers with Packer/Chef/AWS
Immutable servers with Packer/Chef/AWS
 
Dangerous CSS
Dangerous CSSDangerous CSS
Dangerous CSS
 
2013 - Igor Sysoev - NGINx: origen, evolución y futuro - PHP Conference Argen...
2013 - Igor Sysoev - NGINx: origen, evolución y futuro - PHP Conference Argen...2013 - Igor Sysoev - NGINx: origen, evolución y futuro - PHP Conference Argen...
2013 - Igor Sysoev - NGINx: origen, evolución y futuro - PHP Conference Argen...
 
Level Up: 5 Expert Tips for Optimizing WordPress Performance
Level Up: 5 Expert Tips for Optimizing WordPress PerformanceLevel Up: 5 Expert Tips for Optimizing WordPress Performance
Level Up: 5 Expert Tips for Optimizing WordPress Performance
 
"Turbo boost your website" aka BigPipe at Webinale 2014 in Berlin
"Turbo boost your website" aka BigPipe at Webinale 2014 in Berlin"Turbo boost your website" aka BigPipe at Webinale 2014 in Berlin
"Turbo boost your website" aka BigPipe at Webinale 2014 in Berlin
 
Squeeze Maximum Performance From Your Joomla Website
Squeeze Maximum Performance From Your Joomla WebsiteSqueeze Maximum Performance From Your Joomla Website
Squeeze Maximum Performance From Your Joomla Website
 
Here Be Dragons - Debugging WordPress
Here Be Dragons - Debugging WordPressHere Be Dragons - Debugging WordPress
Here Be Dragons - Debugging WordPress
 
In-browser storage and me
In-browser storage and meIn-browser storage and me
In-browser storage and me
 

Similar to phpXperts seminar 2010 CodeMan! with noSQL!

Realtime Search Infrastructure at Craigslist (OpenWest 2014)
Realtime Search Infrastructure at Craigslist (OpenWest 2014)Realtime Search Infrastructure at Craigslist (OpenWest 2014)
Realtime Search Infrastructure at Craigslist (OpenWest 2014)Jeremy Zawodny
 
Sql And Storage Considerations For Share Point Server 2010
Sql And Storage Considerations For Share Point Server 2010Sql And Storage Considerations For Share Point Server 2010
Sql And Storage Considerations For Share Point Server 2010Mike Watson
 
PLAT-8 Spring Web Scripts and Spring Surf
PLAT-8 Spring Web Scripts and Spring SurfPLAT-8 Spring Web Scripts and Spring Surf
PLAT-8 Spring Web Scripts and Spring SurfAlfresco Software
 
Systems Monitoring with Prometheus (Devops Ireland April 2015)
Systems Monitoring with Prometheus (Devops Ireland April 2015)Systems Monitoring with Prometheus (Devops Ireland April 2015)
Systems Monitoring with Prometheus (Devops Ireland April 2015)Brian Brazil
 
Bluemix paas 기반 saas 개발 사례
Bluemix paas 기반 saas 개발 사례Bluemix paas 기반 saas 개발 사례
Bluemix paas 기반 saas 개발 사례uEngine Solutions
 
PLAT-7 Spring Web Scripts and Spring Surf
PLAT-7 Spring Web Scripts and Spring SurfPLAT-7 Spring Web Scripts and Spring Surf
PLAT-7 Spring Web Scripts and Spring SurfAlfresco Software
 
PLAT-7 Spring Web Scripts and Spring Surf
PLAT-7 Spring Web Scripts and Spring SurfPLAT-7 Spring Web Scripts and Spring Surf
PLAT-7 Spring Web Scripts and Spring SurfAlfresco Software
 
EECI 2013 - ExpressionEngine Performance & Optimization - Laying a Solid Foun...
EECI 2013 - ExpressionEngine Performance & Optimization - Laying a Solid Foun...EECI 2013 - ExpressionEngine Performance & Optimization - Laying a Solid Foun...
EECI 2013 - ExpressionEngine Performance & Optimization - Laying a Solid Foun...Nexcess.net LLC
 
SharePoint 2014: Where to save my data, for devs!
SharePoint 2014: Where to save my data, for devs!SharePoint 2014: Where to save my data, for devs!
SharePoint 2014: Where to save my data, for devs!Ben Steinhauser
 
Running MongoDB in the Cloud
Running MongoDB in the CloudRunning MongoDB in the Cloud
Running MongoDB in the CloudTony Tam
 
SQL Server and SharePoint - Best Practices presented by Steffen Krause, Micro...
SQL Server and SharePoint - Best Practices presented by Steffen Krause, Micro...SQL Server and SharePoint - Best Practices presented by Steffen Krause, Micro...
SQL Server and SharePoint - Best Practices presented by Steffen Krause, Micro...European SharePoint Conference
 
Apache Content Technologies
Apache Content TechnologiesApache Content Technologies
Apache Content Technologiesgagravarr
 
Scalable Web Architectures: Common Patterns and Approaches - Web 2.0 Expo NYC
Scalable Web Architectures: Common Patterns and Approaches - Web 2.0 Expo NYCScalable Web Architectures: Common Patterns and Approaches - Web 2.0 Expo NYC
Scalable Web Architectures: Common Patterns and Approaches - Web 2.0 Expo NYCCal Henderson
 
It112 SharePoint 2010 Mythbusters
It112 SharePoint 2010MythbustersIt112 SharePoint 2010Mythbusters
It112 SharePoint 2010 MythbustersSpencer Harbar
 
NoSQL and SQL - Why Choose? Enjoy the best of both worlds with MySQL
NoSQL and SQL - Why Choose? Enjoy the best of both worlds with MySQLNoSQL and SQL - Why Choose? Enjoy the best of both worlds with MySQL
NoSQL and SQL - Why Choose? Enjoy the best of both worlds with MySQLAndrew Morgan
 
Developing High Performance Web Apps - CodeMash 2011
Developing High Performance Web Apps - CodeMash 2011Developing High Performance Web Apps - CodeMash 2011
Developing High Performance Web Apps - CodeMash 2011Timothy Fisher
 
PHP is the King, nodejs is the Prince and Lua is the fool
PHP is the King, nodejs is the Prince and Lua is the foolPHP is the King, nodejs is the Prince and Lua is the fool
PHP is the King, nodejs is the Prince and Lua is the foolAlessandro Cinelli (cirpo)
 
ExpressionEngine - Simple Steps to Performance and Security (EECI 2014)
ExpressionEngine - Simple Steps to Performance and Security (EECI 2014)ExpressionEngine - Simple Steps to Performance and Security (EECI 2014)
ExpressionEngine - Simple Steps to Performance and Security (EECI 2014)Nexcess.net LLC
 
Facebook Presto presentation
Facebook Presto presentationFacebook Presto presentation
Facebook Presto presentationCyanny LIANG
 
Synchronous Reads Asynchronous Writes RubyConf 2009
Synchronous Reads Asynchronous Writes RubyConf 2009Synchronous Reads Asynchronous Writes RubyConf 2009
Synchronous Reads Asynchronous Writes RubyConf 2009pauldix
 

Similar to phpXperts seminar 2010 CodeMan! with noSQL! (20)

Realtime Search Infrastructure at Craigslist (OpenWest 2014)
Realtime Search Infrastructure at Craigslist (OpenWest 2014)Realtime Search Infrastructure at Craigslist (OpenWest 2014)
Realtime Search Infrastructure at Craigslist (OpenWest 2014)
 
Sql And Storage Considerations For Share Point Server 2010
Sql And Storage Considerations For Share Point Server 2010Sql And Storage Considerations For Share Point Server 2010
Sql And Storage Considerations For Share Point Server 2010
 
PLAT-8 Spring Web Scripts and Spring Surf
PLAT-8 Spring Web Scripts and Spring SurfPLAT-8 Spring Web Scripts and Spring Surf
PLAT-8 Spring Web Scripts and Spring Surf
 
Systems Monitoring with Prometheus (Devops Ireland April 2015)
Systems Monitoring with Prometheus (Devops Ireland April 2015)Systems Monitoring with Prometheus (Devops Ireland April 2015)
Systems Monitoring with Prometheus (Devops Ireland April 2015)
 
Bluemix paas 기반 saas 개발 사례
Bluemix paas 기반 saas 개발 사례Bluemix paas 기반 saas 개발 사례
Bluemix paas 기반 saas 개발 사례
 
PLAT-7 Spring Web Scripts and Spring Surf
PLAT-7 Spring Web Scripts and Spring SurfPLAT-7 Spring Web Scripts and Spring Surf
PLAT-7 Spring Web Scripts and Spring Surf
 
PLAT-7 Spring Web Scripts and Spring Surf
PLAT-7 Spring Web Scripts and Spring SurfPLAT-7 Spring Web Scripts and Spring Surf
PLAT-7 Spring Web Scripts and Spring Surf
 
EECI 2013 - ExpressionEngine Performance & Optimization - Laying a Solid Foun...
EECI 2013 - ExpressionEngine Performance & Optimization - Laying a Solid Foun...EECI 2013 - ExpressionEngine Performance & Optimization - Laying a Solid Foun...
EECI 2013 - ExpressionEngine Performance & Optimization - Laying a Solid Foun...
 
SharePoint 2014: Where to save my data, for devs!
SharePoint 2014: Where to save my data, for devs!SharePoint 2014: Where to save my data, for devs!
SharePoint 2014: Where to save my data, for devs!
 
Running MongoDB in the Cloud
Running MongoDB in the CloudRunning MongoDB in the Cloud
Running MongoDB in the Cloud
 
SQL Server and SharePoint - Best Practices presented by Steffen Krause, Micro...
SQL Server and SharePoint - Best Practices presented by Steffen Krause, Micro...SQL Server and SharePoint - Best Practices presented by Steffen Krause, Micro...
SQL Server and SharePoint - Best Practices presented by Steffen Krause, Micro...
 
Apache Content Technologies
Apache Content TechnologiesApache Content Technologies
Apache Content Technologies
 
Scalable Web Architectures: Common Patterns and Approaches - Web 2.0 Expo NYC
Scalable Web Architectures: Common Patterns and Approaches - Web 2.0 Expo NYCScalable Web Architectures: Common Patterns and Approaches - Web 2.0 Expo NYC
Scalable Web Architectures: Common Patterns and Approaches - Web 2.0 Expo NYC
 
It112 SharePoint 2010 Mythbusters
It112 SharePoint 2010MythbustersIt112 SharePoint 2010Mythbusters
It112 SharePoint 2010 Mythbusters
 
NoSQL and SQL - Why Choose? Enjoy the best of both worlds with MySQL
NoSQL and SQL - Why Choose? Enjoy the best of both worlds with MySQLNoSQL and SQL - Why Choose? Enjoy the best of both worlds with MySQL
NoSQL and SQL - Why Choose? Enjoy the best of both worlds with MySQL
 
Developing High Performance Web Apps - CodeMash 2011
Developing High Performance Web Apps - CodeMash 2011Developing High Performance Web Apps - CodeMash 2011
Developing High Performance Web Apps - CodeMash 2011
 
PHP is the King, nodejs is the Prince and Lua is the fool
PHP is the King, nodejs is the Prince and Lua is the foolPHP is the King, nodejs is the Prince and Lua is the fool
PHP is the King, nodejs is the Prince and Lua is the fool
 
ExpressionEngine - Simple Steps to Performance and Security (EECI 2014)
ExpressionEngine - Simple Steps to Performance and Security (EECI 2014)ExpressionEngine - Simple Steps to Performance and Security (EECI 2014)
ExpressionEngine - Simple Steps to Performance and Security (EECI 2014)
 
Facebook Presto presentation
Facebook Presto presentationFacebook Presto presentation
Facebook Presto presentation
 
Synchronous Reads Asynchronous Writes RubyConf 2009
Synchronous Reads Asynchronous Writes RubyConf 2009Synchronous Reads Asynchronous Writes RubyConf 2009
Synchronous Reads Asynchronous Writes RubyConf 2009
 

More from nhm taveer hossain khan

More from nhm taveer hossain khan (13)

Introduction to Machine Learning
Introduction to Machine LearningIntroduction to Machine Learning
Introduction to Machine Learning
 
RubyConfBD 2013 decouple, bundle and share with ruby gems
RubyConfBD 2013   decouple, bundle and share with ruby gems RubyConfBD 2013   decouple, bundle and share with ruby gems
RubyConfBD 2013 decouple, bundle and share with ruby gems
 
Continuous feature-development
Continuous feature-developmentContinuous feature-development
Continuous feature-development
 
Agile Scrum Kanban (BASIS SoftExpo 2011)
Agile Scrum Kanban (BASIS SoftExpo 2011)Agile Scrum Kanban (BASIS SoftExpo 2011)
Agile Scrum Kanban (BASIS SoftExpo 2011)
 
Hi code man! ain't you crazy enough ?
Hi code man! ain't you crazy enough ?Hi code man! ain't you crazy enough ?
Hi code man! ain't you crazy enough ?
 
Let s imagine you have contributed to build the better bangladesh
Let s imagine you have contributed to build the better bangladeshLet s imagine you have contributed to build the better bangladesh
Let s imagine you have contributed to build the better bangladesh
 
Ain't you crazy enough ?
Ain't you crazy enough ?Ain't you crazy enough ?
Ain't you crazy enough ?
 
Agile Project Management Basis Software Exposition 2010
Agile Project Management Basis Software Exposition 2010Agile Project Management Basis Software Exposition 2010
Agile Project Management Basis Software Exposition 2010
 
Ruby on Rails small application demo
Ruby on Rails small application demoRuby on Rails small application demo
Ruby on Rails small application demo
 
Developing Quality Web Application
Developing Quality Web ApplicationDeveloping Quality Web Application
Developing Quality Web Application
 
Better code in JavaScript
Better code in JavaScriptBetter code in JavaScript
Better code in JavaScript
 
TekS Short Git Overview
TekS Short Git OverviewTekS Short Git Overview
TekS Short Git Overview
 
Whats Preventing Me To Write Nearly Accurate Code.Key
Whats Preventing Me To Write Nearly Accurate Code.KeyWhats Preventing Me To Write Nearly Accurate Code.Key
Whats Preventing Me To Write Nearly Accurate Code.Key
 

Recently uploaded

Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 

Recently uploaded (20)

Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 

phpXperts seminar 2010 CodeMan! with noSQL!

  • 1. PhpXperts seminar 2010, Work for Fun!! CodeMan! with noSQL! nhm tanveer hossain khan http://hasan.we4tech.com
  • 2. PhpXperts seminar 2010, Work for Fun!! Super heros!
  • 3. PhpXperts seminar 2010, Work for Fun!! ...So this is about You as a CodeMan! ... CodeMan! CodeMan! help help!
  • 4. PhpXperts seminar 2010, Work for Fun!! Now let's get back to our discussion – Database Stuffs!
  • 5. PhpXperts seminar 2010, Work for Fun!! Database! SELECT books.* FROM books LEFT JOIN users ON books.user_id = users.id WHERE users.age < 15 Relational Database System Query language!
  • 6. PhpXperts seminar 2010, Work for Fun!! Known issues with existing database system! • Maintaining Relations among the tables • Table, Page, Row level Locking • Huge data produces huge Fat indexes • Transactional Operations • Parsing SQL query syntax • Multi tables Joining Query
  • 7. PhpXperts seminar 2010, Work for Fun!! So what about ? noSQL!! (Structured Storage System)
  • 8. PhpXperts seminar 2010, Work for Fun!! About noSQL ? • NoSQL == Structured storage! • An initiative to use alternative of relational database system • Targeting on the following goals –Performance – Autonomous – Minimizing cost
  • 9. PhpXperts seminar 2010, Work for Fun!! Why structured storage over relational database • Getting rid of fear –In larger expansion is CHEAP! –No SQL parsing overhead –No table joining –No relation consideration –No single big chunk of data
  • 10. PhpXperts seminar 2010, Work for Fun!! Let's Think about a quite bigger system!
  • 11. PhpXperts seminar 2010, Work for Fun!! Our Possible context! • Load of data • Huge data growth • Extensive database operations • Extensive I/O traffic (read/write) • Fault tolerance • Data consistency • Assured availability
  • 12. PhpXperts seminar 2010, Work for Fun!! Let's check the facts!
  • 13. PhpXperts seminar 2010, Work for Fun!! MySQL and other noSQL systems performance comparison by Yahoo! research
  • 16. PhpXperts seminar 2010, Work for Fun!! What others are talking about? Or whoever skipped relational database?
  • 17. PhpXperts seminar 2010, Work for Fun!! At facebook! • Facebook! Around 140 nodes! • Facebook open sourced cassandra!
  • 18. PhpXperts seminar 2010, Work for Fun!! Digg.com declared to use cassandra! The fundamental problem is endemic to the relational database mindset, which places the burden of computation on reads rather than writes. This is completely wrong for large-scale web applications, where response time is critical. It’s made much worse by the serial nature of most applications. Each component of the page blocks on reads from the data store, as well as the completion of the operations that come before it. Non-relational data stores reverse this model completely, because they don’t have the complex read operations of SQL. Read at home!
  • 19. PhpXperts seminar 2010, Work for Fun!! Twitter moved their statuses on cassandra! We have a lot of data, the growth factor in that data is huge and the rate of growth is accelerating. We have a system in place based on shared mysql + memcached but its quickly becoming prohibitively costly (in terms of manpower) to operate. We need a system that can grow in a more automated fashion and be highly available. Read at home!
  • 20. PhpXperts seminar 2010, Work for Fun!! Few Related References! • Check out Yahoo! Research's “Cloud Serving Benchmark” • MySQL and Memcached: End of An era? • An article on how Yoshinori scaled MySQL as noSQL to serve 750,000 qps! Click here
  • 21. PhpXperts seminar 2010, Work for Fun!! Time is almost running out!! let's taste some noSQL curry!
  • 22. PhpXperts seminar 2010, Work for Fun!! List of available structured databases • Hbase - yahoo! • Voldemort – used in LinkedIn • MongoDB • MemcacheDB • Riak • Redis • Cassandra – facebook, twitter, digg, Rackspace, Reddit • HyperTable
  • 23. PhpXperts seminar 2010, Work for Fun!! Let's go with Cassandra! (cassandra.apache.org)
  • 24. PhpXperts seminar 2010, Work for Fun!! Why cassandra! • Tested (Facebook, Twitter, Reddit, Digg, Rackspace etc..) • Decentralized and No single point of failure • Flexible schema • Elastic • Durable, Data center and Disaster management aware • Highly scalable write
  • 25. PhpXperts seminar 2010, Work for Fun!! PHP and Cassandra! Using Phpcassa library
  • 26. PhpXperts seminar 2010, Work for Fun!! Install cassandra • Go and download cassandra from here - http://cassandra.apache.org/ • Ensure you have java runtime on your pc •
  • 27. PhpXperts seminar 2010, Work for Fun!! Create keyspace and column family • Extract your download cassandra archive • Edit “cofig/storage-config.xml” file in your text editor • Go to the “Keyspaces” block • Add “AddressBook” Keyspace
  • 28. PhpXperts seminar 2010, Work for Fun!! Configuration! <Keyspace Name="AddressBook"> <ColumnFamily Name='Addresses' CompareWith="TimeUUIDType"/> <ReplicaPlacementStrategy>org.apache.cassandr a.locator.RackUnawareStrategy</ReplicaPlaceme ntStrategy> <ReplicationFactor>1</ReplicationFactor> <EndPointSnitch>org.apache.cassandra.locator. EndPointSnitch</EndPointSnitch> </Keyspace>
  • 29. PhpXperts seminar 2010, Work for Fun!! Kick start cassandra! • $ cd apache-cassandra-0.6.x • $ ./bin/cassandra • Get PHP thrift library – phpcassa • https://github.com/hoan/phpcassa/
  • 30. PhpXperts seminar 2010, Work for Fun!! Show code!! • Inserting data into cassandra! • Listing all added data • Remove an existing data
  • 31. PhpXperts seminar 2010, Work for Fun!! More about cassandra! • All nodes need to be in low latency fiber connected • Still in alpha version! Might have issues! • High RPM hard disk (ie. 15000, 10000)
  • 32. PhpXperts seminar 2010, Work for Fun!! Before you move!, you think about - common sense!
  • 33. PhpXperts seminar 2010, Work for Fun!! Common sense! • Avoid Big Design Up Front ! • Benchmark your existing system performance! • Experiment and calculate cost! • Structured database with Dr. Eric Brewer CAP theorem – Consistency - Is the data I’m looking at now the same if I look at it somewhere else? – Availability - What happens if my database goes down? – Partitioning - What if my data is on different networks?
  • 34. PhpXperts seminar 2010, Work for Fun!! That's it for today :) Thanks! Now you guys should treat me ;)
  • 35. PhpXperts seminar 2010, Work for Fun!! Find out the best restaurant in the town! Passion food reviewers community! http://restaurant.welltreat.us
  • 36. PhpXperts seminar 2010, Work for Fun!! - nhm tanveer hossain khan (hasan)    IT Director, Tasawr Interactive    hasan@tasawr.com    Blog: http://hasan.we4tech.com    Twitter: http://twitter.com/we4tech    love programming,     used to write code in Ruby, Java and PHP! Who am i?
  • 37. PhpXperts seminar 2010, Work for Fun!! NOW Q/A