• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Speeding Couch
 

Speeding Couch

on

  • 3,369 views

Slides for the talk i gave on November roro meetup.

Slides for the talk i gave on November roro meetup.

Statistics

Views

Total Views
3,369
Views on SlideShare
2,395
Embed Views
974

Actions

Likes
0
Downloads
14
Comments
0

15 Embeds 974

http://taylorluk.com 789
http://www.taylorluk.com 106
http://taylorluk.siterest.com 50
http://www.bookandman.com 7
http://feeds.feedburner.com 5
http://taylorluk.siterest.com. 4
http://www.slideshare.net 3
https://taylorluk.siterest.com 2
http://translate.googleusercontent.com 2
http://74.125.113.132 1
http://webcache.googleusercontent.com 1
http://redcity.r10.railsrumble.com 1
http://74.125.93.132 1
http://taylorluk.siterest.local 1
http://ranksit.com 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Apple Keynote

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Speeding Couch Speeding Couch Presentation Transcript

  • Couch Speeding speed up your couchdb Taylor Luk idealian
  • CouchDB • CouchDb is a document-oriented database • RESTFul • JSON data format • Map/Reduce • Schema-free
  • Case Study • Build is a analytic and tracking library that i have build to to do custom tracking for couple projects i am working on..
  • CouchDB looks good • It's restful "how about logging and tracking from both client side and server side." • Schema free "So i can track all kind of actions with different kind of meta data.Video playback, View, Click, Enter and exit" • Speed
  • Not quite... • Higher latency • Slow insert performance • Slow view query index • Large storage requirement • Updating and locking issues
  • Speed up CouchDB - Bulk operations • Bulk operations for insert and delete CouchRest mydb.builk_save({ doc1, doc2 })
  • Speed up CouchDB -  Intelligent Sequential ID • Optimize B-Tree storage • Lower record size • Free timestamps and index # Couch ID "_id":"012471a4cb6124ba54dd49204b41c46e" #Generate timestamp (Time.now.to_f *1000).to_i.to_s(16)
  • Speed up CouchDB -  Intelligent Sequential ID "_id":"012471a4cb6124ba54dd49204b41c46e" # Ruby def created_at   Time.at(self.id[0, 11].to_i(10) / 1000) end #Javascript var timestamp = parseInt(object._id.substring(0,11), 16); var date = new Date(timestamp);
  • Speed up CouchDB -  View and updates • View updating is slow (initial) • Lower the number of emit() in your map function • Trade storage for speed • Aggregation and Summerized records
  • Speed up CouchDB -  useful tips and bits • CouchDB v0.10 - faster insert performance • Compaction helps data storage size • think about your data structure • experimentation*   Alternitive - MySQL myisam is decent for data warehousing - Relational database for transactions ($) - MongoDB for analytic
  • Thank you • email: taylor.luk@idealian.net • github: speedmax • twitter : @taylor_luk • blog : www.taylorluk.com