a lot of you wake up early to be here, so you are probably all interested into blockchains because the next talk will explain us how it will work, how it is and why we do this. Jelle Herold is active in a lot of areas. He's in arts, into math and physics and also computer science and yes he shows us why we need block change, what we use it for and how they work. Jelle Herold. Can you hear me? Yes, yeah, okay. Well thank you everybody for coming so early. If all else fails, there's stickers on the floor. I know stickers are probably more valuable than the only other more valuable thing than coins so they're here on the floor. Yeah I'm gonna try to give an idea why blockchains are relevant and why hackers should look at it and why they are relevant to the world maybe explain a little bit how they work there's a lot of talk about these things. Yeah I went to Pubchrist yesterday so maybe this might not be the best organized talk but that was a lot of fun if please I'll leave some time for questions so please please ask questions. Let's hope this goes well. So a little bit about me you can find me on Twitter that's enough about me. This talk is titled blockchains for better world. So better, I mean you're thinking money is evil, banks, criminals use Bitcoin, all these things. Oh why is my slide not going further?  Right so this is process optimizing our planet. This is why I think blockchains are so useful. If we apply process optimization to a lot of the things that are happening on our planet we might be able to fix a lot of the big problems by targeting our efforts at the right places. It would be really nice. So before we start I'm how many people know what a blockchain is? Okay that's good. So how many people know what smart contracts are? Okay great.  The thing we started with peer-to-peer networks with BitTorrent. From BitTorrent actually effectively came Bitcoin. I'll show you kind of how this works. It's not a lot of extra ingredients that you need to add to BitTorrent to actually reach to Bitcoin but it took a while. From Bitcoin people realize you can generalize this. Bitcoin to Ethereum. So that's where Bitcoin is just a simple transaction from me to another person. Ethereum extends this to having kind of code running on your peer-to-peer network and sending transactions to the code and have the code do something. So this is more general than just a transaction. And then the final step is this project I'm working on where we try to take all the ideas from modern programming language design and to build sort of a process engine instead of just a Turing machine on a blockchain which Ethereum kind of is. So this is a little bit of an outline of the talk. I'll give some cryptography fundamentals just very hand-wavy. Then I'll explain and try to point out how you build what is called distributed ledger technology. So that's the you know Bitcoin and blockchain are these fast words and the new word for it is distributed ledger technology. It's kind of a better word for it. Then I'll explain a little bit about my language and how this applies to the blockchain and then have some final words about how you can apply this to planetary scale. I will put them online yeah for sure. And if so the stickers over here they have an address on there and they can enter email address and you can talk to me and things like that. Yeah no problem. So you asked if the slides are online. So the fundamentals well probably the most fundamental thing is hashing, hash functions. Then another very important thing are distributed hash tables which is DHT and not DTH but okay asymmetric cryptography is another important thing and here I'll just show talk about signing and verifying signatures. So hashing is this it's a principle where you take some data and you compress it to smaller data. So you can have any kind of arbitrary length bit string and then you turn it into a fixed length bit string. So here I demonstrated 160 bits and you have this notion of cryptographic hashing where it means that there's a very small probability of two pieces of data going to the same address space. Of course a function that just sends all the data to the number one is a hashing function because it takes a lot of data and it always goes to a small number. But two pieces of data go to the same number. The other thing about making hashing cryptographically secure is that if you want to go the other way, sorry second let me just plug in power. I mean I go from data to the address to make this secure you shouldn't be able to go back easily. So if I have my address to compute the data that came from this that goes to the same thing that this is not efficiently computable that makes a hash function secure. So yeah to put this to sum up these properties like every bit string leads to a unique address because it's such a big space due to the 160 is a lot of numbers. So every bit string your movie, your Arnold Schwarzenegger movie goes to the same two different address as your MP3 file. It kind of distributes evenly over the entire address space and it works as a checksum meaning that once you have your data, if you somehow got it back from the network, I'll talk a little bit about that. You can check again you compute your hash function and you will see that it's the same you get the same number for the same data and as more tricks you can do with hashing which is the proof of work which is the mining in Bitcoin. I hope this was a little bit clear. Who was this very clear?  Yeah I mean a different way to look at this is that you have you have all imagine you have all the data in the world all these files on all your computers and you want to sort of make this address space where you can find every data back. You need one function that takes your data to its address and another function to find it from the address to find it back. So imagine we build a network of computers and we want to pull the data out. To pull it out you use this distributed hash table thing to give the data an address to give every file an address we use the hashing. Maybe this makes it a little bit clearer. So if you want to learn more about distributed hash tables I can highly recommend the Cadamlia paper. It's a pretty hopefully clear paper about how you can find stuff back in a peer-to-peer network. So it's on a it's it uses this for those that know I mean if you don't know this then you should just phase out for a minute. But it uses XOR so binary XOR as a metric space and that means that if you go directly from X to Z this should be shorter than going from X to Y to Z. So this like this space is probably a metric space I can walk here everything has a distance and now your files get a distance. And it uses this thing to to find your data back. So if if those black dots are the nodes in the network the the XOR metric gives you a way to from every nodes go to the nearest other node or the nearest other file and this way this they show that this converges so that after a number of steps I always reach this file. So who is this clear? More people. Okay that's that's hopeful. Yeah so just just to repeat this for a second because it's kind of fundamental. We have this address space and with the DHT we kind of make it into a normal space where you can walk around like a space like this and without the metric without the notion of distance you cannot do that. So that's what the DHT does. Okay this is interesting. My clicker is very laggy. So yeah now we're gonna go to the next topic which is asymmetric cryptography. Asymmetric deals to this point set the fact that you have two keys instead of one. So you have a secret key and from it you get a public key. Obviously the secret key you should keep a secret. The public key you publicize public make public can make public should make public. It uses elliptic curves obviously not gonna talk about this. Sorry about this my clicker is very... So this is the same thing where you have two functions. One thing is to sign data and the other thing is to verify that the data came from the signature. So for the signing you use your secret key. So I keep the secret key in my pocket and I make add a signature to the data and say listen this is I signed this data. It came from me and then with the corresponding public key you can verify that the data came actually from me. Who is this clear? Yes. All right a lot of hands. Great. Now something interesting happened is happening here because your identity is actually your private key. So if you're a participant in this peer-to-peer network your private key which is just a very very large random number effective sort of and in the Bitcoin situation this becomes your wallet. So this is how this is why these things are important in the in this peer-to-peer network. It's an open network. Anybody can participate as long as you can generate a very large random number you get an identity in the network and then you can use this number to sign transactions or you know files as coming from you. So I'm just gonna talk about something very shortly which is this notion of a brain wallet. So if your identity is just a random number this is very nice thing right so it is super inclusive a bank cannot say sorry I cannot add you to our banking network because of something maybe you have only one leg and then this you know everybody who has a bank account needs two legs so sorry you're you're not allowed to have a bank account. With Bitcoin it's completely inclusive as long as you can generate this number you can you can get there and now you can turn the number into a sequence of words which collapse practice feed shame open this is called a brain wallet by just memorizing these words you can buy any phone enter the words and your Bitcoin identity or whatever identity returns. So this is kind of a crazy but a very cool idea and I actually used this in practice when I went to the US and somehow my bank accounts got blocked and I had to I had no internet but I could export the brain wallet for my phone and moved into somebody else's phone. So this is a very very powerful idea that you obviously don't have it a normal bank I mean you can just memorize your bank account so I think this is very cool who else thinks this is very cool. Less people than understood the previous thing. Anyway I think this is insane anyway so these are kind of the fundamentals that go into blockchains the cryptography fundamentals so now I'm gonna talk a little bit about how you turn this into the so-called distributed ledger technology so what what is a blockchain anyway it's just a decentralized database okay that's all it is actually I mean a decentralized database an amazing thing that we didn't have before but that's what it is so it's a peer-to-peer network that builds a decentralized database and the way they do it is using a ledger so keeping a history of all the transactions then there's this thing called a memory pool which is kind of important to talk about for a second and there's proof of work which is the famous mining that you probably all heard about yeah so let me first talk about the ledger it's a way to it it stores all the transactions that are happening in the network from the beginning of time so there's the genesis block that's when the Bitcoin started and then every transaction from there is recorded so this is what it looks like a blockchain sort of so we're using the I mean nothing why I cannot point at this because it's a very bright screen but over here you have the hash function you see the hashing again a block of transactions is just a block of data and the hash gives it a unique a unique number and then the next block has a starts with a previous a pointer to the previous to the hash of the previous block so this is how it builds a chain every block points back to the previous one and that's why you need the hashing is this clear to everybody it's like a linked list I'll just in yeah I'll continue anyway and hopefully clear so there's a bunch of in a block is a bunch of transactions there's this thing called a nonce which I will talk about as well but let me try one thing because somehow why is this not doing the presenter thing okay well I have to go like this so the Bitcoin network or any most of these blockchain networks they work in the following fashion you have a transaction the transaction is put in a memory pool it's kind of the depending transactions and then you have the finalized transactions that are written on to the ledger now for transaction it needs to be valid in a memory pool you add some sort of transaction fee to it and then miners pick transactions from the memory pool and append them to the blockchain so here we see the asymmetric encryption at work you have your transaction from this address right so the wallet address to this other address so these are just the public keys of the wallet the amount and then the signature and then the Bitcoin network verifies that it's a valid signature the in order to make a block the miners pick from the memory pool so these are all the pending transactions that's just a peer-to-peer network like BitTorrent or whatever and they keep them the miners keep them in memory all these intersections they receive it to see if it's valid if it's valid they keep them and then from this memory pool they just pick a bunch of transactions the one with the biggest fees on them and then put them together into a block make sure it points to the previous block so the latest known valid block in the network and then I have to do this they have to add a nonce so this is a special number and this is the the famous proof of work so very shortly I'll just give you an idea how this works these transactions I cannot make up I just picked them from the memory pool the previous one I also cannot make up because that was just a hash of the previous block the nonce the miner can the miner can pick the nonce and it in fact it should pick the nonce such that if you hash this entire block the resulting hash value has to start with a number of zeros now does anybody see why this might be difficult yeah one two three four seven eight nine oh more hands going up yeah a lot of people see why this is difficult for those that don't see that why it's difficult remember that that the cryptographically secure hash functions they distribute data evenly across this entire address space so the probability of finding supposed this is would be binary zero and one the probability of finding the first thing a zero is 50% but zero one probability of finding two of these things is 25% three zeros in the beginning is 12.5% so this is get more and more harder because it's basically just random just points at some random thing in a very specific way so every time you change the nonce you completely change the hash it just just completely difference number and then to not a completely different number every time you keep changing the nonce and you just need to keep trying this over and over again until you find one with enough zeros and that's what all these miners are doing they actually it's kind of a the bitcoin proof of work algorithm is kind of a stupid algorithm it can be it's so-called brute force parallelizable something like this meaning that there's a lot of you can just build hundreds of copies of the same processor that does this hashing and just do trillions and trillions of hashes at the same time and hope you are the first person that finds the valid nonce and once you find this valid nonce you announce the block back to the network everybody sees you know the checking is easy just compute the hash of this entire blocking you see oh yeah right that's a hash and it has a number of zeros so that's a valid valid block and that's that's what all the miners are doing they built specialized hardware to just keep going over those numbers who is this clear yes a lot of people great if it's not by the way just ask me questions afterward so this is this is roughly how these lock chains work it's just a way to build up a history that everybody agrees on consensus algorithm and then from the history you can reconstruct the database saying this address has so many bitcoins this address has so many bitcoins you might wonder where do bitcoins come from well built into the algorithm once you find a block that's why all the miners spend so much money and electricity on finding these blocks you get some bitcoins so you know if you're the first one to find this particular hash function which is basically like a lottery where the number of the stake is how much work you put in that's why it's called proof of work then you you get bitcoins so that's where they come from they're not actually mining bitcoins the mining nonsense and you know once you find a valid block as a consequence you get some bitcoins so everybody's wondering where bitcoins came from that that's where they come from it's just built into the algorithm yeah do I want to say something else about this let's just continue so now I'm gonna talk a little bit about this programming language that that I've been working on for a very long time this was something that was started a long time ago actually it was Ray Dawson that was the first one to come up with this idea he's a he's a old Debian project lead some of you might know him he's sadly no longer alive he was the first one to say like maybe we can use this thing called Petri Nets to to make reconfigurable software so now I'm just gonna go from a very different angle now for a little while so I'm gonna take modern ideas from programming languages and try to apply them to to blockchains in the end so the state box thing is a it's a visual language for talking about protocols it's kind of like a programming language except you cannot write every program in it it's not like Python it's a particular restricted programming language and the why we do that this is because we want to have well-defined behavior and we also want to have portability meaning that it can target different blockchains or different systems it can just run on your computer as well so not in a distributed fashion and I mean we were building this before there were blockchains but it turns out this is a very good very useful language for so-called smart contracts oh yeah now I remember to say about this so I've showed you a very simple transaction that just send money from one address to another address Ethereum generalizes this so this Ethereum system realized that I can actually instead of just having a database that says this person has this much money I can also have a database that stores programs and whenever I send the transaction to this program address so it's just like almost like the compiled C code or whatever you program in like machine code they store machine code in one of these nodes you send the transaction there and the machine code runs on an Ethereum virtual machine so that instead of just verifying the transaction they compute some properties and you get a new state of your it's like every address has a little table in it so it's like generalized Bitcoin and so there's a lot of a lot of hacks has have been happening because this is not the best way to do it it basically took just the oldest model we have for a computer and put it on a blockchain so trying to make this slightly better and use this advantage of a blockchain to make to make a better world hopefully okay so about this section I'm just going to talk a little bit about the history the background give you a bigger picture then we're going to generalize state machines to patrinets and eventually to the state box system I think I might skip the demo and then give you some other things so yeah in 2003 around the time it was conceived then in round 2008 we were running this on the Java virtual machine and in a cloud and now in 2017 you can use distributed ledger technologies and there's this thing called an ICO initial coin offering that's something that's happening a lot with Ethereum so we'll talk let me just give you for who knows on ICO is okay and that's so many people so an ICO is a way to sell Ethereum was sold as you know this distributed supercomputer running over the world well actually it's not really a distributed super computer it's kind of like a very slow mobile phone and also they're not running any kind of programs on it they're basically running ICO contracts on it so it's more like a distributed ICO machine and so these contracts are like the rules for initial public offering so when you're selling your your company but they the smart contract executes these rules so you can send your money to a smart contract the smart contract collect collect the money and this way you can kind of sell your company in a distributed fashion so this is very popular and a nice way to to get a lot of money for a project so yeah the state box language itself is based on diagrams that correspond to formulas so this is work by Penrose it was one of the first guys to do it to deal with very complicated mathematical formulas he tried to come up with these pictures for them so you can see that this thing with five things is like adding three of those and subtracting one diagram so that's pretty interesting you've probably also seen things like this where you have you want to make audio synthesis and the way you do it is that you cut up these things into different modules and then you connect them with wires this is done for images as well high frequency traders use these things business process modeling notation is an interesting one so is to describe a business process turns out that these things are equivalent to Petrinets which is what I will talk about later and it also turns out that there's mathematics for these things so this is one of the key ideas here is composition how you take smaller parts and you put them together into a bigger thing you can do this with wires just very shortly this guy is advisor for the state box project he's very cool David Spivek the key idea behind this composition is that you have this composition function so if if you give me something with three square holes in it and you give me three square things I can put them together and make one square thing without any holes the mathematics for this called operas but the question is what do you put in these holes so it's really nice that I have some way to combine things but what do we compose over and what I want to propose that we compose over this sort of diagrams that express a process and that's what this state box system tries to do you need to use a lot of very abstract mathematics but that's that's not kind of the point so what's a process anyway well in metham in computer science you kind of have this distinction between an algorithm that just runs locally on your computer and kind of a network protocol or like the Bitcoin network so in physics you have the same idea this is a Feynman diagram of two particles interacting you can you can do the same thing for like topological version of this and then you can combine these things together so they're starting to look like programming x and y y to z comes a function from x to z turns out that these things are all the same and these petrinets in the lower corner is this thing that I've spent a lot of time on and it looks like this is a language to describe processes so is this everything that state box is well know stochastic petrinets just talk about the behavior in the large we need to talk about particular processes at a particular time so in order to explain this I'm going to show you what a state machine is then quickly generalize it to petrinets so a short example of a state machine a traffic light we want to look at the different states that a traffic light can be in so it can be red green or orange so refer to abstracted away we move the casing we just keep the three lights and we say we make the name shorter RGO but we also need to describe how it can flow from one state to the next so these are the blue arrows and these are called transitions so putting this together and rearranging the things we have three states RG and O and we have three transitions from R to G from G to O and from O to R so this is what a state machine is and it that the important thing to note here is that the transition transitions take one state and produce a new state so finite state machine is a set of states and transitions who knows what this is and for who is it clear okay that's good will be nice my clicker response so if a finite state machine is states and transitions what if we have two traffic lights so we have a car and two traffic lights in the red state if they're both go to green and there's two cars you get a bad situation so we want to avoid this this is to say in smart contracts we want to avoid having bad situations so we kind of want to compose these things we want to compose these two state machines so can we do this well we can but then we have to make all put two traffic lights together and put them in there and draw their state space and then you know the first light can go to green or the second light can go to green we want to avoid this corner where two lights are green or there's a yellow and green so we go to here put this other state there remove that thing and now we've added two machines together but this is not the easiest I mean we get a lot more states we need to think a little bit how we do this can we do better or we can using this mathematics stuff and that's what that's what we're going to do first with the patronets to generalize these state machines and see how you can actually speak about two states instead of having just one state so the idea is that we want to allow these so called hyper edges that split one state to go to two states one easy way to do it is just to put a box on the wire and then you can have two angles come out now one thing you should note is that this transitions can be disabled or enabled so it's enabled once all the states are active it's disabled if only one state is active or if not all the states are active so that means the traffic light cannot go to green unless all the conditions are fulfilled for it to go to green we use the dots to mark the active state so if this transition fires it will move the state to down there so you so it gets two states you can do the same with you have some tokens already laying around and then they just move it you see how this works it shouldn't be super hard but who is this clear okay good who is this unclear not so many people you can ask me afterwards so oh yeah can I do this let me show you this in action maybe that makes it clear so this is a example of a Petri net hello they couldn't go bigger this transaction is purple so it's enabled if I fire it it consumes the token over here produces two over there now these two things become enabled this one is I cannot click it still cannot click it but once this action takes place now I can click it so that's that's one example this is another example so maybe somebody is producing things over here you see them piling up in the middle and now this person can start consuming the work this could represent work I mean it's obviously very abstract but I hope you can see how this can represent some sort of sequence of actions that are controlled by this diagram the diagram explains and describes what can happen so now this guy can produce again so that there was an example this make this this make it clear I hope so yeah so now we're gonna redo the traffic lights but now using Petri nets so we just start with the same state machine from red to green to yellow and they're both in the red state then I just add boxes to it see so now still the still state machine but now it now it's a petrinette so now I'm gonna add this debt prevention token it's this token that says that is removed once the light goes to green so that's how you do this you just add two arrows and whenever I transition from red to green I consume this token now when I go back from orange to red I just place the token back and so now I've modeled two traffic lights together and I can prove that they will never be there will never be two green lights you see how this works who sees how this works I've lots of people that's great I was not seeing it so one thing you should notice that I can reuse this now so I can take this you know just put the whole traffic light into a box and just pull out the the one place that they all shared is that prevention token and now I can glue them together like this so that's nice now I only have 10 states instead of 3 to the 3 36 for the regular finite state machine approach so this is a much better way to speak about multiple states and a complicated machine where one person needs to do something and then the other one and the other one so we can show this in action you just prepared this worry about this is really Firefox love how fast it is I don't know some reason this is okay I'll skip the traffic light in action for sake of time so yeah I want I can show you this will probably work because I did prepare this a little bit so this is the current state of this state box system that I'm building here on the left right now you see the history of this machine on the right so this is a patronette and whenever I fire transitions something is added here so this is very much like the history of a blockchain and that's kind of where the initial idea came from like it was set up as a ledger so we just store all the history of all the actions happening in this thing and now we make an encoding that so that you can store these protocols or processes on a blockchain instead of storing arbitrary machine code you just store this specialized network that describes a process there's much more that I can show you right now there's a lot of things to this there's a type system so on the stickers there's this thing says type devs.com it's a way like if you know about the database schema or a JSON schema or XML schema there I used the word XML I needed something similar but cleaner because we want to put all these all these things together into one coherent mathematical thing so that we can prove properties about it so for this we made a very simple type system and once you have this type system you can describe things like a person you say a person is a name an age and gender gender is a boolean age is a number gender is a string you put these things together and because we describe it and we don't write the program that creates a form and a label and an input box and all these things we can make a program that takes such a description and produces a form or produces an API so this is the idea is to describe things and to create stuff out of it another thing is logic programming so we use a different kind of program for those that knows like prolog or data log or cascal log or flicks those kind of languages they are again they are declarative so you describe what you want to do and the program the interpreter figures out what it does how to do it a nice thing is they have guaranteed termination to program these Petri nets we want to fold over the history so that's Petri fold also didn't show that I didn't show how you can compose things together to make bigger networks so this is the idea that you can reuse a process so maybe somebody figured out what what's the best way to onboard a customer to something they just make this thing you leave some holes in it and then you fill in the holes with your own specific process so that's the composition thing because we're just describing stuff we can make a compiler that takes the description and produces an Ethereum contract or you know deploys it to Google cloud or whatever you want to use or just IPFS which is super cool so why is this better than normal smart contracts such as the Ethereum language so it's already said but this is the declarative nature they say what to do not how to do it because if you describe how to do it you make mistakes an Ethereum contract kind of works like this it has this computer memory it has a script that it follows and it goes like well I'm gonna put this red thing over there then I'm gonna do some stuff over here keep remembering that I have the red thing over there I'm gonna put a green thing over there I'm gonna put another number that keep remembering it and then as you go to this sort of play of what's you know what is happening all that stuff you need to convince yourself that nothing bad is happening that you're not overriding any state you shouldn't here we don't do that so the the complexity is in the compiler we just describe what we want to declare it so the another nice property is total programming so we if you do if you have a function that is that works for numbers you have to make sure that it works for every number not just the numbers one to ten but every behavior every part through the function should be exhaust exhaustively defined and this is really nice because a lot of the hacks in Ethereum are happening because this is not done they're not defining all the behavior and then you can find this wiggle room and maybe exploit the contract another property is this diagrammatic nature so it's visual you can see what the contract does you don't need to in your head reverse engineer the machine code and then reenact display in your head so okay when I interact with this thing it's gonna place the red thing over there and the green thing over there and then in the end it's all gonna work out no you just see the diagram you see how yours thing is gonna flow through it yes I'll just skip this for the people that know about blockchains this is very highly related to oracles state channels and the main idea is to not use a Turing machine approach but to use lambda calculus approach so this for the functional programmers yeah I see some hands very for functional programming it's the best right state channels very shortly is a way to do something off the blockchain so it's between two persons kind of a play where I sign a certain state send it to you you revoke my state you sign a new state send it to me I revoke your state sign a new state send it to you you keep doing this so this is like a protocol but you do it not on the blockchain because a blockchain is it's like I said the mobile phone it's super slow it's very expensive state channels are a way to just do it between two people it's also add some privacy and then at any point if somebody violates the protocol you can you can go back to the blockchain and say look this guy violated protocol oh of course first you need to deposit some money on the blockchain like you put some stake and then the smart contract will give you the stake back if you know the other person was not playing along the rules and that's how you can kind of enforce this rules off the blockchain using a state channel yeah so applications for this kind of workflow technology just to give you a short example I worked for a travel company and we had this driver application and a hostess application so after a long while there's these two states it's ready for the for the taxi driver it's ready for the hostess and then if you zoom into the hostess process so this is just double clicking on the box he starts her work and either the customer arrives or the driver arrives first but once they've both arrived arrived you can say the customer enters the taxi so this is a nice way to draw a diagram of the you know of things that need to happen in a certain way other applications are payment systems people to do more and as marketing is kind of dirty word I mean I'm really truly a sort of crypto anarchist kind of person and I believe in sort of freedom and all this stuff but nowadays it seems you cannot go anywhere without marketing or some sort of customer life cycle making you know having a nice experience for your customer insurances supply chain transparency is probably the most important one to show the entire supply chain what is happening where does your avocado come from or your chicken eggs you know what were your chickens fed with did it contain terrible pesticides on the on this side you see some of the main properties so that analytics become really clear on such a system you can see at which state the system is how many people go to one state or the other you can create automatic UIs from it I'll just skip this a little bit we're going to do ICO as well that's this thing called compositional game theory for people that know this it's very very interesting it's to build bigger games out of smaller games this is something we're building into this and we just conclude about this section so we've seen a visual language for speaking about multiple party multi-party protocols I hopefully kind of made a little bit clear that this abstract algebra and the proofs is the way we get the well defined behavior and the portability so you're not just using mathematics because it's I know you want to be stupid about it but it's a way to abstract all the unnecessary details and that gives you new properties namely that you can build these systems that can stack together and you can move it from one blockchain to another and then the most powerful effect of this is that if you use a distributed ledger system you can apply this process modeling on a global scale so entire supply chain of your mobile phone or your laptop or whatever it can be modeled out and it can be done very cheaply because normally these systems are used I mean a lot of people are doing this big companies like IBM and they make a ton of money on it but these are very complicated systems so that's that's a conclusion I hope we can use blockchains to process optimize our planet find the right spots target those things first instead of replacing your light bulb because doesn't do much better change your mortgage yeah and that's that's the state box system and now I think I will take questions if there are any yes thank you yellow if you have questions there were a lot of topics please line up at the microphones first question yes sorry maybe this is very simplistic but does it scale the mod if the model has to contain all of the world in real time online then it will explode yeah so scaling is a big topic in blockchains because right now every node keeps the entire history but state channels are a way to do this so you can not everything needs to happen on the blockchain I just deposit a lot of money and then I do my stuff off the blockchain so that's one way there might be other ways like regular sharding so it does scale like sharding sharding it's a way to I mean this is done on a SHARDING sharding yeah it's just saying again using hashing and taking maybe the first hash the first value of your hash sorry the first digit of your hash digest and allocating data to different pockets like this so instead of every node computing everything just things that go with hash value zero go to this node hash value one goes to that node hash value two I got no question from the other Mike yeah I have a quite technical question I saw that you can have splits into the behavior yes and I presume they also and joins yes and can you have can you have loops yes you can have loops as well okay could you and put the loops we split off again yes okay can you didn't tell me what is the the semantics for the end join well they all have to arrive before they can continue yeah one can but if they can split off how do you check it so I think you mean so if you turn this upside down I will give you an example where I have to draw it where it's really complicated okay I would love to see I mean and so the end the definition and join is really a problem and actually I would not avoid I would avoid using splits and joins because they're constructs that are so complicated that it's not difficult it's impossible to define what should be done so this so this was a real technical question it's okay because so actually the looping thing is something we want to avoid as well so there was a asterix there that I didn't mention but I would love to talk about this so maybe you should clarify this after the talk where you can draw things so I'm also a lawyer yeah and one of the things we see in the blockchain and also this are basically a timeline yeah I guess a timeline of events that move the process further now in law there's a number of situations where court intervened you have to roll back to timeline yes like bankruptcies is a good example but sometimes also in just normal contract enforcement where you want to roll back to system to a previous state even without the help of the parties involved yes right if you go bankrupt then the bank has to undo all transactions until midnight whether the people in charge of the account want to or not yeah and I've always had a hard time finding out how I would do that in Bitcoin yeah so you cannot that's a Bitcoin you sent the money to the wrong address poof it's gone there are people that did this I mean they're not stupid but this just happens so the blockchain itself cannot roll back and I'm glad you asked this question because this was one of the things I tried to address and the way we do this is by using this composition so you could imagine that the bigger box with the three holes in it that will be some sort of legal framework that says I can unroll I can go back right I can use a loop that maybe undoes this certain thing that happened and then you use your given the legal framework you fill in specific processes in there so by putting a layer on top of a blockchain where the blockchain itself just moves forward but the undoing is just appending is part of the process but then in order to make that cryptographically secure you would have to have the private key of the participant in the contract no no the there would be a private key for the legal jurisdiction so you're engaged when you engage in the contract you engage in the composed one that shows that there's like a legal framework underlying it so this would be a normal contract that only goes forward and this would be a contract that allows you to go backward but you know it before you engage in the process you see hey there's a lawyer that can undo my transactions thank you I think about that okay good are there more questions okay okay there's one Vinae Gupta introduced the idea of the Internet of agreements yes materium yeah do you think that will that will fly for logistics for instance because oh yeah it has to connect different legal systems and and the lawyers may not like it yeah yeah it's super interesting what he's doing I actually met him just two weeks ago and they're also using tiny state machines so it could be one of the building blocks for a system like this where you have these recording contracts that avoid having to go to court but there's a arbitrator so this is what is Vinae Gupta is doing is building these like a regular legal contracts and some code that are tied together in a contract and there's an arbitrator that says you know if I borrow my spoon to you and you don't give it back then we don't need to go to court about it but the arbitrator can figure out who gets the money and so this is I think it will fly I think it's a super interesting project and they're trying to use the UK system to to make this all going to be based in London and we'll see what happens with this but that's maybe that the legal tension that these systems bring they point kind of the kind of point out that money isn't what we thought it was and that legal the legal frameworks need an update you know the Dutch government doesn't have proper law for technology like this yet some countries are advancing in this like Singapore or whatever but yeah that's that's probably the most important thing about blockchain is that it forces you to rethink these notions of law yes there don't seem to be more questions or if you have a question okay thank you everybody yeah thank you guys for your attention


