<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Daniel Wilby on Medium]]></title>
        <description><![CDATA[Stories by Daniel Wilby on Medium]]></description>
        <link>https://medium.com/@dywilby?source=rss-4a9ec9c7ebe4------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*b-IkHQ3UqogeYkFB4HYAvw.jpeg</url>
            <title>Stories by Daniel Wilby on Medium</title>
            <link>https://medium.com/@dywilby?source=rss-4a9ec9c7ebe4------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 08:13:42 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@dywilby/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Building something for someone you love]]></title>
            <link>https://medium.com/@dywilby/building-something-for-someone-you-love-b850111fb27a?source=rss-4a9ec9c7ebe4------2</link>
            <guid isPermaLink="false">https://medium.com/p/b850111fb27a</guid>
            <category><![CDATA[devlog]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[retrospectives]]></category>
            <category><![CDATA[distributed-systems]]></category>
            <dc:creator><![CDATA[Daniel Wilby]]></dc:creator>
            <pubDate>Sun, 15 Feb 2026 19:43:13 GMT</pubDate>
            <atom:updated>2026-02-15T19:43:13.498Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/895/1*Nn1moJgkpebu-DzMKkRkYQ.png" /><figcaption>Gorp UI</figcaption></figure><p>Last year my dad asked me if there was a Google Photos alternative that fit his needs; he wanted it to be self-hosted, have extra description and metadata features, and allow linking files and sub-albums. While there were plenty of good options out there already — I had previously suggested <a href="https://nextcloud.com/">Nextcloud</a> and <a href="https://immich.app/">Immich</a> to him — I saw a learning opportunity in building a custom solution. It could easily leverage the house’s numerous IoT devices, contain all the metadata features he wanted, and allow limitless nesting. <a href="https://github.com/dannowilby/gorp">Gorp</a> is my solution for my dad: a distributed, consistent photo store.</p><p>Gorp isn’t unique. It’s a distributed file store built on top of the Raft protocol<a href="https://raft.github.io/raft.pdf">¹</a>; there are tons out there already. There are even more implementations of just Raft. But I traded development time for intimate knowledge about the system. When features break or requirements change, I have a better grasp on the fine details and edge cases. Besides, building a project for someone you love and care about is also a major benefit.</p><h3>For the uninitiated</h3><p>Raft is a distributed consensus algorithm created by Diego Ongaro and John Ousterhout that maintains a highly consistent log. The log often defines a sequence of operations to perform on a state machine. It’s a paper that people encounter early on when learning distributed systems — and for good reason. The explicit goal of the paper is to be understandable where its predecessor Paxos was not.</p><h3>The work to be done</h3><p>I’ll be honest: understandability was half the reason I chose to implement the paper. I’d built a distributed system from the ground up before, implementing Chord<a href="https://pdos.csail.mit.edu/papers/chord:sigcomm01/chord_sigcomm.pdf">³</a> with some friends of mine. I also work heavily with infrastructure and do back end development at my day job. But I wanted to go deeper. I knew that it was achievable, and I wanted to build up some confidence to tackle more complex papers. Time constraints did not seem necessary, although this would bite me later. I also decided that none of the code or explanation of the paper would come from LLMs, just so I could learn to the fullest.</p><p>First I had to gather the requirements. Functionally, a user needs to upload and download images and any additional metadata. Non-functionally, data storage has to be durable so that failures don’t cause data loss. Any data changes, uploads, and deletions need to be consistent; after a successful upload, you don’t want to download a stale version of the data. Latency and throughput were not major factors as my family would be the only users interacting with the system. This is the other half of why I chose Raft.</p><h3>Implementing Raft</h3><p>I really can’t emphasize enough how much fun this part was. Translating the paper into code really scratched an itch for me, not to mention the joy that it gave me knowing that I could accomplish it. The protocol fits into a state machine pattern well, and I didn’t experience many hiccups along the way.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/851/1*3JzEBBb-x5kX__bNzAm-mg.png" /><figcaption><em>State machine depicting Raft </em>instance transitions<a href="https://raft.github.io/raft.pdf">¹</a></figcaption></figure><p>State machine. Boom. Follower heartbeat timeouts and candidate transitions. Boom. Partition healing and reconciliation between two competing leaders. Boom. Continuous syncing between leader and out-of-date followers. Boom. 2-phase configuration changes. Boom.</p><p>That’s 5 big booms and I was nearly done. I was only sidetracked when planning the hosting. While a lack of time constraints gave me the leeway to implement the solution at a deeper level, it also lulled me into an overengineering complacency. I started looking into instance management with Kubernetes. It wasn’t my first time working with Kubernetes, but even so I wanted to make sure I had everything solid. I read the entire documentation again, considering using the operator pattern to manage my system by the end of it.</p><h3>Experiments with Kubernetes</h3><p>I set up a separate prototyping project to assess the feasibility of Kubernetes. The complexity of setting up instances had to be solved for Kubernetes to be a worthwhile solution. It turns out this was not a good choice for this system.</p><p>I built a stateful set deployment with multiple services to facilitate inter-pod communication. I tried implementing a mechanic where an instance/pod would watch the Kubernetes service itself to get the locations of its cluster-mates. I then tried creating an operator, which is a combination of a custom resource and a custom controller. This latter solution allows you to control the lifecycle of your application with the context of the Kubernetes’ pod lifecycle. None of these implementations made cluster creation simple. I still held out hope for the operator approach, believing upgrades would be easier, configuration (particularly the two phase) changes would be streamlined, and storage would be persisted and correctly made reliable.</p><h3>Deciding against Kubernetes</h3><p>Unfortunately, building an operator is complex and would have required the existing configuration change to be ported into the operator itself. The auto-generated template for a Go-based Kubernetes operator is hundreds of lines long — even before you add any of your own logic. And to top it all off, the operator pattern still did not solve the flakiness that comes with trying to get pods to talk to each other in a straightforward way.</p><p>From a higher level, almost a philosophical one, it would require a control pane. Essentially, I would be maintaining a Kubernetes cluster that keeps consistent with etcd (based on the Raft protocol) to maintain Raft.</p><p>I did not like these solutions.</p><h3>Where the project stands</h3><p>In the end I decided for manual instance creation. As this was only going to be running on a local network, I could easily access the logs and traces of any failed instances. If I wanted to further automate things, I could just set up Ansible to provision the instances and use a gossip protocol if one of the instances dies.</p><p>While the concept as a whole is not flashy or groundbreaking, it’s a fully working system now. Create a cluster and use the provided interface to handle your image data. I’m very happy with the final product. My dad seems to be happy using it too, making all the work feel even more worthwhile.</p><p>I’m still fixing minor bugs and neatening up the interface that allows you to interact with your image data. That said, I realize that this project is ripe to be extended. Some ideas I might tackle later are the following:</p><ol><li>Security: encrypting the data and having some level of restriction on the access to data seems important if ever deployed to a more critical use case</li><li>Observability: more operations could be logged and tracked to mitigate any issues that may come up</li><li>General efficiency gains: I’m fairly confident that etcd is much more optimized to handle lots of queries, and their benchmarks<a href="https://etcd.io/docs/v3.5/benchmarks/">²</a> are pretty solid</li><li>Automated testing: simulating and verifying systems can be a pain, so having a system to automatically check for regressions would be so nice</li><li>Automated discovery: currently you set up a node by supplying a config of the cluster, or by sending it a message to update its knowledge of the cluster. A system that automatically checks the network for other instances belonging to its cluster could streamline setup loads</li><li>AI: because why not, everything has it nowadays. Adding auto-generated captions, location data, or edits may seem trivial and annoying today but expected tomorrow</li></ol><p>Again, if you want to check it out, the <a href="https://github.com/dannowilby/gorp">github is here</a>. I’d love any feedback you could give on either this write-up or the project.</p><h3>References</h3><p>[¹] <a href="https://raft.github.io/raft.pdf">https://raft.github.io/raft.pdf</a></p><p>[²] <a href="https://etcd.io/docs/v3.5/benchmarks/">https://etcd.io/docs/v3.5/benchmarks/</a></p><p>[³] <a href="https://pdos.csail.mit.edu/papers/chord:sigcomm01/chord_sigcomm.pdf">https://pdos.csail.mit.edu/papers/chord:sigcomm01/chord_sigcomm.pdf</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b850111fb27a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[I spent 3 years using Docker for local development]]></title>
            <link>https://medium.com/@dywilby/i-spent-3-years-using-docker-for-local-development-71b875818819?source=rss-4a9ec9c7ebe4------2</link>
            <guid isPermaLink="false">https://medium.com/p/71b875818819</guid>
            <category><![CDATA[rust]]></category>
            <category><![CDATA[local-development]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[gui-application]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Daniel Wilby]]></dc:creator>
            <pubDate>Thu, 29 Dec 2022 23:03:55 GMT</pubDate>
            <atom:updated>2022-12-29T23:03:55.501Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Miniature toy shipping container that containers a docker container in it." src="https://cdn-images-1.medium.com/max/1024/1*0EMuoW4UCRojiUuiU7zAGw.jpeg" /><figcaption><a href="https://www.flickr.com/photos/doctorow/18535091584">Dick Hardt’s Docker container, Photo by Cory Doctorow</a></figcaption></figure><p>10 years ago I first started my programming journey by making Minecraft mods on my parents PC. Building on those blocks by moving to bigger and better projects, I realized there had to be a better way to keep a handle on the gargantuan amount of tooling involved with development of any kind.</p><p>Enter <a href="https://www.docker.com/">Docker</a>. Docker is an application/platform which enables the user to create containerized environments to run their applications. This helps the user deploy their applications without worrying about configuring each it time they launch it.</p><p>While predominantly used in production settings, you can use it to help streamline local development by keeping all your tooling inside a nice little containerized box. I’ll show you an example of when I used Docker to compile <a href="https://veloren.net/">Veloren</a>, an open source voxel game made in Rust. I’ll then explain some other ways of using Docker and some reasons why you should or shouldn’t use it.</p><h4>My setup</h4><p>For each new development environment I wanted to develop in, I had a few steps I had to follow:</p><ul><li><strong>Create the Dockerfile and build the image </strong>— if I needed to fine-tune any different aspects of the build environment, i.e. the dev packages, etc… then I would do here. <a href="https://github.com/dannowilby/docker-development-configurations">Here’s</a> a link to the specific docker files I used for different projects.</li><li><strong>Copy my “run” script into the project folder </strong>— the run script would contain the following commands, changing the relevant arguments after copying</li></ul><pre>$ sudo docker run -it \ <br>               --user &quot;$(id -u):$(id -g)&quot; \<br>               --name rust-build-test \<br>               --mount type=bind,source=&quot;$(pwd)&quot;,target=/app \<br>               --workdir /app \<br>                 rust/vulkan /bin/bash<br><br>$ sudo docker rm rust-build-test # cleans up the container after finishing</pre><h4>The flags</h4><p>These are what really gave my system its power. I could simple execute my run script and build whatever project I wanted. A brief explanation of the flags follow:</p><ul><li>-it is actually two flags. -i keeps stdin open, and -t allocates a psuedo-<a href="http://www.linusakesson.net/programming/tty/index.php">TTY</a>. (-it is otherwise known as the interactive terminal flag)</li><li>--user &quot;$(id -u):$(id -g)&quot; lets the container run using your user’s permission. If you don’t include this, files generated by the container may need root to accessed when you quit the container.</li><li>--name rust-build-test just gives the container a name that is easier to deal with for us.</li><li>--mount type=bind,source=&quot;$(pwd)&quot;,target=/app binds the directory that you’re running the script file in to the container’s inside a folder called app .</li><li>--workdir /app replaces the default working directory of the container, without this the default directory will be the root folder.</li><li>rust/vulkan /bin/bash is the image we are running followed by the command you want to run in the container. I usually like to start by opening up bash.</li></ul><p>Obviously there are tons of flags that you could set, but these are the ones I found were essential. Also Docker’s documentation is actually pretty good, <a href="https://docs.docker.com/engine/reference/run/">here’s</a> their page on the docker run command.</p><h4>Why I liked it</h4><ul><li><strong>Small projects or tools were easy to test out </strong>— a machine learning course I took would use Python, and a chaos theory course used Julia. I didn’t have to install either natively, and cleanly removed both from my system after I finished the courses.</li><li><strong>Similar performance to native builds </strong>— the following are screenshot comparisons of building a program natively vs in a container.</li></ul><figure><img alt="Compiling the Veloren project took 5 minutes and 44 seconds when not using a docker container for local development." src="https://cdn-images-1.medium.com/max/1024/1*_9uc5ru-8TmfjE22_PE_-Q.png" /><figcaption>Build performance not using Docker</figcaption></figure><figure><img alt="Compiling the Veloren project took 5 minutes and 16 seconds when using a docker container for local development." src="https://cdn-images-1.medium.com/max/1024/1*Ige43jazWguuhUeJW_-Z-A.png" /><figcaption>Build performance using Docker</figcaption></figure><p>As you can see there’s not much in it. And, I know, running a build command once does not constitute very strong benchmarks. That said, after using Docker for the amount of time I have, I can tell you that the build times have never been noticeably longer. What’s more, I could even compile something in the container and run the binary locally on my machine since docker automatically picks up your platform’s architecture.</p><h4>Why I didn’t like it</h4><ul><li><strong>There is an added thin layer of overhead to every project</strong> — while the set up for a project is fairly easy, there’s an added constant to the start up cost every time. I began to feel worn down after a while, especially when trying to quickly prototype or test.</li><li><strong>While running GUI applications is possible, it does not work well </strong>— there is nuance here that I’ll explain in the next section</li></ul><h4>Gui Applications</h4><p>While intuitively it might seem as though running GUI applications in Docker wouldn’t work at all, you can pass in your display as an environment variable when running your container to make it work. Docker passes the display on and ports the display to your Xorg server. This means that if you use Wayland as your default compositor, you can try installing <a href="https://gitlab.freedesktop.org/mstoeckl/waypipe">Waypipe</a>, or else you’re out of luck. Unfortunately, as far as I can tell, the Waypipe project is no longer active.</p><h4>Tl;dr</h4><p>From the title you might have surmised that I no longer use docker for my local development. For my use cases, I found that the cons outweighed the pros. In my eyes there’s only really two cases for using docker:</p><ul><li>(1) If you work in an organization where configuring the development environment is difficult, or</li><li>(2) if you don’t mind the overhead and are up for the constant configuration of it.</li></ul><p>If you’re like me and just want to get stuff up and running, then don’t follow in my footsteps.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=71b875818819" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Regulation Social Media Needs]]></title>
            <link>https://medium.com/@dywilby/the-regulation-social-media-needs-7086a653c713?source=rss-4a9ec9c7ebe4------2</link>
            <guid isPermaLink="false">https://medium.com/p/7086a653c713</guid>
            <category><![CDATA[internet]]></category>
            <category><![CDATA[politics-and-protest]]></category>
            <category><![CDATA[dissent]]></category>
            <category><![CDATA[social-media]]></category>
            <dc:creator><![CDATA[Daniel Wilby]]></dc:creator>
            <pubDate>Tue, 26 Jun 2018 03:18:14 GMT</pubDate>
            <atom:updated>2022-10-05T04:21:30.671Z</atom:updated>
            <content:encoded><![CDATA[<p>Article originally from <a href="https://dywilby.io/blog/regulation-social-media-needs-25-6-18">dywilby.i</a>o (link defunct, sorry)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*2VpkPxyDwLUxp_dO.jpg" /><figcaption>Image from BBC</figcaption></figure><p>A society-splitting scandal is going on right now. It’s taking place in our pockets, our homes, and our workplaces — and yet we let it conquer us. Social media may seem like a useful way to whittle away time, but has recently become a much more malicious force than previously realised.</p><p>Destabilising cyber campaigns have been raging on social media websites like Facebook and Twitter, the likes of which have been believed to have influenced major events in the West like Brexit and the US presidential election. That device in your pocket doesn’t seem so insignificant anymore, does it?</p><p>At least the European Union, the House of Commons, and the US Congress don’t think so. Each institution has set up investigations and proposed legislation for social media platforms. But before you go rallying behind them, consider first the benefits with the <em>serious</em> implications.</p><p>Everyone knows that social media has connected people more closely together than ever thought possible; as a consequence, our society has quite-rightly changed. Scientists have confirmed that social media websites act like echo chambers, amplifying and distilling our biases, prejudices, and beliefs. People hear only what they believe, inoculating them to the validity of alternate viewpoints. We have become tribalistic in identity and the days of reconciling our opinions are over.</p><p>But if we look at what sort of legislation would be enacted, we see a more dystopian future than the one quickly approaching. The essence of the proposed legislation would be making companies like Facebook, Twitter, and Snapchat restrict their content based solely on the government’s wishes. Say the government extends this legislation any distance. Would display of illicit paraphernalia be censorable? Would political dissent be under the censorship umbrella?</p><p>We must remember that, for its faults, social media has the tremendous power to aid the establishment and maintenance of democracy. <em>That is sacred.</em></p><p>Tunisia, 2010 — a revolution against the one-party government has started after being planned for several weeks on Facebook. Today, we remember that event as the Arab Spring. Today, Tunisia is a functioning democracy.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*nDzLyxP_UDDu8vJo" /><figcaption><em>Image from Sputnik International (the irony)</em></figcaption></figure><p>This stance on social media isn’t staunchly anti-government, but it recognises what failures can come about of a misguided attempt at a quick remedy — it’s as if a 60-year-old were trying to implement it.</p><p>Facebook and other social media sites act as a platform for dissent to be expressed and organised in a system that resembles a direct democracy. We should recognise its importance and not consume the dogmatic thinking that can result of prolonged use — that is the regulation social media needs.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7086a653c713" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>