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

Firebaseで作るIoTバックエンド

Yosuke Onoue
February 12, 2017

 Firebaseで作るIoTバックエンド

キノコがIoTについて勉強する会の発表資料です。

Yosuke Onoue

February 12, 2017
Tweet

More Decks by Yosuke Onoue

Other Decks in Technology

Transcript

  1. ᛔ૩奧Օ • ͠΄͜͞ (@_likr) • Ղ᮷य़਍ ਍檭ᣟݳᣟݳරᙙᎸᑪവ昲ψЀόЄ
 ඲ᒽ΄͵Η΄ᑀ਍ϳϘϐϕ ᇙਧۗර •

    ૡ਍Ꮈᑪᑀ΄櫮䶲ૡ਍䌑ධ͹ͼ
 ;ͩΣΨץԧͭ͵䶲ͯ͢Ρ • ng-kyoto̵GDGᐟ䜜̵KFUG • ݢ憙۸΄Ꮈᑪ;͡Κ͹ͼΡ • ͺͥ͹͵ https://egrid.jp/
  2. JavaScript;IoT • Node.js䌏䖕 • Arduino (Johnny-Five) • RaspberryPI • Intel

    Edison • Tessel • https://tessel.io/ • Firefox OS • ᜉ͚ΚͺͶ͹͵΄΁…
  3. JavaScriptͽIoTϢϸφόϐμ IoTϔϝαφ IoTϝϐμεЀϖ ϢϺЀϕεЀϖ Web / ίϤϷ
 ςЄϝ Webϣ϶γσ φϫЄϕϢζЀ

    ϔφμϕϐϤ
 ίϤϷ DB ᥴຉ ψЀςЄ ϷϯπЀ … ͩͩ΄扖 ͩͩΨ͚͡΁䮭ͯΡ͡Ҙ
  4. Firebase • Google΄൉׀ͯΡBaaS (Backend as a Service) • Ԇ΀䱛ᚆ •

    扯戣 • ϮЄϸ扯戣̵OAuth (Twitter̵Facebook̵…) • ϷίϸόαϭDB • Ϸίϸόαϭݶ๗ݢᚆ΀φκЄϫϹφDB • ϨφϓΰЀν • ᇿᛔϖϮαЀ̵HTTPS̵HTTP/2䌏䖕 • 僻ාϤ϶Ѐ͘Π
  5. ϕ϶ЀφϞα϶;ϯυϲЄϸϝЀϖ϶ • ϕ϶ЀφϞα϶ • JS΄䱛ᚆΨ䝭䔴̵ݘ͚ϣ϶γσΎ΄䌏䖕 • Babel̵TypeScript • ϯυϲЄϸϝЀϖ϶ •

    愢හ΄JSϢήαϸᒵΨ㶨Ӟ΄Ϣήαϸ΁Δ;ΗΡ • Node.jsφόαϸ΄ϤϺν϶ϬЀν(CommonJS) • Webpack • loaderͽϕ϶ЀφϞαϸΘݢᚆ
  6. Webpack • https://webpack.js.org/ • ϺЄύЄ̵Ϥ϶ναЀ΁ΞΡ䝭䔴 • Webpack 2 • Tree

    Shaking • webpack-dev-server • ϺЄθϸ樄咲አςЄϝ • ϶αϣϷϺЄϖ • BrowserHistoryΎ΄ϢζЄϸϝϐμ
  7. Babel • https://babeljs.io/ • ๋ෛ΄ES΄՛䯭ᒵΨES5΁䄜䟵 • ES(ECMA Script) • JavaScript΄䰤伛憒໒

    • https://kangax.github.io/compat-table/es6/ • plugin̵preset΁ΞΠ䝭䔴 • babel-preset-es2017̵babel-preset-react
  8. WebϢϺЀϕεЀϖϢϹЄϭϼЄμ • SPA(Single Page Application)΄ฦ݊ • JavaScript΁ΞΡUI䯤塈΄ྲ᯿͢䃀ے • DOM඙̵֢ϔЄόϢϺЄ΄愢櫏۸Ύ΄䌏䖕 •

    Angular̵ReactJS̵… ϒϥ΢β HTMLΨኞ౮ ίϤϷξЄτϴЀ
 ςЄϝ 8FCαʔό ϒϥ΢β ᶉጱϢήαϸΨᯈמ "1*αʔό JSONᒵΨኞ౮ ϚαϓΰϣίϤϷ 䕪๶΄WebίϤϷ SPA
  9. ReactJS • https://facebook.github.io/react/ • Facebook͢樄咲ͯΡηЄϤЀϊЄφ΄
 WebϢϺЀϕεЀϖView϶αϣ϶Ϸ • 㫪మDOM • DOM

    (Document Object Model) • ஠ᥝ΀᮱ړͶͧΨๅෛͯΡͩ;ͽ㵁ሲጱ΁ൈኮ • JSX • HTML϶αμ΀෈ဩͽViewΨਧ嬝ͯΡ
  10. 䯤౮ • RaspberryPI 1 TypeB • Firebase • 扯戣̵ϷίϸόαϭDB̵ϨφϓΰЀν •

    WebϢϺЀϕεЀϖ • ReactJS̵D3.js • webpack 2̵babel • https://github.com/likr/thermoviz
  11. ϔϯ • https://thermoviz.firebaseapp.com/ • ϔϯίθγЀϕ • [email protected] / kinoko_iot •

    ෛ憒ίθγЀϕ֢౮΅ګᴴӾ • Θֵ͚ͭ͵͚Ո΅्͠䟑ͧͥͶ͚ͫ…