SlideShare a Scribd company logo
1 of 40
Download to read offline
Cassandra
   A short Intro




                   Vitaly Kushner
                    astrails.com
• Distributed
• Non-relational
• Linearly scalable
• Multi data-center aware
BigTable
http://labs.google.com/papers/bigtable.html
Terminology Sucks
      big time
my_cluster: {
  demo_app: {
    accounts: {
       "1": {
         "attributes": {
            "name": "astrails"
         },
         "users": {
            "1" => "",
            "3" => "",
         }
       }
    },
    users: {
       "1": {
         "name": "vitaly",
         "email": "vitaly@astrails.com"
       }
    }
  }
}
my_cluster: {	 	 	 	 	 	 	 	              <<= Cluster Name
  demo_app: {
    accounts: {
       "1": {
         "attributes": {
            "name": "astrails"
         },
         "users": {
            "1" => "",
            "3" => "",
         }
       }
    },
    users: {
       "1": {
         "name": "vitaly",
         "email": "vitaly@astrails.com"
       }
    }
  }
}
my_cluster: {
  demo_app: {	 	 	 	 	 	 	 	              <== Keyspace
    accounts: {
       "1": {
         "attributes": {
            "name": "astrails"
         },
         "users": {
            "1" => "",
            "3" => "",
         }
       }
    },
    users: {
       "1": {
         "name": "vitaly",
         "email": "vitaly@astrails.com"
       }
    }
  }
}
my_cluster: {
  demo_app: {
    accounts: {	 	 	 	 	 	 	              <<= super column family
       "1": {
         "attributes": {
            "name": "astrails"
         },
         "users": {
            "1" => "",
            "3" => "",
         }
       }
    },
    users: {
       "1": {
         "name": "vitaly",
         "email": "vitaly@astrails.com"
       }
    }
  }
}
my_cluster: {
  demo_app: {
    accounts: {
       "1": {
         "attributes": {
            "name": "astrails"
         },
         "users": {
            "1" => "",
            "3" => "",
         }
       }
    },
    users: {	 	 	 	 	 	 	 	               <<= column family
       "1": {
         "name": "vitaly",
         "email": "vitaly@astrails.com"
       }
    }
  }
}
my_cluster: {
  demo_app: {
    accounts: {
       "1": {	 	 	 	 	 	 	 	              <<= key
         "attributes": {
            "name": "astrails"
         },
         "users": {
            "1" => "",
            "3" => "",
         }
       }
    },
    users: {
       "1": {
         "name": "vitaly",
         "email": "vitaly@astrails.com"
       }
    }
  }
}
my_cluster: {
  demo_app: {
    accounts: {
       "1": {
         "attributes": {	 	 	 	 	         << super column
            "name": "astrails"
         },
         "users": {
            "1" => "",
            "3" => "",
         }
       }
    },
    users: {
       "1": {
         "name": "vitaly",
         "email": "vitaly@astrails.com"
       }
    }
  }
}
my_cluster: {
  demo_app: {
    accounts: {
       "1": {
         "attributes": {
            "name": "astrails"	 	 	       <<= column
         },
         "users": {
            "1" => "",
            "3" => "",
         }
       }
    },
    users: {
       "1": {
         "name": "vitaly",
         "email": "vitaly@astrails.com"
       }
    }
  }
}
my_cluster: {
  demo_app: {
    accounts: {
       "1": {
         "attributes": {
            "name": "astrails"	 	 	       <<= value
         },
         "users": {
            "1" => "",
            "3" => "",
         }
       }
    },
    users: {
       "1": {
         "name": "vitaly",
         "email": "vitaly@astrails.com"
       }
    }
  }
}
my_cluster: {
  demo_app: {
    accounts: {
       "1": {
         "attributes": {
            "name": "astrails"
         },
         "users": {
            "1" => "",
            "3" => "",
         }
       }
    },
    users: {
       "1": {
         "name": "vitaly",	 	 	 	         <<= column
         "email": "vitaly@astrails.com"
       }
    }
  }
}
my_cluster: {	 	 	 	 	 	 	 	              <<=   cluster
  demo_app: {	 	 	 	 	 	 	 	              <<=   keyspace
    accounts: {	 	 	 	 	 	 	              <<=   super column family
       "1": {	 	 	 	 	 	 	 	              <<=   key
         "attributes": {	 	 	 	 	         <<=   supercolumn
            "name": "astrails"	 	 	       <<=   column
         },
         "users": {
            "1" => "",
            "3" => "",
         }
       }
    },
    users: {	 	 	 	 	 	 	 	               <<= column family
       "1": {	 	 	 	 	 	 	 	              <<= key
         "name": "vitaly",	 	 	 	         <<= column
         "email": "vitaly@astrails.com"
       }
    }
  }
}
my_cluster: {	 	 	 	 	 	 	 	              <<=   cluster
  demo_app: {	 	 	 	 	 	 	 	              <<=   database
    accounts: {	 	 	 	 	 	 	              <<=   super column family
       "1": {	 	 	 	 	 	 	 	              <<=   key
         "attributes": {	 	 	 	 	         <<=   supercolumn
            "name": "astrails"	 	 	       <<=   column
         },
         "users": {
            "1" => "",
            "3" => "",
         }
       }
    },
    users: {	 	 	 	 	 	 	 	               <<= column family
       "1": {	 	 	 	 	 	 	 	              <<= key
         "name": "vitaly",	 	 	 	         <<= column
         "email": "vitaly@astrails.com"
       }
    }
  }
}
my_cluster: {	 	 	 	 	 	 	 	              <<=   cluster
  demo_app: {	 	 	 	 	 	 	 	              <<=   database
    accounts: {	 	 	 	 	 	 	              <<=   table
       "1": {	 	 	 	 	 	 	 	              <<=   key
         "attributes": {	 	 	 	 	         <<=   supercolumn
            "name": "astrails"	 	 	       <<=   column
         },
         "users": {
            "1" => "",
            "3" => "",
         }
       }
    },
    users: {	 	 	 	 	 	 	 	               <<= column family
       "1": {	 	 	 	 	 	 	 	              <<= key
         "name": "vitaly",	 	 	 	         <<= column
         "email": "vitaly@astrails.com"
       }
    }
  }
}
my_cluster: {	 	 	 	 	 	 	 	              <<=   cluster
  demo_app: {	 	 	 	 	 	 	 	              <<=   database
    accounts: {	 	 	 	 	 	 	              <<=   table
       "1": {	 	 	 	 	 	 	 	              <<=   key
         "attributes": {	 	 	 	 	         <<=   supercolumn
            "name": "astrails"	 	 	       <<=   column
         },
         "users": {
            "1" => "",
            "3" => "",
         }
       }
    },
    users: {	 	 	 	 	 	 	 	               <<= table
       "1": {	 	 	 	 	 	 	 	              <<= key
         "name": "vitaly",	 	 	 	         <<= column
         "email": "vitaly@astrails.com"
       }
    }
  }
}
my_cluster: {	 	 	 	 	 	 	 	              <<=   cluster
  demo_app: {	 	 	 	 	 	 	 	              <<=   database
    accounts: {	 	 	 	 	 	 	              <<=   table
       "1": {	 	 	 	 	 	 	 	              <<=   key
         "attributes": {	 	 	 	 	         <<=   collection
            "name": "astrails"	 	 	       <<=   column
         },
         "users": {
            "1" => "",
            "3" => "",
         }
       }
    },
    users: {	 	 	 	 	 	 	 	               <<= table
       "1": {	 	 	 	 	 	 	 	              <<= key
         "name": "vitaly",	 	 	 	         <<= column
         "email": "vitaly@astrails.com"
       }
    }
  }
}
my_cluster: {	 	 	 	 	 	 	 	              <<=   cluster
  demo_app: {	 	 	 	 	 	 	 	              <<=   database
    accounts: {	 	 	 	 	 	 	              <<=   table
       "1": {	 	 	 	 	 	 	 	              <<=   key
         "attributes": {	 	 	 	 	         <<=   collection
            "name": "astrails"	 	 	       <<=   attribute
         },
         "users": {
            "1" => "",
            "3" => "",
         }
       }
    },
    users: {	 	 	 	 	 	 	 	               <<= table
       "1": {	 	 	 	 	 	 	 	              <<= key
         "name": "vitaly",	 	 	 	         <<= attribute
         "email": "vitaly@astrails.com"
       }
    }
  }
}
Indexing
"my_cluster": {
  "demo_app": {
    "users": {
       "b2c75e99-e079-449d-b562-293dfdbf006e": {
         "attributes": {
           "name": "Vitaly",
           "email": "vitaly@astrails.com",
           "remember_me": "74c4f3a2c85b66f216211edd5245d25ba251d83e"
         }
       }
    },
    "emails": {
       "vitaly@astrails.com": "b2c75e99-e079-449d-b562-293dfdbf006e",
    }
    "remember_me": {
       "74c4f3a2c85b66f216211edd5245d25ba251d83e": "b2c75e99-e079-449d-b562-293dfdbf006e",
    }
  }
}
"my_cluster": {
  "demo_app": {
    "users": {
       "b2c75e99-e079-449d-b562-293dfdbf006e": {
         "attributes": {
           "name": "Vitaly",
           "email": "vitaly@astrails.com",
           "remember_me": "74c4f3a2c85b66f216211edd5245d25ba251d83e"
         }
       }
    },
    "emails": {
       "vitaly@astrails.com": "b2c75e99-e079-449d-b562-293dfdbf006e",
    }
    "remember_me": {
       "74c4f3a2c85b66f216211edd5245d25ba251d83e": "b2c75e99-e079-449d-b562-293dfdbf006e",
    }
  }
}
"my_cluster": {
  "demo_app": {
    "users": {
       "b2c75e99-e079-449d-b562-293dfdbf006e": {
         "attributes": {
           "name": "Vitaly",
           "email": "vitaly@astrails.com",
           "remember_me": "74c4f3a2c85b66f216211edd5245d25ba251d83e"
         }
       }
    },
    "emails": {
       "vitaly@astrails.com": "b2c75e99-e079-449d-b562-293dfdbf006e",
    }
    "remember_me": {
       "74c4f3a2c85b66f216211edd5245d25ba251d83e": "b2c75e99-e079-449d-b562-293dfdbf006e",
    }
  }
}
"my_cluster": {
  "demo_app": {
    "users": {
       "b2c75e99-e079-449d-b562-293dfdbf006e": {
         "attributes": {
           "name": "Vitaly",
           "email": "vitaly@astrails.com",
           "remember_me": "74c4f3a2c85b66f216211edd5245d25ba251d83e"
         }
       }
    },
    "emails": {
       "vitaly@astrails.com": "b2c75e99-e079-449d-b562-293dfdbf006e",
    }
    "remember_me": {
       "74c4f3a2c85b66f216211edd5245d25ba251d83e": "b2c75e99-e079-449d-b562-293dfdbf006e",
    }
  }
}
"my_cluster": {
  "demo_app": {
    "users": {
       "b2c75e99-e079-449d-b562-293dfdbf006e": {
         "attributes": {
           "name": "Vitaly",
           "email": "vitaly@astrails.com",
           "remember_me": "74c4f3a2c85b66f216211edd5245d25ba251d83e"
         }
       }
    },
    "emails": {
       "vitaly@astrails.com": "b2c75e99-e079-449d-b562-293dfdbf006e",
    }
    "remember_me": {
       "74c4f3a2c85b66f216211edd5245d25ba251d83e": "b2c75e99-e079-449d-b562-293dfdbf006e",
    }
  }
}
"my_cluster": {
  "demo_app": {
    "users": {
       "b2c75e99-e079-449d-b562-293dfdbf006e": {
         "attributes": {
           "name": "Vitaly",
           "email": "vitaly@astrails.com",
           "remember_me": "74c4f3a2c85b66f216211edd5245d25ba251d83e"
         }
       }
    },
    "emails": {
       "vitaly@astrails.com": "b2c75e99-e079-449d-b562-293dfdbf006e",
    }
    "remember_me": {
       "74c4f3a2c85b66f216211edd5245d25ba251d83e": "b2c75e99-e079-449d-b562-293dfdbf006e",
    }
  }
}
Playtime
> gem install cassandra
...
> cassandra_helper cassandra
...
<ClusterName>my_cluster</ClusterName>

