MiniBrew: Brewing beer with Python

Video thumbnail (Frame 0) Video thumbnail (Frame 2205) Video thumbnail (Frame 3290) Video thumbnail (Frame 4767) Video thumbnail (Frame 6508) Video thumbnail (Frame 11454) Video thumbnail (Frame 12278) Video thumbnail (Frame 15920) Video thumbnail (Frame 16505) Video thumbnail (Frame 20164) Video thumbnail (Frame 24148) Video thumbnail (Frame 25325) Video thumbnail (Frame 26093) Video thumbnail (Frame 27300) Video thumbnail (Frame 27997) Video thumbnail (Frame 32342) Video thumbnail (Frame 33548) Video thumbnail (Frame 34309) Video thumbnail (Frame 35189) Video thumbnail (Frame 36004) Video thumbnail (Frame 36638) Video thumbnail (Frame 38294) Video thumbnail (Frame 38869)
Video in TIB AV-Portal: MiniBrew: Brewing beer with Python

Formal Metadata

MiniBrew: Brewing beer with Python
Title of Series
Part Number
Number of Parts
CC Attribution - NonCommercial - ShareAlike 3.0 Unported:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal and non-commercial purpose as long as the work is attributed to the author in the manner specified by the author or licensor and the work or content is shared also in adapted form only under the conditions of this license.
Release Date

Content Metadata

