 Hi everybody. Our next talk is starting. It's called I++. Run your fuss off and Please welcome rule standard Okay, can you hear me? Okay So once a year the students of Leuven gather to run their asses off For 24 hours long. I'm talking about the 24 hour run. It's in late October. It starts On a Tuesday at 8 p.m. And it goes on till Wednesday at 8 p.m. Again It's organized by local sport, which is the sports division of the general student organization in Leuven TSA, which is a technical support division They do all of the technical stuff that isn't IT and Ulysses that do all the IT related stuff And of course the participating teams so Ulysses is a student organization based in Leuven and They provide IT students for other services service Students that provide IT services for other students and it's a fast-minded organization. So that means that They Try to use as much open-source software as possible and that you try to promote it as much as possible They offer cheap web hosting for students and personnel at K-Leuven This is our server room. It's mostly second-hand servers or like old desktops Sometimes we like to hack into our own servers because we locked ourselves out We do workshops like workshops about Git or latex or like other More advanced system administration workshops. This is one about latex And we do a yearly job fair. So you can check out the job corner for this poster For open-source minded companies And you can spot me on that picture there representing Mweb. That's company I work for and So at a 24-hour run Ulysses provides a network a wired network and Wi-Fi and since 2013 Ulysses has also been responsible for doing lab counting So this is kind of what the track looks like. It's 520 meters long so it's outside of the normal 400 meters athletic start track and There are three checkpoints. So they start at the main checkpoints and they run counterclockwise to checkpoint 2 and then checkpoint 3 These extra checkpoints are mostly for redundancy Not so much to make sure that they run in the right direction Because we will assume if you go from a checkpoint 1 to checkpoint 3 that you passed checkpoint 2 But we just missed it So if you then go from 3 to 2 we assume that you passed 1 and if you go from 2 to 1 We also assume that you passed 3 so you'll have two laps But usually there are enough eyeballs on people to make sure that they don't do that So this checkpoint kind of looks like this it's a box We call that the reader and inside of that box is a UHF RFID reader a Raspberry Pi Type-B and a switch connecting those two and connecting that to all the other checkpoints and the checkpoint has two antennae in Opposite polarisation And this is kind of what the main checkpoint looks like so The to check one two and three are unmanned, but the first one there we're actually sitting there Looking out to work to the runners that are coming towards us and then you can see the in you can really Finally you can see the box Somewhere on the left and then the antenna there and we sit in there so and they We use RFID tags So these are belts type tags and we put them inside of These batons that we make out of PVC tube with caps on either side and then we put handlebar tape around It's that's used for bicycles So they're a bit nicer to hold and nicer to pass So the software that we use it's called I++ and that's the source code there not really It's a bit more complicated than that than just incrementing every lap so it's written in Java which Takes 30 seconds to start on the readers, but still it runs quite well on these Raspberry Pi's So there's the reader. That's what runs on the Raspberry Pi the processor where all of the reads are accumulated and the score is calculated and the UI is What we use to and there's a UI component and a publisher that publishes the scores live So this is how the reader and the processor kind of come communicate. So there's This UHF RFID reader that can be and the reader that's on the Raspberry Pi and That one communicates using LRP. That's the low level reader protocol with this RFID reader and then puts all of the updates onto a Redis database So it has a list of updates. Those are all in JSON and then they are published to And then they are published on a channel called updates and then a number because Bups ups channels are global in Redis and Then the processor subscribes to that channel and then whenever it gets a New update it will retrieve that from the server from the reader So this means that if the connection is broken between the processor and the reader Then at a later time the processor can still go ahead and get all of those old updates that it missed And so this processor it gets all these updates and they stores them as events in a post-crescue all database and this and Next to these events it stores snapshots. So it starts with an empty snapshot and then everything Is affected by these events and this means because we're keeping all these snapshots This means that if there's an event that happened in the past We can still apply that and still recalculate the states from that point and you might think that's a lot of data, but Really, it's only 24 hours. We're keeping your megabytes of data, but that's still fine and then The UI only communicates with the processor using these commands that it sends also on a Redis pops up channel and then notifications are also sent out to do a UI via Redis and Then the UI retrieves all of the events and the snapshots from post-crescue all database So this is kind of what the UI looks like. I know it's really pretty But I wrote it in like a weekend. I use Jwt for that. That's what we make at MEP that's a Java web framework and So if you look at the cyan bars the cyan bars are Our prediction of where the runners are at that particular time and then the red bars They indicate the last checkpoint that they passed So when we're sitting in this main checkpoints, we can keep an eye out Like it's if the bars almost full we can know like number two is almost gonna arrive and we keep an eye out for that and then also from this UI we can Updates messages so we can always push the status of the events out So like if there is an emergency or the event is over stuff like that We can immediately update from this UI and we have a start in the stop button To indicate to start in the stop time. It's not fixed And we have a safety for that so that we don't accidentally click that they click it and Then for every team you can look at three charts or Just as many charts as there are readers and this indicates how long it was since the last read so Looking at these charts you can kind of gauge whether Things are going wrong because normally a team that like up alone. It's a sports Student organization, so they run at a pretty constant speed So if you see like a peak there or you see like a low there You'll know that maybe we missed a read or maybe We have a read too many which happens rarely like Pretty much never but anyway And then the publisher is the components that publishes the the score So it that can take it from Redis and from our PostgreSQL database and push it out to a JSON file But it can also receive it over HTTPS and push it out over HTTPS And this means that we can chain these publishers after each other So we put one publisher inside of our local counting system network, which is firewall No one can access it and It gets all the updates from Redis and PostgreSQL and then publishes it over HTTPS to our web server in our Ulysses basements And that pushes it out to a JSON file and that is then so served using just a regular web server We use Nginx and there's just a static HTML page there with some JavaScript that pulls the JSON every three seconds and then It can show like some live bars and like people are actually often Think that we're really tracking in real-time where they are Because the bars seem so accurate But that's just because people just run at a pretty constant speed In 2013 sadly the server the software wasn't really working well the software was working with the hardware had some problems But then 2014 it was working flawlessly and This is our and even though the weather was really terrible that year towards a lot of winds 2015 was also a good addition 2016. I don't have a picture of that when he's 17. That's the team for the last time and This 24-hour run is not the only n-hour run Living is the only one that I know of that's 24 hours long But for example in Antwerp, there's a 10-hour run Which is also done by Ulysses, which is good because then Ulysses can test this system twice a year on real on a real event and then in Ghent there was a 12-hour run or friends of these guys they do it there and So Zeus They're called and they use a Bluetooth 2.0 for that and so Even my hometown of medics plus. I don't know if anyone has ever heard of medics plus. It's a tiny town Even they have like a six-hour run and I have nothing to do with that one So what if everyone could easily and cheaply organize events like this that would be great Now we would like to use I plus plus for that But at the moment there are some problems with this system still so it's not user-friendly enough yet So we want to move towards where maybe it's easy enough for someone who can like install a blog and share it hosting Can install it, you know, that's like I think the thresholds so little I don't know like your cousin who kind of knows knows computers can use it It's relatively expensive because these readers they're they can cost like thousands of euros So it would be nice to use like hardware like for example I beacon like these blue blue-toothed low energy kind of beacons that just send out a pulse every A few times per second and put those in our batons And then the checkpoints could just be old or cheap Android phones that would make it a lot cheaper and At the moment, it's kind of specialized for a trusted land So red is not really suitable for like other kinds of network deployments and VPNs are hard to configure for just someone who kind of knows only a little bit about computing so If you want to contribute or if you want to organize something similar you can go to our get up page and also check out the source code I will I have some time for questions, but I'll also hang out outside sites if you have more questions and thank you