<Keyspaces>
  <Keyspace Name="demo_app">
    <ColumnFamily CompareWith="UTF8Type" Name="users" ColumnType="Super" CompareSubcolumnsWith="UTF8Type" />
    <ColumnFamily CompareWith="UTF8Type" Name="emails" ColumnType="Super" CompareSubcolumnsWith="UTF8Type" />
    <ColumnFamily CompareWith="UTF8Type" Name="tokens" />
  </Keyspace>
</Keyspaces>
require 'rubygems'
require 'cassandra'

include Cassandra::Constants

client = Cassandra.new('demo_app')

client.insert(:users, "1", {"name" => "vitaly", "email" => "vitaly@astrails.com"})
client.insert(:accounts, "1", {"attributes" => {"name" => "astrails"}, "users" => {"1" => ""}})

client.insert(:users, "2", {"name" => "boris"})
client.insert(:accounts, "1", {"users" => {"2" => ""}})

client.get(:users, "1")
Rails?
YES!
SmallRecord
WARNING: waporware :)
http://github.com/astrails/small_record
ActiveModel
class Account < SmallRecord::Base
  attribute :name
  attribute :created_at, :type => :datetime

  has_many :users

  validates_presence_of :name
end

class User < SmallRecord::Base
  attribute :name
  attribute :email
  attribute :created_at, :type => :datetime
  attribute :account_id

  def account
    @account ||= Account.find(:account_id)
  end

  validates_presence_of :name
  validates_presence_of :email