Sam here with late in sports cards. We are doing 21 22 put in either on this optic choice basketball five box break number 10 Random team style. Here's a look again at your random results As always you can find these on the website under the results tab as well as the link and chat Good luck everyone See we got here Five autos hopefully some numbered stuff got Chris Milton silver another black golds coming up Wow Jalen Johnson going to the Hawks on the octagraphs rookie auto Nice one there. We've got tail Maladon Don't believe this is gonna be a rookie tail Maladon is gonna be your choice exclusive We got black gold is Christian Wood going to the Rockets There you go Nam queue That is five of eight very nice card there We've got Quinton Grimes and Frans Wagner a couple of good rookies at the end as well Broughts to the Knicks and the Magic on that one Eric Bledsoe. We've got George McGinnis four out of eight on the black gold auto There you go warriors or Pacers Pacers.  We've got dragon scale Isaiah livers go into the Pistons There you go Detroit nice dragon scale That's pretty cool We've got Isaiah Todd. That's gonna be for the wizards 32 out of 88 on the mojo Then Jeremiah Robinson Earl and Jonathan coming up on your rookies very nice rookies to end it there Box number three. That's another dragon scale Josh Christopher on the hollow We've got Trey Murphy the third that is going to the pelicans You're going to warlands Trey Murphy the third you've got dragon scales gonna be the fro Jared Allen going to the cabs Congrats Cleveland. That's James a on the Cavaliers We've got nice Devin Booker Going to Jason s 46 out of 88 nice one there We've got Dearon sharp and Moses moody No, I thought prison choice after this Silver Paul George that's wow. That's cool. Go into the thunder. That's Sean Kemp Nice hit there. Congrats. Okay. See Jason H on The Sean Kemp very cool Choice exclusive is gonna be Anthony Davis going to the Laker Carmella Anthony going to Lakers can't read apparently Saw the Anthony and just figured 80 got Eric Bledsoe going to the Clippers 23 out of 88 then we've got James book night and Brandon Boston jr. Go into the Hornets and the Clippers three to go guys in a full case of elements 12 boxes random division style Every spot you get gives you four teams a lot of hit potential in that you're looking at two jerseys and Our one jersey sometimes three autos sometimes two autos Very good stuff in there for sure though got Kevin Porter jr. Matt Barnes going to the Clippers There you go clips on the optographs auto Corey Kisper is gonna be your choice exclusive going to the Wizards Jeremy Grant going to the Pistons. That is nine out of 88 jersey numbered nine out of 88 Congrats again Detroit Nice one there, and we've got Sharif Cooper and Isiah livers that will do it for the break guys one second Do a quick recap on this? Matt Barnes going to the Clippers Sean Kemp Thunder Tray Murphy the third pelicans Jalen Johnson going to the Hawks George McGinnis Pacers Jared Allen dragon scale cabs Isiah livers dragon scale for the Pistons and Christian Wood black gold rockets that will do it for the break Thanks again everyone for the film next up prism choice


