Slide 1

Slide 1 text

Brewfactory: full-stack homebrew Peter Marton @slashdotpeter

Slide 2

Slide 2 text

$ whoami - work: RisingStack, Inc. - twitter: slashdotpeter - email: [email protected] - blog: http://blog.risingstack.com

Slide 3

Slide 3 text

What is Brewfactory? - semi-automated brewing machine - hobby project - open-source project

Slide 4

Slide 4 text

How to brew beer? (BIAB way)

Slide 5

Slide 5 text

add water and malt

Slide 6

Slide 6 text

hold temperature levels

Slide 7

Slide 7 text

boil it and hops

Slide 8

Slide 8 text

cool it fermentation

Slide 9

Slide 9 text

bottle it enjoy!

Slide 10

Slide 10 text

brewing sucks? … automate it!

Slide 11

Slide 11 text

Brew like a boss

Slide 12

Slide 12 text

What’s on the technology side?

Slide 13

Slide 13 text

JavaScript everywhere 2007 2015 HW Microcontroller IoT devices from $10 Control HW C, C++ Node.js: Johnny-Five, Tessel Web server .net, Java, PHP Node.js Database SQL MongoDB: JS API WebUI JavaScript: jQuery JavaScript: SPA (React, Angular etc.)

Slide 14

Slide 14 text

Node.js in IoT - vibrant community - extreme modularity - high performance

Slide 15

Slide 15 text

Johnny-Five - “jQuery of the IoT” - servo.to( 90 ); button.on(‘down’, fn); - Arduino compatible boards - Node.js

Slide 16

Slide 16 text

Our system

Slide 17

Slide 17 text

Hardware parts - digital temp. sensor - DS18B20 (1-Wire) - heating elements - PWM (pulse-width modulation) - Relay (solid state) - controller - PID

Slide 18

Slide 18 text

IoT device: RaspberryPi - credit-card sized - linux - usb ports - ethernet - NO built-in Wi-Fi - any languages

Slide 19

Slide 19 text

IoT device: SparkCore - pint-sized - arduino compatible - built-in Wi-Fi - C++ - Spark’s cloud

Slide 20

Slide 20 text

Architecture

Slide 21

Slide 21 text

Architecture

Slide 22

Slide 22 text

BrewCore - Node.js ~0.12 / io.js - Koa - WebSockets - Spark’s cloud - https://github.com/BrewCore

Slide 23

Slide 23 text

BrewMobile - Swift - Reactive Cocoa - WebSockets by @vasarhelyia

Slide 24

Slide 24 text

BrewUI - Isomorphic - React app with Flux - CommonJS (Node style) - available as npm module - https://github.com/BrewUI

Slide 25

Slide 25 text

Isomorphic JavaScript “JavaScript code that can be shared between environments.” - Spike Brehm

Slide 26

Slide 26 text

Why is it good for me? - power of server rendering - SEO - legacy support - speed of Single Page Apps (SPA)

Slide 27

Slide 27 text

Isomorphic server side

Slide 28

Slide 28 text

Isomorphic client side

Slide 29

Slide 29 text

Isomorphic challenges - data fetching: talk about this later - init app on both sides - singleton app on client -> request scoped on server

Slide 30

Slide 30 text

Data fetching problem - environment specific problems - should be shimmed - same functionality and interface - different implementation: AJAX / WS / DB call / micro-service / .. - “Full Stack Flux” - Pete Hunt: React.js Conf 2015 - Full Stack Flux

Slide 31

Slide 31 text

Demo (http://brewcore-demo.herokuapp.com)

Slide 32

Slide 32 text

Contribute! github.com/brewfactory

Slide 33

Slide 33 text

Q&A Thank you! http://brewfactory.org