end

Account.find(params[:account]).users.first.name
production:
 adapter: cassandra
 host: 127.0.0.1
 port: 9160
 keyspace: chronos

development:
 adapter: mock

test:
 adapter: mock
production:
 adapter: cassandra
 host: 127.0.0.1
 port: 9160
 keyspace: chronos

development:
 adapter: mock

test:
 adapter: mock
Some Links

•   http://incubator.apache.org/cassandra

•   http://labs.google.com/papers/bigtable.html

•   http://blog.evanweaver.com/articles/2009/07/06/up-and-running-with-cassandra/

•   http://arin.me/blog/wtf-is-a-supercolumn-cassandra-data-model

•   http://github.com/astrails/small_record

More Related Content

What's hot

What's new in Doctrine
What's new in DoctrineWhat's new in Doctrine
What's new in DoctrineJonathan Wage
 
Effective Java with Groovy
Effective Java with GroovyEffective Java with Groovy
Effective Java with GroovyNaresha K
 
Structuring React.js Components
Structuring React.js ComponentsStructuring React.js Components
Structuring React.js ComponentsBartek Witczak
 
4Developers 2018: Structuring React components (Bartłomiej Witczak)
4Developers 2018: Structuring React components (Bartłomiej Witczak)4Developers 2018: Structuring React components (Bartłomiej Witczak)
4Developers 2018: Structuring React components (Bartłomiej Witczak)PROIDEA
 
