Slide 1

Slide 1 text

Open Beer Server theory and the implementation @moznion

Slide 2

Slide 2 text

@moznion

Slide 3

Slide 3 text

No content

Slide 4

Slide 4 text

օ͞ΜϏʔϧ͸
 ޷͖Ͱ͔͢ʂʂ

Slide 5

Slide 5 text

օ͞ΜੜϏʔϧ͸ ޷͖Ͱ͔͢ʂʂ

Slide 6

Slide 6 text

ͦ͏Ͱ΋ͳ͍ਓ͸ ͜ͷൃදඍົͰ͢

Slide 7

Slide 7 text

ΤϯδχΞ Ͱ͔͢ʂʂ

Slide 8

Slide 8 text

ͦ͏Ͱ΋ͳ͍ਓ͸ ྑ͍ػձͰ͢

Slide 9

Slide 9 text

αʔόΤϯδχΞ ʹͳΕΔʂʂ

Slide 10

Slide 10 text

Ϗʔϧαʔόʔ ͷ͸ͳ͠

Slide 11

Slide 11 text

Ϗʔϧαʔόʔ ͱ͸……ੈքͱ͸……

Slide 12

Slide 12 text

https://www.flickr.com/photos/50507715@N00/2892136399

Slide 13

Slide 13 text

࢓૊Έɼ
 ཧʹ͍ͭͯ……

Slide 14

Slide 14 text

࢓૊Έ is easy

Slide 15

Slide 15 text

ίϯϙʔωϯτ֓؍ Ḻ ϔου Ψε ྫྷ΍͢
 ֓೦ λοϓ ΤϯυϢʔβ

Slide 16

Slide 16 text

ίϯϙʔωϯτ֓؍ Ḻ ϔου Ψε ྫྷ΍͢
 ֓೦ λοϓ ΤϯυϢʔβ PDS
 (Presentation Domain Separation) Έ͍ͨͳ΋Μ΍ʂʂ

Slide 17

Slide 17 text

Θ͔Γ·͔ͨ͠ʁ

Slide 18

Slide 18 text

͸͍

Slide 19

Slide 19 text

Ḻ ϔου Ψε ྫྷ΍͢
 ֓೦ λοϓ ΤϯυϢʔβ ѹྗ

Slide 20

Slide 20 text

Ḻ ϔου Ψε ྫྷ΍͢
 ֓೦ λοϓ ΤϯυϢʔβ ѹྗ

Slide 21

Slide 21 text

Ḻ ϔου Ψε ྫྷ΍͢
 ֓೦ λοϓ ΤϯυϢʔβ ѹྗ ։์

Slide 22

Slide 22 text

Ḻ ϔου Ψε ྫྷ΍͢
 ֓೦ λοϓ ΤϯυϢʔβ ѹྗ ։์ ѹʹΑͬͯӷ͕ग़Δ

Slide 23

Slide 23 text

Ḻ ϔου Ψε ྫྷ΍͢
 ֓೦ λοϓ ΤϯυϢʔβ ѹྗ Happy!!

Slide 24

Slide 24 text

Θ͔Γ·ͨ͠Ͷʁ

Slide 25

Slide 25 text

؆୯Ͱ͸ʁ

Slide 26

Slide 26 text

ͱ͍͏Θ͚Ͱ ͭ͘Γ·͢ (ͭ͘Γ͓͖Ͱ͢)

Slide 27

Slide 27 text

ίϯϙʔωϯτ֓؍ Ḻ ϔου Ψε ྫྷ΍͢
 ֓೦ λοϓ ΤϯυϢʔβ

Slide 28

Slide 28 text

ੜḺ

Slide 29

Slide 29 text

No content

Slide 30

Slide 30 text

ੜḺ -ञ԰ʹཔΉͱങ͑·͢ -ඇίϛϡͷਓ͸ΧΫϠε ͱ͔ͰཔΈ·͠ΐ͏

Slide 31

Slide 31 text

ੜḺϚδَ໳ (ͦ͏Ͱ΋ͳ͍)

