SlideShare a Scribd company logo
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 (20)

PDF
You Got React.js in My PHP
Taylor Lovett
 
PPTX
Apache poi
Volodymyr Ostapiv
 
PPTX
Apache poi tutorial
Ramakrishna kapa
 
PPTX
Saving Time with WP-CLI
Taylor Lovett
 
PDF
WordCamp 2012 - WordPress Webapps
tjasko
 
PDF
Modernizing WordPress Search with Elasticsearch
Taylor Lovett
 
PDF
Top ten-list
Brian DeShong
 
PDF
Javascript fatigue, 자바스크립트 피로
Rhio Kim
 
PPTX
Speed up Your Joomla Site for Ultimate Performance
JoomlaDay Australia
 
PDF
MongoDB
SPBRUBY
 
PDF
Webpack: What it is, What it does, Whether you need it
Mike Wilcox
 
PPT
5 Common Mistakes You are Making on your Website
Acquia
 
PDF
Immutable servers with Packer/Chef/AWS
Pavel Gabriel
 
PDF
Dangerous CSS
Mike Wilcox
 
PDF
2013 - Igor Sysoev - NGINx: origen, evolución y futuro - PHP Conference Argen...
PHP Conference Argentina
 
PPTX
Level Up: 5 Expert Tips for Optimizing WordPress Performance
Pantheon
 
PDF
"Turbo boost your website" aka BigPipe at Webinale 2014 in Berlin
Tobias Zander
 
PPTX
Squeeze Maximum Performance From Your Joomla Website
SiteGround.com
 
PDF
Here Be Dragons - Debugging WordPress
Rami Sayar
 
PPTX
In-browser storage and me
Jason Casden
 
You Got React.js in My PHP
Taylor Lovett
 
Apache poi
Volodymyr Ostapiv
 
Apache poi tutorial
Ramakrishna kapa
 
Saving Time with WP-CLI
Taylor Lovett
 
WordCamp 2012 - WordPress Webapps
tjasko
 
Modernizing WordPress Search with Elasticsearch
Taylor Lovett
 
Top ten-list
Brian DeShong
 
Javascript fatigue, 자바스크립트 피로
Rhio Kim
 
Speed up Your Joomla Site for Ultimate Performance
JoomlaDay Australia
 
MongoDB
SPBRUBY
 
Webpack: What it is, What it does, Whether you need it
Mike Wilcox
 
5 Common Mistakes You are Making on your Website
Acquia
 
Immutable servers with Packer/Chef/AWS
Pavel Gabriel
 
Dangerous CSS
Mike Wilcox
 
2013 - Igor Sysoev - NGINx: origen, evolución y futuro - PHP Conference Argen...
PHP Conference Argentina
 
Level Up: 5 Expert Tips for Optimizing WordPress Performance
Pantheon
 
"Turbo boost your website" aka BigPipe at Webinale 2014 in Berlin
Tobias Zander
 
Squeeze Maximum Performance From Your Joomla Website
SiteGround.com
 
Here Be Dragons - Debugging WordPress
Rami Sayar
 
In-browser storage and me
Jason Casden
 

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

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

More from nhm taveer hossain khan (13)

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

Recently uploaded (20)

PDF
Blockchain Transactions Explained For Everyone
CIFDAQ
 
PDF
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
PDF
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
PDF
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
PPTX
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
PDF
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
PDF
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
PDF
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
PPTX
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
PPTX
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
PPTX
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
PDF
From Code to Challenge: Crafting Skill-Based Games That Engage and Reward
aiyshauae
 
PDF
Biography of Daniel Podor.pdf
Daniel Podor
 
PDF
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
PDF
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
PDF
IoT-Powered Industrial Transformation – Smart Manufacturing to Connected Heal...
Rejig Digital
 
PDF
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
PDF
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
PPTX
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
Blockchain Transactions Explained For Everyone
CIFDAQ
 
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
From Code to Challenge: Crafting Skill-Based Games That Engage and Reward
aiyshauae
 
Biography of Daniel Podor.pdf
Daniel Podor
 
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
IoT-Powered Industrial Transformation – Smart Manufacturing to Connected Heal...
Rejig Digital
 
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 

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    [email protected]    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