Hacking JavaFX with Groovy, Clojure, Scala, and Visage: Stephen Chin
Hacking JavaFX with Groovy, Clojure, Scala, and Visage: Stephen ChinHacking JavaFX with Groovy, Clojure, Scala, and Visage: Stephen Chin
Hacking JavaFX with Groovy, Clojure, Scala, and Visage: Stephen Chinjaxconf
 
The Ring programming language version 1.10 book - Part 37 of 212
The Ring programming language version 1.10 book - Part 37 of 212The Ring programming language version 1.10 book - Part 37 of 212
The Ring programming language version 1.10 book - Part 37 of 212Mahmoud Samir Fayed
 
Introduction to Active Record - Silicon Valley Ruby Conference 2007
Introduction to Active Record - Silicon Valley Ruby Conference 2007Introduction to Active Record - Silicon Valley Ruby Conference 2007
Introduction to Active Record - Silicon Valley Ruby Conference 2007Rabble .
 
A to Z about JQuery - Become Newbie to Expert Java Developer
A to Z about JQuery - Become Newbie to Expert Java DeveloperA to Z about JQuery - Become Newbie to Expert Java Developer
A to Z about JQuery - Become Newbie to Expert Java DeveloperManoj Bhuva
 
Pragmatic Real-World Scala (short version)
Pragmatic Real-World Scala (short version)Pragmatic Real-World Scala (short version)
Pragmatic Real-World Scala (short version)Jonas Bonér
 
JavaFX and Scala - Like Milk and Cookies
JavaFX and Scala - Like Milk and CookiesJavaFX and Scala - Like Milk and Cookies
JavaFX and Scala - Like Milk and CookiesStephen Chin
 
JavaFX 2.0 With Alternative Languages - Groovy, Clojure, Scala, Fantom, and V...
JavaFX 2.0 With Alternative Languages - Groovy, Clojure, Scala, Fantom, and V...JavaFX 2.0 With Alternative Languages - Groovy, Clojure, Scala, Fantom, and V...
JavaFX 2.0 With Alternative Languages - Groovy, Clojure, Scala, Fantom, and V...Stephen Chin
 
BGOUG15: JSON support in MySQL 5.7
BGOUG15: JSON support in MySQL 5.7BGOUG15: JSON support in MySQL 5.7
BGOUG15: JSON support in MySQL 5.7Georgi Kodinov
 
The Ring programming language version 1.10 book - Part 47 of 212
The Ring programming language version 1.10 book - Part 47 of 212The Ring programming language version 1.10 book - Part 47 of 212
The Ring programming language version 1.10 book - Part 47 of 212Mahmoud Samir Fayed
 
Windows 8 JavaScript (Wonderland)
Windows 8 JavaScript (Wonderland)Windows 8 JavaScript (Wonderland)
Windows 8 JavaScript (Wonderland)Christopher Bennage
 
Couchbase Korea User Group 2nd Meetup #2
Couchbase Korea User Group 2nd Meetup #2Couchbase Korea User Group 2nd Meetup #2
Couchbase Korea User Group 2nd Meetup #2won min jang
 

What's hot (18)

What's new in Doctrine
What's new in DoctrineWhat's new in Doctrine
What's new in Doctrine
 
Effective Java with Groovy
Effective Java with GroovyEffective Java with Groovy
Effective Java with Groovy
 
Structuring React.js Components
Structuring React.js ComponentsStructuring React.js Components
Structuring React.js Components
 
4Developers 2018: Structuring React components (Bartłomiej Witczak)
4Developers 2018: Structuring React components (Bartłomiej Witczak)4Developers 2018: Structuring React components (Bartłomiej Witczak)
4Developers 2018: Structuring React components (Bartłomiej Witczak)
 
Hacking JavaFX with Groovy, Clojure, Scala, and Visage: Stephen Chin
Hacking JavaFX with Groovy, Clojure, Scala, and Visage: Stephen ChinHacking JavaFX with Groovy, Clojure, Scala, and Visage: Stephen Chin
Hacking JavaFX with Groovy, Clojure, Scala, and Visage: Stephen Chin
 
The Ring programming language version 1.10 book - Part 37 of 212
The Ring programming language version 1.10 book - Part 37 of 212The Ring programming language version 1.10 book - Part 37 of 212
The Ring programming language version 1.10 book - Part 37 of 212
 
Introduction to Active Record - Silicon Valley Ruby Conference 2007
Introduction to Active Record - Silicon Valley Ruby Conference 2007Introduction to Active Record - Silicon Valley Ruby Conference 2007
Introduction to Active Record - Silicon Valley Ruby Conference 2007
 
A to Z about JQuery - Become Newbie to Expert Java Developer
A to Z about JQuery - Become Newbie to Expert Java DeveloperA to Z about JQuery - Become Newbie to Expert Java Developer
A to Z about JQuery - Become Newbie to Expert Java Developer
 
Pragmatic Real-World Scala (short version)
Pragmatic Real-World Scala (short version)Pragmatic Real-World Scala (short version)
Pragmatic Real-World Scala (short version)
 
JavaFX and Scala - Like Milk and Cookies
JavaFX and Scala - Like Milk and CookiesJavaFX and Scala - Like Milk and Cookies
JavaFX and Scala - Like Milk and Cookies
 
