 We are a bit behind schedule, but now we come to our last lightning talk for today. It's Oma Akram And he will talk about desk on the secure cross-platform IPC on the network Please welcome Oma Akram So I'll quickly quickly start and make it quick and make sure that we end on time My name is Oma Akram. I come from Pakistan and Well, I come from Pakistan and I have been part of the Core developer team at crossbar IO. It's a German company that that kind of Sponsors the development of autobahn web socket and vamp libraries. We also developed the crossbar vamp router Recently we are actually working on developing a data market that is distributed so that no single entity controls the data So we are working with different companies As part of that project which obviously should show something in in the next few months I've been part of the Ubuntu community for more than 10 years and Maybe the next month would actually be a the 10th year where I become where when I became the Ubuntu community member officially and Ubuntu kind of sponsored my trip here as well and And finally I was a Q engineer at canonical before the famous layoff that happened So I'll quickly talk about the vamp protocol itself Wamp was initially defined as a sub protocol for web sockets The proposition was that because web socket itself was end-to-end and then you have a you have a server and you have a client So something that was missing was if someone wanted to do remote procedure calls Or if someone wanted to route that traffic to other computers, they would have to develop those semantics themselves What the vamp protocol does is it introduces remote procedure calls and publish subscribe on top of web sockets And it kind of allows You to be able to write responsive websites with decoupled services So with feedback from implementers we actually changed the protocol Like in such a way that now any bidirectional reliable transport could be used So it's not really tied to web socket now Any other transport could be used maybe we will be doing Transport based on top of quick that someone was talking today as well So and all obviously zero confets of technology that's That's used for service discovery and name resolution on the local network And seems like someone disabled multicast on this Wi-Fi network So I had to create a hotspot on my own device to be able to do stuff I am assuming that's due to Making sure that the traffic doesn't go crazy and the routers are able to sustain that So I The main thing is this this is the project that I wanted to talk about this is called desk on It's your connection to your It's your computer's connection to different things Your computer could be a Raspberry Pi. It's could be your desktop itself In in some cases It could be your mobile phone which is right now for example my mobile phone is connected to my computer and it's actually controlling These slides. I'm obviously not pressing keyboard buttons there But I'm doing these RPC calls that are like these procedures are exposed by my computer. I'm just pushing them from here This is not something like a groundbreaking or this software is not groundbreaking obviously many people have done that in the past as well But I just hacked this around last night. So I could do something for this how it started well as most of the open source projects start it started as something that I was Trying to scratch my itch like I had some use cases at my home I want you to control the GPIO pins running on an Ubuntu core device on my home I have this home automation project which kind of Balances load on in my home using solar power for example in in the time of 10 a.m. To 4 p.m. I want to be able to run as much as load on that as possible and so I Wrote this thing to be able to control these GPIO pins from a mobile phone or my computer for that sense and Obviously at a later stage. I wanted I worked in a co-working space and one of the a problem that came up for me was In some cases you forget to dock your desktop screen and you move away And you have this constant fear that someone might poke into your computer So what I implemented was I wrote I exposed an interface from a computer and hooked it to that damon and Ultimately it was controlled by my mobile phone So whenever I stepped away from my desktop, I could actually check my phone and That if I forgot to lock it and I could actually lock the desktop screen Obviously this was working on most Linux distributions. I tested the Kubuntu Ubuntu and a few others well like DM Was working GDM and a few other display managers were working quite fine and Then this thing So I think most mostly we know that if you watch Netflix on your mobile phone when you go to full screen It automatically raises the brightness of the device. This is something that was missing for desktops So I wrote a Chrome extension to be able to do that a Chrome extension would send a request to the damon running on my desktop It would raise the brightness Well while talking well not talking direct. Well, it would actually write those Well used to the a backlight driver on my Linux base system So these were some of the use cases that Called me to write that thing initially it was all coupled together But with time given the use cases I kind of broke it down into different components so that it could be reused by different People trying to implement different use cases or any scenarios that may come up from them So at the core of this technology is a router. It's called crossbar right now. I'm using that router You could implement something For discovery, obviously I use this python library python zero cons for discovery so whenever this server starts on the local network, it's discoverable by other devices and You could hook in different clients one client obviously in this case is my mobile phone the other Could be a Raspberry Pi or it could also be my desktop Well, there is a client running on my desktop as well the CLI used to do the pairing You run a command on your desktop to Generate a key code that then you put in your mobile phone, which actually allows you to pair these devices for security reasons And obviously it's cross platform the technology that's being used here Pretty much runs on all platforms It works on windows on Linux on Mac The core thing the thing that's doing all the routing and all the remote procedure calls and the security layer That is cross-platform and then the multicast DNS, which I already said isn't working on this environment But obviously It's pretty mature enough that apple itself uses it in most of its devices and many Many amazon tablets are also using that Well in on linux we have awahe, but i'm not sure if we are using it that much apart from the printing stack, but That is how it is And okay, so I came up with this little piece of code that I wrote last night For the most part. This is what's exposing the functionality on my desktop. This is talking to you input To send key events. So these are four key events that I Assigned to different procedure rpcs So which i'm calling from here right now obviously There is one for stopping and starting and then there is next and previous. This is being controlled This is for the most part sending key events the the right arrow key the left arrow key Well, actually and the f5 and another key. I don't know which one is that. I don't remember it right now That's page down page up escape and Uh a five key. Okay, so this is a simplest code that I that is running on my computer, which is exposing this functionality And here is the overall picture of this thing I want you to do like this architect of this thing the damon itself which is running Uh, which is the router is running on my desktop I've called it desk on b inspired by lex d and system d the naming obviously Um Then there is an android client. There is a chrome extension which is called bright flicks Which tries To like raise which obviously monitors netflix.com and whenever it goes full screen It sends a signal to the damon which forwards that signal to The other component that's running on my desktop and that raises the screen brightness And for my home use case I already told about the picon that is also another project. That's sub project of this umbrella project picon is your Raspberry Pi's connection to things and Right now that's component is only Being used to control the gpi opins on that thing and which is producing quite a lot of saving for me as as it comes to Using that solar system in my home and so this is Snaps obviously since I mostly used Linux based systems in my computer. So Much of this is being shipped as snaps And they are the first they are first class citizens here. Obviously they They simplify application delivery story very much and due to the fact that snaps are You can use snapcraft to build different packages remotely on on canonical provided servers You get free rwgf builds that That already essential for me to be able to run those my software and on the Raspberry Pi because Trying to build something on the Raspberry Pi is like is a resource killer and it also takes quite a few Hours in some cases to do that. So This service obviously kind of helps me do that and obviously they are secured because You input in itself is very dangerous to expose to anyone Right now i've been talking to the ubuntu guys to be able to allow that they haven't allowed There isn't an interface for you input to be accessed in a confined snap because you are talking directly to slash def slash you input which which is very a let's say open for key in key event And we cannot afford that because a bad actor could do loss of different things that Most of the people wouldn't really want things to be And what's next? The project obviously is hosted on github. I've been doing active development of this thing for the last few months Well, I was quite busy for the Last two three months. So the development pace isn't that fast as it used to be a while back ago, but Now that I do Plan to do most of the changes that I have planned in the next couple of months so that it's shippable so that many People in the community could also contribute to this project. So I invite anyone If there is interest to just Clone the projects fork them report any bugs if you are able to run them on your systems And I'll happily try to fix those and Any questions or anything that's I try to finish it And you could contact me Thanks, Oma for your talk and we still have two and a half minutes So if there is someone who wants to ask a quick question Just um Raise your hand and I will bring the phone microphone to you Nobody Okay, then thanks again Oh There is The router where where does the router run on on my pc? Yes on your pc because that's where These apis get exposed So your route as soon as the router runs on your pc It sends its name on the local network using multicast dns so that other computers on the network are able to discover that So that enables easy access. Okay. It's for the local network. Yes It's totally around the local network in future There will be support for remote access as well Like the router running when your computer will be able to connect to a remote router provided by me Maybe or you would also be able to host that and then you could do all these calls over the internet as well There the technology is there. It's just a matter of doing it So another one Yeah, thanks again