<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Ivan Béthus</title>
    <description>The latest articles on DEV Community by Ivan Béthus (@ibethus).</description>
    <link>https://dev.to/ibethus</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1428348%2F28fd1d4c-5919-4afd-ab66-9f7d8cddeee6.png</url>
      <title>DEV Community: Ivan Béthus</title>
      <link>https://dev.to/ibethus</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ibethus"/>
    <language>en</language>
    <item>
      <title>BreizhCamp2024 : à l'ouest toute !</title>
      <dc:creator>Ivan Béthus</dc:creator>
      <pubDate>Thu, 11 Jul 2024 14:15:27 +0000</pubDate>
      <link>https://dev.to/onepoint/breizhcamp2024-a-louest-toute--4mm2</link>
      <guid>https://dev.to/onepoint/breizhcamp2024-a-louest-toute--4mm2</guid>
      <description>&lt;p&gt;Nous sommes de nouveau sur la route avec quelques membres des équipes onepoint pour le rendez-vous breton des développeurs en tout genre : le BreizhCamp. &lt;br&gt;
Créé en 2011 à l’initiative du BreizhJUG, le BreizhCamp propose de faire se rencontrer les communautés du développement et de l’expertise, avec un contenu à la carte sur plus de 100 thèmes présentés. &lt;/p&gt;

&lt;p&gt;En plus des nombreux sujets présentés par nos collègues, nous avons préparé avec @dlucas un petit top 3 de nos conférences préférées. À vos lunettes, il y a de la bonne lecture !&lt;/p&gt;
&lt;h2&gt;
  
  
  Du code source à l'exécutable : plongée dans les entrailles de la compilation en Rust par &lt;a href="https://www.linkedin.com/in/sihaedouard/" rel="noopener noreferrer"&gt;Édouard Siha&lt;/a&gt;
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;Comment le compilateur Rust fait-il pour assurer le respect de la notion d'emprunt ? Pourquoi est-il capable de générer facilement des binaires spécialisés pour une plateforme d'exécution différente de celle de la plateforme de compilation ? Quel genre d'optimisations surprenantes est-il capable de réaliser ? Quelles caractéristiques le différencie des compilateurs utilisés pour le C ? Pour le Java ?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Si ces questionnements vous intéressent, la conférence d'Édouard Siha est un incontournable. Il rentre en détail dans les étapes de la compilation en Rust, en faisant une analogie assez pédagogique avec les profondeurs marines. Un &lt;em&gt;deep dive&lt;/em&gt; très intéressant pour renforcer sa compréhension du Rust et de manière générale des différentes étapes de création d'un binaire exécutable.&lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/gjQlZuStWeQ"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  MongoDB en scale-up : comment sortir d’un enfer monolithique par &lt;a href="https://x.com/horgix" rel="noopener noreferrer"&gt;Alexis Chotard&lt;/a&gt; et &lt;a href="https://www.linkedin.com/in/caroline-becker-1396957/" rel="noopener noreferrer"&gt;Caroline Becker&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Ce talk, c'est l'histoire d'une scale-up spécialisée dans la gestion de fiches de paie : PayFit. Le 15 mars 2023, leur cluster MongoDB s'écroule, alors qu'il contient 95% des données utilisateur et il est vital au fonctionnement de l'application.&lt;/p&gt;

&lt;p&gt;A travers cette conférence, on découvre comment de mauvais choix d'architecture ou une croissance organique et (trop) rapide ont pu mener à une situation aussi critique. Heureusement, Alexis et Caroline nous expliquent également comment ils ont réussi à réparer leur application, entre stabilisation technique, détricotage du modèle de données, ou encore élimination de &lt;em&gt;single point of failure&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Si on ne doit retenir qu'une chose de ce retour d'expérience, c'est qu'un modèle de donnée doit coller au métier et que la duplication doit être maitrisée. Ici, le principal problème était lié à des données redondantes et stockées en grande quantité, qui ont fini par saturer la base NoSQL... &lt;/p&gt;

&lt;h2&gt;
  
  
  RetEx : Optimisation du temps de démarrage d'une application Java Spring par &lt;a href="https://www.linkedin.com/in/daria-hervieux/" rel="noopener noreferrer"&gt;Daria Hervieux&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Daria Hervieux nous explique comment elle et son équipe ont étudié plusieurs manières de réduire le temps de démarrage d'une application Spring pour atteindre un taux de disponibilité de l'application à 99,9%&lt;/p&gt;