JavaFX 2.0 With Alternative Languages - Groovy, Clojure, Scala, Fantom, and V...
JavaFX 2.0 With Alternative Languages - Groovy, Clojure, Scala, Fantom, and V...JavaFX 2.0 With Alternative Languages - Groovy, Clojure, Scala, Fantom, and V...
JavaFX 2.0 With Alternative Languages - Groovy, Clojure, Scala, Fantom, and V...
 
Mysql python
Mysql pythonMysql python
Mysql python
 
Mysql python
Mysql pythonMysql python
Mysql python
 
BGOUG15: JSON support in MySQL 5.7
BGOUG15: JSON support in MySQL 5.7BGOUG15: JSON support in MySQL 5.7
BGOUG15: JSON support in MySQL 5.7
 
The Ring programming language version 1.10 book - Part 47 of 212
The Ring programming language version 1.10 book - Part 47 of 212The Ring programming language version 1.10 book - Part 47 of 212
The Ring programming language version 1.10 book - Part 47 of 212
 
Scala introduction
Scala introductionScala introduction
Scala introduction
 
Windows 8 JavaScript (Wonderland)
Windows 8 JavaScript (Wonderland)Windows 8 JavaScript (Wonderland)
Windows 8 JavaScript (Wonderland)
 
Couchbase Korea User Group 2nd Meetup #2
Couchbase Korea User Group 2nd Meetup #2Couchbase Korea User Group 2nd Meetup #2
Couchbase Korea User Group 2nd Meetup #2
 

Viewers also liked

Lean Software Development
Lean Software DevelopmentLean Software Development
Lean Software DevelopmentAstrails
 
Engineering esthetics
Engineering estheticsEngineering esthetics
Engineering estheticsAstrails
 
WTF is NoSQL
WTF is NoSQLWTF is NoSQL
WTF is NoSQLAstrails
 
RubyMotion: Put your Dreams in Motion with Ruby
RubyMotion: Put your Dreams in Motion with RubyRubyMotion: Put your Dreams in Motion with Ruby
RubyMotion: Put your Dreams in Motion with RubyAstrails
 
Ruby is an Acceptable Lisp
Ruby is an Acceptable LispRuby is an Acceptable Lisp
Ruby is an Acceptable LispAstrails
 
Machine Learning: Make Your Ruby Code Smarter
Machine Learning: Make Your Ruby Code SmarterMachine Learning: Make Your Ruby Code Smarter
Machine Learning: Make Your Ruby Code SmarterAstrails
 
Migrating from Flux to Redux. Why and how.
Migrating from Flux to Redux. Why and how.Migrating from Flux to Redux. Why and how.
Migrating from Flux to Redux. Why and how.Astrails
 

Viewers also liked (7)

Lean Software Development
Lean Software DevelopmentLean Software Development
Lean Software Development
 
Engineering esthetics
Engineering estheticsEngineering esthetics
Engineering esthetics
 
WTF is NoSQL
WTF is NoSQLWTF is NoSQL
WTF is NoSQL
 
RubyMotion: Put your Dreams in Motion with Ruby
RubyMotion: Put your Dreams in Motion with RubyRubyMotion: Put your Dreams in Motion with Ruby
RubyMotion: Put your Dreams in Motion with Ruby
 
Ruby is an Acceptable Lisp
Ruby is an Acceptable LispRuby is an Acceptable Lisp
Ruby is an Acceptable Lisp
 
Machine Learning: Make Your Ruby Code Smarter
Machine Learning: Make Your Ruby Code SmarterMachine Learning: Make Your Ruby Code Smarter
Machine Learning: Make Your Ruby Code Smarter
 
Migrating from Flux to Redux. Why and how.
Migrating from Flux to Redux. Why and how.Migrating from Flux to Redux. Why and how.
Migrating from Flux to Redux. Why and how.
 

Similar to Cassandra Intro - Distributed, Scalable NoSQL Database

Building a Scalable Inbox System with MongoDB and Java
Building a Scalable Inbox System with MongoDB and JavaBuilding a Scalable Inbox System with MongoDB and Java
Building a Scalable Inbox System with MongoDB and Javaantoinegirbal
 
C# Starter L04-Collections
C# Starter L04-CollectionsC# Starter L04-Collections
C# Starter L04-CollectionsMohammad Shaker
 
Coming to Terms with GraphQL
Coming to Terms with GraphQLComing to Terms with GraphQL
Coming to Terms with GraphQLBruce Williams
 
SFScon17 - Patrick Puecher: "Exploring data with Elasticsearch and Kibana"
SFScon17 - Patrick Puecher: "Exploring data with Elasticsearch and Kibana"SFScon17 - Patrick Puecher: "Exploring data with Elasticsearch and Kibana"
SFScon17 - Patrick Puecher: "Exploring data with Elasticsearch and Kibana"South Tyrol Free Software Conference
 
First few months with Kotlin - Introduction through android examples
First few months with Kotlin - Introduction through android examplesFirst few months with Kotlin - Introduction through android examples
First few months with Kotlin - Introduction through android examplesNebojša Vukšić
 
Elasticsearch an overview
Elasticsearch   an overviewElasticsearch   an overview
Elasticsearch an overviewAmit Juneja
 