President of the United States. Thank you all very much and please be seated. Before welcoming our visitors, our guest here today, I have a brief announcement. I have to make it here because that's where the press is and it's for them. I've just received a briefing from my National Security Advisers on the contents of the proposed Geneva agreements on Afghanistan that would provide for the complete withdrawal of Soviet occupation forces from that country. I believe the U.S. can now join the Soviet Union as a guarantor of the Geneva instruments. I have therefore asked Secretary Schultz to represent us at a signing ceremony for the historic accords scheduled to take place in Geneva later this week. This development would not have been possible, it had not been for the valiant struggle of the Afghan people to rid their country of foreign occupation. We take great pride in having assisted the Afghan people in this triumph when they can count on our continued support. We also pledge our continued friendship and support to the government and people of Pakistan who have so generously hosted millions of Afghan refugees during this period of Soviet domination of Afghanistan. That's the end of the statement. That's the end of that statement and now let's bring on the NCAA basketball champions of Louisiana Tech and the University of Kansas. Thank you and thank you all too and welcome to the White House. I want to join with the members of Congress from Louisiana and Kansas, your loyal fans and the whole nation in congratulating you. You know when I was a boy my nickname was Dutch and looking at all of you I sort of wonder why it wasn't shorty. Come to think of it being here with you reminds me of one of my experiences in college. It was freshman year and just after the football season ended and after playing football I thought I might go out for basketball too. I went to the gym and I saw a few people just about your size and thought to myself I think swimming is the sport for me. But to the women of Louisiana Tech congratulations. You had a lot of great games this season but none was greater than the last one with the lady textures trailing 33 to 19 at halftime. Coach Leon Barmore found himself telling his team you don't quit in anything. You don't quit in life no matter what happens be proud of your efforts when it's over so you can live with yourselves the rest of your life. Any other game when we'd be behind by that many points forward Erica Westbrook said we'd be all upset. This time we kept thinking that it had to be in us. We had to keep digging and finding it within ourselves. Well Coach Erica and all of the lady textures you found it. And I just have a certain feeling that you're going to be able to live with yourselves pretty darned well. Congratulations go as well to Coach Larry Brown and the University of Kansas Jayhawks. Now it's no secret that at the beginning of the NCAA tournament you Jayhawks well I suppose the way to put it is to say that you weren't exactly favored to win. So what happened is a testament to determination, to hard work, lots and lots of hard work, to pride, to teamwork and the courage to dream and perhaps nothing exemplifies the true meaning of teamwork than the support you've all given to Archie Marshall and the untiring support Archie Marshall has given to you. In my opinion that's just the way it should be. As the soft spoken Danny Manning said to a jammed room of reporters after the final game I'd like for you guys to put this in your articles.  To those who said it couldn't happen well we're number one. And to Coach Larry Brown the man who did so much to make this a championship season I know Jayhawk fans everywhere are rejoicing that next year I'm the only one moving back to California well they're both great stories the stories of these two teams these two fighters who happen to turn themselves into national champions and if I could offer a thought to each of you young players it would be this remember the lessons you've learned this season the lessons about hard work and never quitting about digging down into yourselves when you seem to be behind because what you've learned in basketball will be a strength to you all your lives especially here in this great land of opportunity because it's true if you keep your head up and work hard in America anything can happen. So again congratulations on your exciting victory God bless you all and have you thought about a game between you know what ever got up here and fainted President Reagan I know over the last eight years that he's probably had many a famous person here with him and a lot of great people and he's invited him to the White House but I can assure you that no one appreciates it more than Leon Balmor the Louisiana Tech Lady of Textures President Dan Renau and Louisiana Tech University we're very honored to be here but I think something really special to me is I watched during these eight years and I'm a big fan of President Reagan the image that he's presented and he and his wife and that's the very same image that we try to present with our women basketball players and team in Louisiana Tech. In 1981 he came to the White House that was the same year that we won our first National Championship. In 1982 we won a second National Championship. His last year in office is this year and we won again. I believe it was a great eight years for all of us especially the President in Louisiana Tech. I have one of the best basketball players in America and this morning's USA Today she was won the way trophy Friday but it was in today's issue that's Teresa Weatherspoon. I mean she's a heart and soul of our basketball team. Her determination and effort in that championship game led to rest of her teammates to victory and she wants to come forward to present President Reagan again. Thank you. On behalf of the Lady Textures we want to thank President Reagan for allowing us to visit him here at the White House with him and his wife and few people have the privilege of meeting the makers of history and just meeting him today has given us this opportunity and as a token of our appreciation we want to present to him an autographed basketball from the nation's number one women's basketball team, the Louisiana Tech University Lady Textures. I've never been anywhere eight years so I just don't quite know how to react but and this is our first one but it's an extraordinary thing to be invited here and be recognized by the President of the United States and everybody connected with this. You know we had a real difficult time getting here but I think the difficulties made it all that more meaningful. Chancellor Butik, the University of Kansas and the State of Kansas I know are thrilled to death and this is something we'll all remember for a long, long time. We had a great player, I don't know if USA Today recognized him but I think all our team did, a lot of people talked about our team as Danny and the Miracles and that's something we all believed in but Danny Manning, one of our captains and one of the great players to ever play college basketball is going to present the President with a gift. I have to bend down a little bit. I'd like to thank President Reagan and the staff for having us here and we're very thrilled and it's definitely an honor to be here and we'd like to present him with one of the basketball men's letter jackets.