Slide 32

Slide 32 text

No content

Slide 33

Slide 33 text

No content

Slide 34

Slide 34 text

ίϯϙʔωϯτ֓؍ Ḻ ϔου Ψε ྫྷ΍͢
 ֓೦ λοϓ ΤϯυϢʔβ

Slide 35

Slide 35 text

ϔου

Slide 36

Slide 36 text

No content

Slide 37

Slide 37 text

ϔου -ੜḺͱͷΠϯλʔϑΣʔε -ΨεͱͷΠϯλʔϑΣʔε Ͱ΋͋Δ -ѹΛ༩͑ͭͭӷΛग़͢ਓ

Slide 38

Slide 38 text

ϔουϚδَ໳ (ͦ͏Ͱ΋ͳ͍)

Slide 39

Slide 39 text

ΩϦϯḺͱ
 ΞαώḺ͕͋Δ

Slide 40

Slide 40 text

ϔουͷҧ͍ -ΩϦϯḺ༻ͷϔουͱ
 ΞαώḺ༻ͷϔου͕͋Δ -ޱۚͷܗঢ়͕ҧ͏ -ޓ׵ੑ͕ *ແ͍*

Slide 41

Slide 41 text

ΩϦϯ ΩϦϯϔου Ξαώ Ξαώϔου αϯτϦʔ Ξαώϔου αοϙϩ Ξαώϔου

Slide 42

Slide 42 text

ΩϦϯ ΩϦϯϔου Ξαώ Ξαώϔου αϯτϦʔ Ξαώϔου αοϙϩ Ξαώϔου

Slide 43

Slide 43 text

ΩϦϯ ΩϦϯϔου Ξαώ Ξαώϔου αϯτϦʔ Ξαώϔου αοϙϩ Ξαώϔου ͳͥͳͷͩ……

Slide 44

Slide 44 text

߹ͬͨϔουΛ ༻ҙ͠·͠ΐ͏

Slide 45

Slide 45 text

ίϯϙʔωϯτ֓؍ Ḻ ϔου Ψε ྫྷ΍͢
 ֓೦ λοϓ ΤϯυϢʔβ

Slide 46

Slide 46 text

Ψε

Slide 47

Slide 47 text

No content

Slide 48

Slide 48 text

Ψε -ϔουͱ઀ଓͯ͠ΨεΛ ૹΔਓ -ΨεͱͷΠϯλϑΣʔε ٴͼѹྗௐ੔ث

Slide 49

Slide 49 text

ΨεϚδَ໳ (ͦ͏Ͱ΋ͳ͍)

Slide 50

Slide 50 text

྘ͷϘϯϕ͸ ࣮͸ෆཁ

Slide 51

Slide 51 text

No content

Slide 52

Slide 52 text

ίϯύΫτΨε ͕࢖͑Δ

Slide 53

Slide 53 text

No content

Slide 54

Slide 54 text

STOP!!!!!!

Slide 55

Slide 55 text

ίϯύΫτΨεΛ
 ࢖͏ͨΊʹ͸ ઐ༻ͷΞλονϝϯτ
 ͕ඞཁ

Slide 56

Slide 56 text

No content

Slide 57

Slide 57 text

͜Ε͕ແ͍ͱ࿙Ε·͢

Slide 58

Slide 58 text

STOP!!!!!!!!!!!!!!!!!!!!!!

Slide 59

Slide 59 text

खͰద౰ʹΞλονϝ ϯτకΊΔͱ࿙Ε·͢

Slide 60

Slide 60 text

ϞϯΩʔϨϯνͰ
 కΊ·͠ΐ͏ (Ψε1ຊϩετ͠·ͨ͠)

Slide 61

Slide 61 text

ίϯϙʔωϯτ֓؍ Ḻ ϔου Ψε ྫྷ΍͢
 ֓೦ λοϓ ΤϯυϢʔβ

Slide 62

Slide 62 text

ྫྷ΍͢෦෼

Slide 63

Slide 63 text

No content

