#garagekidztweetz

id:garage-kid@76whizkidz のライフログ・ブログ!

NoSQL Afternoon In Japan

スポンサーリンク

本日、品川シーサイド楽天タワーで開催された NoSQL Afternoon In Japan で取得してきたメモを share。
  • 少しづつ Reference 情報をあとから足していく予定です。

  • 催し概要
    • more than 400 applicant.
      • 300 attendees.
    • 13:00-18:30
    • 同時通訳あり
    • iPhone でのメモに挑戦してみる
    • Shinya motohashi
      • 時間厳守でやっていきたい
      • 同時通訳レシーバーは必ず返却
      • この部屋から持ち出さない
    • 経緯:
      もともとnosqlの論文の読書会、人を集める
      Tim nosqlmeetup をやりたい
    • Tim NoSQL Summer を主催
      ほとんどのプロジェクトは米発
      世界中を回ってNoSQLの啓蒙
      楽天への感謝、こういった場を設けられたことに関して
      各スピーカーに対しての感謝
      日本発のNoSQLに対しての興味
    • 日本側30分、海外側40分の時間配分

Hibari

  • Hibari NoSQL for bigdata
  • About Gemini
    • Messaging products
    • 2001 July founded
  • This year opensourced Hibari
  • Hibari=cloud birds
    • Key value ,big data store
    • Support Redhat,Centos, ...
  • Why NoSQL?
    Web mailsystem needs
    Big data, low cost
  • Durability
  • Strong consistency
  • Low latency
  • High availability
  • Read heavy
  • Lockless API
  • Chain replication
  • Chain provides scalability
    • Chain is a partitioned key
  • concept of chain
    • Fault tolerance HA
  • Compare Benchmark with Cassandra
    • Benchmark in 3 ways
      • In house tool
      • Yahoo's cloud storage benchmark
      • Basho bench
        5台のレプリケーション同じ構成
        Get and Put Performance
        Latency/msec
        Java のロードツールとErlangの相性による問題??
    • Cassandra/Hibari Comparison
      • Datamodel: column oriented/keyvalue
      • Data replication preference: lists/chain replicating
      • Strength: write powerful/read powerful
  • Roadmap
    • 2011 enterprise version
QA
  • Admin server
    • 変更を管理する
  • CAP定理
    • まだまだ難しい
  • Erlang のパッチ
    • R13B, 14B

Okuyama

  • Kobe digital labo
  • Takahiro Iwase
  • 奈良、車好き、走りにいく道路の名前
Okuyama overview
  • Java implemented
  • Now 0.8.2
  • 永続化メカニズム、ネットワーク
  • Client -> Master node -> data node (セット数は可変)
Okuyama feature
  • メモリーモード、ディスクモード、メモリーxディスク
    →メモリーモードが最速
    →ディスク、キーとバリューがセパレート
    ディスクとメモリー管理、二タイプ
  • Memcaced, HTTPをサポート
  • Redundancy
  • Availability
  • Network mechanism
    • メタデータの管理
    • 小さなデータ
  • Okuyama tag 機能
    • キーとタグの違い、タグでまとめられている情報の量に性能はよる
    • データノード側でjavascriptを実行可能
    • Data lock function 現状はスケーラビリティの問題、改善の余地あり
  • Google code に upload 予定日

Cassandra

  • Introduction to apache Cassandra
  • Nate McCall
  • @zznate
  • ダウンロードして試した人まではいるがプロダクトまで出している人は稀
  • Dynamo,amazon - Google,Bigtable - inbox search -> Cassandra
Scaling
    • アルファベットのデータ配置
Reliability
Tunable consistency
Flexible data model
Not a key/value store
  • Keys x column families
  • Keys x SuperColumns
Secondary indexes
Analytics
Monitoring
Cluster load
Write latency
Client library
  • Python
  • Java
  • Ruby
  • .NET
Community
  • Add-ons
  • Lucandra
Services, Support and Training
  • Riptano
Compaction
  • Server memory adding
  • JCM tuning
QA
  • Upgrading
    • ローリングアップグレード
  • レンジゴースト??
    • セカンダリインデックスで解消する
    • アブロプロダクション??
  • 運用上の問題解決
    • Cluster の一台がこけたことにより、他のサーバーでさばくことができず連鎖的に落ちていくのをどうするか??
    • スケーリングしてください、と。

ROMA

User-Cusomizable NoSQL
Background
  • 簡単に構築できるNoSQLが望まれていた
  • 2009オープンソース化
  • 楽天内の様々なサービスで利用
  • 社内から様々なニーズ、要望を受けてそれに対応していっている
    • リストデータにどうしたら簡単にアクセスできるか??
      • 楽天トラベルのニーズ対応
        Plugin architecture -> ROMA の機能を拡張させる
Architecture
  • 4 modules, NW IO module, ...
  • Data partitioning
  • Consistent hashing and virtual node
  • Each virtual node 32bit ???
Data accessing
Ring Menbership Model, Sharing Ring
Message protocol
Heartbeat failure detection
Command Plugin
  • ユーザが簡単にコマンドの定義をすることができる??
QA
  • 各機能がモジュール化されている
    • 外部の機能の利用も可能に
  • GPL V3
  • Ruby の理由
    まつもとひろゆきさんが楽天のフェローだから。
    Ruby で分散システムをつくったらどうなるかと考えた

MyCassandra??*1

  • 東京工業大学
  • Cassandra のデータ部分をmysqlに置き換え
  • 図の見方がよく分からない
  • VoltDB ,Redis
  • NoSQL は分散のしかけ、ストレージに分離できるという発想