How ElasticSearch lives in my DevOps life
How ElasticSearch lives in my DevOps lifeHow ElasticSearch lives in my DevOps life
How ElasticSearch lives in my DevOps life琛琳 饶
 
Json Persistence Framework
Json Persistence FrameworkJson Persistence Framework
Json Persistence Frameworkdanieloskarsson
 
Architecture Components
Architecture ComponentsArchitecture Components
Architecture ComponentsSang Eel Kim
 
Ruby is Awesome
Ruby is AwesomeRuby is Awesome
Ruby is AwesomeAstrails
 
The State of Lithium
The State of LithiumThe State of Lithium
The State of LithiumNate Abele
 
Next-generation API Development with GraphQL and Prisma
Next-generation API Development with GraphQL and PrismaNext-generation API Development with GraphQL and Prisma
Next-generation API Development with GraphQL and PrismaNikolas Burk
 
The Testing Games: Mocking, yay!
The Testing Games: Mocking, yay!The Testing Games: Mocking, yay!
The Testing Games: Mocking, yay!Donny Wals
 
Ecto DSL Introduction - Yurii Bodarev
Ecto DSL Introduction - Yurii BodarevEcto DSL Introduction - Yurii Bodarev
Ecto DSL Introduction - Yurii BodarevElixir Club
 
Yurii Bodarev - Ecto DSL
Yurii Bodarev - Ecto DSLYurii Bodarev - Ecto DSL
Yurii Bodarev - Ecto DSLElixir Club
 
Teste de Integração com DbUnit e jIntegrity
Teste de Integração com DbUnit e jIntegrityTeste de Integração com DbUnit e jIntegrity
Teste de Integração com DbUnit e jIntegrityWashington Botelho
 

Similar to Cassandra Intro - Distributed, Scalable NoSQL Database (20)

Building a Scalable Inbox System with MongoDB and Java
Building a Scalable Inbox System with MongoDB and JavaBuilding a Scalable Inbox System with MongoDB and Java
Building a Scalable Inbox System with MongoDB and Java
 
C# Starter L04-Collections
C# Starter L04-CollectionsC# Starter L04-Collections
C# Starter L04-Collections
 
Coming to Terms with GraphQL
Coming to Terms with GraphQLComing to Terms with GraphQL
Coming to Terms with GraphQL
 
SFScon17 - Patrick Puecher: "Exploring data with Elasticsearch and Kibana"
SFScon17 - Patrick Puecher: "Exploring data with Elasticsearch and Kibana"SFScon17 - Patrick Puecher: "Exploring data with Elasticsearch and Kibana"
SFScon17 - Patrick Puecher: "Exploring data with Elasticsearch and Kibana"
 
First few months with Kotlin - Introduction through android examples
First few months with Kotlin - Introduction through android examplesFirst few months with Kotlin - Introduction through android examples
First few months with Kotlin - Introduction through android examples
 
Elasticsearch an overview
Elasticsearch   an overviewElasticsearch   an overview
Elasticsearch an overview
 
How ElasticSearch lives in my DevOps life
How ElasticSearch lives in my DevOps lifeHow ElasticSearch lives in my DevOps life
How ElasticSearch lives in my DevOps life
 
Rails3 changesets
Rails3 changesetsRails3 changesets
Rails3 changesets
 
Json Persistence Framework
Json Persistence FrameworkJson Persistence Framework
Json Persistence Framework
 
Architecture Components
Architecture ComponentsArchitecture Components
Architecture Components
 
Elastic tire demo
Elastic tire demoElastic tire demo
Elastic tire demo
 
Active record(1)
Active record(1)Active record(1)
Active record(1)
 
Ruby is Awesome
Ruby is AwesomeRuby is Awesome
Ruby is Awesome
 
The State of Lithium
The State of LithiumThe State of Lithium
The State of Lithium
 
MongoDB With Style
MongoDB With StyleMongoDB With Style
MongoDB With Style
 
Next-generation API Development with GraphQL and Prisma
Next-generation API Development with GraphQL and PrismaNext-generation API Development with GraphQL and Prisma
Next-generation API Development with GraphQL and Prisma
 
The Testing Games: Mocking, yay!
The Testing Games: Mocking, yay!The Testing Games: Mocking, yay!
The Testing Games: Mocking, yay!
 
Ecto DSL Introduction - Yurii Bodarev
Ecto DSL Introduction - Yurii BodarevEcto DSL Introduction - Yurii Bodarev
Ecto DSL Introduction - Yurii Bodarev
 
Yurii Bodarev - Ecto DSL
Yurii Bodarev - Ecto DSLYurii Bodarev - Ecto DSL
Yurii Bodarev - Ecto DSL
 
Teste de Integração com DbUnit e jIntegrity
Teste de Integração com DbUnit e jIntegrityTeste de Integração com DbUnit e jIntegrity
Teste de Integração com DbUnit e jIntegrity
 

Recently uploaded

A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkPixlogix Infotech
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024TopCSSGallery
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...itnewsafrica
 

Recently uploaded (20)

A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App Framework
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
 