Slide 64

Slide 64 text

ྫྷ΍͢෦෼ -ಔͷύΠϓΛྫྷ΍͢ -ϏʔϧΛྫྷ͑ͨಔͷύΠϓ ʹ௨͢ -ྫྷ͑Δʂʂʂʂ -ͱ͍͏࢓૊Έ

Slide 65

Slide 65 text

No content

Slide 66

Slide 66 text

ྫྷ΍͢෦෼ -ද໘ੵ͕ଟ͚Ε͹ଟ͍΄ Ͳྑ͍ͷͰίΠϧঢ়ʹۂ ͛Δ

Slide 67

Slide 67 text

ίϯϙʔωϯτ֓؍ Ḻ ϔου Ψε ྫྷ΍͢
 ֓೦ λοϓ ΤϯυϢʔβ

Slide 68

Slide 68 text

λοϓ

Slide 69

Slide 69 text

No content

Slide 70

Slide 70 text

λοϓ -Ϗʔϧग़͢ޱͷ෦෼Ͱ͢ -Ҏ্

Slide 71

Slide 71 text

ίϯϙʔωϯτ֓؍ Ḻ ϔου Ψε ྫྷ΍͢
 ֓೦ λοϓ ΤϯυϢʔβ

Slide 72

Slide 72 text

νϡʔϒ

Slide 73

Slide 73 text

νϡʔϒ -֤ίϯϙʔωϯτΛ઀ଓ ͢Δ܅ -Micro servicesʹ͓͚ΔHTTP Έ͍ͨͳ΋ΜͰ͢

Slide 74

Slide 74 text

νϡʔϒ -ͳΔ΂͘ݻ͍΋ͷΛ࢖͍ ·͠ΐ͏ -ݻ͘ͳ͍ͱϫϯλονܧ खͰ࢖͑ͳ͍

Slide 75

Slide 75 text

νϡʔϒ -ࠔͬͨΒϗʔϜηϯλʔͰ ങ͍·͠ΐ͏

Slide 76

Slide 76 text

No content

Slide 77

Slide 77 text

ܨ͗߹Θͤͯ
 ͍͖·͠ΐ͏

Slide 78

Slide 78 text

No content

Slide 79

Slide 79 text

No content

Slide 80

Slide 80 text

No content

Slide 81

Slide 81 text

No content

Slide 82

Slide 82 text

No content

Slide 83

Slide 83 text

MEMO: ͜͜Ͱݱ෺͕ ग़·͢

Slide 84

Slide 84 text

Ͱ͖ͨͰ͖ͨ

Slide 85

Slide 85 text

͔͜͠͠ΕͰ͸ ͨͩͷϏ ʔϧαʔόʔ

Slide 86

Slide 86 text

΋ͬͱศརʹ
 ͠·͠ΐ͏

Slide 87

Slide 87 text

ͱ͍͏Θ͚Ͱ HTTPͷ෦෼

Slide 88

Slide 88 text

લఏ

Slide 89

Slide 89 text

Perl 5Ͱॻ͍ͯ·͢

Slide 90

Slide 90 text

Why?

Slide 91

Slide 91 text

No content

Slide 92

Slide 92 text

That's all

Slide 93

Slide 93 text

Թ౓؅ཧ

Slide 94

Slide 94 text

Թ౓؅ཧ Ϛδॏཁ

Slide 95

Slide 95 text

ొ৔ਓ෺ -Raspberry Pi -DS18B20 (Թ౓ηϯα) -Mackerel

Slide 96

Slide 96 text

No content

Slide 97

Slide 97 text

ొ৔ਓ෺ -Raspberry Pi -DS18B20 (Թ౓ηϯα) -Mackerel

Slide 98

Slide 98 text

ొ৔ਓ෺ -Raspberry Pi -DS18B20 (Թ౓ηϯα) -Mackerel ͜ΕΛαʔόʔ಺ʹೖΕ͓ͯ͘

Slide 99

Slide 99 text

֓؍ Beer Server DS18B20 3.3V Temperature Custom Metrics (Temperature)

