I don't like caches

I don’t like caches In fact I do, but not for everything. I like caching for immutable resources and for side effects free computation. I don’t like caching for mutable resources and computations. Let me explain why. Cache for immutable resources At MyCoach when we rebuilt our storage service we chose not to support updates. When a file is uploaded it is assigned a unique UUID, this UUID will be part of the link to a file for it’s whole lifetime. If you need to update a file you’ll perform a delete, reupload a new file, get a new link, and update the resource with a reference to your file with a new link. ...

November 6, 2021 · 4 min · Clément Agarini

Checking third party licenses

Disclaimer: I’m not a lawyer, this article is about setting up tools to check you third party libraries. It’s by no mean a legal advice. Some open source licenses are said to be viral licenses. A viral license can contaminate your proprietary software and force you to release your code to the public with the same license as the library. You need to audit your third parties to check the licenses transitively, but who wants to do that by hand ? ...

June 10, 2021 · 4 min · Clément Agarini

Reacting to change with Change Data Capture

There are a lot of cases in the MyCoach platform where we want to do something when something else happened. For example, when a new substitution is added to a game we might want to recompute the two player’s play time, when a new public exercise is added, modified or removed we want to update our search index accordingly. Computing play time If we take the example of football, the play time depends on the following data: ...

February 24, 2021 · 7 min · Clément Agarini

Building a distributed scheduler

For a long time I’ve postponed the decision to introduce a distributed scheduler at MyCoach. I wasn’t sure which one to choose, or how to build one. Post poning this decision meant not building some features. In July 2020 I got caught up by the feature folks, there were some features requiring scheduling. For our MyCoach Pro product, we needed to send some push notifications before and after the training in order for the player to reply to the questionnaire. The goal was clear, we needed to make sure that player answer the pre and post training questionnaire. If not we’ll have unhappy physical trainer and coaches because they need data from questionnaire to adapt the training to the current physical state of the player and to assess the impact of the training on the player. ...

January 19, 2021 · 9 min · Clément Agarini