Cassandra Intro - Distributed, Scalable NoSQL Database

  • 1. Cassandra A short Intro Vitaly Kushner astrails.com
  • 2. • Distributed • Non-relational • Linearly scalable • Multi data-center aware
  • 4. Terminology Sucks big time
  • 5. my_cluster: { demo_app: { accounts: { "1": { "attributes": { "name": "astrails" }, "users": { "1" => "", "3" => "", } } }, users: { "1": { "name": "vitaly", "email": "vitaly@astrails.com" } } } }
  • 6. my_cluster: { <<= Cluster Name demo_app: { accounts: { "1": { "attributes": { "name": "astrails" }, "users": { "1" => "", "3" => "", } } }, users: { "1": { "name": "vitaly", "email": "vitaly@astrails.com" } } } }
  • 7. my_cluster: { demo_app: { <== Keyspace accounts: { "1": { "attributes": { "name": "astrails" }, "users": { "1" => "", "3" => "", } } }, users: { "1": { "name": "vitaly", "email": "vitaly@astrails.com" } } } }
  • 8. my_cluster: { demo_app: { accounts: { <<= super column family "1": { "attributes": { "name": "astrails" }, "users": { "1" => "", "3" => "", } } }, users: { "1": { "name": "vitaly", "email": "vitaly@astrails.com" } } } }
  • 9. my_cluster: { demo_app: { accounts: { "1": { "attributes": { "name": "astrails" }, "users": { "1" => "", "3" => "", } } }, users: { <<= column family "1": { "name": "vitaly", "email": "vitaly@astrails.com" } } } }
  • 10. my_cluster: { demo_app: { accounts: { "1": { <<= key "attributes": { "name": "astrails" }, "users": { "1" => "", "3" => "", } } }, users: { "1": { "name": "vitaly", "email": "vitaly@astrails.com" } } } }
  • 11. my_cluster: { demo_app: { accounts: { "1": { "attributes": { << super column "name": "astrails" }, "users": { "1" => "", "3" => "", } } }, users: { "1": { "name": "vitaly", "email": "vitaly@astrails.com" } } } }
  • 12. my_cluster: { demo_app: { accounts: { "1": { "attributes": { "name": "astrails" <<= column }, "users": { "1" => "", "3" => "", } } }, users: { "1": { "name": "vitaly", "email": "vitaly@astrails.com" } } } }
  • 13. my_cluster: { demo_app: { accounts: { "1": { "attributes": { "name": "astrails" <<= value }, "users": { "1" => "", "3" => "", } } }, users: { "1": { "name": "vitaly", "email": "vitaly@astrails.com" } } } }
  • 14. my_cluster: { demo_app: { accounts: { "1": { "attributes": { "name": "astrails" }, "users": { "1" => "", "3" => "", } } }, users: { "1": { "name": "vitaly", <<= column "email": "vitaly@astrails.com" } } } }
  • 15. my_cluster: { <<= cluster demo_app: { <<= keyspace accounts: { <<= super column family "1": { <<= key "attributes": { <<= supercolumn "name": "astrails" <<= column }, "users": { "1" => "", "3" => "", } } }, users: { <<= column family "1": { <<= key "name": "vitaly", <<= column "email": "vitaly@astrails.com" } } } }
  • 16. my_cluster: { <<= cluster demo_app: { <<= database accounts: { <<= super column family "1": { <<= key "attributes": { <<= supercolumn "name": "astrails" <<= column }, "users": { "1" => "", "3" => "", } } }, users: { <<= column family "1": { <<= key "name": "vitaly", <<= column "email": "vitaly@astrails.com" } } } }
  • 17. my_cluster: { <<= cluster demo_app: { <<= database accounts: { <<= table "1": { <<= key "attributes": { <<= supercolumn "name": "astrails" <<= column }, "users": { "1" => "", "3" => "", } } }, users: { <<= column family "1": { <<= key "name": "vitaly", <<= column "email": "vitaly@astrails.com" } } } }
  • 18. my_cluster: { <<= cluster demo_app: { <<= database accounts: { <<= table "1": { <<= key "attributes": { <<= supercolumn "name": "astrails" <<= column }, "users": { "1" => "", "3" => "", } } }, users: { <<= table "1": { <<= key "name": "vitaly", <<= column "email": "vitaly@astrails.com" } } } }
  • 19. my_cluster: { <<= cluster demo_app: { <<= database accounts: { <<= table "1": { <<= key "attributes": { <<= collection "name": "astrails" <<= column }, "users": { "1" => "", "3" => "", } } }, users: { <<= table "1": { <<= key "name": "vitaly", <<= column "email": "vitaly@astrails.com" } } } }
  • 20. my_cluster: { <<= cluster demo_app: { <<= database accounts: { <<= table "1": { <<= key "attributes": { <<= collection "name": "astrails" <<= attribute }, "users": { "1" => "", "3" => "", } } }, users: { <<= table "1": { <<= key "name": "vitaly", <<= attribute "email": "vitaly@astrails.com" } } } }
  • 22. "my_cluster": { "demo_app": { "users": { "b2c75e99-e079-449d-b562-293dfdbf006e": { "attributes": { "name": "Vitaly", "email": "vitaly@astrails.com", "remember_me": "74c4f3a2c85b66f216211edd5245d25ba251d83e" } } }, "emails": { "vitaly@astrails.com": "b2c75e99-e079-449d-b562-293dfdbf006e", } "remember_me": { "74c4f3a2c85b66f216211edd5245d25ba251d83e": "b2c75e99-e079-449d-b562-293dfdbf006e", } } }
  • 23. "my_cluster": { "demo_app": { "users": { "b2c75e99-e079-449d-b562-293dfdbf006e": { "attributes": { "name": "Vitaly", "email": "vitaly@astrails.com", "remember_me": "74c4f3a2c85b66f216211edd5245d25ba251d83e" } } }, "emails": { "vitaly@astrails.com": "b2c75e99-e079-449d-b562-293dfdbf006e", } "remember_me": { "74c4f3a2c85b66f216211edd5245d25ba251d83e": "b2c75e99-e079-449d-b562-293dfdbf006e", } } }
  • 24. "my_cluster": { "demo_app": { "users": { "b2c75e99-e079-449d-b562-293dfdbf006e": { "attributes": { "name": "Vitaly", "email": "vitaly@astrails.com", "remember_me": "74c4f3a2c85b66f216211edd5245d25ba251d83e" } } }, "emails": { "vitaly@astrails.com": "b2c75e99-e079-449d-b562-293dfdbf006e", } "remember_me": { "74c4f3a2c85b66f216211edd5245d25ba251d83e": "b2c75e99-e079-449d-b562-293dfdbf006e", } } }
  • 25. "my_cluster": { "demo_app": { "users": { "b2c75e99-e079-449d-b562-293dfdbf006e": { "attributes": { "name": "Vitaly", "email": "vitaly@astrails.com", "remember_me": "74c4f3a2c85b66f216211edd5245d25ba251d83e" } } }, "emails": { "vitaly@astrails.com": "b2c75e99-e079-449d-b562-293dfdbf006e", } "remember_me": { "74c4f3a2c85b66f216211edd5245d25ba251d83e": "b2c75e99-e079-449d-b562-293dfdbf006e", } } }
  • 26. "my_cluster": { "demo_app": { "users": { "b2c75e99-e079-449d-b562-293dfdbf006e": { "attributes": { "name": "Vitaly", "email": "vitaly@astrails.com", "remember_me": "74c4f3a2c85b66f216211edd5245d25ba251d83e" } } }, "emails": { "vitaly@astrails.com": "b2c75e99-e079-449d-b562-293dfdbf006e", } "remember_me": { "74c4f3a2c85b66f216211edd5245d25ba251d83e": "b2c75e99-e079-449d-b562-293dfdbf006e", } } }
  • 27. "my_cluster": { "demo_app": { "users": { "b2c75e99-e079-449d-b562-293dfdbf006e": { "attributes": { "name": "Vitaly", "email": "vitaly@astrails.com", "remember_me": "74c4f3a2c85b66f216211edd5245d25ba251d83e" } } }, "emails": { "vitaly@astrails.com": "b2c75e99-e079-449d-b562-293dfdbf006e", } "remember_me": { "74c4f3a2c85b66f216211edd5245d25ba251d83e": "b2c75e99-e079-449d-b562-293dfdbf006e", } } }
  • 29. > gem install cassandra ... > cassandra_helper cassandra ...
  • 30. <ClusterName>my_cluster</ClusterName> <Keyspaces> <Keyspace Name="demo_app"> <ColumnFamily CompareWith="UTF8Type" Name="users" ColumnType="Super" CompareSubcolumnsWith="UTF8Type" /> <ColumnFamily CompareWith="UTF8Type" Name="emails" ColumnType="Super" CompareSubcolumnsWith="UTF8Type" /> <ColumnFamily CompareWith="UTF8Type" Name="tokens" /> </Keyspace> </Keyspaces>
  • 31. require 'rubygems' require 'cassandra' include Cassandra::Constants client = Cassandra.new('demo_app') client.insert(:users, "1", {"name" => "vitaly", "email" => "vitaly@astrails.com"}) client.insert(:accounts, "1", {"attributes" => {"name" => "astrails"}, "users" => {"1" => ""}}) client.insert(:users, "2", {"name" => "boris"}) client.insert(:accounts, "1", {"users" => {"2" => ""}}) client.get(:users, "1")
  • 33. YES!
  • 37. class Account < SmallRecord::Base attribute :name attribute :created_at, :type => :datetime has_many :users validates_presence_of :name end class User < SmallRecord::Base attribute :name attribute :email attribute :created_at, :type => :datetime attribute :account_id def account @account ||= Account.find(:account_id) end validates_presence_of :name validates_presence_of :email end Account.find(params[:account]).users.first.name
  • 38. production: adapter: cassandra host: 127.0.0.1 port: 9160 keyspace: chronos development: adapter: mock test: adapter: mock
  • 39. production: adapter: cassandra host: 127.0.0.1 port: 9160 keyspace: chronos development: adapter: mock test: adapter: mock
  • 40. Some Links • http://incubator.apache.org/cassandra • http://labs.google.com/papers/bigtable.html • http://blog.evanweaver.com/articles/2009/07/06/up-and-running-with-cassandra/ • http://arin.me/blog/wtf-is-a-supercolumn-cassandra-data-model • http://github.com/astrails/small_record