Slide 100

Slide 100 text

No content

Slide 101

Slide 101 text

No content

Slide 102

Slide 102 text

-άϥϑग़͢

Slide 103

Slide 103 text

No content

Slide 104

Slide 104 text

No content

Slide 105

Slide 105 text

MackerelͰ ͋ΒΏΔαʔόʔͷ ؂ࢹ͕Ͱ͖Δʂ

Slide 106

Slide 106 text

No content

Slide 107

Slide 107 text

࣏҆ҡ࣋ػೳ

Slide 108

Slide 108 text

ະ੒೥ऀ͕ञΛ ҿΉͱേͤΒΕ·͢

Slide 109

Slide 109 text

ະ੒೥ऀ͕ ञΛҿΊΔঢ়گΛ ࡞Βͳ͚Ε͹ྑ͍

Slide 110

Slide 110 text

ະ੒೥ऀ͕ ञΛҿΊΔঢ়گΛ ࡞Βͳ͚Ε͹ྑ͍ ઃఆΑΓن໿ (Convention over Configuration)

Slide 111

Slide 111 text

೥ྸ͕20ࡀʹຬͪ ͍ͯͳ͍ਓ͸ 403͠·͠ΐ͏

Slide 112

Slide 112 text

۩ମతʹ
 => ະ੒೥ऀͱࢥ͖͠ ਓؒʹ͸ ϏʔϧΛग़͞ͳ͍

Slide 113

Slide 113 text

ొ৔ਓ෺ -Raspberry Pi -C270 (Web camera) -Microsoft Azure -ιϨϊΠυόϧϒ

Slide 114

Slide 114 text

೥ྸਪఆ

Slide 115

Slide 115 text

Azure Face API

Slide 116

Slide 116 text

No content

Slide 117

Slide 117 text

Azure Face API -إը૾Λ౤͛Δͱͦͷը ૾ͷϝλ৘ใΈ͍ͨͳ΋ ͷ͕औΕΔ -ࠓճ͸೥ྸΛ࢖͏ -΢ΣϒΧϜͰࡱͬͨը૾ Λ࢖༻

Slide 118

Slide 118 text

No content

Slide 119

Slide 119 text

͜ΕͰإʹΑͬͯ ೥ྸ৘ใ͕Θ͔Δ

Slide 120

Slide 120 text

࣮ࡍʹαʔόࢭΊΔ ͷ͸Ͳ͏͢Δʁ

Slide 121

Slide 121 text

ιϨϊΠυόϧϒ

Slide 122

Slide 122 text

