6. Beer brewing process - simplified
Mashing
• Extracting sugars from malted barley
• Separating wort from grains
Boiling
• Boiling wort
• Adding hops, spices or other additives
Fermenting
• Adding yeast to boiled (and cooled) wort
• Fermenting at a specific temperature until all sugar is converted
Packaging
• Getting beer into some vessel (Bottle or keg usually)
• Enjoy once beer is carbonated
7. Project Hoptimus - Requirements
Recipe
•Import recipe (BeerXML standard)
•Display overview and current brew process
Mashing
•Pump in correct amount of water
•Monitor temperature for mash duration
•Pump wort to boil kettle
Boil
•Boil water for boil duration
•Alarms to add hops / additives
•Pump wort to fermenter once wort is cooled
Ferment
•Monitor and control temperature for duration of fermentation
•Monitor specific gravity to determine when fermentation is done
•Log all measurements to cloud database
8. Challenges when developing IOT applications
> Hardware is difficult to emulate
> Testing physical sensors is hard
> God objects abound in Android
> Behaviour tends to spread across classes
10. Hexagonal architecture
> Not a silver bullet
> Separates contract from implementation
> Makes code easier to test
> Allows running your IOT app on an emulator
12. Hexagonal architecture on Android Things
> We need to create a standard Android Things project and make two
simple changes:
1. Add a provided dependency to your build.gradle
2. Add an intent filter to your manifest
> For each service / piece of hardware
1. Create a port (the contract)
2. Create an adapter for a mock implementation
3. Create an adapter for the real implementation