Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
AWS SDK for RubyでDynamoDBを操作してみた
Search
Naoto Enokawa
October 18, 2014
Programming
0
340
AWS SDK for RubyでDynamoDBを操作してみた
JAWS-UG沖縄 CMS祭り 前夜祭LT資料です。
Naoto Enokawa
October 18, 2014
Tweet
Share
More Decks by Naoto Enokawa
See All by Naoto Enokawa
CircleCI Orbs にコントリビュートした話 / Story contributed to CircleCI Orbs
enokawa
0
630
AWS re:Invent 2017行ってきました報告 / JAWS-UG Okinawa 20180106
enokawa
1
320
Roadworkerではじめる大量DNS移行 / Codenize Meetup
enokawa
0
3.4k
AWS構築のハマりポイントを詳しく解説 / Cloud on the BEACH 2016
enokawa
3
1.5k
JAWS DAYS 2016 ランチセッション
enokawa
0
580
AWS初心者がCodenize.toolsでInfrastructure as Codeした話/jawsug-beginner2-lt
enokawa
0
840
cloudpackインターン成果報告
enokawa
0
2k
ownCloud on AWS in Hackers Champloo 前夜祭 #hcmpl
enokawa
0
620
#jawsug 沖縄 勉強会「AWS触ってみたけどその後どうしてる?」
enokawa
0
98
Other Decks in Programming
See All in Programming
Webサーバーサイド言語としてのRustについて
kouyuume
1
5k
kiroとCodexで最高のSpec駆動開発を!!数時間で web3ネイティブなミニゲームを作ってみたよ!
mashharuki
0
1k
AkarengaLT vol.38
hashimoto_kei
1
130
釣り地図SNSにおける有料機能の実装
nokonoko1203
0
200
テーブル定義書の構造化抽出して、生成AIでDWH分析を試してみた / devio2025tokyo
kasacchiful
0
350
Kotlin 2.2が切り拓く: コンテキストパラメータで書く関数型DSLと新しい依存管理のかたち
knih
0
120
CSC305 Lecture 12
javiergs
PRO
0
250
オンデバイスAIとXcode
ryodeveloper
0
370
AI駆動開発カンファレンスAutumn2025 _AI駆動開発にはAI駆動品質保証
autifyhq
0
100
What Spring Developers Should Know About Jakarta EE
ivargrimstad
0
650
When Dependencies Fail: Building Antifragile Applications in a Fragile World
selcukusta
0
120
Towards Transactional Buffering of CDC Events @ Flink Forward 2025 Barcelona Spain
hpgrahsl
0
120
Featured
See All Featured
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
140
34k
Why You Should Never Use an ORM
jnunemaker
PRO
60
9.6k
Agile that works and the tools we love
rasmusluckow
331
21k
Building a Scalable Design System with Sketch
lauravandoore
463
33k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.5k
Gamification - CAS2011
davidbonilla
81
5.5k
Thoughts on Productivity
jonyablonski
72
4.9k
Building Adaptive Systems
keathley
44
2.8k
The Pragmatic Product Professional
lauravandoore
36
7k
We Have a Design System, Now What?
morganepeng
54
7.9k
Building Flexible Design Systems
yeseniaperezcruz
329
39k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.7k
Transcript
AWS SDK for Ruby V2Ͱ DynamoDBΛૢ࡞ͯ͠Έͨ Naoto Enokawa
ࣗݾհ ӫ ేʢ͑ͷ͔Θ ͳ͓ͱʣ ԭೄࠃࡍେֶ4࣍ ಛٕɿDJʢEDMͱ͔ʣ झຯɿҰ؟ϨϑʢEOS kiss X5ʣ
DynamoDBʹϦΞϧλΠϜͰ πΠʔτΛ֨ೲ͢Δ ͬͨ͜ͱ
ͳΜͰʁʁ
None
MacBookͷഎ໘Λ ࣗຫ͋͠͏WebαʔϏε
ʮMacFriendsʯͰݕࡧʂ http://macfriends.net/
None
ઌੜʮσʔλϕʔε͑ʯ
DBͳʹ͓͏… RDSͬͨΒෛ͚ͨײ͕͢͡Δww
RDS͏ΑΓDynamoDB ͬͨํ͕҆͘ࡁΈͦ͏ʂʂ
༻ͨ͠AWSαʔϏε DynamoDBɿશϚωʔδυNoSQLɺ KeyValueܕɺAPIܦ༝Ͱར༻͢ΔɺSSDͰ͍ AWS SDK for RubyɿRubyͰAWSͷϦιʔεΛ ૢ࡞͢Δ͜ͱ͕Ͱ͖ΔɺଞʹɺJavaɺ JavaScriptɺPhytonɺPHPɺ.NETɺNode.jsɺ iOSɺAndroid
Πϝʔδਤ DynamoDB ΅͘ͷMac RubyͰͿͪࠐΉʂʂ
σϞ
create_table.rb resp = dynamo_db.create_table( table_name: 'tweets', key_schema: [ { attribute_name:
'tweet_id', key_type: 'HASH', }, ], attribute_definitions: [ { attribute_name: 'tweet_id', attribute_type: 'N', }, ], provisioned_throughput: { read_capacity_units: 1, write_capacity_units: 1, }, )
put_item.rb client = TweetStream::Client.new ! client.track("#macfriends") do |status| if !status.text.index("RT")
puts "@" + status.user.screen_name + " : " + status.text resp = dynamo_db.put_item( table_name: 'tweets', item: { 'tweet_id' => status.id, 'user_id' => status.user.id, 'screen_name' => status.user.screen_name, 'tweet_text' => status.text, } ) end end
None
ࠓޙͷ՝ • ݟ͑ΔԽ • ϒϥβ্ͰDBͷใΛදࣔͤ͞Δ • herokuʹσϓϩΠ
None
/enokawa/tweetstream_dynamodb
AWS SDK for Ruby V2Ͱ DynamoDBΛૢ࡞ͯ͠Έͨ Naoto Enokawa