MongoDB

10gen

Quick introduction
  • Adoption is very very strong.
  • 90000 download
  • 1000 production, like 4 square
  • C++
  • platform 32/64 bit
  • Prenty of language drivers
  • Ruby, java, C,C++
No join + no complex transactions
New data model
  • Terminology
  • Colection
  • JSON document
  • Embedding and link
  • Shard
  • Shard link
Design session
  • どうやって操作するか??
  • Secondary Index on any fields in document
  • Not a key value stores
  • Data is JSON document
  • Query operators
  • Extending the schema
    →手間が低い, push,
Create index on nested document

→ネストしたデータ格納ができる??
→ネストしたデータに対する Indexing

Deployment of MongoDB
  • Primary read/write
  • Secondary read
  • Secondary for backup
Scalability
  • Shard することで高めることができる
  • Adding replica set
Monitoring
  • They like Munin
  • Measure stats overtime
  • Tells what is going on with your system
MongoDB enables easy Application building
  • Map/Reduce
  • Capped Collection
  • Tailable Cursors
  • Geo indexing
QA
  • twitter: @mongodb
  • Only to Identify hash key
  • Performance
    • Benchmark results
    • They don't much benchmark results, It depends on each system
    • Starting without sharding , its easy to shard it, not need down time
  • Roadmap
    Support の強化、日本語ドキュメント
  • Availability
    Replica set がダウンしたときにどうするのか
    ちょっと質問の意味を取り違えているような
    Primary , secondary は同じデータセンター
    もう一つの secondary は違うデータセンターに配置する

kumofs

  • kumofs
    distributed key value store
  • Messagepack
  • Kumo=雲=cloud
  • Get, set, delete, CAS(compare and swap)
  • Read and write scalable
  • えとらぼ
    • Photo storage service
Why kumofs ?
  • Need to manage heavy read and write
  • Don't want wake up late of night
  • Manager x Servers x Gateway
    • Application request through GW
    • GW, hides configuration of cluster fr application
  • Administration tools are implemented by Ruby
MassagePack
  • Cross language
  • Dynamic typing like JSON
  • More compact than JSON
  • So very fast and small
MessagePack RPC
  • Cross language messaging library
  • Asynchronous RPC with parallel pipelining
  • Connection pooling
  • Event-driven IO
  • Multiple client can share the event loop
  • timer, signal handler, ... also are shared in event loop
QA
  • @kzk_movers
  • Ameba now
  • kumofs は Primitive なデータを扱うことを想定している
  • 開発のきっかけ
    • えとらぼで、アルバイトしているときにただひたすら速いデータ処理の仕組みを作ろうと思ったから

Couch DB

Relaxing with CouchDB
Introduction
  • Came from Boston
  • Not a CouchDB commiter ... But using it for several years
  • Schema free, docunent database management
  • Written in Erlang
    • Top level apache project
  • JSON document consist of several set of key and values
Resultful API
  • Supports CRUD
  • Never overwrite previously committed data
  • Append only b-tree, copy-on-write
Views
Incremental Indexes
  • Only new docs or changed docs get ...
Replication
  • Peer-based, bi-directional using normal HTTP
Multi-couch setups
  • Master x slave
  • Robust Multi master
  • Master x master
Conflicts
  • Chooses a winner but the looser is saved with the document as looser rev
FUTON
BigCouch??
  • CouchDB+Scaling
  • CouchDB is awesome but somewhat incomplete
    • Horizontal scaling
    • Transparent to the application
    • No single point of failures
  • Best practice of BigCouch
    • Q : number of Disk spinning
    • Small DB small Q, big DB big Q
  • Fractal Scaling
CouchDB in the wild
  • 15+ million deployment
Why not CouchDB??
  • Missing features
  • Adhoc queries -> is true by design
  • Doesn't scale -> use BigCouch
  • Too new API still changing -> 1.0.x release and stabled
QA
  • What is different between MongoDB??
    Very similar but many in difference, i.e. Replication, Sharding handling
  • Adhoc query fast -> View

HBASE/Hadoop

  • cloudera, software engineer
Why should you care?
  • Data is everywhere
  • Article : the unreasonable effectiveness of data
    • Next 10 years job will be stastitians
So what's Hadoop
  • Stores a lot of informations across many commodity computers
Store and Process
  • HDFS and Map Reduce
What makes Hadoop special
  • Hadoop separates it's fault tolerance system from applications
  • Scalability
  • Both are work
    • 100GB less image data
    • 100TB more than log data
  • 5-4000 commodity servers
Master nodes
  • Name node x jobtracker
Slave nodes
  • Name node
HDFS storage
HDFS write path
MapReduce
  • Map functions and reduce functions
  • Map function works same node of data node
  • Shuffle the data
  • Reduce
  • Put it together -> HDFS
Hadoop is not NoSQL
  • Hive supports SQL like language
Ecosystem around Hadoop
Hadoop in wild
  • Yahoo
  • Facebook
  • Twitter
HBASE
  • HDFS + random read/write
  • A big sorted map
HBASE API
  • Get
  • Put
  • Scan range, filter
  • Increment
    ...
Quicklook of architecture
  • Image
Numbers of HBASE
  • larger cluster : 600 nodes - 600TB
HBASE
  • Ordered range scan
  • Automatically shards , scaling
HBase in product
  • Facebook
  • Mozilla -> recieves crash report
Free learning video, available
  • cloudera.com
HBase can use realtime

*1:飛び入り