Subject Area
Francisco Igual - MiniBrew: Brewing beer with Python Dutch startup MiniBrew intends to disrupt the beer market by introducing an easy-to-use beer brewing machine controlled by a mobile app and communicating with a Python backend. Users want real-time insights in their brewing process, which presented some challenges in terms of architectural design. In this talk Elements Interactive's Chesco discusses best practices and pitfalls of the IoT architecture of MiniBrew by diving into message queues, protocol buffers and full- session logging. ----- The number one alcoholic drink in the world is undoubtedly beer. With the rise of craft beers, also homebrewing has become very popular in recent years, although it is still a complex and expensive hobby. Dutch startup MiniBrew intends to change that with their revolutionary beer brewing machine, which is controlled by a mobile app and communicates with a Python API backend. In this talk Chesco will share his ideas and experiences in utilizing Python in the backend architecture for the MiniBrew project he and his team are working on at MiniBrew's development partner Elements Interactive. As many IoT projects, the ingredients for MiniBrew are a device with a limited chipset and internet connection, a backend to store the data acting as the mastermind and a mobile app to allow end users to control the brewing process. The fact that we want users to know in real-time how their beer brewing process is doing presented some challenges which required us to come up with a competitive architecture that would both give real- time status updates and not saturate the server with continuous calls. Chesco discusses best practices and pitfalls in designing and developing IoT architecture by diving into the RabbitMQ message broker, the MQTT protocol and protocol buffers. He will focus on the REST API and CMS site written in Python, elaborating on high frequency data in the apps, scalability, full-session logging and overcoming common architectural challenges.
Architecture Building Projective plane Communications protocol Communications protocol Computer architecture
Process (computing) Computer animation Projective plane Virtual machine Expert system Mereology
Mobile app Presentation of a group Personal digital assistant Projective plane Moment (mathematics) Virtual machine Error message Connected space
Information Real number Multiplication sign Authentication Projective plane Workstation <Musikinstrument> Virtual machine Real-time operating system Interprozesskommunikation Computer animation Personal digital assistant Information security Information security Computing platform
Group action Greatest element Virtual machine Heat transfer Scalability Data transmission Interprozesskommunikation Formal language Product (business) Revision control Roundness (object) Different (Kate Ryan album) Software testing Physical system Condition number Computer architecture Area Dependent and independent variables Information Key (cryptography) Software developer Physical law Moment (mathematics) Projective plane Mathematical analysis Instance (computer science) Latent class model Interprozesskommunikation Fehlererkennung Connected space Arithmetic mean Message passing Process (computing) Computer animation Integrated development environment Personal digital assistant Point cloud Right angle Information security
Computer animation Decision theory Projective plane Phase transition Binary file Communications protocol Communications protocol
Server (computing) Group action Constraint (mathematics) Service (economics) Multiplication sign Range (statistics) Instance (computer science) Quality of service Event horizon Flow separation Computer programming Interprozesskommunikation Connected space Message passing Computer animation Integrated development environment Different (Kate Ryan album) Hypermedia Communications protocol Service-oriented architecture Communications protocol
Axiom of choice Group action Manufacturing execution system Multiplication sign Cloud computing Mereology First-person shooter Special unitary group Total S.A. Arm Variance Electronic meeting system Set (mathematics) Cuboid Addressing mode Arc (geometry) Metropolitan area network Service (economics) Mass Price index Instance (computer science) Windows Registry Uniform resource name Acoustic shadow Right angle Authorization Reverse engineering Windows Registry Mobile app Authentication Virtual machine 3 (number) Lace Rule of inference Product (business) Cache (computing) Authorization Message passing Conditional-access module Game theory Quicksort Computing platform Rule of inference Dependent and independent variables Gateway (telecommunications) Information Projective plane Coma Berenices Cartesian coordinate system CAN bus Computer animation Integrated development environment Personal digital assistant Service-oriented architecture
Authentication Web page Server (computing) Variety (linguistics) 1 (number) Real-time operating system Heat transfer Complete metric space Interprozesskommunikation Scalability Scalability Neuroinformatik Particle system Goodness of fit Computer configuration Computer animation Computer configuration Analogy Cuboid Communications protocol Service-oriented architecture Traffic reporting Form (programming)
Server (computing) Computer animation Information Real-time operating system Service-oriented architecture
Raw image format Code Multiplication sign Code 3 (number) Coma Berenices Connected space Message passing Computer animation Hypermedia Software testing Right angle Service-oriented architecture Absolute value Endliche Modelltheorie Service-oriented architecture Message passing Library (computing) Library (computing)
Degree (graph theory) Slide rule Computer configuration Computer configuration Multiplication sign
Axiom of choice Trail Information Gender Structural load System administrator Execution unit Virtual machine Gene cluster Amsterdam Ordnance Datum Price index Interprozesskommunikation Mereology Frame problem Scalability Revision control Message passing Computer configuration Computer animation Software framework Pattern language Information security Plug-in (computing) Condition number
Authentication Information Multiplication sign Authentication Coma Berenices Price index Mereology Connected space Arithmetic mean Computer animation Network topology Service-oriented architecture Plug-in (computing)
Authentication Message passing Computer animation Googol Buffer solution View (database) Buffer solution Coma Berenices Communications protocol Message passing System call Flow separation
Message passing Group action Latent heat Computer animation Information Googol Buffer solution Multiplication sign String (computer science) Buffer solution Coma Berenices Communications protocol
Email Number Message passing Computer animation String (computer science) Mobile Web Message passing Field (computer science) Data type Default (computer science)
Boss Corporation Dataflow Dependent and independent variables Server (computing) Block (periodic table) Projective plane Virtual machine Database Euler angles Element (mathematics) Computer programming Element (mathematics) Web 2.0 Architecture Computer architecture
Ocean current NP-hard Group action Multiplication sign Sheaf (mathematics) Water vapor Theory Scalability Machine vision Product (business) Array data structure Software testing Information security Form (programming) Computer architecture Information Unit testing Limit (category theory) Benchmark Performance appraisal Word Arithmetic mean Personal digital assistant Buffer solution Normal (geometry) Point cloud Pattern language Pressure Communications protocol Row (database)
welcome all to how to make semester with Python you have just think well mean sometimes well thank you for being here will come on uh my name is just what I am I have a cantilevered eliminating directly a company from the netherlands there and I'm going to talk about how to make that held the brew beer with by the morally so there are some things that I would like you to leave here to leave the room with some ideas and uh and some of them are I would like to know it you know how to build an IOT back and which are the technologies of protocols and the tools that are out there and I will do some comparative so you get to know what's out there and also we choose the 1 that may feed you best if you have to do a project like this the some again considerations that people will not tell you about ideas of a cantilever you need to make sure that uh they're taking into account it will be for running architecture for a narrative that can and of course you will learn how to brew beer actually you know what you want to leave the room you can skip 30 minutes so
1st uncertainty about Mary which is the project for which we developed this platform enable
is an amazing machine and you can actually root beer with it and you it will guide you since they're getting to know new recipes from mobile uh and then you can choose the recipe want to prove it will be sent to your home and then you will you would just bored ingredients into and and the mission will take care to do everything from the 1st and the last 4 or part of the process I will also teach you how to how to brew beer even if you have no idea at all but the and you will start being uh having no knowledge about it and after several bruises will be at the bill expert this machine comes with
a mobile app the mobile app is going to show real-time data of what the machine is doing at this moment it's going to show you what is the current temperature of the ingredients that are inside the machine what is occurring so what what is the target temperature in case you never recalled plays a very warm place and it takes longer to get to the temperature etc. to it will also help you to see if there is any error in your machine presidents it loses connectivity anything like this will also tell you and it will also allow you to start and stop the brewing session so we will actually only interact with emission from my so this is not everything that the project has of course because otherwise it wouldn't be here giving a talk so actually there by some the middle yes so well not only by some of the the mother tongue I will
focus the presentation on actually explain to you what you have to put in the middle of those 2 things for you toward him as so let's get
technical where they want to show the
project requirements that probably when you get a customer or you want to build something like like this you will you will have you will need to we wanted to do real-time data we want to have from the mobile phone we want to know exactly what the machine is doing in real time 1 time that's fine as well but quite close we will need to have security in the communications we're all actually sending sensitive information because the recipe sometimes would be copyrighted uh we cannot we can uh let anyone see it at 1 end of the station uh because in case someone out there the channel got compromised nobody would be able to see what actually is going through the through the channel health education and if we get somebody looking at the at the were API our our our platform saying it's guys is it actually lies and when it was gets compromised can we use disable we communications
of course because we not only get real-time data from the but will also some actions to the maneuvers so we need both of which communication resiliency the
system has to be resistance and it gated falls in its to go but because people aspects responsiveness in the In the United and also it has be language uh in the IOT easily we get and this is the case where we get really constrained environments and this makes us have to mind every kilo light that we use in our in our project especially in the in the right or so we have to take into account that the the packages that we send information that we sent the beauty this law it would be so that's also to considerations alive with that we have to take into account and some other project requires that we may get the lesson status what happens if emissions suddenly goes offline we need to know what was what he was doing right before that will help us because the body the binding of the machine costs for the production of the production version of that they need to be able to take a minute but that is not incorrect state and be able to divide it sends a different channels of communication only for debugging purposes we will leave out and that inside also for uh being able to set up the user's there many Bruce keys everything on a lot of API and into explain that if there is enough not rainbows etc. light is a mean that this is a project that is going on is growing so we have to take into consideration that we may get new requirements that we've been get at the moment that we will deliver the 1st round of requirements actually is usually never brought it right but in this case as being a start up it's more likely that this will happen that the other thing that I mentioned before as a back-end developer you need to take into consideration some things that not always will come and requirements for instance the debate about scalability which is awarded is over used to never job offering itinerary every company as a skeleton bureaucratic scalable actually the on this project we have to take into account when building the architecture through analysis by ideas but I mean that we cannot use technology areas kicking right now and in 1 or 2 years is going to be obsolete we can't afford that small text that is important for several reasons is going to be easier to maintain for the people that goes after us tend to have less errors so that there's a connection tests are going to be easier were going to have a much easier like and error checking we've there is something going wrong we want to be able to that it this is the usual that we didn't buy but before entering the Pentagon to take into account reduce the data transfer as I mentioned before releasing that transfer would do 2 things at once uh make faster messages and the other will make a cheaper BOC and in our clouds that provide and the condition was the bottom 1 because we all of the you annotation and we all love to write documentation so this is something that we to think about actually nobody writes documentation so this is the
phase that you may you may do when you see this is the requirements and you never tackle the project like this well let's go into something and it goes step by step shows that the
step and let's start with a
communications protocol this is this a requirement that is a decision that depending on how we make it now it will affect the possibility that we have a little too the for technologies or support so we're going to analyze very fast in the protocols that are out there and there are some of
them that are already out of scope like we're not interested in them because of throughput but I will mention then that because you could you could probably uh I would like you to think it's it media as QB thank it business for service but but not so much for then we get and keep the the continued is 1 of the big players in the in the protocols for community for communicating with I T there was developed by IBM and then given to the kids from the ocean for us of and for uh KDD is especially tailored for constraints which for constrained environments and has some good things from to B. for instance as quality of service where you can decide if you want to to deliver what the message 1 and I don't care what happens or you want to deliver a message 1 and only 1 so you have a range of qualities between that that every event future it also allows routine for based on topic on topic which allows for spreading messages through several receivers but is is going there's another 1 uh there's you with the the would be was developed by the constrained resources group by IETF and it's also 1 of the big players in in IOT protocol for the therefore to so uh CEO a slightly different it uses more server duration and uses HTTP verbs even though it's not it's to be so it doesn't have its disadvantages both are targeted for but very constrained environments but uh even though they are very similar in that they are very different in some other things for phrase and they are very different in the way that it can be the used a broker in the middle and everyone connected with the client so that you can do of all of this kind of stuff and you will be uses a client-server both ways so then that's a big difference already the thing is that in keeping the long-lived TCP connections while CEO abuses you so this is a really another big difference uh for these reasons actually probably could do with both that for these reasons we we chose and so now that we have for our protocol it's time to look
for solutions so all there you will find a lot of already like companies that they claim that they have a back and ready for entities so you don't have to program anything and that's kind of true so there we're going to analyze 1 because there's no time for formalizing what I want to analyze 1 of them 1 of these comprehensive but in solutions and see if it fits our or
environments and to who analyzed WS the from and see if it's actually a good and a good choice for our for our case going to over a
very fast through through the through the architectural because uh Amazon declined to response from my talk so I will go over a reverse so there's some things that we like from from Amazon instance of indication authorization registry is 1 of the requirement that we have we needed to indicate that the device machines 1 by 1 individual in case 1 was compromised and as a price that and KDD of course here's a broker the ratio of those this was also a requirement for what we need to know the lesson of status here it is right out of the box and and I API also when you have an API for apps use all the looks as well the small disadvantaged small disadvantaged been is that uh we're going to you're going to have to use that very generic API and maybe it will be as a reduced as if you would do the European so for all your purposes but anyway it's documented you because you will always wondering that problem and and it's out of the box where the 4 something with a light the as the cable this is a really small thing that is the case using a couple of hundred kilobytes and that was actually too much for our constrained devices uh so we couldn't really use the use action yeah so in probably in another project this wouldn't be a problem uh but in our case it was then there is a rules engine Amazon this is not a problem in itself is good but it's good if you're using all the Amazon products Amazon makes it really really easy to connect things between another you against send information said rules that everything use but only if your inside as and if you're out you need to do quite more work through connected to your external uh part of the platform another thing that we like to watch is that the application have to connect using an ABI and API will present some related to real-time right and having to do when it is to be a school every time that we need to get the latest of information doesn't doesn't sound too good as well so let's
analyze the present requirements that we happen that size what Amazon is is cheating or any of box we had secured it's a secure channel where authentication we get two-way communication we got good resiliency Amazon claims they're very good at that I think that we got lesson status we get an API we get a lot of scalability as much as your wallet can afford we have proven technology as well as from the knowledge is Amazon has not been out there for a long enough to be called a pruned analogy but I mean I think about there's a full-time working on it so we can be quite sure that it's not the support isn't going to be dropped in 1 year or 2 years so we that's why we take from infinity because if they have box that In this respect and the completion most important so some things that under the brightest if you it we're not happy with the way that they were getting has the option of real-time data uh we can have a situation because the the worsening institutions as a form and that is used uh lightweight forward more reason that I commented before that we couldn't put the SDK into organized but actually because we're using Jason's so would actually sending more data than we should I go to that page Ramos it's a variety of the market but actually might address because there it will be hard for us to implement new requirement is that they do not fit nicely into Amazon is and will have to them ourselves outside small text that there are some things that we will not be able to do in that state like at inside the binding all of that so what happened that we looked at the end we will have to have a lower on and inside our own stack of technologies for having that running and then we will end up having to be issues of for the 1 that is related to autism and the other 1 so that this is why it's it cannot be considered like a really small and then the reducing the transfer if everything has to go through the server 1 and the other 1 using uh education for this it's not going to be considered like this so the conclusion for this is that you can use it but only if it really matters what you want to do otherwise let's check out this about our solution so 1st thing is to get a broker through into the broker that supports and GDP and we have like a lot of options a lot of them uh there is every week or 2 weeks earlier the reports in a company that hasn't entity the server so I'm just going to show a few ones like you mosquito and he and he the Bernanke you haven't you and you and you know uh there's
not a lot of creativity in the names for this kind of companies but there I mean you can choose any that you wanted some are uh they use you pay them and they are already lot the others you devote yourself but we chose from a computer for going very fast for some reason the way it's been player for many years it has to to prevent both vertical horizontal and it can go Frank individual particles which is said it's not something that we require about him to be something that serves like there is no payment for years and we were familiar with it so is also counted so that's what we chose this but probably if you chose any of the other 2 would be good as well now we get an
extra bonus for doing their the broker ourselves ideas that now we can do so on a Americans send information to remedy and Q and the devices all of them but they want to listen to the lecture brewing session they can be listening to the ready so what in the information for real-time there's a need to pass through the server anymore so what is what is from doing while the devices get real to there's no need
to do anything the now what this talk to
the broker got a broker right so well used by for now there is a library
from Eclipse and I promised myself I wouldn't show
any code because the stock is media and also it's it's very short in time but now that I already showed an legal refers to it it's always has you only need to import the entity the model and then you just said I feel callbacks on connection subscribe to a topic on this connection 1 message do something with message you can to the broker and employer you got it that it's so easy to get an entity the server and so we got 1 thing
fixed time to look at the API invites and of course so
options here I could go through
all of the options and actually uh there will be a lot of fights it was there that discussion uh only discussing this slide could take like a full talk and only in each 1 of them would take a full degree well as 1 of them so I'm going to do is go refers to the ways 1 which so but they the
gender tasty by the last photon generous
framework and there are even more actually we chose gender framework because we of course we were familiar with where they have a part of the deal with that and and well it's a scalable there's loads of the q invasions offered external plugins naps and there's everything you may need to catch everything so it's a really good and now with the latest version that's had just gotten off use a few days ago uh there's really good uh are some good is like Atlantic conditions that you should really take out volatility of sorry OK so uh how are we doing right now after the choices we get real-time in now we got security if go through brokerage cannot access of two-way communication sent I will reduce the traffic by skipping the going through the API of the and we also got is the last known status because we we're now it's already the we got the bagging we can use the bagging and we can use the admin inside to help their the stuff about the machines we got the other side of the and of course and we got the DAPI were mentioned was guy the tracking because we are familiar with tracking arose with Python so that can be considered it would be easier for us to the book by phone and book him so some of these we already got by using those those 2 is resiliency and scalability but this depends of course on how you do you that how you're going to deploy you're going to clusters of its edited but it's full of documentation of how to make the system scalable because they are very famous and others we got frame was its very comes sorry you was it there because there now it's Python and we can't do everything we want with it we all know that right and proven technologies cost otherwise we wouldn't be in this conference small text that now we got only these 2 pieces of 4 and that we really understand and some things that we still don't have with a manifestation the messages are still being sent tradition we have indication that everyone can connect to the brokerages start missing anything other than we cannot say it's like on the device because we just sending messages and he did units should polite with any of the river patterns and it's also but it's not like we're that we're not sending the small amount of information actually something more information than the and documentation that's fine that's that's the conditions for the so let's start
solving the remaining parts of indication and by them as well there
is a really nice plugin for everything keep my son of a tree given explaining its arriving in q authentication back in the to be OK so what does this mean now when
they're device uh when the mission was to connect to broker instead of the brokerages saying yeah you can connect that connect we will present information to about them and by the time which exhibits and save that the definition can actually connect the not so that wouldn't it have all that in the broker can be in our normal database nice and responds and remember it's a long lived TCP connections just once that's really cool is what for devices was so we take
another 1 there's authentication now so
let's go for the last 1 of his view that light with messages so how are we going to do this with now with Google so if you know
probable buffers yet you should use any kind of idea a separate call from Google that actually is well I had these good tables on of displaying but I will try to to just go very fast and and explain it but as you
see in this example Jason that the device could stand to through the server or or to commission percentage are at the we see that in each 1 of these messages is going to be a lot of repeating information like this and the idea of a time BAD strain you're going to send the time-stamping string and the date that actions once introduces information that is going to be repeated over and over and over and that's going to consume data and that is also going to make it so so we don't want that but also it's really easy to read but how are we going to solve these with have a buffer for offer is actually
what would what it does is that the specification of how the message is build shared between the parties that they're communicating but is not transmitted through the wire but actually you got the specification of both ends and you understand the data those different every time if anybody from Google was here probably here they which would me because it's not really like this but this is an example so so you see actually what is being transferred here this will also the 1 to
sponsor my talk why is that so I'm not going to show you how it works but uh this is uh really easy you know just builds which fields your message will have to their required optional so then you can change the requirement there always backwards compatible and then you will not have a problem if you're upgrading the message that is sent and somebody's using an old so what
are we doing now cost both things check we're happy with the solution now is is that however a
very small final architecture very very simple uh you can see that we have we got the web servers together with 3 blocks that we talked about some end points for everything you and to be the listener and responder and then we got the the downweight the uh audit for the devices I was to get the rabbit program for what devices and machines for the web servers for to communicate uh of course database consists cash and and everything that is usually used in you know with a with 4 so do everything is a scalable because everything is in the blood flow and everything all of those technologies are easy to scale so this is it well the is already it's I was probably my boss is going to watch me on you tube I want to tell you that they will work
and they're really cool company called elements interacting we work at Barcelona Spain and on and in the Netherlands so if you want to do cool projects like this uh be sure to enter and or just contact me after the talk and I'll be happy to explain what we do and how we do it
so if endurance prevention which you get any questions yes so what about unit testing and hope to wavering but what about unit testing you have what you write the words had where we get on with that of the human vision of the question the question is which our dishonored or using we are only using the 1 of in by tests on almost all right now we're using this test cases but and so we were thinking of trying by this but we still didn't do right now we got a very very good coverage but on on of the beer this that pattern the higher the 1 question do you have a hard limiter security because I wonder whether some Enhanced API and they don't come and increase the temperature and pressure make the remote form essentially or set them in Hebrew on fire and living in arrays also intelligence and it does evaluation of all the recipes and so there is no there is no way that anything that could break them many row is accepted a actually use and the recipe to the neighbor and it finds it it's not good and it will just answer that there could not be start with some information of course but but again there's no Norris for bonds with about it it's said the norm all have you thought about using 3 instead of Google Protocol Buffers easiest and was about about political boffins scientists and I don't know Protocol Buffers with a dancer and treated about the 3 I have and I don't know about it all think we were pretty happy with probable buffers with because they had everything we needed there benchmarks were really good so actually we've just found it this is really cool stuff here so actually we didn't write about those I am not just wondering what kind of data that you send from the many group you who it's it's partially I am I am I don't really know exactly because that's more of think but there's like a zillion sensor Sparano them in Hebrew pressure uh uh if there is water flowing around which is the current status theory section spending from the user what is the next thing that is going to them and there's a lot of information which alleviated Jason I just showed it was like a ridiculous example because it actually make a much bigger so so we have that's have you tested to what the scalability limit of your stack is have you tried to topple the things no not yet not the not we actually working with many resembling like by the remember wrong with sending its mean here that we're testing there quite some of them quite some basidiospores this thing and on the 20 something like 60 times more information that will send in in the real world because we're really really looking everything into a very uh detail so right now we can handle already with a really small cloud architecture and I mean really small so it can handle like hundreds of members so I at when we go to when we just make a normal the uh uh production the prime and it's going to be able to to handle uh thousands and of course we will we're going to implement scalability clustering everything the overcoming accessible