ιϨϊΠυόϧϒ - ి࣓ੴʢιϨϊΠυʣͷ࣓ྗΛ༻͍ͯϓ ϥϯδϟͱݺ͹ΕΔమยΛಈ͔͢͜ͱͰ หʢόϧϒʣΛ։ด͢Δ࢓૊ΈΛ࣋ͭ΋ ͷͰɺྲྀମʢ༉ѹɺۭѹɺਫѹͳͲʣΛ ௨͢؅ͰͷྲྀΕͷ։ด੍ޚʹ༻͍ΒΕΔ
 (https://ja.wikipedia.org/wiki/ %E9%9B%BB%E7%A3%81%E5%BC%81)

Slide 123

Slide 123 text

ιϨϊΠυόϧϒ https://upload.wikimedia.org/wikipedia/commons/thumb/6/6f/Solenoid_Valve.svg/300px-Solenoid_Valve.svg.png

Slide 124

Slide 124 text

֓؍ Beer Server out Ḻ ϔου λοϓ ιϨϊΠυ όϧϒ Control C270 Photo Face API

Slide 125

Slide 125 text

֓؍ Beer Server out Ḻ ϔου λοϓ ιϨϊΠυ όϧϒ Control C270 Photo Face API

Slide 126

Slide 126 text

֓؍ Beer Server out Ḻ ϔου λοϓ ιϨϊΠυ όϧϒ Control C270 Photo Face API ͜ͷ෦෼ σϑΥͩͱಈ͖·ͤΜ

Slide 127

Slide 127 text

ιϨϊΠυόϧϒͱϥζύΠ - ιϨϊΠυόϧϒ͸͍͍ͩͨ12Vۦಈ - ϥζύΠͷग़ྗ͸5V/3.3V - ଍Γͳ͍ʂʂ

Slide 128

Slide 128 text

ঢѹ

Slide 129

Slide 129 text

No content

Slide 130

Slide 130 text

ͦΕͰ΋ແཧ

Slide 131

Slide 131 text

ιϨϊΠυόϧϒͱϥζύΠ
 ͱঢѹث - ঢѹث͸5Vۦಈ - ೚ҙͰON/OFFͰ͖ΔϥζύΠͷGPIO ͸3.3V - ଍Γͳ͍ʂʂʂ

Slide 132

Slide 132 text

ιϨϊΠυόϧϒͱϥζύΠ
 ͱঢѹث - ৗʹONͷ5VͷPINΛ࢖͑͹͍͚Δ - ͔ͦ͠͠ΕͰ͸εΠονग़དྷͳ͍ - ΋͏ͩΊͳͷ͔

Slide 133

Slide 133 text

NPNτϥϯδελ

Slide 134

Slide 134 text

No content

Slide 135

Slide 135 text

!!!!!!!

Slide 136

Slide 136 text

- Base͕HighʹͳΔͱ - Collectorͷిྲྀ͕ - ૿෯͞Εͯ - EmitterʹྲྀΕΔ

Slide 137

Slide 137 text

- BaseʹGPIOܨ͍Ͱ - CollectorΛGNDʹܨ͙ͱ - GPIO͕Highͷ࣌Emitter͕
 GNDʹམͪΔ

Slide 138

Slide 138 text

֓؍ Beer Server out Ḻ ϔου λοϓ ιϨϊΠυ όϧϒ Control C270 Photo Face API

Slide 139

Slide 139 text

ৄࡉ ιϨϊΠυ όϧϒ 2SC1815 GND GPIO ঢѹث 5V Emitter GND 12V

Slide 140

Slide 140 text

ৄࡉ ιϨϊΠυ όϧϒ 2SC1815 GND GPIO ঢѹث 5V Emitter GND 12V High

Slide 141

Slide 141 text

ৄࡉ ιϨϊΠυ όϧϒ 2SC1815 GND GPIO ঢѹث 5V Emitter GND 12V High

Slide 142

Slide 142 text

ৄࡉ ιϨϊΠυ όϧϒ 2SC1815 GND GPIO ঢѹث 5V Emitter GND 12V High

Slide 143

Slide 143 text

ৄࡉ ιϨϊΠυ όϧϒ 2SC1815 GND GPIO ঢѹث 5V Emitter GND 12V High

Slide 144

Slide 144 text

ղܾʂ

Slide 145

Slide 145 text

ૢ࡞͸͜Ε͚ͩͰՄೳ

Slide 146

Slide 146 text

σϞ

Slide 147

Slide 147 text

ࠓޙ

Slide 148

Slide 148 text

ࠓޙ - ࢒ྔ؂ࢹ͕Ͱ͖ͳ͔ͬͨͷͰ
 ͳΜΒ͔ͷํ๏Ͱ΍Γ͍ͨ - ϒϨουϘʔυ΍Ί͍ͨ - ιϨϊΠυόϧϒ࢖͑͹
 HTTPӽ͠ʹϦϞʔτͰϏʔϧͷ
 ڙڅ͕ग़དྷͦ͏ͳͷͰ΍Δ

Slide 149

Slide 149 text

·ͱΊ

Slide 150

Slide 150 text

·ͱΊ - Ϗʔϧαʔό͸࡞ΕΔ

Slide 151

Slide 151 text

·ͱΊ - ࠓճͷ૯ίετ: 89,343JPY

Slide 152

Slide 152 text

͚ͨͯ͘͢Ε

Slide 153

Slide 153 text

Q?