 We are from Goldenproject, from Warsaw in Poland. Today we're going to entertain you by building and running some software on WebAssembly and on the golden infrastructure. Can I have a picture of Hans in the room? I mean, we have guests here. How many of you are either current or former software developers, like coders? Hey, this workshop is for you guys. Do you remember how you all started? Do you remember how you started coding? How you felt compelled and excited to touch the keyboard to write a computer program? I remember when I started, I was 8 by then. And I wanted to write a computer game on my 8-bit Commodore. So I went to wait. I picked a book on basic and I just started writing simple if-then statements. And I ended up with a text-based computer game. It worked and I felt the thrill for the first time. Years later I picked up C-language, which felt so professional to me. And I had to learn new syntax with the braces and curly brackets. And it had a compiler and I could compile the exifile. That was so exciting. And every time, years later, when I was speaking all the other languages I was learning, I felt the same thrill. I'm almost 40 now and I started learning Rust language last year. And I again felt the same excitement with the new syntax and new tool sets being able to build something that actually works. I'm saying all this because we hope to be able to replace some of this excitement with you guys here, playing with WebAssembly and Golem. So WebAssembly. WebAssembly, essentially, is assembly language for the web. That's our plot. But seriously, it is a programming platform, like the native programming platform for the web. That's how it's sold, how it's hosted. It's both with new native performance. It comes with a binary format to distribute your software. It can be compiled from any language. That's the concept of it. Today we're going to be showing Rust language. And it's both on the best support for WebAssembly compilation. But you're able to compile from C, C++, from Go, and other languages as well. I mean, I even heard a C-sharp compiler. It is portable, so multiple platforms. It comes with a sandboxing model, which is very similar to JavaScript. And funnily enough, it's also very similar to JavaScript in other aspects. I mean, just like JavaScript broke out of the web browsers. I mean, look what happened with node.js. In the same way, WebAssembly doesn't need to be run in the browser. It can be run on a proper server-side backend manner. And this is what we are going to be demonstrating and playing with today on GoLib. And on GoLib itself. GoLib is a concept. It's a concept of a distributed decentralized marketplace for computing power. So essentially, you're able to share your computing power with others on your GoLib network. What's important and convenient for us here is that since last release, it supports the WebAssembly running. We call it the GWASM model. And what's also convenient for us today is that GoLib has a sort of lightweight version, which is called GoLib Unlimited, which is rid of the economy layer. And it's meant for the trusted environments, such as the one you'll be seeing here today. And it also supports the GWASM modules. So that's what we're going to play with today. But before we begin, let's set ourselves in the mood. Can we just dim the lights a little bit, please? So imagine we are not in 2019. We are here in Osaka in 2077. And we are at war. We are the crypto resistance, depending on the free world from the oppression of the corrupt, crooked corporate syndicates. To exchange ideas, we celebrate our annual secret conference of the society's greatest visioners and thinkers. And through gathering of free minds and free wills, such as this, is an obvious threat to the syndicates. We've learned that our conference has been compromised, and we are likely to become a target for attack. We expect long-range cruising missiles to be launched from the private islands in the Pacific Ocean. But we are not defenseless. Our wits, our technology, are the ultimate defense. Join us today. Join the network. Leverage the computing power so that together we can outsmart the enemy and make a step towards a more balanced civilization. Who's with us today? Who's joining us today? Those of you who want to join the workshop, like the hands-on building workshop, welcome to join the network that we've set up for you. We have prepared a safe training boot camp environment. We have a local network where there's a Wi-Fi, there's LAN tables. LANs are going to be more stable than the Wi-Fi. Join the network. Open the URL, which is there, and it takes you to the landing page of the workshop. By the way, the landing page is also available online, on the internet, so you're happy to repeat those exercises with all the materials in your home time. Those of you who want, we have pen drives here with all the content, all the binaries, so we're going to grab this and maybe quicker to download to install the setup. So the plan for today is, we will set up the golden certificate cluster. So we have a golden hub prepared for you, and you will be able to connect to the app so that you can participate in the suit of computation on WebAssembly. Those of you who don't want to take a coding session are happy to sit back and relax, but you can compile a sort of round-deck golden provider part to join the network so that your PC is actually posting the computation. Those of you who want to take part, please download the Docker image, and that contains the full development environment that is required for the session today. That session will be played by my colleague here on the screen, so you're happy to follow. If you are having trouble connecting, if you're having trouble running the exercises, just raise your hand, at least someone from the staff will try to help you. I think we're all set for the GU cluster. I have a colleague here who will take us to the process. What's up? I don't mind if I sit down. I didn't sleep last night. I bet all of you have problems as well. It's very creepy. As it was shown on the screen, for those of you who are calling us, we have prepared a website for you guys. It's www.devcom.com.net and you will find pretty much everything that we're going to cover today here. Sorry, I'm going to find everything that we're going to talk about here and there today. That includes the tutorial. Now, the tutorial has got quite a bit of text, so you might not want to follow it now, but feel free to do this. We play it ourselves on phone. Hopefully, you guys are going to have fun with it. Now, for today's session, I advise you to do the work of teaching. It's about copying paste instructions, essentially, so if you're ever lost, just copy and paste, then you should be back on track. First and foremost, for those of you who are trying to join us, the instruction is in showing the tutorial. Great. So, where do we start? So, in the tutorial, section number one is going to talk to her. So, have you guys actually done it? Yes. Have you tried doing it? Oh, yes. Right, okay. So, if you go to our web page www.devcom.net and then forward slash tutorial, please follow, so basically, for your posts, the mark or the limits, get yourself the installation package and run it if you can. For those of you who put the tablets, you can try it, but for those of you who have Windows services, actually might not. Okay, does it make sense? Cool. So, what's going to happen then? You should see the train. I've got a mark here, you see on the screen. I'm looking at the figure. It should be in the top right corner, for Gene, I can do that, right? Then, if you take the figure, you want to connect with AutoStolen and give it, you can give a sample to access, it doesn't really matter around. You're not going to be running anything out of here. Okay. And as you will be connecting here, you're going to see you guys here and that's, if you go to hub, with a port number of 61, 61, 622, and a 4 slash app, 4 slash index, HTML, HTML, you're joining. Could you make the photo of the figure? Yeah, I can. Apple plus? Yeah. Thank you. Okay, so these are all the seats in Macs. Not actually both. I haven't seen Windows here. So Linux is in Macs. We're going to connect the cluster here locally. This is everything right here on the local network. And we're going to use this cluster to actually upload the picture later on. And it's very easy to set up. We've got the installers, as I mentioned, on the tutorial web page. So you can actually, if you fancy, you can actually do yourself later on as well. You can actually have your own cluster too. To do some fancy stuff that we didn't mention before. What is probably also important is that the packages, based on packages that have been prepared, they do contain the awesome runtime. So they do contain the WebAssembly so the backend, and we will run the WebAssembly modules that we will build on those hosts, on those nodes. So essentially what we're presenting is we'll present the running of our software or the software that we will build on the distributed network somewhere on your PC. Anyone? Success in connecting? Excellent. Anyone else? Hey, do you see yourself out there? Yeah, I was trying to... It seems... Does anybody know how this... I'm trying to... I'm trying to... I'm trying to... I'm trying to... Is it... Are you on the cable or the Wi-Fi? Oh, the Wi-Fi. They've got like 15 different networks here and they open a few more shutters. Wi-Fi? It's bad, so if you can grab a cable, just grab a cable. Does anybody else need help? Sign the tube provider? I'm trying to talk about it. Oh, sorry. Yeah, okay, guys. Oh, yeah, there is one window. Hey, Mark Rock. Who's Mark Rock? Yeah, we actually didn't think it's going to work on windows, so that's good. Well, it hasn't worked yet. Oh, yeah, come on. I'll do the change on... Oh, you can't. We messed with it, so... I think the note name is actually what you have... Yeah, basically... I mean, you can try changing it now if you do it and you might break it. Thank you. Ah, okay. So you know you're a host name? Oh, then... No, but you can take your ID and follow the ID. All right, so, I mean, because there's flights numerous here, and there's enough of us to start practicing. Yeah? Okay, ready to do some building? Ready to do some building, or... So, any sheet? We're going to start with A1. More. Make it larger. Hopefully you guys got the document pulled. I think you can get it off the USB drive. The USB drive. Yes? The comment for roping from the USB stick is like on the whiteboard. Okay, cool. Dr. Long minus E, which is minus I. Okay, so... I assume that you already got the marker. If you don't, please do it now. Now, we're going to create... I already did it, so... I'm not going to go through those then, but being like a Ducky workspace, we're going to use it to actually map a folder of the docker, as we can actually ground it. So, this is what we're going to have. We actually pretty much don't have anything on the docker except for the W. So, you can't read it very much there. It's a pain in the ass if you're actually going to pilot there. It takes a long time, especially if you don't have a docker. It's good that you can get it. It's really, really good. So, and then, you know, you can just map the host folder to the one and docker. Okay? So, please do that. Now, I'm going to skip this, because I've already done it, and instead, I'm going to very briefly show you what did not... What did you want? What did you want to run there? We call it what you want to run there. It's basically our punch name for an ABA. So, you can actually write straightforward programs that basically come forward to not reduce paramedics, actually, to offload them on Golem. And it's not only Golem unlimited, but also Golem itself. We're actually, we're almost there to be able to actually run everything in your tutorial in Golem. So, we're almost there. So, the API is very simple. We'll see how it works. And that's it. So, the merge, exec and merge is like map to use. So, I'm sure everybody knows this. So, with split, you basically split the main into a set of tasks that you want to distribute over our network. That map takes... exec takes tasks, does some computation on it, and then spits out the task result and get anything that you want. And then merge, collect all them and it's very simple. I'm pretty sure everybody's done it before. This is the simplest we can come up with. So, let me show you how it works. I'm going to prove to you that it is actually simple. Now, please tell me that you can see this. Or is it too small? It's bigger. It's better. I can keep going. Is that okay? I mean, if I keep going, it's good. Okay, go. So, when you open Docker, you're going to add in the LLGWAS brother audio lock. Oh, by the way, we're a Rust fanatics and we really encourage you to use Rust as a console. No physics is actually really cool. In my... In my humble case, I used to go a lot with Rust. This is so much easier. The examples are mostly in Rust but there is a simple example as well for the CD. Yeah, do that stuff. So, we've got them free install, free Docker. We even have nano. Can you use it? I mean, I'll throw it to my page. So, let's open it up. Now, I've got some stuff free in the cart here. So, this is basically the stuff that you need to have but it doesn't change from I use this in this case, okay? So, we have split tags that I can merge, as I said. Now, I've got some unfinished types here to make it more conformant to the presentation that I showed you. Now, we've also got the dispatcher run and this is essentially the glue that makes everything work. If you want to go in the limited column, I'm not going to go into details about what split context is on RSR but if you have any questions about this, you can answer them afterwards and you can find more about it in the tutorial or in our GitHub. So, first of all, the problem we want to present to you like very simple, right? It's essentially speaking of the simple thing. So, we have an array of 100 integers and we want to do a bunch of them. I know it's a stupid example but you shouldn't want to call it a thing. So, we're going to divide it into 10 arrays, 10 integers each and then we're going to send each chunk to one of your machines. You guys send the sum for us. You guys are going to send us the sum of 5 and then we're going to put it back together and it's great because it's so simple you can actually do this one machine and put it right in the zone. So, a sonic test, if you will. So, an array of integers takes you for bits on the side. It seems as simple as it goes. And the result, for each task, is going to be one number, right? Because after the sum, it's just one number. So, in split, let's first say so that's going to be the size of the chunk and we're going to make it 10, we have 100 integers. So, a size chunk of 10 for example, 10 arrays. It's perfect. Now, that's going to be the input array. So, this is where we're going to split. Now, if you have any questions about rust you can also ask hopefully staff and the others will be able to help you out if you get lost here. So, I'm just going to create a vector of 100 integers assigned. The equal sign is basically you've got an inclusive range and rust output is going to be our tasks so that's going to be... Now, I know this looks awful actually. We need the one element sample and that's because of rust. I mean, I know not everything is great but, you know, technicality I think it's a small fraction of great but honestly, no. It's not that bad. So, now for chunk and arrays of chunks and this is our sum. If I look at this, right? I mean, this is almost everything. And the task is going to be a task sorry, a task and that's essentially magic. Slice the vector, right? From something that's borrowed old and we're going to put it in our container here. Now, just to prove to you that it works I'm going to print it out for you as well as we compile it, it should be visible and that's us, right? I'm not going to fill in exactly here but I need to put something there and show it to you. I want to show you first that it works so let me quickly re-compile them for you I've got the warnings we're going to get rid of them as we go on. Sorry, what's the thing with this one element samples? That's a very good question can we carry it afterwards? It's a bit of a difficulty I'll be happy to show it to you we use a script in for Boston, we're going to be using one for the moment because it's a very robust I mean, I know it's craft, but that's the only thing we can do to do it. So very robust in here we set up all the repos so that you can do it as is possible but it works and we're going to get to it as soon so it's going to be here I've got it right so it's hello so G was rather just to show you some my local times G was rather minus B to show you what was going on target so it was I guess running that's way too much so you can see that we've got 10 arrays going back in let's fill it in the exit, that's very simple we just want one number out and that's essentially speaking bugging, let's print it out so that's summing up every separate number and then we're going to get it this array of powerful sums and do the final sum well it's very a simplistic problem you can clarify the addition of it it does work trust me not yet I know we're going to get there I know you know this stuff but you know right so for the merge so we take the results let me call it given or actually know the final sum 4 so let's take the results now you can notice probably you get a factor of of tuples now that's because if you want to do some more fancy stuff like I don't understand the deviation however you can actually use the input the original input as well to do something more turn it turn it and then just sum it up now and this is what and as I said that's a perfect example because we can verify ourselves so we've got the final sum it's actually something small problem that there you go, okay so it works that's a sanity check that actually works it's important to do it on the class itself we can do that so in Docker we've got everything we can find for you so you can actually go back in here this morning outside but everything should be there anyway so if you do that here you're going to see a lot of stuff I'll show you that on the paper you can see that it works let's go to something more interesting and I've got the bundle, right? I mean if you don't have black fractals you might as well do it now so fractals we can see ourselves simple fractals they actually take quite a lot of time to render in a pretty big so we thought hey that's a perfect example for example to show you here this is exactly what we're going to do if you go on to main you can see that we have the dispatcher here as well if you go into the Mandelbrot module you're going to see that there is merge there is exec and there is some split I'm not going to go into the code it's just too long but if you want if you've got an idea of how to do that comment to it for you so just go ahead and in your spare time so with mine is me you guys are actually going to help us so let's make it a challenge like 10,000 by 10,000 pixels and make it I don't know okay so stop this happening go away oh that's fancy this is new I didn't expect that in the session I don't know I don't know I'm going to get it back here we go so you can see that we're creating the sandbox so this is recording the machine this is mine sorry I'm actually using it something diluted oh we've got the output perfect okay guys we can go through them you can find something interesting I don't know what I is I'm going to do it myself so we do we suggest that you get a look we'll do the floor one like with all the floors just dig deeper dig deeper and the actual description will show up sometime today it's not up yet we didn't want everyone to do it and crack it just for the workshop let's do it after and you will need to team up like teams to do it but I need to interrupt you guys because it was fun right I just got the news well it was fun for us but that's still me that's still you why are you still here because I'm cool obviously yeah yes I just got the news from headquarters we are under attack that missiles are flying they are on their way but as I said we are not without they can we managed to deploy a mesh of sensors in the pacific ocean in the water itself which are capable of tracking tribal objects we are gathering data as we speak we are collecting data and our analysts are preparing a predictive algorithm to actually detect the trajectories and the impact date and time of those projectiles but we need your help okay we need your help to run the reputation only as I said together we can track this we can compute this and we are literally waiting for the package to arrive and be available are you ready? yes can you actually run it? yes I can but there isn't enough of you there's too few of you only few of you managed to connect so we need to do something about it and we decided to use our so called decoy nodes we have a number of undercover machines deployed on the syndicates commercial belt and we used them to feed misinformation to syndicates analytics for example in Cambridge and that was their only purpose until today today we are going to use them to save ourselves we are going to use them to compute the trajectories of the nest cells but some of you may notice that they aren't trusted has anyone of you heard the term HE for those of you who haven't it is a concept that allows computing on encrypted data so in a sense we want to encrypt the data from the sensors send them to the nodes both trusted and untrusted so your nodes will also be computing the encrypted data to get the encrypted results and fetch them back and decrypt them on our site so that our computation is safe so our analytics has prepared the prediction of the algorithm using FEG and that's what we are going to be running today okay so just to clarify we are not making any claims as I was going to say from the very as in like if you break these nodes you know you know how it is right so generating some points now we are going to define so those are the points that came from the headquarters right quite a bit of noise we are going to try and regress so very simple problem we are going to do it using fully homomorphic encryption so we are actually going to encrypt it and then we are going to run it so you are actually going to do stuff we are going to try and regress well like FEG in this case doesn't explore this new type of memory full secrecy doesn't come without a cost so we already got it so let's actually run that on your machines so this is an example app called GUDOT it's just on your USB drives you can play with it as well so all the code is there you can have a look the fully homomorphic encryption library is called GUORF it's on our github account as well so have a look play with it again that's very important right so why is everything running from there basically Ronald is going to run it for us and let's do back and to you let's say 40 ok the stuff is happening and the browser now on the keyboard is actually more workable ok ok so we got the results back you can see the fitter model here so the Ronald was actually doing a lot of stuff he was actually encrypting the stuff then I took the keys randomly then it was sending encrypted code and you guys you were doing computation and it was coming back to us and then we put the model and then we couldn't destroy the missile and all that so we have it so if you are going to die because of me you can sue me later so again so those are the points that we can't if you guys see this I'm going to zoom in a bit more what does it show us I mean it just regrets a lot of the points so we have time here no we are past the time so we are going to die that's ok just send it to the headquarters we might right just send it because we have a live view just send it yeah we're dead anyway we've got that yet I mean we got the points now ah there we go should what are you waiting for I will ask them with the tower port hey we managed to survive thanks to you right so that's it we managed to save the crypto resistance overalls thank you for that thank you for participating in our workshop as I said you can do all those things offline using the material you have seen the setup of the golden unlimited cluster which was really quick I mean most of you were new to it you have seen software built and run on web assembly and on the golden infrastructure you've seen us running FHE experimental simple case but it is actually working and you can see yourself on web assembly again and on golden you have managed to save the free world you're off you're off with the package of content packages for example you're off with the Easter egg for you to pick up and try to spread the word and bring the others speak at the golden staff a great demo thank you guys