Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Riak入門

UENISHI Kota
December 05, 2012

 Riak入門

IDCF主催のNoSQLセミナーでRiakの入門やデモの話をしてきました

UENISHI Kota

December 05, 2012
Tweet

More Decks by UENISHI Kota

Other Decks in Technology

Transcript

  1. Riakͱ͸ •  DynamoʹΠϯεύΠϠ͞ Εͨɺ •  Consistent HashingʹΑΓ ਫฏ෼ࢄ͠ɺ •  Vector

    ClockʹΑΔಡΈࠐ Έ࣌ղܾΛجຊʹσʔλ Λ৑௕Խ͠ɺ •  Erlang/OTPͰಈ࡞͢Δ ෼ࢄKVSͰ͋Δ
  2. DEMO 1 •  GET, PUT, DELETE ͯ͠ΈΔ •  ը૾Λͦͷ··ஔ͚Δ • 

    $ curl –X PUT http://url.to.server/buckets/b/keys/k -T riak-transparent-larger.png •  ϦϯΫ 7
  3. •  高可用性 •  低レイテンシー •  水平拡張性 •  耐障害性 •  運用の容易さ

    •  予測可能性 RiakͷσβΠϯΰʔϧ Riak Clients (Ruby, Java, Node.js, PHP, .NET, etc) Webmachine (HTTP) Protocol Buffers (Binary, Persistent Connect) MDC Replication * Riak EnterpriseDS Only Riak SNMP / JMX * Riak EnterpriseDS Only Riak KVS (with 2i, MapReduce) Riak Search (Distributed, Full- Text) Riak Pipe Riak Core (Ring Management, Partitioning, Anti-Entropy, Replication, Version Control) Pluggable Storage Backends Bitcask LevelDB Riak Control RiakͷΞʔΩςΫνϟ •  Riakは可用性を最優先 とするようチューニング •  データ一貫性のレベル はチューニング可能 CAPఆཧ
  4. ҰൠతͳRiakγφϦΦ •  1୆Ҏ্ͷ෺ཧϚγʔϯΛඞཁͱ ͢Δେ͖ͳσʔλΛѻ͏έʔεɻ (෺ཧϚγʔϯ4୆Ҏ্͕๬·͠ ͍) •  Մ༻ੑ͕τοϓཁ݅ͷέʔε •  ѻ͏σʔλ͕keys,

    valuesͱͯ͠ ϞσϧԽͰ͖Δέʔε When to Use ҰൠతͳϢʔεέʔε •  Ad Networks •  Digital Media •  On-Line Games •  Social Networks •  Social Analysis •  Cloud Operators •  Messaging Services •  Product Catalogs •  Document Management •  Health Care Information Management
  5. Health Information Management • 2012年1月のDevSummitにてAT&T が mHealthを紹介 • 開発者、アプリ、端末を繋ぐPaaSのエコ システムを構築 • Withings, FitBit,

    MyZeoを含むサードパ ーティ端末 • ユーザ、トークン、アプリケーション、ヘ ルスメトリックスなどをRiakに保存 • HIPAAと HL7に準拠 Clinical care teams, insurance companies, pharmacists, employers will benefit from a more holistic view of someone's current state of health. •  550ສਓͷσϯϚʔΫࠃຽͷॲํᝦʹؔ ͢Δ৘ใΛอଘ •  HIPAAಉ౳ͷίϯϓϥΠΞϯεཁ݅ •  OracleιϦϡʔγϣϯʹൺ΂95%҆Ձ •  MySQLʹൺ΂4ഒߴ଎ •  NoSQLͷ࢖༻Λ༏ઌ͢Δ͜ͱͰDBA͕ ෆཁͷͨΊӡ༻ίετΛ௿ݮ Creates a comprehensive drug treatment history, available securely to patients, doctors and medical systems on any device, at any time Danish Health Services
  6. Complex Event Management Provides advanced malware analysis and protection using

    big data to discover, understand and block malware outbreaks, APTs, and targeted attacks. Ensures Norton On-Line users have an always-on, integrated experience that securely interfaces a device with the cloud maintaining critical data •  ֦ுੑͱ҆ఆੑͷ໘͔ΒRiakΛબ୒ •  RiakͷΞυόϯευػೳʢRiakαʔνɺ 2i (ηΧϯμϦʔΠϯσοΫε)Λ࣮૷ •  Ϋϥ΢υϕʔεαʔϏε͸ɺσόΠε ΤʔδΣϯτ͔ΒϚϧ΢ΣΞʹؔ͢Δ σʔλΛऩू •  1MBҎԼͷΦϒδΣΫτͷwrite- intensiveॲཧ •  ଞͷ஍ҬͷαϙʔτͷͨΊʹ֦ுத •  γεςϜμ΢ϯͷഉআͷͨΊʹOracle͔ΒRiak ΁ϦϓϨʔε •  ϓϥΠϚϦʔαʔϏε͸ɺϢʔβొ࿥σʔλ ͷอଘɺಉظσʔλͷอଘ΍ϙϦγʔσʔλ ͷอଘͳͲ •  ηΧϯμϦʔαʔϏε͸ɺ“event service”ͷͨ ΊΠϕϯτϩάͷอଘɺαʔνɻOracle͔Βͷ ϚΠάϨʔγϣϯ •  ֤ςφϯτ͕֤ࣗͷϙϦγʔΛ࣋ͭચ࿅͞Ε ͨঝೝ؅ཧΛཁٻ͞ΕΔ
  7. Latest News: riak_dt •  CRDT(Commutative Replicated Data Types)ʹΑΔࣗಈ తͳίϯϑϦΫτղܾ • 

    ྫ: atomic counter •  ωοτϫʔΫ෼அʹ΋ෛ͚ͳ͍ڧ͍σʔλߏ଄ •  Concurrent Revisionsͱ͍͏΍ͭͱࣅ͍ͯ·͢ •  http://github.com/basho/riak_dt 17