&lt;p&gt;Elle nous livre donc les résultats des trois expérimentations effectuées :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Class Data Sharing (CDS) : cette technique permet de réduire le temps de démarrage et l'empreinte mémoire des JVM en mettant en cache les métadonnées de classes dans un fichier d'archive afin qu'elles puissent être rapidement préchargées dans une JVM nouvellement lancée.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Spring Ahead-of-Time (AOT) : sans aller jusqu'à la création d'image native, Daria nous explique qu'ils ont utilisé la technique de compilation AOT qui permet de pré-compiler le bytecode en code natif avant le démarrage de l'application. Le tout, s'exécutant sur une JVM traditionnelle.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;CRaC (Coordinated Restore at Checkpoint) : cette technique repose sur le principe d'effectuer un checkpoint de l'état de l'application à un moment donné, puis de le restaurer à partir de ce checkpoint lors du redémarrage de l'application. Cela permettant notamment d'avoir les hotspots de l'application déjà chargés en mémoire.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Daria conclut par un tableau comparatif en termes de gain, inconvénients, taille de livrable... Pas de spoil ! Nous vous laissons découvrir le résultat de son étude dans le replay (quand il sera disponible) !&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Git update-refs in a nutshell</title>
      <dc:creator>Ivan Béthus</dc:creator>
      <pubDate>Thu, 23 May 2024 17:26:37 +0000</pubDate>
      <link>https://dev.to/onepoint/git-update-refs-in-a-nutshell-574c</link>
      <guid>https://dev.to/onepoint/git-update-refs-in-a-nutshell-574c</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Original article on my &lt;a href="https://blog.hot-coffee.dev/blog/git_update_refs/" rel="noopener noreferrer"&gt;blog&lt;/a&gt; (🇫🇷)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;When working on a versioned project, it is relatively common to end up with a "stack" of branches. What could be more frustrating than having to rebase all the other branches on top of the first one when updating it? This process becomes even more tedious when the number of branches is high or when they are regularly modified.&lt;/p&gt;

&lt;p&gt;Git version 2.38&lt;sup id="fnref1"&gt;1&lt;/sup&gt; introduces a solution to this problem: the &lt;code&gt;update-refs&lt;/code&gt; rebase option.&lt;/p&gt;

&lt;h2&gt;
  
  
  Stack?
&lt;/h2&gt;

&lt;p&gt;Branch stacking is a way to break down important features, allowing for smaller pull requests. In the example below, three branches dependent on each other have been created, allowing "my feature" to be divided into three distinct blocks.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The assumption here is that when each of these branches is individually merged into the &lt;code&gt;main&lt;/code&gt; branch, the code will still be functional, as it has been appropriately divided.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpiry3zxu4evdyso0lhec.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpiry3zxu4evdyso0lhec.png" alt="initial state"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let's say a small typo was made in the commit of the &lt;code&gt;my-feature-v1&lt;/code&gt; branch. A second commit needs to be added to fix the issue, resulting in the following history:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbjqbz34lpnugl662flmi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbjqbz34lpnugl662flmi.png" alt="after commit"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this situation, the only solution to update &lt;code&gt;my-feature-v2&lt;/code&gt; and &lt;code&gt;my-feature-v3&lt;/code&gt; is to checkout and rebase v2 on v1, then v3 on v2.&lt;/p&gt;

&lt;p&gt;This cumbersome process is remedied by the &lt;code&gt;update-refs&lt;/code&gt; rebase option.&lt;/p&gt;

&lt;h2&gt;
  
  
  The solution
&lt;/h2&gt;

&lt;h3&gt;
  
  
  update-refs
&lt;/h3&gt;

&lt;p&gt;The goal of this option is to automatically update the &lt;em&gt;n&lt;/em&gt; branches on which the branch being rebased depends.&lt;/p&gt;

&lt;p&gt;Thus, in our case, we can simply checkout our &lt;code&gt;my-feature-v3&lt;/code&gt; branch and run the command &lt;code&gt;git rebase my-feature-v1 --update-refs&lt;/code&gt;. With this option, Git updates not only the v3 branch but also the v2 branch to preserve the history. The result of this operation is as follows:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpopxq76ba40elbnxdfov.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpopxq76ba40elbnxdfov.png" alt="after rebase update-refs"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;In practice:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F84doy3uaerh4o9mgnb59.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F84doy3uaerh4o9mgnb59.gif" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Updating the Remote Repository
&lt;/h3&gt;

&lt;p&gt;Even if the branches being manipulated have already been pushed to the remote repository, it is possible to update all of them in a single command: &lt;code&gt;git push --force-with-lease origin my-feature-v1 my-feature-v2 my-feature-v3&lt;/code&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Here, a specific &lt;code&gt;force push&lt;/code&gt; is used to preserve the remote history&lt;sup id="fnref2"&gt;2&lt;/sup&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Global Activation
&lt;/h3&gt;

&lt;p&gt;Why not always use the &lt;code&gt;update-refs&lt;/code&gt; option during a rebase? The Git team asked themselves the same question and decided to include this possibility in the configuration. Thus, &lt;code&gt;git config --global rebase.updateRefs true&lt;/code&gt; activates the option globally for each of your rebases.&lt;/p&gt;

&lt;h3&gt;
  
  
  In Summary
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;git rebase {my-branch} --update-refs&lt;/code&gt; updates a branch and all its dependencies&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;git push --force-with-lease origin my-branch-1 my-branch-2 my-branch-n&lt;/code&gt; pushes the update of these branches to the remote repository&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Happy &lt;em&gt;rebasing&lt;/em&gt;!&lt;/p&gt;




&lt;ol&gt;

&lt;li id="fn1"&gt;
&lt;p&gt;The release note is available &lt;a href="https://github.blog/2022-10-03-highlights-from-git-2-38/#rebase-dependent-branches-with-update-refs" rel="noopener noreferrer"&gt;here&lt;/a&gt; ↩&lt;/p&gt;
&lt;/li&gt;

&lt;li id="fn2"&gt;
&lt;p&gt;See the &lt;a href="https://delicious-insights.com/en/posts/git-push-with-lease/" rel="noopener noreferrer"&gt;use case&lt;/a&gt; ↩&lt;/p&gt;
&lt;/li&gt;

&lt;/ol&gt;

</description>
      <category>git</category>
      <category>rebase</category>
      <category>versioncontrol</category>
    </item>
  </channel>
</rss>
