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
Open Beer Server - theory and the implementation
Search
moznion
December 03, 2016
Technology
5
7.9k
Open Beer Server - theory and the implementation
Slide of builderscon Tokyo 2016
moznion
December 03, 2016
Tweet
Share
More Decks by moznion
See All by moznion
Develop to Survive - YAPC::Hakodate 2024 Keynote
moznion
9
14k
これはPerl? それともRuby? クイズ〜〜〜〜〜!!!- Perl or Ruby Quiz
moznion
3
2.4k
Perl 5 OOP機構30年史 - Perl 5's OOP Mechanism over the past 30 years
moznion
1
930
RuboCopのカスタムCopを書いてContributionしてみる - Contributing a Custom Cop to RuboCop: A Hands-on Experience
moznion
0
65
AWS上に構築する メンテ容易なElasticsearch System / Maintainable Elasticsearch system on AWS
moznion
2
3.9k
PROXY Protocol aware Proxy Server on Node.js
moznion
2
2.5k
Perl meets AWS Lambda
moznion
0
4.7k
ソフトウェア開発における 「設計」と「パフォーマンス」の相互作用 / Interaction Between Design and Performance on Software Development
moznion
12
6.9k
Javaカードの世界 / The world of Java Card
moznion
9
13k
Other Decks in Technology
See All in Technology
Amazon SageMaker Unified Studio(Preview)、Lakehouse と Amazon S3 Tables
ishikawa_satoru
0
140
re:Invent 2024 Innovation Talks(NET201)で語られた大切なこと
shotashiratori
0
220
目玉アップデート!のSageMaker LakehouseとUnified Studioは何たるかを見てみよう!
nayuts
0
230
OCI Oracle Database Services新機能アップデート(2024/09-2024/11)
oracle4engineer
PRO
0
120
Postman と API セキュリティ / Postman and API Security
yokawasa
0
180
LINEヤフーのフロントエンド組織・体制の紹介【24年12月】
lycorp_recruit_jp
0
510
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
5
52k
Kubernetes環境のオブザーバビリティの次の一歩をOpenTelemetryで実現すると何がどうなるの? - CloudNative Days Winter 2024
katzchang
0
130
Oracle Cloudの生成AIサービスって実際どこまで使えるの? エンジニア目線で試してみた
minorun365
PRO
4
230
MLOps の現場から
asei
5
600
実務につなげる数理最適化
recruitengineers
PRO
6
600
10分で学ぶKubernetesコンテナセキュリティ/10min-k8s-container-sec
mochizuki875
2
150
Featured
See All Featured
Optimising Largest Contentful Paint
csswizardry
33
3k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
8
1.2k
How to Ace a Technical Interview
jacobian
276
23k
GraphQLとの向き合い方2022年版
quramy
44
13k
Designing for humans not robots
tammielis
250
25k
Side Projects
sachag
452
42k
The Invisible Side of Design
smashingmag
298
50k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
5
430
How to train your dragon (web standard)
notwaldorf
88
5.7k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
How to Think Like a Performance Engineer
csswizardry
21
1.2k
Building Applications with DynamoDB
mza
91
6.1k
Transcript
Open Beer Server theory and the implementation @moznion
@moznion
None
օ͞ΜϏʔϧ ͖Ͱ͔͢ʂʂ
օ͞ΜੜϏʔϧ ͖Ͱ͔͢ʂʂ
ͦ͏Ͱͳ͍ਓ ͜ͷൃදඍົͰ͢
ΤϯδχΞ Ͱ͔͢ʂʂ
ͦ͏Ͱͳ͍ਓ ྑ͍ػձͰ͢
αʔόΤϯδχΞ ʹͳΕΔʂʂ
Ϗʔϧαʔόʔ ͷͳ͠
Ϗʔϧαʔόʔ ͱ……ੈքͱ……
https://www.flickr.com/photos/50507715@N00/2892136399
Έɼ ཧʹ͍ͭͯ……
Έ is easy
ίϯϙʔωϯτ֓؍ Ḻ ϔου Ψε ྫྷ͢ ֓೦ λοϓ ΤϯυϢʔβ
ίϯϙʔωϯτ֓؍ Ḻ ϔου Ψε ྫྷ͢ ֓೦ λοϓ ΤϯυϢʔβ PDS (Presentation
Domain Separation) Έ͍ͨͳΜʂʂ
Θ͔Γ·͔ͨ͠ʁ
͍
Ḻ ϔου Ψε ྫྷ͢ ֓೦ λοϓ ΤϯυϢʔβ ѹྗ
Ḻ ϔου Ψε ྫྷ͢ ֓೦ λοϓ ΤϯυϢʔβ ѹྗ
Ḻ ϔου Ψε ྫྷ͢ ֓೦ λοϓ ΤϯυϢʔβ ѹྗ ։์
Ḻ ϔου Ψε ྫྷ͢ ֓೦ λοϓ ΤϯυϢʔβ ѹྗ ։์ ѹʹΑͬͯӷ͕ग़Δ
Ḻ ϔου Ψε ྫྷ͢ ֓೦ λοϓ ΤϯυϢʔβ ѹྗ Happy!!
Θ͔Γ·ͨ͠Ͷʁ
؆୯Ͱʁ
ͱ͍͏Θ͚Ͱ ͭ͘Γ·͢ (ͭ͘Γ͓͖Ͱ͢)
ίϯϙʔωϯτ֓؍ Ḻ ϔου Ψε ྫྷ͢ ֓೦ λοϓ ΤϯυϢʔβ
ੜḺ
None
ੜḺ -ञʹཔΉͱങ͑·͢ -ඇίϛϡͷਓΧΫϠε ͱ͔ͰཔΈ·͠ΐ͏
ੜḺϚδَ (ͦ͏Ͱͳ͍)
None
None
ίϯϙʔωϯτ֓؍ Ḻ ϔου Ψε ྫྷ͢ ֓೦ λοϓ ΤϯυϢʔβ
ϔου
None
ϔου -ੜḺͱͷΠϯλʔϑΣʔε -ΨεͱͷΠϯλʔϑΣʔε Ͱ͋Δ -ѹΛ༩͑ͭͭӷΛग़͢ਓ
ϔουϚδَ (ͦ͏Ͱͳ͍)
ΩϦϯḺͱ ΞαώḺ͕͋Δ
ϔουͷҧ͍ -ΩϦϯḺ༻ͷϔουͱ ΞαώḺ༻ͷϔου͕͋Δ -ޱۚͷܗঢ়͕ҧ͏ -ޓੑ͕ *ແ͍*
ΩϦϯ ΩϦϯϔου Ξαώ Ξαώϔου αϯτϦʔ Ξαώϔου αοϙϩ Ξαώϔου
ΩϦϯ ΩϦϯϔου Ξαώ Ξαώϔου αϯτϦʔ Ξαώϔου αοϙϩ Ξαώϔου
ΩϦϯ ΩϦϯϔου Ξαώ Ξαώϔου αϯτϦʔ Ξαώϔου αοϙϩ Ξαώϔου ͳͥͳͷͩ……
߹ͬͨϔουΛ ༻ҙ͠·͠ΐ͏
ίϯϙʔωϯτ֓؍ Ḻ ϔου Ψε ྫྷ͢ ֓೦ λοϓ ΤϯυϢʔβ
Ψε
None
Ψε -ϔουͱଓͯ͠ΨεΛ ૹΔਓ -ΨεͱͷΠϯλϑΣʔε ٴͼѹྗௐث
ΨεϚδَ (ͦ͏Ͱͳ͍)
ͷϘϯϕ ࣮ෆཁ
None
ίϯύΫτΨε ͕͑Δ
None
STOP!!!!!!
ίϯύΫτΨεΛ ͏ͨΊʹ ઐ༻ͷΞλονϝϯτ ͕ඞཁ
None
͜Ε͕ແ͍ͱ࿙Ε·͢
STOP!!!!!!!!!!!!!!!!!!!!!!
खͰదʹΞλονϝ ϯτకΊΔͱ࿙Ε·͢
ϞϯΩʔϨϯνͰ కΊ·͠ΐ͏ (Ψε1ຊϩετ͠·ͨ͠)
ίϯϙʔωϯτ֓؍ Ḻ ϔου Ψε ྫྷ͢ ֓೦ λοϓ ΤϯυϢʔβ
ྫྷ͢෦
None
ྫྷ͢෦ -ಔͷύΠϓΛྫྷ͢ -ϏʔϧΛྫྷ͑ͨಔͷύΠϓ ʹ௨͢ -ྫྷ͑Δʂʂʂʂ -ͱ͍͏Έ
None
ྫྷ͢෦ -ද໘ੵ͕ଟ͚Εଟ͍΄ Ͳྑ͍ͷͰίΠϧঢ়ʹۂ ͛Δ
ίϯϙʔωϯτ֓؍ Ḻ ϔου Ψε ྫྷ͢ ֓೦ λοϓ ΤϯυϢʔβ
λοϓ
None
λοϓ -Ϗʔϧग़͢ޱͷ෦Ͱ͢ -Ҏ্
ίϯϙʔωϯτ֓؍ Ḻ ϔου Ψε ྫྷ͢ ֓೦ λοϓ ΤϯυϢʔβ
νϡʔϒ
νϡʔϒ -֤ίϯϙʔωϯτΛଓ ͢Δ܅ -Micro servicesʹ͓͚ΔHTTP Έ͍ͨͳΜͰ͢
νϡʔϒ -ͳΔ͘ݻ͍ͷΛ͍ ·͠ΐ͏ -ݻ͘ͳ͍ͱϫϯλονܧ खͰ͑ͳ͍
νϡʔϒ -ࠔͬͨΒϗʔϜηϯλʔͰ ങ͍·͠ΐ͏
None
ܨ͗߹Θͤͯ ͍͖·͠ΐ͏
None
None
None
None
None
MEMO: ͜͜Ͱݱ͕ ग़·͢
Ͱ͖ͨͰ͖ͨ
͔͜͠͠ΕͰ ͨͩͷϏ ʔϧαʔόʔ
ͬͱศརʹ ͠·͠ΐ͏
ͱ͍͏Θ͚Ͱ HTTPͷ෦
લఏ
Perl 5Ͱॻ͍ͯ·͢
Why?
None
That's all
Թཧ
Թཧ Ϛδॏཁ
ొਓ -Raspberry Pi -DS18B20 (Թηϯα) -Mackerel
None
ొਓ -Raspberry Pi -DS18B20 (Թηϯα) -Mackerel
ొਓ -Raspberry Pi -DS18B20 (Թηϯα) -Mackerel ͜ΕΛαʔόʔʹೖΕ͓ͯ͘
֓؍ Beer Server DS18B20 3.3V Temperature Custom Metrics (Temperature)
None
None
-άϥϑग़͢
None
None
MackerelͰ ͋ΒΏΔαʔόʔͷ ࢹ͕Ͱ͖Δʂ
None
࣏҆ҡ࣋ػೳ
ະऀ͕ञΛ ҿΉͱേͤΒΕ·͢
ະऀ͕ ञΛҿΊΔঢ়گΛ ࡞Βͳ͚Εྑ͍
ະऀ͕ ञΛҿΊΔঢ়گΛ ࡞Βͳ͚Εྑ͍ ઃఆΑΓن (Convention over Configuration)
ྸ͕20ࡀʹຬͪ ͍ͯͳ͍ਓ 403͠·͠ΐ͏
۩ମతʹ => ະऀͱࢥ͖͠ ਓؒʹ ϏʔϧΛग़͞ͳ͍
ొਓ -Raspberry Pi -C270 (Web camera) -Microsoft Azure -ιϨϊΠυόϧϒ
ྸਪఆ
Azure Face API
None
Azure Face API -إը૾Λ͛Δͱͦͷը ૾ͷϝλใΈ͍ͨͳ ͷ͕औΕΔ -ࠓճྸΛ͏ -ΣϒΧϜͰࡱͬͨը૾ Λ༻
None
͜ΕͰإʹΑͬͯ ྸใ͕Θ͔Δ
࣮ࡍʹαʔόࢭΊΔ ͷͲ͏͢Δʁ
ιϨϊΠυόϧϒ
ιϨϊΠυόϧϒ - ి࣓ੴʢιϨϊΠυʣͷ࣓ྗΛ༻͍ͯϓ ϥϯδϟͱݺΕΔమยΛಈ͔͢͜ͱͰ หʢόϧϒʣΛ։ด͢ΔΈΛ࣋ͭ ͷͰɺྲྀମʢ༉ѹɺۭѹɺਫѹͳͲʣΛ ௨͢ͰͷྲྀΕͷ։ด੍ޚʹ༻͍ΒΕΔ (https://ja.wikipedia.org/wiki/ %E9%9B%BB%E7%A3%81%E5%BC%81)
ιϨϊΠυόϧϒ https://upload.wikimedia.org/wikipedia/commons/thumb/6/6f/Solenoid_Valve.svg/300px-Solenoid_Valve.svg.png
֓؍ Beer Server out Ḻ ϔου λοϓ ιϨϊΠυ όϧϒ Control
C270 Photo Face API
֓؍ Beer Server out Ḻ ϔου λοϓ ιϨϊΠυ όϧϒ Control
C270 Photo Face API
֓؍ Beer Server out Ḻ ϔου λοϓ ιϨϊΠυ όϧϒ Control
C270 Photo Face API ͜ͷ෦ σϑΥͩͱಈ͖·ͤΜ
ιϨϊΠυόϧϒͱϥζύΠ - ιϨϊΠυόϧϒ͍͍ͩͨ12Vۦಈ - ϥζύΠͷग़ྗ5V/3.3V - Γͳ͍ʂʂ
ঢѹ
None
ͦΕͰແཧ
ιϨϊΠυόϧϒͱϥζύΠ ͱঢѹث - ঢѹث5Vۦಈ - ҙͰON/OFFͰ͖ΔϥζύΠͷGPIO 3.3V - Γͳ͍ʂʂʂ
ιϨϊΠυόϧϒͱϥζύΠ ͱঢѹث - ৗʹONͷ5VͷPINΛ͍͚͑Δ - ͔ͦ͠͠ΕͰεΠονग़དྷͳ͍ - ͏ͩΊͳͷ͔
NPNτϥϯδελ
None
!!!!!!!
- Base͕HighʹͳΔͱ - Collectorͷిྲྀ͕ - ૿෯͞Εͯ - EmitterʹྲྀΕΔ
- BaseʹGPIOܨ͍Ͱ - CollectorΛGNDʹܨ͙ͱ - GPIO͕Highͷ࣌Emitter͕ GNDʹམͪΔ
֓؍ Beer Server out Ḻ ϔου λοϓ ιϨϊΠυ όϧϒ Control
C270 Photo Face API
ৄࡉ ιϨϊΠυ όϧϒ 2SC1815 GND GPIO ঢѹث 5V Emitter GND
12V
ৄࡉ ιϨϊΠυ όϧϒ 2SC1815 GND GPIO ঢѹث 5V Emitter GND
12V High
ৄࡉ ιϨϊΠυ όϧϒ 2SC1815 GND GPIO ঢѹث 5V Emitter GND
12V High
ৄࡉ ιϨϊΠυ όϧϒ 2SC1815 GND GPIO ঢѹث 5V Emitter GND
12V High
ৄࡉ ιϨϊΠυ όϧϒ 2SC1815 GND GPIO ঢѹث 5V Emitter GND
12V High
ղܾʂ
ૢ࡞͜Ε͚ͩͰՄೳ
σϞ
ࠓޙ
ࠓޙ - ྔࢹ͕Ͱ͖ͳ͔ͬͨͷͰ ͳΜΒ͔ͷํ๏ͰΓ͍ͨ - ϒϨουϘʔυΊ͍ͨ - ιϨϊΠυόϧϒ͑ HTTPӽ͠ʹϦϞʔτͰϏʔϧͷ ڙڅ͕ग़དྷͦ͏ͳͷͰΔ
·ͱΊ
·ͱΊ - Ϗʔϧαʔό࡞ΕΔ
·ͱΊ - ࠓճͷ૯ίετ: 89,343JPY
͚ͨͯ͘͢Ε
Q?