Intro

This post will give a short overview on how to deploy your app and subsequent updates using torrents. First some basics will be covered regarding how to setup a tracker followed up by creating a customized deployment client. The use of a customized client is simply to show deeper integration, though a normal torrent client would work just as well.

Deploying apps via torrents is not a new concept by any stretch and the likes of twitter have been doing this ages ago. While the project is no longer maintained, there is a more recent tracker that can be used which gives us the same result though everything is not packaged as nicely.

Requirements

  • Torrent Tracker
  • Torrent Client
  • Configuration update code
  • Management Service

Tracker Setup

Grab the tracker config

curl -L https://raw.githubusercontent.com/chihaya/chihaya/release-v1.0/example_config.json -o config.json

start a docker instance

docker run -p 6880-6882:6880-6882 -v $PWD/config.json:/config.json:ro quay.io/jzelinskie/chihaya:v1.0.2 -v=5

First Seed

Create a torrent file using the URL ( http://localhost:6881/announce ) as your announce URL. Note in this case the localhost means we are testing on the same host. If you want to seed or download the archive from a different host, replace localhost with either the hostname or IP.

Once the torrent file is created ensure that the torrent is seeded (either locally or on a remote host).

Distribution

You can now grab the grab the deployment archive with the original torrent file created in the previous step using your torrent client of choice.

Up till this point there is not that differs from normal torrent distribution. To make this process a bit more automated we can make use of a distribution service daemon.

The management daemon runs along side your application and watches a known end point for version changes, as soon as new version is published, the service can grab the latest torrent file and start downloading + seeding the archive. Once the archive is on the host it can continue with the usual upgrade process you may have to start running the new version by either forking to a deployment script or performing the steps internally.

Conclusion

The initial setup of the tracker is a once off cost. There after all that is required to distribute your archive/application is to simply seed your distribution archive and request it on each of the distribution end points either manually or in an automated manner.

RC1140

Soweto Marathon

Having completed the soweto marathon 21km last year and in addition to some prodding from my cousin I finally did my first full marathon this year. The race happened on the 6 Nov 2016 and it was definitely a milestone in my athletic adventures. I have been doing half marathons for a while now and kept putting of a full marathon because I figured it want much different than getting ready for a half marathon. After proving myself completely wrong I have to say I still enjoyed the race completely. The soweto is one of the harder marathons in jhb (and according to some in SA) and the race definitely showed me that I need to still up my game when it comes to running. I was originally planning on a 5 hour (or sub 5 if possible) but this unfortunately never happened. In the last 6kms of the race I lost my legs (there isn’t any other way i can explain that) and had to do short walk + trot sessions till the finish line. In the end I finished with a time of 5:22:44, in the end I am happy that I could even finish the race and will just use this as a way to set an easy personal best next time I do the race or another marathon. While I may have lost my legs at the end I was definitely not pushing nearly as hard as I could have as demonstrated by my crazy level of recovery over the next week.

Organization and general issues

The race organization was mostly good. The main issue really comes down to traffic on the day of the event and not enough marshaling around that. But once parked getting to the start line was easy and there were plenty of porta potties though I have come to not rely on them anymore.

The run

I did this run with my cousin who is significantly stronger and fitter than I am and even though he had never done a full marathon either, he definitely made the race more enjoyable. While we couldn’t talk the entire race (I can barely talk for 15mins so no way I could talk for 5 hours), the occasional pep talk as he pushed me forward and kept me engaged definitely made a huge difference to me getting over the finish line.

Running isn’t as technical as cycling so there isn’t as much to cover , but the hills towards the end of the race did hit me at the worst possible time.

I also ran with a hydration vest that I was used to training with and that I think I really needed since my timings were not in sync with the water stations and towards the end it helped more when stations were dry because I was so far back in the pack. I am not sure what caused it, but I also go quite nauseous at the end of the race (in sync with when I lost my power to run) and no matter much I drank I couldn’t get hydrated properly. This probably resulted in one of the worst feelings I can imagine (trying to run while feeling sick).

Conclusion

In the end this was a great race. I gave the race everything I had and while I could have possibly done better if I had trained harder ahead of time, I am more than happy with the time that I posted this year.

The statistics from my race can be found here

Overall

This was a unique book in how its presented. I did not originally know that it was two books combined in one and its really up to the reader to decide if they want to read them back to back or individually. Personally I feel they need to be read back to back since the books are pretty short overall and you end up feeling a little cheated with the completion of the first book not giving a big pay off.

The books were also quite different compared to what I generally look for a in a fantasy book. I prefer deep characters and interesting worlds, this book (the combination) had hints of that but in the end is actually a very light read. This book actually makes for a very nice read for people interested in the fantasy genre and are looking for something new to try. There is no burden to complete the entire series after having read one book as the build up is very gradual and you are never left feeling like you have to read the next book to get closure on the story , rather you feel like you want to read further to get a better grasp of the world.

Good

The characters in this book are quite unique and fun, they play to the classes they have been setup as which results in an enjoyable read since you have a basic grasp of what the characters are capable off without them needing to constantly display their amazing skills. The characters are presented as ‘elite’ characters, meaning they already have all their powers/skills and simply choose not to demonstrate these powers at all times. While they are powerful, it was good to see them being able to solve a number of situations through social interactions instead of overwhelming shows of power.

Bad

There isnt too much to fault the books on, there is a definitely a lack of depth to the books initially but this is slowly built up over time. The characters histories are touched on but never really fleshed out which does leave you wanting a bit more. While not something bad to me, many people may not enjoy the style of characters in the book which almost feel like they came straight out of an anime with some of their goofiness and mannerisms.

Conclusion

This is a great read if you want something quick and short with good amount of adventure, action and plotting. There is some extra depth to the book that I did not cover, regarding the different factions that are at play in the story. This faction wars probably pay of more the longer you read into the entire story arc. If you enjoy fantasy give this a read, you cant go wrong with it, but its not mistborn or other such similar books.

Things I hopefully will get to addressing one day :P.

Audiobooks. Discovery Duathlon. Rapid Miner. FreeBSD Jails. FreeBSD in general.

Winter Fast One MTB Race

So I completed my first MTB only race for the year on the 1 May. Compared to DualX, this race was much easier with the focus being on speed as opposed to technical skill and heavy climbing.

Organization and general issues

The race organization was mostly good. Since this was the second time doing thia race I had some expectations around the sizing and process that was involved with the race day setup. Sadly those expectations weren’t exactly met, mostly due to the size of the crowd which was significantly larger than last year. Because of this, getting into the venue, finding parking, race number collection and toilet facilities were all over crowded. From what I understand, the organizers were aware just how many people signed up so I wish they had catered for things a little better. Overall these issues have become fairly minor to me so I wont say they spoilt the event at all, it just made the pre-race wait a little annoying.

The Ride

The race did not have the best start with myself and bunch of other B batch riders somehow ending up with the C or D batch riders. Since there was no clear markings or pens it was really hard to figure out where we needed to be. In the end we needed to rush to the front after hearing the call for our batch to start racing. Since we were the last couple rider to leave our batch, I feel we lost a significant amount of time and then got stuck behind slower riders once we hit the single track.

With the pressure to make up some of the distance, I ended up attacking too aggressively and too often in the first 20 mins or so of the race. As expected this led to a small fall as I hit a middle island on a dual track section and slid out for a bit. After that small spill, I ended up dialing it back too much. In hindsight, I should have kept the pressure on and then relaxed a bit more on the longer climbs.

The course this year was reversed from last year, which was a welcome change since it meant I wasn’t too used to how things looked. Unfortunately, it also meant I didn’t get much advantage from racing it last year. The course also had about an extra 5km’s compared to the course that I rode last year. Overall I preferred this route since it felt like I could attack harder on the downhills since they weren’t always positioned around the slightly technical sections like last year.

I was surprised by how nicely my climbing had progressed (or maybe I just wasn’t as tired as I was for DualX) and I was able to climb most of the hills quite hard, unlike last year. I was even more surprised to find that I was able to overtake a number of riders on some of the longer uphills.

My relief on making it to the end of the race without any technical issues can not be expressed adequately in words. That’s because it’s been my biggest issue last year and an issue on my road ride earlier this year. Thankfully my bike performed like a beast and didn’t give any issues throughout the race.

Conclusion

In the end this was a great race. I gave the race everything I had and while I could have possibly done better if I had trained harder ahead of time, I am more than happy with the time that I posted this year (1:57). I was also happy with my batch selection which was mostly based on an honor system. I chose the B batch which put me in the 24-20km speed range and I am happy that I was actually able to hit an average within that range for the race (even if it was just barely).

After my recovery sleep, the pain was pretty bad and mostly manifested in the form of major neck tensionand soreness in my abs area and joints. Comparing this to the notes from my last road race, this seems to be a recurring issue and is probably something I should look at addressing, both on the ride and immediately afterwards.

The statistics from my race can be found here : http://www.movescount.com/moves/move60916808