Thank you very much, good morning. I need to move, I can't stand. I learned that when I was out in the field for 20 something years, like many of you. And somewhat standing up here on the stage, I feel like back in the UN. I feel like back in those days, I was up and you're down. And there's a barrier in between and there's a distance. So usually I like to go down to be on the same level with people. But it's not possible, there's no space. But if I do that then the cameras can't follow. So I'm forced to stay up here. And somewhat it feels very uncomfortable. So that's where innovation starts. Rethinking our relationships. This is all about relationships, relationships in the world. Relationships between those who are out there. There's seven and something billion of us. And how do we relate to each other? Something extraordinary has happened over the last, I would say 24 months. Especially for all of us who have been out there risking our lives and saving lives. Trying to change something. And trying to get that message across into the world that somewhat there are needs which are uncovered. There are situations out there where we don't feel that the world is paying enough attention. And something has happened in these 24 months which nobody could believe would come true one day. The whole world is thinking about refugees, displaced people, migration, is suddenly talking about humanitarian aid, is talking about development aid, about sharing resources. Who did it? Not us. It's the people who actually risked their lives, who came across the Mediterranean. Many died. And incredible difficulties, incredible risks, incredible money they spent. And in fact they achieved what all the public relations and media departments of all the aid agencies of the world never managed. They got it across. So suddenly wherever you go people discuss it. It also woke up something which of course we need to get nervous about. That's the ghosts of the past. That's the populist and fascist statements we read every day somewhere. It also of course showed us the limits of the European peace project. That's how Europe started once upon a time. It showed us that somewhat we are not as advanced as we thought. That they're so well equipped and trained and educated West. Europe is far behind in fact. And there's something else. And that's where we're coming to actually our theme here. There's something else which definitely exposed the limits of what all of us have been trying to do and been doing for decades. Since we invented the modern form of charity, of helping, of being out there. Somewhat it's not that the system is broke, as my former boss Antonio Guterres keeps on saying. But the system somewhat is clearly broken. It was always broken somewhat. But we simply didn't see it. And that's where we're now beginning to have to rethink. That's where we start the theme of innovation. Innovation is not about technology. Innovation is about re-changing our relationships. Innovation is about the way of how we finally move away eventually from the colonial past, which is unfortunately a capitalist present. We're still there where we were before. We're still playing some city and getting little ships with resources from all over the world to us, that the ones who are living in prosperity have access to whatever the world can. So the question is, how do we turn it around? Again, organizations like MSF being everywhere, being at the forefront, the United Nations agencies, the many, many other aid organizations in the, what we call it now, the aid industry, are covering only a tiny, tiny little bit of all of this. Let's be honest. How many of the 120, 130 million people in direct need of something, of survival, besides the one billion people also who have gone hungry yesterday, today, and will go hungry tomorrow? How much of this the traditional aid is actually covering? So we need to be honest with ourselves. We cannot do it. We cannot achieve that. We assist everybody out there who is somewhere in need. So that means we have to change the way. We have to change the way of how we look at it. How do we multiply out the capacities? And the answer is, for me, pretty simple. It's not our capacities, it's the people capacities. Getting away from the arrogance we have as organizations, as people who come and help. I was also in that feeding before, when I had that impression, I was bringing something to other people. It's really the famous help people to help themselves. And are we really doing that? Honestly, I haven't seen it. I have been most of my time, not always, but most of my time really in the deep field. I have not seen a lot of initiatives, a lot of projects, a lot of true attempts to have people really take over. And that's something we need to really address. And there we come to connectivity. Connectivity of what the world can do. That's what I said to myself when I quit the United Nations back in 2014, is, well, it can't be that me as a field manager, I haven't seen anything of what the world can do reaching us, reaching us somewhat, reaching people in the field. All these, what we call today, innovation technology is new systems with the exception of having less people in the field because there are more people dealing with something behind, writing reports, more transparency, more accountability, analyzing data which don't help me because in the field I have to make decisions on four or five factors on the spot. Doesn't help me to go too much into detail. It helps maybe others to plan better, but I haven't seen, as a UNHCR manager, anything of this coming in. I haven't seen anybody I was working with really capable of taking over once I had gone. So how can we actually move to that stage of what I would say are the resources of the world, the knowledge of the world, that what people can do, what we have invented, what we can share so that others have access to this. We are benefiting from the fact that it's very easy to grab our phone and we have relatively good connectivity. We have Wi-Fi's, we have whatever. And if you have a question, we put the question to Google. Or we have a question, we put the question to a network we know. Other people don't have that access. Are we really true about giving that access? So for me the first demand in here is let's try to have really everybody in the world have that access. Let's turn around our rejection. We all have that feeling about globalization and connectivity as being something bad, but it's very easy to say if you have access. Everybody here in this room has mobility, has access to technology, has access to knowledge. And it's very arrogant to say, other people down there, we have to protect them against that globalization, against that mobility, against all of these evils of modern society. The world has gone too far that we can stop it. So now it's up to us to turn globalization, connectivity to the advantage of the people out there. You have done a lot, the little I've seen of the work on the medical field particularly to make that happen. But it is still not enough. It is still in the hands of a few. So the democracy of knowledge, socializing knowledge, that's what we are here for and should be here for. That's where innovation starts. The rest, yes, these are gadgets, the inventions. There we can find a lot of things and but that is not what I would call the true innovation. The way of how we accept again that we have limits, limits in what we can do. Finding the ways of transferring responsibilities back to the people who are really the most concerned everywhere in the world. That is what we need to work on and it's possible. There are many examples where in fact, when we were not there, somebody else has taken over. I don't want to praise the private sector but the private sector has capacities, has resources, has a lot of knowledge. Public sector, capacities you have in municipalities, in local governments. This is all something you need to make sure it travels and it doesn't travel only between London, Paris and maybe if you're lucky, Mumbai or Rio. This also belongs to the hook, to Mafrak in Northern Jordan. This knowledge belongs to the small places where we all work, there where the stuff is happening. That's where we need to make sure that somebody realizes I can do something. That's what we do. That's what we're trying to do right now in Northern Iraq. I give an example here. Northern Iraq has one and a half million displaced people and refugees in a population of four and a half million people. Is the answer with the humanitarian agencies? Is the answer out there to actually use humanitarian resources? No, it's actually with, in supporting the local communities to actually understand that they can deal with a larger population in a different way. It is with, in fact, for us to lobby for others to come in and I know that is the difficult part. That's what we're very bad at. People themselves have learned that in many cases, waiting for the aid agencies is maybe not the right thing but then they're left alone. That's also something I'm coming back to my experiences in Zaatari camp which really taught me to become more humble because that was one of the examples where people took over. When I was asked in 2013 to take over Zaatari refugee camp, which was a mess, some journalists called it the hellhole of refugee camps that was really violent, was really not pleasant. In fact, what had happened was an upheaval of the people against the aid agencies and against the way of how we were dealing with this. They wanted to be treated as people, as human beings and they didn't want to be like we are now us up and them down. They took over, they reorganized our site planning. They dismantled 86 buildings because they didn't want to go to the toilet together with 50 other people as we had decided. They did not want to eat the same stuff. They wanted to be treated like normal human beings. They wanted to transform that camp, not into a better camp but into a city, into a living space. And we were holding back, we were trying to prevent them. We called it illegal, we called it criminal. We got people arrested when they did that. That's how we think about them and us. So that's what I think we need to rethink. So, for instance, let's take that example of refugee camps. Who should take and manage situations where we have 500,000 people, a million people into an area? Some go into camps, others are in villages. I don't think it should be UNHCR. I don't think it should be UNDP taking over from UNHCR. When we talk about UN it shouldn't be, it shouldn't be the aid agencies. We should be talking about developing the whole area and there again, a combination of protecting the rights of people. That's our job, making sure that everybody has access, but have infrastructure and services being delivered by those who know that better. And that's again, capacities from the private and from the public sector. Academia, universities can contribute a lot. The world has an answer for everything. Before we go into discussions, I would like to show you a little clip. That's a clip from Zaatari Refugee Camp from 2013. BBC Business Report, one year after Zaatari Camp was established, was established on the 29th of July, 2012. The BBC Business Report came to a refugee camp. You wonder why, but first the clip, please. The refugee camp is staggering. From East to West, so big it's now considered Jordan's fifth largest city. And to illustrate its size, back down on the ground, a complete loop of the camp's outer ring road takes more than 20 minutes by car. And inside the camp, the number of residents has grown from a few hundred to about 120,000 people. And where there's that kind of population growth, commerce quickly follows. So this is Zaatari's main business street. It's home to hundreds of shops and services. And it's so popular with Syrians and camp workers, it's been nicknamed the Champs-Élysées in reference to the bustling shopping street in the French capital, Paris. A walk along the street reveals a brisk trade in anything from mobile phone sim cards, cigarettes, gas refills, and electrical appliances. But aside from the sale of goods, services play an important part in creating a sense of normality in the camp. The owner of this business quits his beauty salon in Dara, Syria, and moved to Zaatari last year. The shop generates a small profit by offering haircuts at a one and a half dollar fixed price. But running a camp business is wrought with contradictions. I'm worried about lost opportunities and if I'm making the right decisions. For example, I look around me and think, should I renovate the place and expand it? And then I think, why are you going back? Some people say the camp was better in the old days when they used to distribute meals. But I think that now is better. We can open our own shops and the fact that this is possible is good for us. Now we're living like anyone else. There's no better way of illustrating that point than having a look around Atef's wedding dress hire shop, a hot spot for brides to be. Women used to come here, say they have weddings, and they can't find dresses. So we got two dresses for rent and it worked out well. We have two weddings a day and there are people who come from outside the camp to rent dresses because it's cheaper here. The profit is not that much but we are doing okay. Sometimes we even take five dinars from people who can't afford to pay much. But while formal businesses thrive, so too does Zattery's black market. District gangs are known to make a handsome profit by selling on aid goods and siphoning off electricity supplies. The man tasked with tackling this issue is camp manager Kilian Kleinschmidt. A walk around the camp reveals how his policy of encouraging business development is having a harmonising effect. It's sometimes, and in the interest of maintaining peace, even he has to turn a blind eye to the camp's more questionable business deals. Back in Mr Kleinschmidt's meeting room, and you can't help but notice this, the interactive map once used to explain his camp strategy to U.S. Secretary of State John Kerry. In short, district councils need to be introduced to improve law and order. We need to bring in control, manage it, but also give the freedom for people to develop their businesses and develop their capacities, develop their homes. So that's why, as we speak, trying to put in place physical compounds, physical administration, divide the whole place into 12 districts, which allows us to actually know who is there, what they're doing, and help them to doing their things in a better way, in a more regulated way, but also in a free way. That's what free market economy is about. So economic theory has a way of bringing about calm and stability. But keeping the peace in a camp is not always that straightforward. At the end of a long, hot day, tempers can fray. Oh, the tear gas used by Jordanian security to disperse a frustrated crowd. A reminder that Zatteri Champs-Elyse is far from its French namesake when it comes to doing business. One demonstration and one act of violence amongst bigger groups since 2014, April. Not one demonstration. Because we changed our relationship. We were building a camp. They were building a city. Just to conclude, now there is the Jordan Compact, which has been announced in London during the Syria conference. And one of the projects is actually to bring forward special economic development zones in northern Jordan, where Syrians and Jordanians should be able to work alike. That is not the job of UNHCR, UNDP, MSF or anybody else. That's not the job of professionals. To make sure, professionals in the business sector to make sure that there is actually investment, that there is actually of course the protection of labour rights, that out of that still quite flimsy settlement becomes a real city and that people can actually build up the future of their lives. That for me is innovation. Thank you.


Okay, hello everyone, name is Gabriel Freitas, and I'm going to tell you a little bit about my experience in the open source by integrating a project like RabbitMQ to Knative. And this is path to GA, how to guide a RabbitMQ story. Basically for this talk, I want to learn a little bit why it's Knative and why isn't it for this integration with RabbitMQ. So I will explain the big picture of Knative and how to connect these pieces into your project. The process for bringing your integration to Knative, this talk is not going to be a deep dive on how to integrate a project to Knative, but it's going to be a summary and hopefully a useful roadmap for people that want to integrate, who have thought about integrating something to Knative, so you can look at the steps that I had to follow by helping with integration. I didn't start it from the beginning, so there's a lot of context that I have to learn and I have to ask, but hopefully this will avoid some of the mistakes that I personally made and make your life easier when getting an integration done with Knative. I'm also going to tell you how and who defines quality gates for GA and how to prioritize them, how to make your components available through the Knative release process and documentation, how to overcome all mistakes and strategies to solve them, and how to gather qualitative and quantitative feedback from metrics and users. So let's get started. First of all, if you're going to integrate something to Knative, it's worth knowing what is Knative for. So to answer this question, you have to go a little bit back in the time and why is Kubernetes something that we use today? So Kubernetes was aiming to solve an issue with past time apps that they were hard to develop. Distributed systems have been hard all along the time, so with Kubernetes, you look to put an abstraction later on top of building distributed systems so you could manage less complexity than to manually manage containers like cycles, containers, crashes, errors, and all of the changes that you have to do on a distributed system. Kubernetes gives you an opinionated way of doing this. You have to do it by YAML, you have to do the Kubernetes API, but it's a light opinionated framework to do this because you can extend the framework, you can use tools that you use on your past project that are integrated with the Kubernetes ecosystem. So it has to be opinionated because it has to give you a way to do this simply and more easy than it was before, but it lets you extend a lot of things, a logs, metrics, and all of this stuff that are normal in the distributed system world. On top of this, Kubernetes, it's still hard. You can end up with YAML Forest, a lot of YAMLs, a lot of configuration, or it could be complex and complex even when using Kubernetes.  So it is opinionated. Yes, it is opinionated, but again, it tells you you have to use this, but you can extend it using custom resources. You can use existing integration like the one that I'm going to explain today. So let's explain the Knative pieces and how they managed to get a pretty, a fairly big picture of the cloud-native state into the pieces that they separated. Knative divides in some pieces. Knative serving that offered you a building block to manage your serverless workflows in the cloud. Knative eventing, Knative eventing lets you give you the building blocks to build your event-driven architecture using the Knative way. There is broker, streamer, channel subscriptions. We will talk about that later. Knative function, it's again another abstraction layer that you hide from the user functions. Reduce the complexity that serving and eventing have because this is hard. System can get a lot of complex, can get complex and complex from time to time. So functions is aiming for simplify even the Knative way. And Knative build, that was a, Tecton was a part of Knative build. Like you have that CI-CD system that is independent for any cloud provider. So Knative is open source at the end of the day. So it has its pros and it comes. And the community is driven where it's heading. Function is a clear example of that function. Didn't exist like a year before now. And it was driven by Lance Mauricio. And I will talk a little bit about it because it's definitely a successful case of how to drive something on the OSS world. So Knative has a lot of pros and cons, as I said. One that you can see as any of them is community driven adoption and development is key. Communication and consensus is necessary.  We are looking to thrive and to get bigger and bigger. So you cannot pull the project to a direction that you want. You have to communicate your ideas and look for people that are wanting to support and help you by implementing them. OSS is fun but hard. Open source is fun because you get to know people from different companies. You get to know a lot of brilliant people that it's going to help you. That in other way, working just for your enterprise, you are not going to get that opportunity. But these people is also rotating. They get tired of the project. They get involved in other projects. So the hard part is to being able to get in the role of the people that left and keep going with the community as you do that. Knative is big and complex. You have the docs and as a community, Knative is by no means a small project. It has a lot of moving parts and it's always evolving. So docs and community is going to be the key for you to start understanding the project and use the working groups to align and get the right context. Knative have these working group concepts where people join groups to work in a specific area of Knative. It's impossible for one people to maintain the whole Knative ecosystem. So the best way to start at least is joining the working group that you are more interested in. So if you are interested in eventing and serving, they have their own working groups. The function teams just got its own working group. So you are seeing how to start to get involved and driving the creation of your part of the project in the community. So now that we know what is Knative, what it is for and how to start your journey in the open source, then where to start when you want to drive your integration or even start your implementation in the Knative world. Basically, it's all about the spec or the type. The specification dictates what your implementation has to conform to or what your implementation has to look like for other people to see. Basically, in Knative, I'm going to focus on Knative eventing in this talk because I think it was integrated as the messaging protocol behind the Knative eventing implementation. So the specification is basically a document that tells you as a developer what your integration should have for you to implement, basically. And for a user perspective, this document tells you, okay, this is what you have to expect when using that implementation in your project. So Knative eventing has detailed specs on brokers, triggers, and all of these customer resources that it defines. The serving also have them, but let's move that aside for now for this presentation. Also, there are parts of the code that don't have specs that you're not going to define everything in a project as a spec. So if you don't see a spec and you want to implement something that is missing or something that maybe is not functioning like the flagged example that one of the folks told us in one bus talk, then you have to look at the type. The type is going to tell you, okay, your object should look like this, should implement these methods. This is a way that you should start your implementation on this and maybe change it in the way. That's something that you just have to start doing it and then you will know if you're in the right path. And sometimes it just does not exist on Knative eventing, so in Knative in general. So if it does not exist, go for it, write your specs and write your own types for you to start implementing your integration. Now that we know how to start, let's go to integration. You must have a reason behind your integration with Knative. The way a working group can stand behind your integration. Always communicate what you are doing in Knative. You can think that you have the new great idea for Knative, but maybe a seasoned maintainer is going to tell you, okay, this can be done in another way or this is already something that we discussed that we don't want, so communicate. So a working group can stand behind you or even create a new one as a function example. Understand the pieces involved, not the whole picture, just what you need. Basically, when you're going to start your implementation, there's a lot of things to look at. In RabbitMQ, we just had to look at eventing, but even then, we didn't look at the whole picture of eventing. Basically, we ignored the implementation of channels and prescriptions in favor of higher level abstractions that were broker-triggered sources. So basically, eventing RabbitMQ does not have yet channel subscriptions because we wanted to offer the users that we had in mind, the filters and the capabilities that the broker-triggered sources were already covering. So in that way, we went to an initial state to a GA state more quicker than it was implementing channels and subscriptions. Basically, now that you have your picture, you know where to implement it and what to implement, you need to create a Sandbox repo. Sandbox is a part of Knative that gives you the tools to create a repo that is not getting the Knative core repo. So everyone in the community can start seeing your code and checking out what you're doing and start contributing if they are interested. So this is a great way to start implementing. A lot of things are covered in the readme, so I'm not going to go into details, but this is like the roadmap that you have to follow to get your implementation going and the community to start talking about it. So after you create your Sandbox repo, you're going to start with the testing. How do you tell another software engineer that your project works and not just by your words is by telling, okay, I have test all of this code and the bar is high, it's always passing. So there are three types of tests that I found that they were key on the Knative environment. One of them are unit tests, the usual unit tests that you do to your code, E2E tests. These are ways to test scenarios, real scenarios by emulking all the dependencies, but you need to have a lot of resources on how to write E2E tests in different, based on GitHub actions using different cloud providers or cloud environments. And finally, the conformance tests. If you remember, I told you about specification or specs. Conformance tests are the way to tell Knative that your conformance, your specification is being respected by your implementation. So basically if you have an specification of a broker that you have a function that you have to implement and if the function needs to return something greater than zero or and it's correct or less than zero to be incorrect. Basically a conformance test to test this is okay. I have this function, my function is returning greater than zero, your conformance is passing. In the other case, you are not respecting the specification of that specific implementation. And this is what lead us to the whole picture. Basically this is a pipeline or multiple pipelines of the Knative and ending site where you can see where all of these is getting in the picture. You see here that downstream tests is something that I haven't explained, but basically Knative is an upstream repo or upstream ecosystem basically. So Knative is the repo that other repos that are the integrations or other external repos depends on. Downstream tests are the ones that based on the unit test the E2E and the conformance test are going to tell Knative, okay something is changing in the upstream or repo is breaking. Now you have to tell us what to do because the ecosystem is kind of breaking up. So this is a way of automatizing the whole environment for everyone to know like when it's on your release, there are new changes. Your project is still stable or your project needs to adapt to the new changes. This is something that is maybe it's not for the normal projects, you don't have to have an ecosystem to start your integration or all that. But having this is key for an ecosystem to be stable and to be usable around multiple integrations. Now let's go, now that we know a little bit how are things handled by Knative and where are we in our cycle to integrate something with Knative let's see event in RabbitMQ. So example, basically what we wanted to do is to integrate RabbitMQ that is a messaging multi-protocol machine system to Eventim, because Eventim underneath uses messaging protocol to make sure that the events are getting from the sources to the things. So we started going over the Knative rep material levels, we have clear that we have an initial state of projects and stable state of projects and usable state of projects. RGA was our goal to make the project usable for new users. So we started defining what we needed to implement. As I already told you, Eventim have channels, subscriptions, source brokers and triggers and also flows. So we basically in noted the channels and the subscriptions and went for the broker, trigger and source abstraction that when we're higher level for our use case and start documenting, we started documenting as soon as we were implementing this but it was not enough. Then we realized okay, documentation is key but we are not getting the right kind of documentation for our users so we started building POC demos starting getting RabbitMQ to the Knative.docs talks, blocks and at this point we started to get users to use them and to give us feedback and that was key with the user feedback, we documented even more and at that point we were happy on how things were going with RabbitMQ but we were not quite ready for declare GA for RabbitMQ. We declared usable when we integrate the repo into the release project, basically it's adding your repo to a YAML, having a way to release your repo in a GitHub action and integrating the tests with the Knative release process. At this point this was our architecture. Basically we have the broker and trigger that are the ones that receives cloud events and forwards them to a sync and we have a source. A source receives a RabbitMQ message and forward it as a cloud event. This is important because this is the only way that you have to forward events in the RabbitMQ architecture, of course not but this is the one that made more sense for us to integrate with Knative and the beautiful thing with Knative eventing is that you can use this as a RabbitMQ broker but if you change that type and use Kafka broker implementation it's going to look different but for the user it's going to be the same experience. You're going to get, if you're using broker trigger you're going to get a cloud event and forward it to a sync and if you use a source you're going to get that Kafka message or Kafka payload and you're going to forward it as a cloud event so it hides everything for the user. This was our responsibility as RabbitMQ experts to define this architecture. The orange bits are the one that are managed by RabbitMQ so this is not a problem in Knative. This has the wrong way of handling errors and handling the messages and the green bits are the one that we had to implement in Knative. The basically all of these receipt of adapter, dispatcher, the DLQ dispatcher, consumers and all that so I will talk a little bit about them in the next slide. One of the things that we had to do was define and quality gates. If you recall what I just said, this is usable. This is not yet GA. GA means general availability for the user to use your project so we needed to have these quality gates that we need to achieve for users to start trusting our product for them to integrate in the project so what is a quality gate? It's basically that a mail zone that you need to reach to get your project into a usable state. So, at this point we were implementing things as they were coming. If a user told us like, okay, we need 1,000 messages per second, we implemented. This is failing when I do this and this. We were fixing that but we didn't have a concrete set of goals that led our implementation so when we defined the quality gates was really a game changer for us. The first quality gate was, we need to achieve the 1,000 messages per second. Second one was, we need to maintain the at least once delivery guarantee and we, I'm saving two for the end or one for the end that was a user of us told us, okay, we need this and we saw that, okay, this need to be ready for GA because in our case we are not ready yet. Focus on the essential, setting concrete goals, let you focus on the essentials and errors and errors are also scenarios. We were, as you saw in the past slide, a lot of things were green, a lot of things were our own work to integrate with Knative and these things did not have any error recovery system so you have to be careful on how you do the retries, how you handle when one part of your system is failing because that is key on an event-driven system for it to be usable in other projects. And basically, user issues are critical. I told you that set concrete goals and focus on the essential is also critical but always a user that is using the project is in open source at least, is the keystone of your implementation. So when users start telling us, okay, this is failing, we need TLS, we need the MTLS also in our implementation that modified our concrete goals that we have, they weren't but it was all worth it because at the end we have already a useful system with all of these points that we may be missed because when you're implementing you have your own context of what you're doing but when someone starts using it from the outside, this is going to change the way you see your project. So basically when you set your goals, now you need to gather valuable metrics that allow you to measure, okay, I'm getting into those goals. How do you set those valuable metrics? You have to have in mind that not every quantitative piece of data is available metric. We have a lot of data available to us thanks to the revenue implementation but some of them were not key for our GA announcement like for example, how many bytes are we writing per second and are getting forward by the revenue system. That was something that if we follow that metric we will be in the wrong path and this probably will take us three or four months more than it took us. So you need to read exactly what you need and you need to integrate that into your development process or cycle for you to get a successful project. So K-Native provides a good set of metrics to consider and start there. Basically if K-Native is measuring that, probably all of the projects that are integrating with K-Native are measuring them so there's some good clues of how or what metric you have to use to start an integration with K-Native. Also use your quality gates, one that I explained before as a guide for your metrics. We wanted to reach 1,000 messages per second. That's a point where you can start thinking, okay, if I need to get to that goal I need to measure something that is relevant for that goal and that give us the clue to set two or three more measurements that we had in the metrics. Have a clear goal when benchmarking basically or benchmarks are adapted with things that we can measure and show to the users, okay, this is working. This was what we promised and in every release we run the benchmarks and update the images for the users to know we are still getting into that goal or we surpass it for them to be sure like, okay, this is key. I want to use RabbitMQ because they have these X throughput and they are maintaining in each release. So it's important for the user to see and to be attracted to your product, like, okay, this is your benchmarks and these are the guarantees that I'm offering to you. And also log certain metrics. We were logging a lot of stuff and we were thinking at some point that, okay, this could be used like a metric but no, logs is an event that is happening on your system and a metric is like a snapshot of your system in a certain instance. So be careful to take one as the other because at the end we realize that logs were throwing us off in the wrong path. So after that avoid common mistakes. Basically all of them is a list that is worth repeating of things that went wrong in the integration with RabbitMQ but also where we learned a lot about each one of them. I hope that leaving this here can avoid this pain point for any other future integration. So don't start implementing before talking about your idea, focus when in doubt, use the community and other channels. Go one step at a time. Don't buy it more than you get you. When you are going to implement something, go right into that path. You don't have to learn the whole project to implement something in eventing on functional and serving. Learn to prioritize about focusing on more important stuff and roadmaps and goals can be more important than the implementation. Hopefully this talk gets you a little bit excited or change your mind about integrating some stuff with K-Native. And I hope you all enjoyed. If you have any questions, go ahead. Thank you.