<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>postgresql Archives | Clever Cloud</title>
	<atom:link href="https://www.clever.cloud/blog/tag/postgresql/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.clever.cloud/blog/tag/postgresql/</link>
	<description>From Code to Product</description>
	<lastBuildDate>Tue, 02 Dec 2025 14:25:09 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	

<image>
	<url>https://cdn.clever-cloud.com/uploads/2023/03/cropped-cropped-favicon-32x32.png</url>
	<title>postgresql Archives | Clever Cloud</title>
	<link>https://www.clever.cloud/blog/tag/postgresql/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Java de base ouverte sur Symfony de logs en couleurs</title>
		<link>https://www.clever.cloud/podcast/java-de-base-ouverte-sur-symfony-de-logs-en-couleurs/</link>
					<comments>https://www.clever.cloud/podcast/java-de-base-ouverte-sur-symfony-de-logs-en-couleurs/#respond</comments>
		
		<dc:creator><![CDATA[Horacio Gonzalez]]></dc:creator>
		<pubDate>Fri, 17 Oct 2025 06:00:00 +0000</pubDate>
				<category><![CDATA[Java 25]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[PHP 8.5]]></category>
		<category><![CDATA[postgresql]]></category>
		<category><![CDATA[Symfony]]></category>
		<guid isPermaLink="false">https://www.clever-cloud.com/?post_type=podcast&#038;p=20762</guid>

					<description><![CDATA[<p><img width="1920" height="1080" src="https://cdn.clever-cloud.com/uploads/2025/10/145.jpg" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="145" decoding="async" fetchpriority="high" srcset="https://cdn.clever-cloud.com/uploads/2025/10/145.jpg 1920w, https://cdn.clever-cloud.com/uploads/2025/10/145-300x169.jpg 300w, https://cdn.clever-cloud.com/uploads/2025/10/145-1024x576.jpg 1024w, https://cdn.clever-cloud.com/uploads/2025/10/145-768x432.jpg 768w, https://cdn.clever-cloud.com/uploads/2025/10/145-1536x864.jpg 1536w, https://cdn.clever-cloud.com/uploads/2025/10/145-1368x770.jpg 1368w" sizes="(max-width: 1920px) 100vw, 1920px" /></p><!-- wp:buttons -->
<div class="wp-block-buttons"><!-- wp:button -->
<div class="wp-block-button"><a class="wp-block-button__link wp-element-button" href="https://youtu.be/OtcIMve6lcY">Voir sur Youtube</a></div>
<!-- /wp:button --></div>
<!-- /wp:buttons -->

<!-- wp:paragraph -->
<p></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Animé par : Horacio GONZALEZ<br>Avec la participation de : <br>- Mathieu SANTOSTEFANO<br>- Sébastien BRUNAT<br>- Julien DURILLON</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Episode enregistré le 26 septembre 2025</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Montage : Yann BRESSON @ Smartmedias</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading">Chapitrage et Liens</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>00:00:16 - Présentation des invités</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>00:02:20 - Symfony UX, modern web app without writing much JS&nbsp;</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul class="wp-block-list"><!-- wp:list-item -->
<li><a href="https://ux.symfony.com/">https://ux.symfony.com/</a></li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Symfony AssetMapper, avoid nodejs to build your frontend app&nbsp; (permet de se passer du builder nodejs) <a href="https://symfony.com/doc/current/frontend.html#assetmapper">https://symfony.com/doc/current/frontend.html#assetmapper</a></li>
<!-- /wp:list-item --></ul>
<!-- /wp:list -->

<!-- wp:paragraph -->
<p>00:08:51 - Symfony AI, tool set of PHP components to bring AI capabilities to applications, with native Symfony integration&nbsp;</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul class="wp-block-list"><!-- wp:list-item -->
<li><a href="https://symfony.com/blog/kicking-off-the-symfony-ai-initiative">https://symfony.com/blog/kicking-off-the-symfony-ai-initiative</a></li>
<!-- /wp:list-item --></ul>
<!-- /wp:list -->

<!-- wp:paragraph -->
<p>00:14:08 - Postgresql 18 released - <a href="https://lwn.net/Articles/1039483/">https://lwn.net/Articles/1039483/</a> <a href="https://www.postgresql.org/about/news/postgresql-18-released-3142/">https://www.postgresql.org/about/news/postgresql-18-released-3142/</a></p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul class="wp-block-list"><!-- wp:list-item -->
<li>Async IO pour l’accès disque (par exemple avec io_uring)</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Meilleures perfs sur les requêtes (notamment gestion d’index et query planning)</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Support d’OAuth et depréciation du md5 hashed password</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>`uuidv7()`</li>
<!-- /wp:list-item --></ul>
<!-- /wp:list -->

<!-- wp:paragraph -->
<p>00:22:45 - Java 25 released&nbsp;</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul class="wp-block-list"><!-- wp:list-item -->
<li><a href="https://mail.openjdk.org/pipermail/announce/2025-September/000360.html">https://mail.openjdk.org/pipermail/announce/2025-September/000360.html</a>&nbsp;</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li><a href="https://jdk.java.net/25/release-notes">https://jdk.java.net/25/release-notes</a>&nbsp;</li>
<!-- /wp:list-item --></ul>
<!-- /wp:list -->

<!-- wp:paragraph -->
<p>00:29:10 - PHP 8.5 RC1 <a href="https://www.php.net/archive/2025.php#2025-09-25-3">https://www.php.net/archive/2025.php#2025-09-25-3</a></p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul class="wp-block-list"><!-- wp:list-item -->
<li>Version finale attendue en novembre</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Quoi de neuf dans PHP 8.5 <a href="https://sensiolabs.com/blog/2025/new-in-php-85">https://sensiolabs.com/blog/2025/new-in-php-85</a><!-- wp:list -->
<ul class="wp-block-list"><!-- wp:list-item -->
<li>Ajout du Pipe Operator</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Nouvelles fonctions de manipulation d’arrays</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Getter d’Error et Exception handlers</li>
<!-- /wp:list-item --></ul>
<!-- /wp:list --></li>
<!-- /wp:list-item --></ul>
<!-- /wp:list -->

<!-- wp:paragraph -->
<p>00:35:55 - Calendrier release Symfony&nbsp;</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul class="wp-block-list"><!-- wp:list-item -->
<li><a href="https://symfony.com/releases">https://symfony.com/releases</a></li>
<!-- /wp:list-item --></ul>
<!-- /wp:list -->

<!-- wp:paragraph -->
<p>00:48:50 - One Token to rule them all - obtaining Global Admin in every Entra ID tenant via Actor tokens&nbsp;</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul class="wp-block-list"><!-- wp:list-item -->
<li><a href="https://dirkjanm.io/obtaining-global-admin-in-every-entra-id-tenant-with-actor-tokens/">https://dirkjanm.io/obtaining-global-admin-in-every-entra-id-tenant-with-actor-tokens/</a>&nbsp;</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Entra ID = Azure Active Directory</li>
<!-- /wp:list-item --></ul>
<!-- /wp:list -->

<!-- wp:paragraph -->
<p>00:54:40 - REMPAR25 exercice national de crise cyber&nbsp;</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul class="wp-block-list"><!-- wp:list-item -->
<li><a href="https://cyber.gouv.fr/actualites/rempar25-un-exercice-de-crise-cyber-dune-ampleur-inedite">https://cyber.gouv.fr/actualites/rempar25-un-exercice-de-crise-cyber-dune-ampleur-inedite</a></li>
<!-- /wp:list-item --></ul>
<!-- /wp:list -->

<!-- wp:paragraph -->
<p>00:56:00 - Outil de l’épisode : Tailspin, un pager qui met de la couleur dans tes logs&nbsp;</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul class="wp-block-list"><!-- wp:list-item -->
<li><a href="https://github.com/bensadeh/tailspin">https://github.com/bensadeh/tailspin</a></li>
<!-- /wp:list-item --></ul>
<!-- /wp:list -->

<!-- wp:paragraph -->
<p>01:00:10 - Musique de fin 1 – Le dernier jour du disco, Juliette Armanet <a href="https://www.youtube.com/watch?v=hTHmZYC7Zws">https://www.youtube.com/watch?v=hTHmZYC7Zws</a></p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul class="wp-block-list"><!-- wp:list-item -->
<li>Musique de fin 2 - Archive - Lights <a href="https://www.youtube.com/watch?v=yLuOzNeHw5I">https://www.youtube.com/watch?v=yLuOzNeHw5I</a> ⚠️ 18min</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Musique de fin 3 - <a href="https://www.youtube.com/watch?v=hYiWXWywiPM&amp;pp=ygUWZW5jb3JlIHVuIG1hdGluIGNlcGhheg%3D%3D">https://www.youtube.com/watch?v=hYiWXWywiPM&amp;pp=ygUWZW5jb3JlIHVuIG1hdGluIGNlcGhheg%3D%3D</a>&nbsp;</li>
<!-- /wp:list-item --></ul>
<!-- /wp:list -->

<!-- wp:paragraph -->
<p></p>
<!-- /wp:paragraph -->]]></description>
										<content:encoded><![CDATA[<p><img width="1920" height="1080" src="https://cdn.clever-cloud.com/uploads/2025/10/145.jpg" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="145" decoding="async" srcset="https://cdn.clever-cloud.com/uploads/2025/10/145.jpg 1920w, https://cdn.clever-cloud.com/uploads/2025/10/145-300x169.jpg 300w, https://cdn.clever-cloud.com/uploads/2025/10/145-1024x576.jpg 1024w, https://cdn.clever-cloud.com/uploads/2025/10/145-768x432.jpg 768w, https://cdn.clever-cloud.com/uploads/2025/10/145-1536x864.jpg 1536w, https://cdn.clever-cloud.com/uploads/2025/10/145-1368x770.jpg 1368w" sizes="(max-width: 1920px) 100vw, 1920px" /></p><!-- wp:buttons -->
<div class="wp-block-buttons"><!-- wp:button -->
<div class="wp-block-button"><a class="wp-block-button__link wp-element-button" href="https://youtu.be/OtcIMve6lcY">Voir sur Youtube</a></div>
<!-- /wp:button --></div>
<!-- /wp:buttons -->

<!-- wp:paragraph -->
<p></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Animé par : Horacio GONZALEZ<br>Avec la participation de : <br>- Mathieu SANTOSTEFANO<br>- Sébastien BRUNAT<br>- Julien DURILLON</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Episode enregistré le 26 septembre 2025</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Montage : Yann BRESSON @ Smartmedias</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading">Chapitrage et Liens</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>00:00:16 - Présentation des invités</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>00:02:20 - Symfony UX, modern web app without writing much JS&nbsp;</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul class="wp-block-list"><!-- wp:list-item -->
<li><a href="https://ux.symfony.com/">https://ux.symfony.com/</a></li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Symfony AssetMapper, avoid nodejs to build your frontend app&nbsp; (permet de se passer du builder nodejs) <a href="https://symfony.com/doc/current/frontend.html#assetmapper">https://symfony.com/doc/current/frontend.html#assetmapper</a></li>
<!-- /wp:list-item --></ul>
<!-- /wp:list -->

<!-- wp:paragraph -->
<p>00:08:51 - Symfony AI, tool set of PHP components to bring AI capabilities to applications, with native Symfony integration&nbsp;</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul class="wp-block-list"><!-- wp:list-item -->
<li><a href="https://symfony.com/blog/kicking-off-the-symfony-ai-initiative">https://symfony.com/blog/kicking-off-the-symfony-ai-initiative</a></li>
<!-- /wp:list-item --></ul>
<!-- /wp:list -->

<!-- wp:paragraph -->
<p>00:14:08 - Postgresql 18 released - <a href="https://lwn.net/Articles/1039483/">https://lwn.net/Articles/1039483/</a> <a href="https://www.postgresql.org/about/news/postgresql-18-released-3142/">https://www.postgresql.org/about/news/postgresql-18-released-3142/</a></p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul class="wp-block-list"><!-- wp:list-item -->
<li>Async IO pour l’accès disque (par exemple avec io_uring)</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Meilleures perfs sur les requêtes (notamment gestion d’index et query planning)</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Support d’OAuth et depréciation du md5 hashed password</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>`uuidv7()`</li>
<!-- /wp:list-item --></ul>
<!-- /wp:list -->

<!-- wp:paragraph -->
<p>00:22:45 - Java 25 released&nbsp;</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul class="wp-block-list"><!-- wp:list-item -->
<li><a href="https://mail.openjdk.org/pipermail/announce/2025-September/000360.html">https://mail.openjdk.org/pipermail/announce/2025-September/000360.html</a>&nbsp;</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li><a href="https://jdk.java.net/25/release-notes">https://jdk.java.net/25/release-notes</a>&nbsp;</li>
<!-- /wp:list-item --></ul>
<!-- /wp:list -->

<!-- wp:paragraph -->
<p>00:29:10 - PHP 8.5 RC1 <a href="https://www.php.net/archive/2025.php#2025-09-25-3">https://www.php.net/archive/2025.php#2025-09-25-3</a></p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul class="wp-block-list"><!-- wp:list-item -->
<li>Version finale attendue en novembre</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Quoi de neuf dans PHP 8.5 <a href="https://sensiolabs.com/blog/2025/new-in-php-85">https://sensiolabs.com/blog/2025/new-in-php-85</a><!-- wp:list -->
<ul class="wp-block-list"><!-- wp:list-item -->
<li>Ajout du Pipe Operator</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Nouvelles fonctions de manipulation d’arrays</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Getter d’Error et Exception handlers</li>
<!-- /wp:list-item --></ul>
<!-- /wp:list --></li>
<!-- /wp:list-item --></ul>
<!-- /wp:list -->

<!-- wp:paragraph -->
<p>00:35:55 - Calendrier release Symfony&nbsp;</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul class="wp-block-list"><!-- wp:list-item -->
<li><a href="https://symfony.com/releases">https://symfony.com/releases</a></li>
<!-- /wp:list-item --></ul>
<!-- /wp:list -->

<!-- wp:paragraph -->
<p>00:48:50 - One Token to rule them all - obtaining Global Admin in every Entra ID tenant via Actor tokens&nbsp;</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul class="wp-block-list"><!-- wp:list-item -->
<li><a href="https://dirkjanm.io/obtaining-global-admin-in-every-entra-id-tenant-with-actor-tokens/">https://dirkjanm.io/obtaining-global-admin-in-every-entra-id-tenant-with-actor-tokens/</a>&nbsp;</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Entra ID = Azure Active Directory</li>
<!-- /wp:list-item --></ul>
<!-- /wp:list -->

<!-- wp:paragraph -->
<p>00:54:40 - REMPAR25 exercice national de crise cyber&nbsp;</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul class="wp-block-list"><!-- wp:list-item -->
<li><a href="https://cyber.gouv.fr/actualites/rempar25-un-exercice-de-crise-cyber-dune-ampleur-inedite">https://cyber.gouv.fr/actualites/rempar25-un-exercice-de-crise-cyber-dune-ampleur-inedite</a></li>
<!-- /wp:list-item --></ul>
<!-- /wp:list -->

<!-- wp:paragraph -->
<p>00:56:00 - Outil de l’épisode : Tailspin, un pager qui met de la couleur dans tes logs&nbsp;</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul class="wp-block-list"><!-- wp:list-item -->
<li><a href="https://github.com/bensadeh/tailspin">https://github.com/bensadeh/tailspin</a></li>
<!-- /wp:list-item --></ul>
<!-- /wp:list -->

<!-- wp:paragraph -->
<p>01:00:10 - Musique de fin 1 – Le dernier jour du disco, Juliette Armanet <a href="https://www.youtube.com/watch?v=hTHmZYC7Zws">https://www.youtube.com/watch?v=hTHmZYC7Zws</a></p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul class="wp-block-list"><!-- wp:list-item -->
<li>Musique de fin 2 - Archive - Lights <a href="https://www.youtube.com/watch?v=yLuOzNeHw5I">https://www.youtube.com/watch?v=yLuOzNeHw5I</a> ⚠️ 18min</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Musique de fin 3 - <a href="https://www.youtube.com/watch?v=hYiWXWywiPM&amp;pp=ygUWZW5jb3JlIHVuIG1hdGluIGNlcGhheg%3D%3D">https://www.youtube.com/watch?v=hYiWXWywiPM&amp;pp=ygUWZW5jb3JlIHVuIG1hdGluIGNlcGhheg%3D%3D</a>&nbsp;</li>
<!-- /wp:list-item --></ul>
<!-- /wp:list -->

<!-- wp:paragraph -->
<p></p>
<!-- /wp:paragraph -->]]></content:encoded>
					
					<wfw:commentRss>https://www.clever.cloud/podcast/java-de-base-ouverte-sur-symfony-de-logs-en-couleurs/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Deploy a Scala / Akka application with PostgreSQL integration</title>
		<link>https://www.clever.cloud/blog/engineering/2022/06/09/deploy-a-scala-akka-application-with-postgresql-integration/</link>
		
		<dc:creator><![CDATA[Geoffrey GUILBON]]></dc:creator>
		<pubDate>Thu, 09 Jun 2022 12:44:32 +0000</pubDate>
				<category><![CDATA[Engineering]]></category>
		<category><![CDATA[deployment]]></category>
		<category><![CDATA[postgresql]]></category>
		<category><![CDATA[Scala]]></category>
		<guid isPermaLink="false">https://www.clever-cloud.com/?p=6509</guid>

					<description><![CDATA[<p><img width="1400" height="540" src="https://cdn.clever-cloud.com/uploads/2022/06/akka.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="akka" decoding="async" srcset="https://cdn.clever-cloud.com/uploads/2022/06/akka.png 1400w, https://cdn.clever-cloud.com/uploads/2022/06/akka-300x116.png 300w, https://cdn.clever-cloud.com/uploads/2022/06/akka-1024x395.png 1024w, https://cdn.clever-cloud.com/uploads/2022/06/akka-768x296.png 768w, https://cdn.clever-cloud.com/uploads/2022/06/akka-1368x528.png 1368w" sizes="(max-width: 1400px) 100vw, 1400px" /></p><!-- wp:media-text {"align":"wide","mediaId":6749,"mediaType":"image","mediaWidth":30} -->
<div class="wp-block-media-text alignwide is-stacked-on-mobile" style="grid-template-columns:30% auto"><figure class="wp-block-media-text__media"><img src="https://cdn.clever-cloud.com/uploads/2022/06/akkatoolkitlogo-2-318x131.png" alt="" class="wp-image-6749 size-full"/></figure><div class="wp-block-media-text__content"><!-- wp:paragraph -->
<p>When I started working at Clever Cloud, I spent some time messing around with the platform and its tooling. This blog post will present you how I managed to:</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul class="wp-block-list"><!-- wp:list-item -->
<li>create a simple Scala/Akka HTTP template application with PostgreSQL persistence</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>link the application to a managed PostgreSQL</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>deploy it</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>try it!</li>
<!-- /wp:list-item --></ul>
<!-- /wp:list --></div></div>
<!-- /wp:media-text -->

<!-- wp:heading -->
<h2 class="wp-block-heading">Create a Scala/Akka HTTP template 🔨</h2>
<!-- /wp:heading -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">Get the sources</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p><a href="https://github.com/CleverCloud/scala-akka-http-postgres-example">Clone</a> the project generated from Akka Github <a href="https://github.com/akka/akka-http-quickstart-scala.g8" target="_blank" rel="noreferrer noopener">quick start template</a>.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>This service provides the ability to manage a simple in-memory user registry exposing 4 routes:</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul class="wp-block-list"><!-- wp:list-item -->
<li>List all users</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Get a specific user</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Create a user</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Delete a user</li>
<!-- /wp:list-item --></ul>
<!-- /wp:list -->

<!-- wp:paragraph -->
<p>A thorough description of available the cURL commands may be found <a href="https://developer.lightbend.com/guides/akka-http-quickstart-scala/#cURL-commands" target="_blank" rel="noreferrer noopener">here</a>.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">Add extra features</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>A few functionalities have been added on top of the original example:</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul class="wp-block-list"><!-- wp:list-item -->
<li>store the registry into a PostgreSQL database (instead of in memory)</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>read database parameters from <a href="https://www.clever.cloud/blog/fonctionnalites/2022/03/22/improving-our-environment-variables-editor/">environment variables</a></li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>add a hardcoded basic authentication</li>
<!-- /wp:list-item --></ul>
<!-- /wp:list -->

<!-- wp:paragraph -->
<p>All parameters may be specified in the <a href="https://github.com/CleverCloud/scala-akka-http-postgres-example/blob/master/src/main/resources/application.conf">application.conf</a> file:</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul class="wp-block-list"><!-- wp:list-item -->
<li>basic auth</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>database parameters</li>
<!-- /wp:list-item --></ul>
<!-- /wp:list -->

<!-- wp:paragraph -->
<p>Parameters are fetched from environment variables, or the specified default value if none is found</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="lang-bash">app {
  basic-auth {
    user = "foo"
    user = ${?BASIC_AUTH_USER}
    password = "bar"
    password = ${?BASIC_AUTH_PASSWORD}
  }
  routes {
    # If ask takes more time than this to complete the request is failed
    ask-timeout = 5s
  }

  db {
    host = "localhost"
    host = ${?POSTGRESQL_ADDON_HOST}
    port = "5432"
    port = ${?POSTGRESQL_ADDON_PORT}
    database = "postgres"
    database = ${?POSTGRESQL_ADDON_DB}
    user = "login"
    user = ${?POSTGRESQL_ADDON_USER}
    pass = "pass"
    pass = ${?POSTGRESQL_ADDON_PASSWORD}
  }
}</code></pre>
<!-- /wp:html -->

<!-- wp:heading -->
<h2 class="wp-block-heading">Run the application using Clever Cloud CLI 🚀</h2>
<!-- /wp:heading -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">Create a Clever Cloud application</h3>
<!-- /wp:heading -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="lang-bash">clever create --type sbt myakka --region par --org testorg</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>This command creates a new application</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul class="wp-block-list"><!-- wp:list-item -->
<li>of type sbt for <a href="https://www.clever.cloud/product/applications-scala/">Scala</a></li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>named <em>myakka</em></li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>in <em>Paris</em> region</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>inside my test organisation <em>testorg</em></li>
<!-- /wp:list-item --></ul>
<!-- /wp:list -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">Enable a dedicated build instance for faster build (optional pro tip)</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>By default a newly created application will run an XS instance which are quite small for building Scala applications fast. One way to build faster is to use a dedicated build Instance: In the Clever Cloud console, got to your application -&gt; options, and check the box <code>[] Enable dedicated build instance</code> This way you can keep your XS instance for running the application, but you can choose an XL for the build time. Or with the command line tool:</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="lang-bash">clever scale -a myakka --build-flavor XL</code></pre>
<!-- /wp:html -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">Create a PostgreSQL database</h3>
<!-- /wp:heading -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="lang-bash">clever addon -l myakka create postgresql-addon myakkadb</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>This command orders a PostgreSQL add-on instance and link it to <code><em>myakka</em></code>, injecting the right environment variables into the application instance to contact the database.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Database creation and migration is performed using <a href="https://flywaydb.org/">flywaydb</a> tool. Those script may be found in the <a href="https://github.com/CleverCloud/scala-akka-http-postgres-example/tree/master/src/main/resources/db/migration">migration/db</a> directory of the application resources.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Migration will be automatically called once you specify the proper build hook in the environment variables</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><kbd>CC_POST_BUILD_HOOK</kbd> with value <kbd><kbd>sbt flywayMigrate</kbd></kbd></p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="lang-bash">clever env -a myakka set <kbd>CC_POST_BUILD_HOOK</kbd> "sbt flywayMigrate"</code></pre>
<!-- /wp:html -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">Configure basic auth environment variables</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Basic authentication login and password can be specified as environment variables using the <kbd>clever env</kbd> command. If none is found, basic authentication will default to <em>application.conf</em> file values</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="lang-bash">clever env -a myakka set BASIC_AUTH_USER &lt;YOUR_AUTH_USER&gt;
clever env -a myakka set BASIC_AUTH_PASSWORD &lt;YOUR_AUTH_PASSWORD&gt;</code></pre>
<!-- /wp:html -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">Link your local repo with your Clever Cloud application instance</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Retrieve your application id with</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="lang-bash">clever applications</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>Then link the local repository to the application (creating a <em>.clever.json</em> file)</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="lang-bash">clever link app_&lt;UUID&gt;</code></pre>
<!-- /wp:html -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">Deploy</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>You are now ready to deploy and run your code, just run</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="lang-bash">clever deploy</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>You are now able to follow the deployment process until it completes successfully</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Your application is running now!</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">Try it</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>It's time to experiment with it using <kbd>curl</kbd> or your favorite GUI</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":4} -->
<h4 class="wp-block-heading">Add a user</h4>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Adapt this command in order to insert a new user into the registry:</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="lang-bash">curl --request POST \
  --url https://app-&lt;UUID&gt;.cleverapps.io/users \
  --header 'Content-type: application/json' \
  -u '&lt;YOUR_AUTH_USER&gt;:&lt;YOUR_AUTH_PASSWORD&gt;' \
  --data '{
  "name": "Serge",
  "age": 42,
  "countryOfResidence": "Greenland"
}'

{
	"description": "User Serge created."
}</code></pre>
<!-- /wp:html -->

<!-- wp:heading {"level":4} -->
<h4 class="wp-block-heading">Get all users</h4>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Check that the user has been properly created, by getting the list of users:</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="lang-bash">curl --request GET \
  --url https://app-&lt;UUID&gt;.cleverapps.io/users \
  -u '&lt;YOUR_AUTH_USER&gt;:&lt;YOUR_AUTH_PASSWORD&gt;'

{"users":[{"age":42,"countryOfResidence":"Greenland","name":"Serge"}]}</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>It works, Success! 🎉</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p></p>
<!-- /wp:paragraph -->]]></description>
										<content:encoded><![CDATA[<p><img width="1400" height="540" src="https://cdn.clever-cloud.com/uploads/2022/06/akka.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="akka" decoding="async" loading="lazy" srcset="https://cdn.clever-cloud.com/uploads/2022/06/akka.png 1400w, https://cdn.clever-cloud.com/uploads/2022/06/akka-300x116.png 300w, https://cdn.clever-cloud.com/uploads/2022/06/akka-1024x395.png 1024w, https://cdn.clever-cloud.com/uploads/2022/06/akka-768x296.png 768w, https://cdn.clever-cloud.com/uploads/2022/06/akka-1368x528.png 1368w" sizes="auto, (max-width: 1400px) 100vw, 1400px" /></p><!-- wp:media-text {"align":"wide","mediaId":6749,"mediaType":"image","mediaWidth":30} -->
<div class="wp-block-media-text alignwide is-stacked-on-mobile" style="grid-template-columns:30% auto"><figure class="wp-block-media-text__media"><img src="https://cdn.clever-cloud.com/uploads/2022/06/akkatoolkitlogo-2-318x131.png" alt="" class="wp-image-6749 size-full"/></figure><div class="wp-block-media-text__content"><!-- wp:paragraph -->
<p>When I started working at Clever Cloud, I spent some time messing around with the platform and its tooling. This blog post will present you how I managed to:</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul class="wp-block-list"><!-- wp:list-item -->
<li>create a simple Scala/Akka HTTP template application with PostgreSQL persistence</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>link the application to a managed PostgreSQL</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>deploy it</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>try it!</li>
<!-- /wp:list-item --></ul>
<!-- /wp:list --></div></div>
<!-- /wp:media-text -->

<!-- wp:heading -->
<h2 class="wp-block-heading">Create a Scala/Akka HTTP template 🔨</h2>
<!-- /wp:heading -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">Get the sources</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p><a href="https://github.com/CleverCloud/scala-akka-http-postgres-example">Clone</a> the project generated from Akka Github <a href="https://github.com/akka/akka-http-quickstart-scala.g8" target="_blank" rel="noreferrer noopener">quick start template</a>.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>This service provides the ability to manage a simple in-memory user registry exposing 4 routes:</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul class="wp-block-list"><!-- wp:list-item -->
<li>List all users</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Get a specific user</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Create a user</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Delete a user</li>
<!-- /wp:list-item --></ul>
<!-- /wp:list -->

<!-- wp:paragraph -->
<p>A thorough description of available the cURL commands may be found <a href="https://developer.lightbend.com/guides/akka-http-quickstart-scala/#cURL-commands" target="_blank" rel="noreferrer noopener">here</a>.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">Add extra features</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>A few functionalities have been added on top of the original example:</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul class="wp-block-list"><!-- wp:list-item -->
<li>store the registry into a PostgreSQL database (instead of in memory)</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>read database parameters from <a href="https://www.clever.cloud/blog/fonctionnalites/2022/03/22/improving-our-environment-variables-editor/">environment variables</a></li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>add a hardcoded basic authentication</li>
<!-- /wp:list-item --></ul>
<!-- /wp:list -->

<!-- wp:paragraph -->
<p>All parameters may be specified in the <a href="https://github.com/CleverCloud/scala-akka-http-postgres-example/blob/master/src/main/resources/application.conf">application.conf</a> file:</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul class="wp-block-list"><!-- wp:list-item -->
<li>basic auth</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>database parameters</li>
<!-- /wp:list-item --></ul>
<!-- /wp:list -->

<!-- wp:paragraph -->
<p>Parameters are fetched from environment variables, or the specified default value if none is found</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="lang-bash">app {
  basic-auth {
    user = "foo"
    user = ${?BASIC_AUTH_USER}
    password = "bar"
    password = ${?BASIC_AUTH_PASSWORD}
  }
  routes {
    # If ask takes more time than this to complete the request is failed
    ask-timeout = 5s
  }

  db {
    host = "localhost"
    host = ${?POSTGRESQL_ADDON_HOST}
    port = "5432"
    port = ${?POSTGRESQL_ADDON_PORT}
    database = "postgres"
    database = ${?POSTGRESQL_ADDON_DB}
    user = "login"
    user = ${?POSTGRESQL_ADDON_USER}
    pass = "pass"
    pass = ${?POSTGRESQL_ADDON_PASSWORD}
  }
}</code></pre>
<!-- /wp:html -->

<!-- wp:heading -->
<h2 class="wp-block-heading">Run the application using Clever Cloud CLI 🚀</h2>
<!-- /wp:heading -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">Create a Clever Cloud application</h3>
<!-- /wp:heading -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="lang-bash">clever create --type sbt myakka --region par --org testorg</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>This command creates a new application</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul class="wp-block-list"><!-- wp:list-item -->
<li>of type sbt for <a href="https://www.clever.cloud/product/applications-scala/">Scala</a></li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>named <em>myakka</em></li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>in <em>Paris</em> region</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>inside my test organisation <em>testorg</em></li>
<!-- /wp:list-item --></ul>
<!-- /wp:list -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">Enable a dedicated build instance for faster build (optional pro tip)</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>By default a newly created application will run an XS instance which are quite small for building Scala applications fast. One way to build faster is to use a dedicated build Instance: In the Clever Cloud console, got to your application -&gt; options, and check the box <code>[] Enable dedicated build instance</code> This way you can keep your XS instance for running the application, but you can choose an XL for the build time. Or with the command line tool:</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="lang-bash">clever scale -a myakka --build-flavor XL</code></pre>
<!-- /wp:html -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">Create a PostgreSQL database</h3>
<!-- /wp:heading -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="lang-bash">clever addon -l myakka create postgresql-addon myakkadb</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>This command orders a PostgreSQL add-on instance and link it to <code><em>myakka</em></code>, injecting the right environment variables into the application instance to contact the database.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Database creation and migration is performed using <a href="https://flywaydb.org/">flywaydb</a> tool. Those script may be found in the <a href="https://github.com/CleverCloud/scala-akka-http-postgres-example/tree/master/src/main/resources/db/migration">migration/db</a> directory of the application resources.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Migration will be automatically called once you specify the proper build hook in the environment variables</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><kbd>CC_POST_BUILD_HOOK</kbd> with value <kbd><kbd>sbt flywayMigrate</kbd></kbd></p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="lang-bash">clever env -a myakka set <kbd>CC_POST_BUILD_HOOK</kbd> "sbt flywayMigrate"</code></pre>
<!-- /wp:html -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">Configure basic auth environment variables</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Basic authentication login and password can be specified as environment variables using the <kbd>clever env</kbd> command. If none is found, basic authentication will default to <em>application.conf</em> file values</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="lang-bash">clever env -a myakka set BASIC_AUTH_USER &lt;YOUR_AUTH_USER&gt;
clever env -a myakka set BASIC_AUTH_PASSWORD &lt;YOUR_AUTH_PASSWORD&gt;</code></pre>
<!-- /wp:html -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">Link your local repo with your Clever Cloud application instance</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Retrieve your application id with</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="lang-bash">clever applications</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>Then link the local repository to the application (creating a <em>.clever.json</em> file)</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="lang-bash">clever link app_&lt;UUID&gt;</code></pre>
<!-- /wp:html -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">Deploy</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>You are now ready to deploy and run your code, just run</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="lang-bash">clever deploy</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>You are now able to follow the deployment process until it completes successfully</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Your application is running now!</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">Try it</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>It's time to experiment with it using <kbd>curl</kbd> or your favorite GUI</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":4} -->
<h4 class="wp-block-heading">Add a user</h4>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Adapt this command in order to insert a new user into the registry:</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="lang-bash">curl --request POST \
  --url https://app-&lt;UUID&gt;.cleverapps.io/users \
  --header 'Content-type: application/json' \
  -u '&lt;YOUR_AUTH_USER&gt;:&lt;YOUR_AUTH_PASSWORD&gt;' \
  --data '{
  "name": "Serge",
  "age": 42,
  "countryOfResidence": "Greenland"
}'

{
	"description": "User Serge created."
}</code></pre>
<!-- /wp:html -->

<!-- wp:heading {"level":4} -->
<h4 class="wp-block-heading">Get all users</h4>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Check that the user has been properly created, by getting the list of users:</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="lang-bash">curl --request GET \
  --url https://app-&lt;UUID&gt;.cleverapps.io/users \
  -u '&lt;YOUR_AUTH_USER&gt;:&lt;YOUR_AUTH_PASSWORD&gt;'

{"users":[{"age":42,"countryOfResidence":"Greenland","name":"Serge"}]}</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>It works, Success! 🎉</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p></p>
<!-- /wp:paragraph -->]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>#63 &#8211; L&#8217;oAuth v100 met en demeure la foundation des fusions de RFC</title>
		<link>https://www.clever.cloud/podcast/63-loauth-v100-met-en-demeure-la-foundation-des-fusions-de-rfc/</link>
		
		<dc:creator><![CDATA[Hubert Sablonnière]]></dc:creator>
		<pubDate>Mon, 21 Feb 2022 13:40:50 +0000</pubDate>
				<category><![CDATA[Chrome]]></category>
		<category><![CDATA[CNIL]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[Google Analytics]]></category>
		<category><![CDATA[JSON]]></category>
		<category><![CDATA[Log4shell]]></category>
		<category><![CDATA[postgresql]]></category>
		<guid isPermaLink="false">https://www.clever-cloud.com/?post_type=podcast&#038;p=5422</guid>

					<description><![CDATA[<p><img width="1920" height="1080" src="https://cdn.clever-cloud.com/uploads/2022/02/63-1.jpg" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="63 1" decoding="async" loading="lazy" srcset="https://cdn.clever-cloud.com/uploads/2022/02/63-1.jpg 1920w, https://cdn.clever-cloud.com/uploads/2022/02/63-1-300x169.jpg 300w, https://cdn.clever-cloud.com/uploads/2022/02/63-1-1024x576.jpg 1024w, https://cdn.clever-cloud.com/uploads/2022/02/63-1-768x432.jpg 768w, https://cdn.clever-cloud.com/uploads/2022/02/63-1-1536x864.jpg 1536w, https://cdn.clever-cloud.com/uploads/2022/02/63-1-1368x770.jpg 1368w" sizes="auto, (max-width: 1920px) 100vw, 1920px" /></p><!-- wp:gallery {"columns":4,"linkTo":"none"} -->
<figure class="wp-block-gallery has-nested-images columns-4 is-cropped"><!-- wp:image {"id":712,"sizeSlug":"large","linkDestination":"none"} -->
<figure class="wp-block-image size-large"><img src="https://cdn.clever-cloud.com/uploads/2021/03/hubert-sablonniere.jpg" alt="hubert_sablonnière" class="wp-image-712"/><figcaption>Hubert Sablonnière</figcaption></figure>
<!-- /wp:image -->

<!-- wp:image {"id":3045,"sizeSlug":"large","linkDestination":"none"} -->
<figure class="wp-block-image size-large"><img src="https://cdn.clever-cloud.com/uploads/2021/08/30kgNpLQ_400x400.jpg" alt="Pierre Zemb" class="wp-image-3045"/><figcaption>Pierre Zemb</figcaption></figure>
<!-- /wp:image -->

<!-- wp:image {"id":705,"sizeSlug":"large","linkDestination":"none"} -->
<figure class="wp-block-image size-large"><img src="https://cdn.clever-cloud.com/uploads/2021/03/arnaud-lefebvre.jpg" alt="arnaud_lefebvre" class="wp-image-705"/><figcaption>Arnaud Lefebvre</figcaption></figure>
<!-- /wp:image -->

<!-- wp:image {"id":5425,"sizeSlug":"large","linkDestination":"none"} -->
<figure class="wp-block-image size-large"><img src="https://cdn.clever-cloud.com/uploads/2022/02/david_brassely.jpg" alt="" class="wp-image-5425"/><figcaption>David Brassely</figcaption></figure>
<!-- /wp:image --></figure>
<!-- /wp:gallery -->

<!-- wp:paragraph -->
<p>Dans cet incroyable épisode, il est question : de la CNIL et de Google Analytics, de la faille #log4shell,  d'authentification, de la version 100 de Chrome et Firefox, d'un nouveau container pour les requêtes, d'un incident poilu sur PostgreSQL, de migration de métadata, d'exécution de code arbitraire et d'extension de cockpit JSON… pour finir, comme il se doit en musique.</p>
<!-- /wp:paragraph -->

<!-- wp:buttons -->
<div class="wp-block-buttons"><!-- wp:button {"className":"is-style-fill"} -->
<div class="wp-block-button is-style-fill"><a class="wp-block-button__link" href="https://youtu.be/9Gz2n7NRrog" target="_blank" rel="noreferrer noopener">Regarder sur Youtube</a></div>
<!-- /wp:button --></div>
<!-- /wp:buttons -->

<!-- wp:paragraph -->
<p></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>👋 Venez discuter avec nous sur <strong>@clever_cloudFR</strong> pour nous dire ce que vous avez pensé de ce nouvel épisode.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>➡️ Pour découvrir ou réécouter d’anciens épisodes&nbsp;<a href="https://www.clever.cloud/fr/podcast/">c’est par ici</a>&nbsp;!</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 id="timecodes-liens">Timecodes &amp; liens :</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>00:00:00 Introduction et présentation de l’invité<br><a href="https://github.com/gravitee-io/" target="_blank" rel="noreferrer noopener">https://github.com/gravitee-io/</a></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>00:00:00 La CNIL met en demeure un gestionnaire de sites français pour son usage de Google Analytics<br><a href="https://www.cnil.fr/fr/utilisation-de-google-analytics-et-transferts-de-donnees-vers-les-etats-unis-la-cnil-met-en-demeure" target="_blank" rel="noreferrer noopener">https://www.cnil.fr/fr/utilisation-de-google-analytics-et-transferts-de-donnees-vers-les-etats-unis-la-cnil-met-en-demeure<br></a><a href="https://www.linkedin.com/feed/update/urn:li:activity:6897522101679390720/" target="_blank" rel="noreferrer noopener">https://www.linkedin.com/feed/update/urn:li:activity:6897522101679390720/<br></a><a href="https://matomo.org/matomo-cloud/" target="_blank" rel="noreferrer noopener">https://matomo.org/matomo-cloud/</a></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>00:12:45 : LCC 272 - Interview sur Log4Shell avec this<br><a href="https://lescastcodeurs.com/2022/02/12/lcc-272-interview-sur-log4shell-avec-this/&#10;">https://lescastcodeurs.com/2022/02/12/lcc-272-interview-sur-log4shell-avec-this/<br></a><a href="https://snyk.io/&#10;">https://snyk.io/<br></a><a href="https://logback.qos.ch/news.html" target="_blank" rel="noreferrer noopener">https://logback.qos.ch/news.html</a></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>00:19:10 Le chien qui se mord la queue… de la gestion des authentications / autorizations<br><a href="https://datatracker.ietf.org/doc/draft-ietf-oauth-v2-1/04/" target="_blank" rel="noreferrer noopener">https://datatracker.ietf.org/doc/draft-ietf-oauth-v2-1/04/<br></a>Next-generation protocol : GNAP <a href="https://datatracker.ietf.org/doc/html/draft-ietf-gnap-core-protocol" target="_blank" rel="noreferrer noopener">https://datatracker.ietf.org/doc/html/draft-ietf-gnap-core-protocol</a></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>00:27:00 Version 100 in Chrome and Firefox<br><a href="https://hacks.mozilla.org/2022/02/version-100-in-chrome-and-firefox/" target="_blank" rel="noreferrer noopener">https://hacks.mozilla.org/2022/02/version-100-in-chrome-and-firefox/<br></a><a href="https://wicg.github.io/ua-client-hints/" target="_blank" rel="noreferrer noopener">https://wicg.github.io/ua-client-hints/<br></a>Retrospective and Technical Details on the recent Firefox Outage<br><a href="https://hacks.mozilla.org/2022/02/retrospective-and-technical-details-on-the-recent-firefox-outage/" target="_blank" rel="noreferrer noopener">https://hacks.mozilla.org/2022/02/retrospective-and-technical-details-on-the-recent-firefox-outage/</a></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>00:35:20 A New Container Query Polyfill That Just Works<br><a href="https://css-tricks.com/a-new-container-query-polyfill-that-just-works/" target="_blank" rel="noreferrer noopener">https://css-tricks.com/a-new-container-query-polyfill-that-just-works/<br></a><a href="https://caniuse.com/css-container-queries" target="_blank" rel="noreferrer noopener">https://caniuse.com/css-container-queries</a></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>00:39:50 A Hairy PostgreSQL Incident<br><a href="https://ardentperf.com/2022/02/10/a-hairy-postgresql-incident/" target="_blank" rel="noreferrer noopener">https://ardentperf.com/2022/02/10/a-hairy-postgresql-incident/</a></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>00:43:45 Migrating Snowflake’s Metadata with No Downtime<br><a href="https://medium.com/snowflake/migrating-snowflakes-metadata-with-no-downtime-ca90604b677c" target="_blank" rel="noreferrer noopener">https://medium.com/snowflake/migrating-snowflakes-metadata-with-no-downtime-ca90604b677c</a></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>00:50:15 ldd arbitrary code execution<br><a href="https://catonmat.net/ldd-arbitrary-code-execution" target="_blank" rel="noreferrer noopener">https://catonmat.net/ldd-arbitrary-code-execution<br></a><a href="https://github.com/gentoo/pax-utils" target="_blank" rel="noreferrer noopener">https://github.com/gentoo/pax-utils</a></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>00:55:45 RFC sur l’ajout du support de JSON dans cURL<br><a href="https://github.com/curl/curl/discussions/8312" target="_blank" rel="noreferrer noopener">https://github.com/curl/curl/discussions/8312<br></a><a href="https://daniel.haxx.se/blog/2022/02/02/curl-dash-dash-json/" target="_blank" rel="noreferrer noopener">https://daniel.haxx.se/blog/2022/02/02/curl-dash-dash-json/</a></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>00:58:15 jless — a command-line JSON viewer<br><a href="https://pauljuliusmartinez.github.io/" target="_blank" rel="noreferrer noopener">https://pauljuliusmartinez.github.io/</a></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>01:01:00 Choix musical de David Brassely : Alabama Shakes - Don't Wanna Fight<br><a href="https://www.youtube.com/watch?v=nin-fiNz50M" target="_blank" rel="noreferrer noopener">https://www.youtube.com/watch?v=nin-fiNz50M</a></p>
<!-- /wp:paragraph -->]]></description>
										<content:encoded><![CDATA[<p><img width="1920" height="1080" src="https://cdn.clever-cloud.com/uploads/2022/02/63-1.jpg" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="63 1" decoding="async" loading="lazy" srcset="https://cdn.clever-cloud.com/uploads/2022/02/63-1.jpg 1920w, https://cdn.clever-cloud.com/uploads/2022/02/63-1-300x169.jpg 300w, https://cdn.clever-cloud.com/uploads/2022/02/63-1-1024x576.jpg 1024w, https://cdn.clever-cloud.com/uploads/2022/02/63-1-768x432.jpg 768w, https://cdn.clever-cloud.com/uploads/2022/02/63-1-1536x864.jpg 1536w, https://cdn.clever-cloud.com/uploads/2022/02/63-1-1368x770.jpg 1368w" sizes="auto, (max-width: 1920px) 100vw, 1920px" /></p><!-- wp:gallery {"columns":4,"linkTo":"none"} -->
<figure class="wp-block-gallery has-nested-images columns-4 is-cropped"><!-- wp:image {"id":712,"sizeSlug":"large","linkDestination":"none"} -->
<figure class="wp-block-image size-large"><img src="https://cdn.clever-cloud.com/uploads/2021/03/hubert-sablonniere.jpg" alt="hubert_sablonnière" class="wp-image-712"/><figcaption>Hubert Sablonnière</figcaption></figure>
<!-- /wp:image -->

<!-- wp:image {"id":3045,"sizeSlug":"large","linkDestination":"none"} -->
<figure class="wp-block-image size-large"><img src="https://cdn.clever-cloud.com/uploads/2021/08/30kgNpLQ_400x400.jpg" alt="Pierre Zemb" class="wp-image-3045"/><figcaption>Pierre Zemb</figcaption></figure>
<!-- /wp:image -->

<!-- wp:image {"id":705,"sizeSlug":"large","linkDestination":"none"} -->
<figure class="wp-block-image size-large"><img src="https://cdn.clever-cloud.com/uploads/2021/03/arnaud-lefebvre.jpg" alt="arnaud_lefebvre" class="wp-image-705"/><figcaption>Arnaud Lefebvre</figcaption></figure>
<!-- /wp:image -->

<!-- wp:image {"id":5425,"sizeSlug":"large","linkDestination":"none"} -->
<figure class="wp-block-image size-large"><img src="https://cdn.clever-cloud.com/uploads/2022/02/david_brassely.jpg" alt="" class="wp-image-5425"/><figcaption>David Brassely</figcaption></figure>
<!-- /wp:image --></figure>
<!-- /wp:gallery -->

<!-- wp:paragraph -->
<p>Dans cet incroyable épisode, il est question : de la CNIL et de Google Analytics, de la faille #log4shell,  d'authentification, de la version 100 de Chrome et Firefox, d'un nouveau container pour les requêtes, d'un incident poilu sur PostgreSQL, de migration de métadata, d'exécution de code arbitraire et d'extension de cockpit JSON… pour finir, comme il se doit en musique.</p>
<!-- /wp:paragraph -->

<!-- wp:buttons -->
<div class="wp-block-buttons"><!-- wp:button {"className":"is-style-fill"} -->
<div class="wp-block-button is-style-fill"><a class="wp-block-button__link" href="https://youtu.be/9Gz2n7NRrog" target="_blank" rel="noreferrer noopener">Regarder sur Youtube</a></div>
<!-- /wp:button --></div>
<!-- /wp:buttons -->

<!-- wp:paragraph -->
<p></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>👋 Venez discuter avec nous sur <strong>@clever_cloudFR</strong> pour nous dire ce que vous avez pensé de ce nouvel épisode.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>➡️ Pour découvrir ou réécouter d’anciens épisodes&nbsp;<a href="https://www.clever.cloud/fr/podcast/">c’est par ici</a>&nbsp;!</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 id="timecodes-liens">Timecodes &amp; liens :</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>00:00:00 Introduction et présentation de l’invité<br><a href="https://github.com/gravitee-io/" target="_blank" rel="noreferrer noopener">https://github.com/gravitee-io/</a></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>00:00:00 La CNIL met en demeure un gestionnaire de sites français pour son usage de Google Analytics<br><a href="https://www.cnil.fr/fr/utilisation-de-google-analytics-et-transferts-de-donnees-vers-les-etats-unis-la-cnil-met-en-demeure" target="_blank" rel="noreferrer noopener">https://www.cnil.fr/fr/utilisation-de-google-analytics-et-transferts-de-donnees-vers-les-etats-unis-la-cnil-met-en-demeure<br></a><a href="https://www.linkedin.com/feed/update/urn:li:activity:6897522101679390720/" target="_blank" rel="noreferrer noopener">https://www.linkedin.com/feed/update/urn:li:activity:6897522101679390720/<br></a><a href="https://matomo.org/matomo-cloud/" target="_blank" rel="noreferrer noopener">https://matomo.org/matomo-cloud/</a></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>00:12:45 : LCC 272 - Interview sur Log4Shell avec this<br><a href="https://lescastcodeurs.com/2022/02/12/lcc-272-interview-sur-log4shell-avec-this/&#10;">https://lescastcodeurs.com/2022/02/12/lcc-272-interview-sur-log4shell-avec-this/<br></a><a href="https://snyk.io/&#10;">https://snyk.io/<br></a><a href="https://logback.qos.ch/news.html" target="_blank" rel="noreferrer noopener">https://logback.qos.ch/news.html</a></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>00:19:10 Le chien qui se mord la queue… de la gestion des authentications / autorizations<br><a href="https://datatracker.ietf.org/doc/draft-ietf-oauth-v2-1/04/" target="_blank" rel="noreferrer noopener">https://datatracker.ietf.org/doc/draft-ietf-oauth-v2-1/04/<br></a>Next-generation protocol : GNAP <a href="https://datatracker.ietf.org/doc/html/draft-ietf-gnap-core-protocol" target="_blank" rel="noreferrer noopener">https://datatracker.ietf.org/doc/html/draft-ietf-gnap-core-protocol</a></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>00:27:00 Version 100 in Chrome and Firefox<br><a href="https://hacks.mozilla.org/2022/02/version-100-in-chrome-and-firefox/" target="_blank" rel="noreferrer noopener">https://hacks.mozilla.org/2022/02/version-100-in-chrome-and-firefox/<br></a><a href="https://wicg.github.io/ua-client-hints/" target="_blank" rel="noreferrer noopener">https://wicg.github.io/ua-client-hints/<br></a>Retrospective and Technical Details on the recent Firefox Outage<br><a href="https://hacks.mozilla.org/2022/02/retrospective-and-technical-details-on-the-recent-firefox-outage/" target="_blank" rel="noreferrer noopener">https://hacks.mozilla.org/2022/02/retrospective-and-technical-details-on-the-recent-firefox-outage/</a></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>00:35:20 A New Container Query Polyfill That Just Works<br><a href="https://css-tricks.com/a-new-container-query-polyfill-that-just-works/" target="_blank" rel="noreferrer noopener">https://css-tricks.com/a-new-container-query-polyfill-that-just-works/<br></a><a href="https://caniuse.com/css-container-queries" target="_blank" rel="noreferrer noopener">https://caniuse.com/css-container-queries</a></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>00:39:50 A Hairy PostgreSQL Incident<br><a href="https://ardentperf.com/2022/02/10/a-hairy-postgresql-incident/" target="_blank" rel="noreferrer noopener">https://ardentperf.com/2022/02/10/a-hairy-postgresql-incident/</a></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>00:43:45 Migrating Snowflake’s Metadata with No Downtime<br><a href="https://medium.com/snowflake/migrating-snowflakes-metadata-with-no-downtime-ca90604b677c" target="_blank" rel="noreferrer noopener">https://medium.com/snowflake/migrating-snowflakes-metadata-with-no-downtime-ca90604b677c</a></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>00:50:15 ldd arbitrary code execution<br><a href="https://catonmat.net/ldd-arbitrary-code-execution" target="_blank" rel="noreferrer noopener">https://catonmat.net/ldd-arbitrary-code-execution<br></a><a href="https://github.com/gentoo/pax-utils" target="_blank" rel="noreferrer noopener">https://github.com/gentoo/pax-utils</a></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>00:55:45 RFC sur l’ajout du support de JSON dans cURL<br><a href="https://github.com/curl/curl/discussions/8312" target="_blank" rel="noreferrer noopener">https://github.com/curl/curl/discussions/8312<br></a><a href="https://daniel.haxx.se/blog/2022/02/02/curl-dash-dash-json/" target="_blank" rel="noreferrer noopener">https://daniel.haxx.se/blog/2022/02/02/curl-dash-dash-json/</a></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>00:58:15 jless — a command-line JSON viewer<br><a href="https://pauljuliusmartinez.github.io/" target="_blank" rel="noreferrer noopener">https://pauljuliusmartinez.github.io/</a></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>01:01:00 Choix musical de David Brassely : Alabama Shakes - Don't Wanna Fight<br><a href="https://www.youtube.com/watch?v=nin-fiNz50M" target="_blank" rel="noreferrer noopener">https://www.youtube.com/watch?v=nin-fiNz50M</a></p>
<!-- /wp:paragraph -->]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Pgpool-II: getting the most of PostgreSQL</title>
		<link>https://www.clever.cloud/blog/features/2021/07/07/introducing-pgpool-ii/</link>
		
		<dc:creator><![CDATA[Emmanuel Bosquet]]></dc:creator>
		<pubDate>Wed, 07 Jul 2021 09:04:00 +0000</pubDate>
				<category><![CDATA[Features]]></category>
		<category><![CDATA[databases]]></category>
		<category><![CDATA[pgpool]]></category>
		<category><![CDATA[postgresql]]></category>
		<guid isPermaLink="false">https://www2.cleverapps.io/wp/blog/technology/2021/07/07/introducing-pgpool-ii/</guid>

					<description><![CDATA[<p><img width="1400" height="540" src="https://cdn.clever-cloud.com/uploads/2021/07/pg-pool2-1.jpg" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="pg pool2 1" decoding="async" loading="lazy" srcset="https://cdn.clever-cloud.com/uploads/2021/07/pg-pool2-1.jpg 1400w, https://cdn.clever-cloud.com/uploads/2021/07/pg-pool2-1-300x116.jpg 300w, https://cdn.clever-cloud.com/uploads/2021/07/pg-pool2-1-1024x395.jpg 1024w, https://cdn.clever-cloud.com/uploads/2021/07/pg-pool2-1-768x296.jpg 768w, https://cdn.clever-cloud.com/uploads/2021/07/pg-pool2-1-1368x528.jpg 1368w" sizes="auto, (max-width: 1400px) 100vw, 1400px" /></p>Are you having too many simultaneous connections on your PostgreSQL database? Do you dream of balancing the load of your requests across a PostgreSQL cluster? Either way, we've got the solution for you.

Clever Cloud is proud to introduce the native support of Pgpool-II on all application instances, for no additional fee.

<span id="more-3001"></span>

<a href="https://www.clever.cloud/developers/deploy/addon/postgresql/pgpool">See the Clever Cloud documentation on Pgpool-II</a>.
<h2 id="what-is-pgpool-ii">What is Pgpool-II?</h2>
It is a middleware that comes in between your application and your PostgreSQL database (<a href="https://www.pgpool.net/mediawiki/index.php/Main_Page">official website</a>). As its name suggests, it <em>pools</em> your app's connections to PostgreSQL, by saving and reusing them, and letting them wait when they are too many.

Pgpool-II also serves as a load balancer for PostgreSQL replicas for superior scaling. More on this below.

Pgpool-II now works out of the box on all Clever Cloud machines. Only exception: if you use docker, you'll have to configure the Dockerfile yourself.
<h2 id="no-more-connection-refused">No more <code>connection refused</code></h2>
Pgpool-II overall smoothens the use of PostgreSQL.
<ul>
 	<li><strong>Accessed on a Unix socket</strong>: faster than a TCP socket. Gotta chase those nanoseconds.</li>
 	<li><strong>Connection reuse</strong>: Pgpool saves connections and reuses them when similar ones come in (same user, same database…).</li>
 	<li><strong>Managing exceeding connections</strong>: Normally, PostgreSQL takes only so many concurrent connections, and discards any additional ones, which compromises the app. Pgpool-II, instead, queues the excess connections for later. No more <code>connection refused</code>.</li>
</ul>
<h2 id="what-do-i-have-to-do">What do I have to do?</h2>
Barely anything. By changing only one environment variable in your code, your app will send its requests to Pgpool-II directly.

In a typical PHP app, you would connect to a PostgreSQL add-on by doing:
<pre><code class="language-PHP">$host = getenv("POSTGRESQL_ADDON_HOST");
</code></pre>
You just need to change that into:
<pre><code class="language-PHP">$host = getenv("CC_PGPOOL_SOCKET_PATH");
</code></pre>
That's all there is to change in your code. User, password, all other calls to environment variables remain the same. See <a href="https://www.clever.cloud/developers/deploy/addon/postgresql/pgpool/#usage">the doc</a> for details.

Now in the Clever Cloud Console, go to your app's environment variables, set <code>CC_ENABLE_PGPOOL</code> to <code>true</code>, and you're good to go!
<h2 id="load-balancing-lets-go-big">Load balancing: let's go big</h2>
Suppose your web app is BIG. You've got a few <code>INSERT</code> queries to make (registering a new customer for instance), and a ton of <code>SELECT</code> queries (searches, filling pages with products, you name it). It becomes wise to create <em>replicas</em> of your database, a PostgreSQL feature. These identical instances, called <em>followers</em>, are exact copycats of your <em>leader</em> database. On the graph they are called <em>primary</em> and <em>standby</em>, respectively. There can be several <em>standby</em> nodes.

<center>
<img style="width: 600px;" src="https://cdn.clever-cloud.com/uploads/2021/08/pgpool.png" /></center>

Pgpool-II will direct the <strong>write queries</strong> to the <em>primary</em>, and dispatch the <strong>read queries</strong> to the <em>standby</em> nodes, thus balancing the load and increasing throughput.

More details <a href="https://www.clever.cloud/developers/deploy/addon/postgresql/pgpool/#how-to-configure-pgpool-ii">in the doc</a>. All you have to do is create as many PostgreSQL add-ons as you want replicas, and ask us to do the plumbing for you.]]></description>
										<content:encoded><![CDATA[<p><img width="1400" height="540" src="https://cdn.clever-cloud.com/uploads/2021/07/pg-pool2-1.jpg" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="pg pool2 1" decoding="async" loading="lazy" srcset="https://cdn.clever-cloud.com/uploads/2021/07/pg-pool2-1.jpg 1400w, https://cdn.clever-cloud.com/uploads/2021/07/pg-pool2-1-300x116.jpg 300w, https://cdn.clever-cloud.com/uploads/2021/07/pg-pool2-1-1024x395.jpg 1024w, https://cdn.clever-cloud.com/uploads/2021/07/pg-pool2-1-768x296.jpg 768w, https://cdn.clever-cloud.com/uploads/2021/07/pg-pool2-1-1368x528.jpg 1368w" sizes="auto, (max-width: 1400px) 100vw, 1400px" /></p>Are you having too many simultaneous connections on your PostgreSQL database? Do you dream of balancing the load of your requests across a PostgreSQL cluster? Either way, we've got the solution for you.

Clever Cloud is proud to introduce the native support of Pgpool-II on all application instances, for no additional fee.

<span id="more-3001"></span>

<a href="https://www.clever.cloud/developers/deploy/addon/postgresql/pgpool">See the Clever Cloud documentation on Pgpool-II</a>.
<h2 id="what-is-pgpool-ii">What is Pgpool-II?</h2>
It is a middleware that comes in between your application and your PostgreSQL database (<a href="https://www.pgpool.net/mediawiki/index.php/Main_Page">official website</a>). As its name suggests, it <em>pools</em> your app's connections to PostgreSQL, by saving and reusing them, and letting them wait when they are too many.

Pgpool-II also serves as a load balancer for PostgreSQL replicas for superior scaling. More on this below.

Pgpool-II now works out of the box on all Clever Cloud machines. Only exception: if you use docker, you'll have to configure the Dockerfile yourself.
<h2 id="no-more-connection-refused">No more <code>connection refused</code></h2>
Pgpool-II overall smoothens the use of PostgreSQL.
<ul>
 	<li><strong>Accessed on a Unix socket</strong>: faster than a TCP socket. Gotta chase those nanoseconds.</li>
 	<li><strong>Connection reuse</strong>: Pgpool saves connections and reuses them when similar ones come in (same user, same database…).</li>
 	<li><strong>Managing exceeding connections</strong>: Normally, PostgreSQL takes only so many concurrent connections, and discards any additional ones, which compromises the app. Pgpool-II, instead, queues the excess connections for later. No more <code>connection refused</code>.</li>
</ul>
<h2 id="what-do-i-have-to-do">What do I have to do?</h2>
Barely anything. By changing only one environment variable in your code, your app will send its requests to Pgpool-II directly.

In a typical PHP app, you would connect to a PostgreSQL add-on by doing:
<pre><code class="language-PHP">$host = getenv("POSTGRESQL_ADDON_HOST");
</code></pre>
You just need to change that into:
<pre><code class="language-PHP">$host = getenv("CC_PGPOOL_SOCKET_PATH");
</code></pre>
That's all there is to change in your code. User, password, all other calls to environment variables remain the same. See <a href="https://www.clever.cloud/developers/deploy/addon/postgresql/pgpool/#usage">the doc</a> for details.

Now in the Clever Cloud Console, go to your app's environment variables, set <code>CC_ENABLE_PGPOOL</code> to <code>true</code>, and you're good to go!
<h2 id="load-balancing-lets-go-big">Load balancing: let's go big</h2>
Suppose your web app is BIG. You've got a few <code>INSERT</code> queries to make (registering a new customer for instance), and a ton of <code>SELECT</code> queries (searches, filling pages with products, you name it). It becomes wise to create <em>replicas</em> of your database, a PostgreSQL feature. These identical instances, called <em>followers</em>, are exact copycats of your <em>leader</em> database. On the graph they are called <em>primary</em> and <em>standby</em>, respectively. There can be several <em>standby</em> nodes.

<center>
<img style="width: 600px;" src="https://cdn.clever-cloud.com/uploads/2021/08/pgpool.png" /></center>

Pgpool-II will direct the <strong>write queries</strong> to the <em>primary</em>, and dispatch the <strong>read queries</strong> to the <em>standby</em> nodes, thus balancing the load and increasing throughput.

More details <a href="https://www.clever.cloud/developers/deploy/addon/postgresql/pgpool/#how-to-configure-pgpool-ii">in the doc</a>. All you have to do is create as many PostgreSQL add-ons as you want replicas, and ask us to do the plumbing for you.]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>One Framework a Day keeps the Boredom Away: Ratpack</title>
		<link>https://www.clever.cloud/blog/features/2017/10/12/ratpack/</link>
		
		<dc:creator><![CDATA[Laurent Doguin]]></dc:creator>
		<pubDate>Thu, 12 Oct 2017 17:15:00 +0000</pubDate>
				<category><![CDATA[Features]]></category>
		<category><![CDATA[1fdba]]></category>
		<category><![CDATA[jvm]]></category>
		<category><![CDATA[postgresql]]></category>
		<category><![CDATA[ratpack]]></category>
		<guid isPermaLink="false">https://www2.cleverapps.io/wp/blog/technology/2017/10/12/ratpack/</guid>

					<description><![CDATA[<p><img width="1400" height="540" src="https://cdn.clever-cloud.com/uploads/2021/08/1fdba-ratpack-1.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="1fdba ratpack 1" decoding="async" loading="lazy" srcset="https://cdn.clever-cloud.com/uploads/2021/08/1fdba-ratpack-1.png 1400w, https://cdn.clever-cloud.com/uploads/2021/08/1fdba-ratpack-1-300x116.png 300w, https://cdn.clever-cloud.com/uploads/2021/08/1fdba-ratpack-1-1024x395.png 1024w, https://cdn.clever-cloud.com/uploads/2021/08/1fdba-ratpack-1-768x296.png 768w, https://cdn.clever-cloud.com/uploads/2021/08/1fdba-ratpack-1-1368x528.png 1368w" sizes="auto, (max-width: 1400px) 100vw, 1400px" /></p>Welcome to this new edition of <a href="/blog/features/2017/10/09/1fdba-step0/">One Framework a Day keeps the Boredom Away</a>. In this series I will show you how to deploy a particular framework on Clever Cloud every day until I want to go back to boredom. Today it's about Ratpack.

<span id="more-2908"></span>

In each post of this series we'll see how to deploy a particular framework on Clever Cloud. Today we are taking a look at <a href="http://ratpack.io/">Ratpack</a>.

If you want to tag along, make sure you have git, a Clever Cloud account and that you have installed our CLI <a href="https://github.com/CleverCloud/clever-tools">Clever-Tools</a>.
<h2 id="what-is-ratpack">What is Ratpack?</h2>
<blockquote>
<ul>
 	<li>Ratpack is a set of Java libraries for building modern HTTP applications.</li>
 	<li>It provides just enough for writing practical, high performance, apps.</li>
 	<li>It is built on Java 8, Netty and reactive principles.</li>
</ul>
</blockquote>
I am personally a big Ratpack fan for its simplicity. If you want to try it there are many projects already on Github. I have chosen to test one from <a href="https://github.com/danveloper">Dan Woods</a>. He wrote the book <a href="https://www.oreilly.com/library/view/learning-ratpack/9781491921654/">Learning Ratpack</a>. I encourage you to read it if you like what you see here.

He started a performance test project: <a href="https://github.com/danveloper/s1p-high-perf-microservices/">s1p-high-perf-microservices</a>. It's a microservice that includes a connection to Postgres. So let's look at how to deploy it.
<h2 id="setup">Setup</h2>
Fist step is to clone the project:<code>git clone https://github.com/danveloper/s1p-high-perf-microservices/</code>

Open it with your favorite editor. You will see it's a gradle based project, which is one of the build tool supported by Clever Cloud. Open the DBConfig class. You will see it declares the configuraiton prefix 'db'. Let's assume it's to configure PostgreSQL. Now open <code>application.yml</code>. This is where the configuration is stored in this project. So this is where we configure the DB connection. Let's create our database. You can either log to the console, use the API or use the CLI like this: <code>clever addon create postgresql-addon --plan dev --region eu ratpackPG</code>

Here I have created a Postgre instance with the dev plan in the eu region called ratpackPG. If you run <code>clever addon</code> you will see it on the list. You can also see it in the console. A database is an add-on and as such can be linked to an application. Here linking <code>ratpackPG</code> means that the configuration environment variables provided by the add-on will be injected in the linked application. We have two things left to do.
<ul>
 	<li>Create the application: <code>clever create --type gradle ratpackTest --region par</code></li>
 	<li>Link the add-on: <code>clever service link-addon ratpackPG</code></li>
</ul>
If you are following closely you'll notice that region names are different for add-ons and applications. This has to do with our will to keep our Add-ons API compatible with Heroku.

Anyway now you have an application. And if you take a look at its environment variable with <code>clever env</code>, you should see relevant variables like <code>POSTGRESQL_ADDON_DB</code>, <code>POSTGRESQL_ADDON_HOST</code>, etc… There are different ways to use them in our project.

We can edit <code>application.yml</code> so it looks like this:
<pre><code class="language-yaml">db:
  username: ${POSTGRESQL_ADDON_USER}
  password: ${POSTGRESQL_ADDON_PASSWORD}
  database: ${POSTGRESQL_ADDON_DB}
  poolSize: 4
  hostname: ${POSTGRESQL_ADDON_HOST}
  port: ${POSTGRESQL_ADDON_PORT}
</code></pre>
Using the <code>${}</code> allows us to use existing environment variables and assigned them directly to our properties. That's because this Ratpack project includes Spring and uses it to manage part of its configuration. If you do this you can easily reuse that same code base for different applications for staging, preprod, etc…

We can also directly setup new environment variables that will be picked up by Ratpack. Take a look at their <a href="https://ratpack.io/manual/current/config.html#environment_variables">documentation</a> on the matter. To setup variables with the CLI it works like this:
<pre><code class="language-bash">clever env set RATPACK_PORT 8080
clever env set db_database \${POSTGRESQL_ADDON_DB}
clever env set db_hostname \${POSTGRESQL_ADDON_HOST}
clever env set db_password \${POSTGRESQL_ADDON_PASSWORD}
clever env set db_port \${POSTGRESQL_ADDON_PORT}
clever env set db_username \${POSTGRESQL_ADDON_USER}
clever env set db_poolSize 4
</code></pre>
Since the application is doing the following SQL query:
<pre><code class="language-java">public Observable&lt;Product&gt; getProducts() {
  return pool.queryRows("select * from product").map(row -&gt; {
    Long id = row.getLong("product_id");
    String name = row.getString("name");
    String description = row.getString("description");
    Boolean available = row.getBoolean("is_available");
    BigDecimal price = row.getBigDecimal("price");
    return new Product(id, name, description, available, price);
  }).doOnError(Throwable::printStackTrace);
}
</code></pre>
We need to load data in there. Let's create a <code>data.sql</code> file with this content:
<pre><code class="language-sql">CREATE TABLE public.product (
   product_id   bigint,
   name   text,
   description   text,
   is_available   boolean,
   price   double precision
);
INSERT INTO product(product_id, name, description, is_available, price)
       VALUES (1, 'product name','product description', true, 20.00);
</code></pre>
Or run:
<pre><code class="language-bash">touch data.sql
echo "CREATE TABLE public.product (product_id   bigint,   name   text,   description   text,   is_available   boolean,   price   double precision); INSERT INTO product(product_id, name, description, is_available, price) VALUES (1, 'product name','product description', true, 20.00);" &gt; data.sql
</code></pre>
To insert it in the DB, you can do something like <code>psql -h baug3gcfk7kx1ui-postgresql.services.clever-cloud.com -p 5432 -U ukh3kcp2me9oc1rqtw7i -d baug3gcfk7kx1ui &lt; data.sql</code>. You will be prompted for the password. This command is available in the 'add-on information' page of your Postgres instance in the console.

You can also retrieve all the variables from the CLI by typing <code>clever env</code>. If you are an awk fan here's a one liner: <code>psql `clever env | awk  -F = '/POSTGRESQL_ADDON_URI/ { print $2}'` &lt; data.sql</code>
<h2 id="deploy">Deploy</h2>
You have a configured application and add-on. Time to figure out how to run it. If you run <code>gradle tasks</code> you will get the list of gradle goals you can run. One of them is <code>run</code>, which is exactly what we want to do. To configure this, you need to create a <code>clevercloud</code> folder at the root of your project and inside it create a <code>gradle.json</code> file with the following content:
<pre><code class="language-json">{
  "deploy": {
    "goal": "run"
  }
}
</code></pre>
What is left to do is to commit your pending change:
<pre><code class="language-bash">git add clevercloud/gradle.json src/main/resources/application.yml
git commit -m"add clever cloud specifics"
</code></pre>
And then deploy your project: <code>clever deploy</code>

Once the deployment is done type <code>clever open</code> to open the application in your default browser.

If you are satisfied there's a couple of other things you can do like adding a custom domain name with <code>clever domain yourcustomdomain.com</code>. scale up <code>clever scale --flavor &lt;flavor&gt;</code> or out <code>clever scale --min-instances &lt;min-instances&gt; --max-instances &lt;max-instances&gt;</code>, even setup automatic scale out <code>clever scale --min-instances &lt;min-instances&gt; --max-instances &lt;max-instances&gt;</code>. How cool is that?]]></description>
										<content:encoded><![CDATA[<p><img width="1400" height="540" src="https://cdn.clever-cloud.com/uploads/2021/08/1fdba-ratpack-1.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="1fdba ratpack 1" decoding="async" loading="lazy" srcset="https://cdn.clever-cloud.com/uploads/2021/08/1fdba-ratpack-1.png 1400w, https://cdn.clever-cloud.com/uploads/2021/08/1fdba-ratpack-1-300x116.png 300w, https://cdn.clever-cloud.com/uploads/2021/08/1fdba-ratpack-1-1024x395.png 1024w, https://cdn.clever-cloud.com/uploads/2021/08/1fdba-ratpack-1-768x296.png 768w, https://cdn.clever-cloud.com/uploads/2021/08/1fdba-ratpack-1-1368x528.png 1368w" sizes="auto, (max-width: 1400px) 100vw, 1400px" /></p>Welcome to this new edition of <a href="/blog/features/2017/10/09/1fdba-step0/">One Framework a Day keeps the Boredom Away</a>. In this series I will show you how to deploy a particular framework on Clever Cloud every day until I want to go back to boredom. Today it's about Ratpack.

<span id="more-2908"></span>

In each post of this series we'll see how to deploy a particular framework on Clever Cloud. Today we are taking a look at <a href="http://ratpack.io/">Ratpack</a>.

If you want to tag along, make sure you have git, a Clever Cloud account and that you have installed our CLI <a href="https://github.com/CleverCloud/clever-tools">Clever-Tools</a>.
<h2 id="what-is-ratpack">What is Ratpack?</h2>
<blockquote>
<ul>
 	<li>Ratpack is a set of Java libraries for building modern HTTP applications.</li>
 	<li>It provides just enough for writing practical, high performance, apps.</li>
 	<li>It is built on Java 8, Netty and reactive principles.</li>
</ul>
</blockquote>
I am personally a big Ratpack fan for its simplicity. If you want to try it there are many projects already on Github. I have chosen to test one from <a href="https://github.com/danveloper">Dan Woods</a>. He wrote the book <a href="https://www.oreilly.com/library/view/learning-ratpack/9781491921654/">Learning Ratpack</a>. I encourage you to read it if you like what you see here.

He started a performance test project: <a href="https://github.com/danveloper/s1p-high-perf-microservices/">s1p-high-perf-microservices</a>. It's a microservice that includes a connection to Postgres. So let's look at how to deploy it.
<h2 id="setup">Setup</h2>
Fist step is to clone the project:<code>git clone https://github.com/danveloper/s1p-high-perf-microservices/</code>

Open it with your favorite editor. You will see it's a gradle based project, which is one of the build tool supported by Clever Cloud. Open the DBConfig class. You will see it declares the configuraiton prefix 'db'. Let's assume it's to configure PostgreSQL. Now open <code>application.yml</code>. This is where the configuration is stored in this project. So this is where we configure the DB connection. Let's create our database. You can either log to the console, use the API or use the CLI like this: <code>clever addon create postgresql-addon --plan dev --region eu ratpackPG</code>

Here I have created a Postgre instance with the dev plan in the eu region called ratpackPG. If you run <code>clever addon</code> you will see it on the list. You can also see it in the console. A database is an add-on and as such can be linked to an application. Here linking <code>ratpackPG</code> means that the configuration environment variables provided by the add-on will be injected in the linked application. We have two things left to do.
<ul>
 	<li>Create the application: <code>clever create --type gradle ratpackTest --region par</code></li>
 	<li>Link the add-on: <code>clever service link-addon ratpackPG</code></li>
</ul>
If you are following closely you'll notice that region names are different for add-ons and applications. This has to do with our will to keep our Add-ons API compatible with Heroku.

Anyway now you have an application. And if you take a look at its environment variable with <code>clever env</code>, you should see relevant variables like <code>POSTGRESQL_ADDON_DB</code>, <code>POSTGRESQL_ADDON_HOST</code>, etc… There are different ways to use them in our project.

We can edit <code>application.yml</code> so it looks like this:
<pre><code class="language-yaml">db:
  username: ${POSTGRESQL_ADDON_USER}
  password: ${POSTGRESQL_ADDON_PASSWORD}
  database: ${POSTGRESQL_ADDON_DB}
  poolSize: 4
  hostname: ${POSTGRESQL_ADDON_HOST}
  port: ${POSTGRESQL_ADDON_PORT}
</code></pre>
Using the <code>${}</code> allows us to use existing environment variables and assigned them directly to our properties. That's because this Ratpack project includes Spring and uses it to manage part of its configuration. If you do this you can easily reuse that same code base for different applications for staging, preprod, etc…

We can also directly setup new environment variables that will be picked up by Ratpack. Take a look at their <a href="https://ratpack.io/manual/current/config.html#environment_variables">documentation</a> on the matter. To setup variables with the CLI it works like this:
<pre><code class="language-bash">clever env set RATPACK_PORT 8080
clever env set db_database \${POSTGRESQL_ADDON_DB}
clever env set db_hostname \${POSTGRESQL_ADDON_HOST}
clever env set db_password \${POSTGRESQL_ADDON_PASSWORD}
clever env set db_port \${POSTGRESQL_ADDON_PORT}
clever env set db_username \${POSTGRESQL_ADDON_USER}
clever env set db_poolSize 4
</code></pre>
Since the application is doing the following SQL query:
<pre><code class="language-java">public Observable&lt;Product&gt; getProducts() {
  return pool.queryRows("select * from product").map(row -&gt; {
    Long id = row.getLong("product_id");
    String name = row.getString("name");
    String description = row.getString("description");
    Boolean available = row.getBoolean("is_available");
    BigDecimal price = row.getBigDecimal("price");
    return new Product(id, name, description, available, price);
  }).doOnError(Throwable::printStackTrace);
}
</code></pre>
We need to load data in there. Let's create a <code>data.sql</code> file with this content:
<pre><code class="language-sql">CREATE TABLE public.product (
   product_id   bigint,
   name   text,
   description   text,
   is_available   boolean,
   price   double precision
);
INSERT INTO product(product_id, name, description, is_available, price)
       VALUES (1, 'product name','product description', true, 20.00);
</code></pre>
Or run:
<pre><code class="language-bash">touch data.sql
echo "CREATE TABLE public.product (product_id   bigint,   name   text,   description   text,   is_available   boolean,   price   double precision); INSERT INTO product(product_id, name, description, is_available, price) VALUES (1, 'product name','product description', true, 20.00);" &gt; data.sql
</code></pre>
To insert it in the DB, you can do something like <code>psql -h baug3gcfk7kx1ui-postgresql.services.clever-cloud.com -p 5432 -U ukh3kcp2me9oc1rqtw7i -d baug3gcfk7kx1ui &lt; data.sql</code>. You will be prompted for the password. This command is available in the 'add-on information' page of your Postgres instance in the console.

You can also retrieve all the variables from the CLI by typing <code>clever env</code>. If you are an awk fan here's a one liner: <code>psql `clever env | awk  -F = '/POSTGRESQL_ADDON_URI/ { print $2}'` &lt; data.sql</code>
<h2 id="deploy">Deploy</h2>
You have a configured application and add-on. Time to figure out how to run it. If you run <code>gradle tasks</code> you will get the list of gradle goals you can run. One of them is <code>run</code>, which is exactly what we want to do. To configure this, you need to create a <code>clevercloud</code> folder at the root of your project and inside it create a <code>gradle.json</code> file with the following content:
<pre><code class="language-json">{
  "deploy": {
    "goal": "run"
  }
}
</code></pre>
What is left to do is to commit your pending change:
<pre><code class="language-bash">git add clevercloud/gradle.json src/main/resources/application.yml
git commit -m"add clever cloud specifics"
</code></pre>
And then deploy your project: <code>clever deploy</code>

Once the deployment is done type <code>clever open</code> to open the application in your default browser.

If you are satisfied there's a couple of other things you can do like adding a custom domain name with <code>clever domain yourcustomdomain.com</code>. scale up <code>clever scale --flavor &lt;flavor&gt;</code> or out <code>clever scale --min-instances &lt;min-instances&gt; --max-instances &lt;max-instances&gt;</code>, even setup automatic scale out <code>clever scale --min-instances &lt;min-instances&gt; --max-instances &lt;max-instances&gt;</code>. How cool is that?]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>One Framework a Day keeps the Boredom Away: Ruby on Rails with Redmine</title>
		<link>https://www.clever.cloud/blog/features/2017/10/11/1fdba-rails-redmine/</link>
		
		<dc:creator><![CDATA[Laurent Doguin]]></dc:creator>
		<pubDate>Wed, 11 Oct 2017 19:15:00 +0000</pubDate>
				<category><![CDATA[Features]]></category>
		<category><![CDATA[1fdba]]></category>
		<category><![CDATA[fsbucket]]></category>
		<category><![CDATA[postgresql]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[Ruby]]></category>
		<guid isPermaLink="false">https://www2.cleverapps.io/wp/blog/technology/2017/10/11/1fdba-rails-redmine/</guid>

					<description><![CDATA[<p><img width="1400" height="540" src="https://cdn.clever-cloud.com/uploads/2021/08/1fdba-ror-1.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="1fdba ror 1" decoding="async" loading="lazy" srcset="https://cdn.clever-cloud.com/uploads/2021/08/1fdba-ror-1.png 1400w, https://cdn.clever-cloud.com/uploads/2021/08/1fdba-ror-1-300x116.png 300w, https://cdn.clever-cloud.com/uploads/2021/08/1fdba-ror-1-1024x395.png 1024w, https://cdn.clever-cloud.com/uploads/2021/08/1fdba-ror-1-768x296.png 768w, https://cdn.clever-cloud.com/uploads/2021/08/1fdba-ror-1-1368x528.png 1368w" sizes="auto, (max-width: 1400px) 100vw, 1400px" /></p>Welcome to this new edition of <a href="/blog/features/2017/10/09/1fdba-step0/">One Framework a Day keeps the Boredom Away</a>. In this series I will show you how to deploy a particular framework on Clever Cloud every day until I want to go back to boredom. Today it's about Ruby on Rails.

<span id="more-2907"></span>

In each post of this series we'll see how to deploy a particular framework on Clever Cloud. Today we are taking a look at <a href="https://rubyonrails.org/">Ruby on Rails</a>.

If you want to tag along, make sure you have git, a Clever Cloud account and that you have installed our CLI <a href="https://github.com/CleverCloud/clever-tools">Clever-Tools</a>.
<h2 id="what-is-ruby-on-rails">What is Ruby on Rails?</h2>
<blockquote>Ruby on Rails, or simply Rails, is a server-side web application framework written in Ruby under the MIT License. Rails is a model–view–controller framework, providing default structures for a database, a web service, and web pages.</blockquote>
There are lots of applications built on top of Ruby on Rails. Today I decided to look at <a href="https://github.com/edavis10/redmine">Redmine</a>. It's a project management web application. You can read our documentation on <a href="https://www.clever.cloud/developers/doc/applications/ruby/">Rails</a> first and then folow this tutorial.
<h2 id="setup">Setup</h2>
<ul>
 	<li>Start by cloning the sources, here I am checking out the latest stable branch: <code>git clone https://github.com/edavis10/redmine/ --branch 3.4-stable</code></li>
 	<li>Create the database you want to use, in my case Postgres: <code>clever addon create postgresql-addon --plan dev --region eu redminePG</code></li>
 	<li>Create a <a href="https://www.clever.cloud/developers/addons/fs_buckets/">FS Bucket</a>: <code>clever addon create fs-bucket --plan s --region eu redmineFS</code></li>
 	<li>Create the Ruby application on Clever Cloud: <code>clever create --type ruby redmine --region par</code></li>
 	<li>Link the Postgres add-on to the application: <code>clever service link-addon redminePG</code></li>
 	<li>Link the FS Bucket add-on to the application: <code>clever service link-addon redmineFS</code></li>
</ul>
It's time to configure the application with environment variables. To get a list of the already available variables simply run <code>clever env</code>. You will notice all the variables related to PostgreSQL. To use them create a new <code>database.yml</code> file under <code>config</code>: <code>touch config/database.yml</code>
<pre><code class="language-yaml">production:
  adapter: postgresql
  database: &lt;%= ENV["POSTGRESQL_ADDON_DB"] %&gt;
  host: &lt;%= ENV["POSTGRESQL_ADDON_HOST"] %&gt;
  username: &lt;%= ENV["POSTGRESQL_ADDON_USER"] %&gt;
  port: &lt;%= ENV["POSTGRESQL_ADDON_PORT"] %&gt;
  password: &lt;%= ENV["POSTGRESQL_ADDON_PASSWORD"] %&gt;
  encoding: utf8
</code></pre>
<ul>
 	<li>Define a new global secret in <code>config/secrets.yml</code>: <code>touch config/secrets.yml</code>
<pre><code class="language-yaml">production:
  secret_key_base: &lt;%= ENV["SECRET_KEY_BASE"] %&gt;
</code></pre>
</li>
 	<li>Define all the other configuration variables under <code>config/configuration.yml</code>: <code>touch config/configuration.yml</code>
<pre><code class="language-yaml">production:
  attachments_storage_path: &lt;%= ENV["APP_HOME"] %&gt;&lt;%= ENV["ATTACHMENTS_STORAGE_PATH"] %&gt;
</code></pre>
</li>
</ul>
The following property uses two different variables. <em>APP_HOME</em> is already available and injected when the VM starts. It's the absolute path to the application repository. The second one is to tell Redmine where to write files.

Time to install the dependencies with <code>./bin/bundle install --without development test</code>. And now setup the various environment variables you will need:
<ul>
 	<li>Set the Ruby version: <code>clever env set RUBY_VERSION 2.3.1</code></li>
 	<li>Setup the Rails environment to use the production configuration: <code>clever env set RAILS_ENV production</code></li>
 	<li>Use <code>en</code> as language: <code>clever env set REDMINE_LANG en</code></li>
 	<li>Use a newly generated secret: <code>clever env set SECRET_KEY_BASE `./bin/rake secret` </code></li>
 	<li>Setup where to write files: <code>clever env set ATTACHMENTS_STORAGE_PATH /data/attachments</code></li>
 	<li>Define where to mount our FS Bucket:<code>clever env set CC_FS_BUCKET /data:`clever env | awk  -F = '/BUCKET_HOST/ { print $2}'` </code></li>
</ul>
The FS bucket is one of the add-ons we setup earlier. It's a FileSystem mounted when the VM starts. Here it's mounted under <code>/public</code>. This path being relative to the home of the application, which is what we had under <em>APP_HOME</em> earlier. The second part of the <em>CC_FS_BUCKET</em> variable separated by a semi-colon is the host for your FS Bucket. It's already available under the <em>BUCKET_HOST</em> variable.

Now Redmine requires to write in some folder, and those folder to be pre-created. To make sure this executed each time the app is ran, we can use a pre-run hook. It will run something each time prior to starting the app. Let's start with the script:

<code>mkdir clevercloud; touch clevercloud/initDirectories.sh &amp;&amp; chmod +x clevercloud/initDirectories.sh</code>
<pre><code class="language-bash">[ -d tmp ] || mkdir tmp
[ -d tmp/pdf ] || mkdir tmp/pdf
[ -d data/plugin_assets ] || mkdir data/plugin_assets
[ -d tmp/pdf ] || mkdir tmp/pdf
[ -d data/attachments ] || mkdir data/attachments
</code></pre>
It first tests the existence of the folder and if it does not exist, creates it. To make sure it's run add the hook like this: <code>clever env set CC_PRE_RUN_HOOK ./clevercloud/initDirectories.sh</code>

The minimum configuration is ready, we can move on to the deployment phase.
<h2 id="deploy">Deploy</h2>
As usual with Clever Cloud the deployment phase is tied to the runtime and build tool used by the application. Here it's a Ruby app so we are going to create a ruby.json file: <code>touch clevercloud/ruby.json</code>
<pre><code class="language-json">{
  "deploy" : {
    "rakegoals": ["db:migrate"],
    "sidekiq": true
  }
}
</code></pre>
Now we need to commit our changes. Create a new deployment branch, commit your stuff and deploy!
<pre><code class="language-bash">git checkout -b clever/deploy
git add Gemfile.lock clevercloud/initDirectories.sh clevercloud/ruby.json config/configuration.yml config/database.yml config/secrets.yml
git commit -m"add clever specifics"
clever deploy
</code></pre>
Last command is the equivalent of <code>git push clever yourBranch</code> where clever is a remote branch that was added when you created the application with the CLI at the very begining.

There is one last thing we can do. In Redmine's documentation they mention some default data you can import by running a rake task. Since we don't want to run these tasks each time we restart the application, we can SSH on the VM and execute them here. Run <code>clever ssh</code>. This will open a connection to the VM. From here you can execute that task:
<pre><code class="language-bash">[ldoguin@caolila redmine]$ clever ssh
Opening an ssh shell.
Warning: Permanently added '[195.154.154.198]:40707' (ED25519) to the list of known hosts.
bas@76afae97-762c-43ee-b861-d5db873b553d ~ $ cd app_58f97386-2ec5-48b6-a774-31d64241f692/
bas@76afae97-762c-43ee-b861-d5db873b553d ~/app_58f97386-2ec5-48b6-a774-31d64241f692 $ RAILS_ENV=production bundle exec rake redmine:load_default_data
Select language: ar, az, bg, bs, ca, cs, da, de, el, en, en-GB, es, es-PA, et, eu, fa, fi, fr, gl, he, hr, hu, id, it, ja, ko, lt, lv, mk, mn, nl, no, pl, pt, pt-BR, ro, ru, sk, sl, sq, sr, sr-YU, sv, th, tr, uk, vi, zh, zh-TW [en] 
====================================
Default configuration data loaded.
bas@76afae97-762c-43ee-b861-d5db873b553d ~/app_58f97386-2ec5-48b6-a774-31d64241f692 $ 
</code></pre>
If you have tasks to run regularly you can also configure a cron by adding a json fle as explained in <a href="https://www.clever.cloud/developers/doc/administrate/cron/">our documentation</a>.

To test this, I invite you to run <code>clever open</code>. This should open the running application in your default browser. By default you can login with admin/admin. I invite you to create a project, an issue and add an attachment to that issue. If everything works correctly you can go in our web console, click on redmineFS and then on File Explorer. You should be able to explore your FS bucket and see the file you attached to the issue :)

<img src="https://www2.cleverapps.io/app/uploads/2021/08/redmineFsBucket.png" alt="Application environment variables" />

What's also interesting here is that everything is configured with env variable so you can use the same code for prod and preprod or staging if you want to.
<h2 id="setup-and-deploy-a-preproduction-redmine">Setup and Deploy a Preproduction Redmine</h2>
You did most of the work already :) Just don't forget to use the <code>--alias</code> option to specify which application you are working with.
<pre><code class="language-bash">clever addon create postgresql-addon --plan s --region eu redminePG
clever addon create fs-bucket --plan s --region eu staging-redmineFS
clever create --type ruby staging-redmine --region par
clever service --alias staging-redmine link-addon staging-redminePG
clever service --alias staging-redmine link-addon staging-redmineFS
clever env --alias staging-redmine set RUBY_VERSION 2.3.1
clever env --alias staging-redmine set RAILS_ENV production
clever env --alias staging-redmine set REDMINE_LANG en
clever env --alias staging-redmine set SECRET_KEY_BASE `./bin/rake secret`
clever env --alias staging-redmine set ATTACHMENTS_STORAGE_PATH /data/attachments
clever env --alias staging-redmine set CC_FS_BUCKET /data:`clever env --alias staging-redmine  | awk  -F = '/BUCKET_HOST/ { print $2}'`
clever env --alias staging-redmine set CC_PRE_RUN_HOOK ./clevercloud/initDirectories.sh
clever deploy --alias staging-redmine
</code></pre>
Then you can inject the default data just like before. As you can see most of the work here was to make sure Redmine could be configured with environment variables. Some Rails projects, or other projects in general, are more or less compliant with <a href="https://12factor.net/">12 factors</a> and as such require some work.

Hopefuly you liked what you read. This is a very minimal setup to enjoy Redmine, there are other things to configure like the SMTP server or some plugins to be added. That's up to you :)]]></description>
										<content:encoded><![CDATA[<p><img width="1400" height="540" src="https://cdn.clever-cloud.com/uploads/2021/08/1fdba-ror-1.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="1fdba ror 1" decoding="async" loading="lazy" srcset="https://cdn.clever-cloud.com/uploads/2021/08/1fdba-ror-1.png 1400w, https://cdn.clever-cloud.com/uploads/2021/08/1fdba-ror-1-300x116.png 300w, https://cdn.clever-cloud.com/uploads/2021/08/1fdba-ror-1-1024x395.png 1024w, https://cdn.clever-cloud.com/uploads/2021/08/1fdba-ror-1-768x296.png 768w, https://cdn.clever-cloud.com/uploads/2021/08/1fdba-ror-1-1368x528.png 1368w" sizes="auto, (max-width: 1400px) 100vw, 1400px" /></p>Welcome to this new edition of <a href="/blog/features/2017/10/09/1fdba-step0/">One Framework a Day keeps the Boredom Away</a>. In this series I will show you how to deploy a particular framework on Clever Cloud every day until I want to go back to boredom. Today it's about Ruby on Rails.

<span id="more-2907"></span>

In each post of this series we'll see how to deploy a particular framework on Clever Cloud. Today we are taking a look at <a href="https://rubyonrails.org/">Ruby on Rails</a>.

If you want to tag along, make sure you have git, a Clever Cloud account and that you have installed our CLI <a href="https://github.com/CleverCloud/clever-tools">Clever-Tools</a>.
<h2 id="what-is-ruby-on-rails">What is Ruby on Rails?</h2>
<blockquote>Ruby on Rails, or simply Rails, is a server-side web application framework written in Ruby under the MIT License. Rails is a model–view–controller framework, providing default structures for a database, a web service, and web pages.</blockquote>
There are lots of applications built on top of Ruby on Rails. Today I decided to look at <a href="https://github.com/edavis10/redmine">Redmine</a>. It's a project management web application. You can read our documentation on <a href="https://www.clever.cloud/developers/doc/applications/ruby/">Rails</a> first and then folow this tutorial.
<h2 id="setup">Setup</h2>
<ul>
 	<li>Start by cloning the sources, here I am checking out the latest stable branch: <code>git clone https://github.com/edavis10/redmine/ --branch 3.4-stable</code></li>
 	<li>Create the database you want to use, in my case Postgres: <code>clever addon create postgresql-addon --plan dev --region eu redminePG</code></li>
 	<li>Create a <a href="https://www.clever.cloud/developers/addons/fs_buckets/">FS Bucket</a>: <code>clever addon create fs-bucket --plan s --region eu redmineFS</code></li>
 	<li>Create the Ruby application on Clever Cloud: <code>clever create --type ruby redmine --region par</code></li>
 	<li>Link the Postgres add-on to the application: <code>clever service link-addon redminePG</code></li>
 	<li>Link the FS Bucket add-on to the application: <code>clever service link-addon redmineFS</code></li>
</ul>
It's time to configure the application with environment variables. To get a list of the already available variables simply run <code>clever env</code>. You will notice all the variables related to PostgreSQL. To use them create a new <code>database.yml</code> file under <code>config</code>: <code>touch config/database.yml</code>
<pre><code class="language-yaml">production:
  adapter: postgresql
  database: &lt;%= ENV["POSTGRESQL_ADDON_DB"] %&gt;
  host: &lt;%= ENV["POSTGRESQL_ADDON_HOST"] %&gt;
  username: &lt;%= ENV["POSTGRESQL_ADDON_USER"] %&gt;
  port: &lt;%= ENV["POSTGRESQL_ADDON_PORT"] %&gt;
  password: &lt;%= ENV["POSTGRESQL_ADDON_PASSWORD"] %&gt;
  encoding: utf8
</code></pre>
<ul>
 	<li>Define a new global secret in <code>config/secrets.yml</code>: <code>touch config/secrets.yml</code>
<pre><code class="language-yaml">production:
  secret_key_base: &lt;%= ENV["SECRET_KEY_BASE"] %&gt;
</code></pre>
</li>
 	<li>Define all the other configuration variables under <code>config/configuration.yml</code>: <code>touch config/configuration.yml</code>
<pre><code class="language-yaml">production:
  attachments_storage_path: &lt;%= ENV["APP_HOME"] %&gt;&lt;%= ENV["ATTACHMENTS_STORAGE_PATH"] %&gt;
</code></pre>
</li>
</ul>
The following property uses two different variables. <em>APP_HOME</em> is already available and injected when the VM starts. It's the absolute path to the application repository. The second one is to tell Redmine where to write files.

Time to install the dependencies with <code>./bin/bundle install --without development test</code>. And now setup the various environment variables you will need:
<ul>
 	<li>Set the Ruby version: <code>clever env set RUBY_VERSION 2.3.1</code></li>
 	<li>Setup the Rails environment to use the production configuration: <code>clever env set RAILS_ENV production</code></li>
 	<li>Use <code>en</code> as language: <code>clever env set REDMINE_LANG en</code></li>
 	<li>Use a newly generated secret: <code>clever env set SECRET_KEY_BASE `./bin/rake secret` </code></li>
 	<li>Setup where to write files: <code>clever env set ATTACHMENTS_STORAGE_PATH /data/attachments</code></li>
 	<li>Define where to mount our FS Bucket:<code>clever env set CC_FS_BUCKET /data:`clever env | awk  -F = '/BUCKET_HOST/ { print $2}'` </code></li>
</ul>
The FS bucket is one of the add-ons we setup earlier. It's a FileSystem mounted when the VM starts. Here it's mounted under <code>/public</code>. This path being relative to the home of the application, which is what we had under <em>APP_HOME</em> earlier. The second part of the <em>CC_FS_BUCKET</em> variable separated by a semi-colon is the host for your FS Bucket. It's already available under the <em>BUCKET_HOST</em> variable.

Now Redmine requires to write in some folder, and those folder to be pre-created. To make sure this executed each time the app is ran, we can use a pre-run hook. It will run something each time prior to starting the app. Let's start with the script:

<code>mkdir clevercloud; touch clevercloud/initDirectories.sh &amp;&amp; chmod +x clevercloud/initDirectories.sh</code>
<pre><code class="language-bash">[ -d tmp ] || mkdir tmp
[ -d tmp/pdf ] || mkdir tmp/pdf
[ -d data/plugin_assets ] || mkdir data/plugin_assets
[ -d tmp/pdf ] || mkdir tmp/pdf
[ -d data/attachments ] || mkdir data/attachments
</code></pre>
It first tests the existence of the folder and if it does not exist, creates it. To make sure it's run add the hook like this: <code>clever env set CC_PRE_RUN_HOOK ./clevercloud/initDirectories.sh</code>

The minimum configuration is ready, we can move on to the deployment phase.
<h2 id="deploy">Deploy</h2>
As usual with Clever Cloud the deployment phase is tied to the runtime and build tool used by the application. Here it's a Ruby app so we are going to create a ruby.json file: <code>touch clevercloud/ruby.json</code>
<pre><code class="language-json">{
  "deploy" : {
    "rakegoals": ["db:migrate"],
    "sidekiq": true
  }
}
</code></pre>
Now we need to commit our changes. Create a new deployment branch, commit your stuff and deploy!
<pre><code class="language-bash">git checkout -b clever/deploy
git add Gemfile.lock clevercloud/initDirectories.sh clevercloud/ruby.json config/configuration.yml config/database.yml config/secrets.yml
git commit -m"add clever specifics"
clever deploy
</code></pre>
Last command is the equivalent of <code>git push clever yourBranch</code> where clever is a remote branch that was added when you created the application with the CLI at the very begining.

There is one last thing we can do. In Redmine's documentation they mention some default data you can import by running a rake task. Since we don't want to run these tasks each time we restart the application, we can SSH on the VM and execute them here. Run <code>clever ssh</code>. This will open a connection to the VM. From here you can execute that task:
<pre><code class="language-bash">[ldoguin@caolila redmine]$ clever ssh
Opening an ssh shell.
Warning: Permanently added '[195.154.154.198]:40707' (ED25519) to the list of known hosts.
bas@76afae97-762c-43ee-b861-d5db873b553d ~ $ cd app_58f97386-2ec5-48b6-a774-31d64241f692/
bas@76afae97-762c-43ee-b861-d5db873b553d ~/app_58f97386-2ec5-48b6-a774-31d64241f692 $ RAILS_ENV=production bundle exec rake redmine:load_default_data
Select language: ar, az, bg, bs, ca, cs, da, de, el, en, en-GB, es, es-PA, et, eu, fa, fi, fr, gl, he, hr, hu, id, it, ja, ko, lt, lv, mk, mn, nl, no, pl, pt, pt-BR, ro, ru, sk, sl, sq, sr, sr-YU, sv, th, tr, uk, vi, zh, zh-TW [en] 
====================================
Default configuration data loaded.
bas@76afae97-762c-43ee-b861-d5db873b553d ~/app_58f97386-2ec5-48b6-a774-31d64241f692 $ 
</code></pre>
If you have tasks to run regularly you can also configure a cron by adding a json fle as explained in <a href="https://www.clever.cloud/developers/doc/administrate/cron/">our documentation</a>.

To test this, I invite you to run <code>clever open</code>. This should open the running application in your default browser. By default you can login with admin/admin. I invite you to create a project, an issue and add an attachment to that issue. If everything works correctly you can go in our web console, click on redmineFS and then on File Explorer. You should be able to explore your FS bucket and see the file you attached to the issue :)

<img src="https://www2.cleverapps.io/app/uploads/2021/08/redmineFsBucket.png" alt="Application environment variables" />

What's also interesting here is that everything is configured with env variable so you can use the same code for prod and preprod or staging if you want to.
<h2 id="setup-and-deploy-a-preproduction-redmine">Setup and Deploy a Preproduction Redmine</h2>
You did most of the work already :) Just don't forget to use the <code>--alias</code> option to specify which application you are working with.
<pre><code class="language-bash">clever addon create postgresql-addon --plan s --region eu redminePG
clever addon create fs-bucket --plan s --region eu staging-redmineFS
clever create --type ruby staging-redmine --region par
clever service --alias staging-redmine link-addon staging-redminePG
clever service --alias staging-redmine link-addon staging-redmineFS
clever env --alias staging-redmine set RUBY_VERSION 2.3.1
clever env --alias staging-redmine set RAILS_ENV production
clever env --alias staging-redmine set REDMINE_LANG en
clever env --alias staging-redmine set SECRET_KEY_BASE `./bin/rake secret`
clever env --alias staging-redmine set ATTACHMENTS_STORAGE_PATH /data/attachments
clever env --alias staging-redmine set CC_FS_BUCKET /data:`clever env --alias staging-redmine  | awk  -F = '/BUCKET_HOST/ { print $2}'`
clever env --alias staging-redmine set CC_PRE_RUN_HOOK ./clevercloud/initDirectories.sh
clever deploy --alias staging-redmine
</code></pre>
Then you can inject the default data just like before. As you can see most of the work here was to make sure Redmine could be configured with environment variables. Some Rails projects, or other projects in general, are more or less compliant with <a href="https://12factor.net/">12 factors</a> and as such require some work.

Hopefuly you liked what you read. This is a very minimal setup to enjoy Redmine, there are other things to configure like the SMTP server or some plugins to be added. That's up to you :)]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>One Framework a Day keeps the Boredom Away: Django</title>
		<link>https://www.clever.cloud/blog/features/2017/10/10/1fdba-django-taiga/</link>
		
		<dc:creator><![CDATA[Laurent Doguin]]></dc:creator>
		<pubDate>Tue, 10 Oct 2017 17:15:00 +0000</pubDate>
				<category><![CDATA[Features]]></category>
		<category><![CDATA[1fdba]]></category>
		<category><![CDATA[Django]]></category>
		<category><![CDATA[postgresql]]></category>
		<category><![CDATA[Python]]></category>
		<guid isPermaLink="false">https://www2.cleverapps.io/wp/blog/technology/2017/10/10/1fdba-django-taiga/</guid>

					<description><![CDATA[<p><img width="1400" height="540" src="https://cdn.clever-cloud.com/uploads/2021/08/1fdba-django-1.jpg" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="1fdba django 1" decoding="async" loading="lazy" srcset="https://cdn.clever-cloud.com/uploads/2021/08/1fdba-django-1.jpg 1400w, https://cdn.clever-cloud.com/uploads/2021/08/1fdba-django-1-300x116.jpg 300w, https://cdn.clever-cloud.com/uploads/2021/08/1fdba-django-1-1024x395.jpg 1024w, https://cdn.clever-cloud.com/uploads/2021/08/1fdba-django-1-768x296.jpg 768w, https://cdn.clever-cloud.com/uploads/2021/08/1fdba-django-1-1368x528.jpg 1368w" sizes="auto, (max-width: 1400px) 100vw, 1400px" /></p>Welcome to this new edition of <a href="/blog/features/2017/10/09/1fdba-step0/">One Framework a Day keeps the Boredom Away</a>. In this series I will show you how to deploy a particular framework on Clever Cloud every day until I want to go back to boredom. Today it's about Django.

<span id="more-2906"></span>

In each post of this series we'll see how to deploy a particular framework on Clever Cloud. Today we are taking a look at <a href="https://www.djangoproject.com/">Django</a>.

If you want to tag along, make sure you have git, a Clever Cloud account and that you have installed our CLI <a href="https://gitHub.com/CleverCloud/clever-tools">Clever-Tools</a>.
<h2 id="what-is-django">What is Django?</h2>
<blockquote>Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design. Built by experienced developers, it takes care of much of the hassle of Web development, so you can focus on writing your app without needing to reinvent the wheel. It’s free and open source.</blockquote>
It's also one of the most popular web frameworks, especially in the Python world. We already have a <a href="https://www.clever.cloud/developers/python/python-django-sample/">simple example</a> on how to run a Django based site in our documentation. I invite you to check it out first. Since it's so simple today I am going to use another Django based website. Lurking on GitHub I came across <a href="https://taiga.io/">Taiga</a>. It's a project management platform. It looks useful and beautiful so why not try it?
<h2 id="setup">Setup</h2>
Taiga writes in a PostgreSQL database and on a filesystem. So I know I will need an FS-Bucket add-on and a PostgreSQL add-on. It's composed of two different projects. There is the backend written in Python using Django. The other is an AngularJS frontend. Most of the work will consist of making sure this can be configured with environment variables.

To start configuring the backend we need to:
<ul>
 	<li>Clone the project: <code>git clone https://gitHub.com/taigaio/taiga-back.git</code></li>
 	<li>Get in the project: <code>cd taiga-back</code></li>
 	<li>Create our Postgres add-on: <code>clever addon create postgresql-addon --plan dev --region eu taigaPG</code></li>
 	<li>Create our FS Bucket add-on: <code>clever addon create fs-bucket --plan s --region eu taigaFS</code></li>
 	<li>Create our application: <code>clever create --type python taiga --region par</code></li>
 	<li>Link our Postgres add-on: <code>clever service link-addon taigaPG</code></li>
 	<li>Link our FS Bucket add-on: <code>clever service link-addon taigaFS</code></li>
 	<li>Define the python version to use: <code>clever env set PYTHON_VERSION 3</code></li>
 	<li>Define where to mount our FS Bucket: <code>clever env set CC_FS_BUCKET /data:`clever env | awk  -F = '/BUCKET_HOST/ { print $2}'` </code></li>
 	<li>Define the secret used by the app: <code>clever env set SECRET theveryultratopsecretkey</code></li>
 	<li>Define the frontend domain name: <code>clever env set FRONT_DOMAIN taigald.cleverapps.io"</code></li>
 	<li>Define the HTTP schema: <code>clever env set HTTP_SCHEMA https"</code></li>
 	<li>Define where to store media: <code>clever env set STORAGE_MEDIA /data/media"</code></li>
 	<li>Define where to store static files: <code>clever env set STORAGE_STATIC /data/static"</code></li>
</ul>
Now it's time to tell Taiga how to retrieve and use our environment variables. To do so we need to create a new file called <code>local.py</code> under the <code>settings</code> directory: <code>touch settings/local.py</code>

In this file we can setup everything:
<pre><code class="language-python">from .common import *
import os

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql',
        'NAME': os.getenv("POSTGRESQL_ADDON_DB"),
        'USER': os.getenv("POSTGRESQL_ADDON_USER"),
        'PASSWORD': os.getenv("POSTGRESQL_ADDON_PASSWORD"),
        'HOST': os.getenv("POSTGRESQL_ADDON_HOST"),
        'PORT': os.getenv("POSTGRESQL_ADDON_PORT"),
    }
}

MEDIA_ROOT = os.path.join(BASE_DIR, os.getenv("STORAGE_MEDIA"))
STATIC_ROOT = os.path.join(BASE_DIR, os.getenv("STORAGE_STATIC"))
MEDIA_URL = ""https://" +  os.getenv("FRONT_DOMAIN") + os.getenv("STORAGE_MEDIA")
STATIC_URL = "https://" +  os.getenv("FRONT_DOMAIN") + os.getenv("STORAGE_STATIC")
SITES["front"]["scheme"] = os.getenv("HTTP_SCHEMA")
SITES["front"]["domain"] = os.getenv("FRONT_DOMAIN")

SECRET_KEY = os.getenv("SECRET")

DEBUG = False
PUBLIC_REGISTER_ENABLED = True
</code></pre>
Taiga expects all your folders to be already created. To make sure this happens we can use a <a href="https://www.clever.cloud/developers/doc/develop/build-hooks/#hooks-types">pre-build hook</a>.
<ul>
 	<li>Create the hook script: <code>mkdir clevercloud; touch clevercloud/buildDirectories.sh &amp;&amp; chmod +x ./clevercloud/buildDirectories.sh</code></li>
 	<li>Use the following code for the shell script:
<pre><code class="language-bash">[ -d $STORAGE_STATIC ] || mkdir -p $STORAGE_STATIC
[ -d $STORAGE_MEDIA ] || mkdir -p $STORAGE_MEDIA
</code></pre>
</li>
 	<li>Define the hook: <code>clever env set CC_PRE_BUILD_HOOK ./clevercloud/buildDirectories.sh</code></li>
</ul>
Something else we need to do since there are going to be two applications is to setup a proper domain name. Here I am using <code>cleverapps.io</code>, which is automatically configured for SSL support: <code>clever domain add taigabackld.cleverapps.io</code>

You can commit all the new files in a new branch. You are now done with the minimal backend configuration.

Moving on to the frontend configuration. They have a prebuilt version of the site so that is something we can use.
<ul>
 	<li>Clone the project: <code>git clone https://gitHub.com/taigaio/taiga-front-dist.git</code></li>
 	<li>Get in the project: <code>cd taiga-back</code></li>
 	<li>Get the latest stable version: <code>git checkout stable</code></li>
 	<li>Copy the default configuration file: <code>cp dist/conf.example.json dist/conf.json</code></li>
 	<li>Change the backend URL: <code>sed -i 's,http://localhost:8000/api/v1/,http://taigabackld.cleverapps.io/api/v1/,g' dist/conf.json</code></li>
 	<li>Create the static website: <code>clever create --type static-apache taiga-front</code></li>
 	<li>Link this website to our FS Bucket addon: <code>clever service link-addon taigaFS</code></li>
 	<li>Setup its mount point: <code>clever env set CC_FS_BUCKET /dist/data:`clever env | awk  -F = '/BUCKET_HOST/ { print $2}'` </code></li>
 	<li>Add a domain name: <code>clever domain add taigald.cleverapps.io</code></li>
</ul>
Since the root of the site is the <code>dist</code> folder, we need to configure it. This can be done by creating a <code>clevercloud/php.json</code> file containing:
<pre><code class="language-json">{
  "deploy": {
    "webroot": "/dist"
  }
}
</code></pre>
Now go ahead and commit this. You are done with the configuration of this project.
<h2 id="deploy">Deploy</h2>
We have two applications to deploy. First the backend. It's a Python runtime so here's what you need to do:
<ul>
 	<li>Define the Python module we want to start: <code>clever env set CC_PYTHON_MODULE taiga.wsgi</code></li>
 	<li>Define the Python backend to use: <code>clever env set PYTHON_BACKEND gunicorn</code></li>
 	<li>Deploy the app: <code>clever deploy</code></li>
</ul>
If everything goes well you should see the logs of the application being built, then logs should show your app is ready. We then need to initialize the data. Run <code>clever ssh</code> and it will connect you to the running VM. From there, get into your application folder, for me it's <code>cd app_254da6af-3642-4c98-afd3-48e46e3adb23/</code>. Now we can use python scripts to intialize all the things:
<pre><code class="language-bash">python manage.py migrate --noinput
python manage.py loaddata initial_user
python manage.py loaddata initial_project_templates
python manage.py compilemessages
python manage.py collectstatic --noinput
python manage.py sample_data
</code></pre>
Last one takes a bit of time and is not mandatory. It's some sample data if you want to try an existing install of Taiga.

Moving on to the front end part. All you need to do is run <code>clever deploy</code> and then <code>clever open</code>. You should have Taiga open in your default browser, ready for you to login with user <code>admin</code> and password <code>123123</code>.

That's it, have fun with your new project management website :)]]></description>
										<content:encoded><![CDATA[<p><img width="1400" height="540" src="https://cdn.clever-cloud.com/uploads/2021/08/1fdba-django-1.jpg" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="1fdba django 1" decoding="async" loading="lazy" srcset="https://cdn.clever-cloud.com/uploads/2021/08/1fdba-django-1.jpg 1400w, https://cdn.clever-cloud.com/uploads/2021/08/1fdba-django-1-300x116.jpg 300w, https://cdn.clever-cloud.com/uploads/2021/08/1fdba-django-1-1024x395.jpg 1024w, https://cdn.clever-cloud.com/uploads/2021/08/1fdba-django-1-768x296.jpg 768w, https://cdn.clever-cloud.com/uploads/2021/08/1fdba-django-1-1368x528.jpg 1368w" sizes="auto, (max-width: 1400px) 100vw, 1400px" /></p>Welcome to this new edition of <a href="/blog/features/2017/10/09/1fdba-step0/">One Framework a Day keeps the Boredom Away</a>. In this series I will show you how to deploy a particular framework on Clever Cloud every day until I want to go back to boredom. Today it's about Django.

<span id="more-2906"></span>

In each post of this series we'll see how to deploy a particular framework on Clever Cloud. Today we are taking a look at <a href="https://www.djangoproject.com/">Django</a>.

If you want to tag along, make sure you have git, a Clever Cloud account and that you have installed our CLI <a href="https://gitHub.com/CleverCloud/clever-tools">Clever-Tools</a>.
<h2 id="what-is-django">What is Django?</h2>
<blockquote>Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design. Built by experienced developers, it takes care of much of the hassle of Web development, so you can focus on writing your app without needing to reinvent the wheel. It’s free and open source.</blockquote>
It's also one of the most popular web frameworks, especially in the Python world. We already have a <a href="https://www.clever.cloud/developers/python/python-django-sample/">simple example</a> on how to run a Django based site in our documentation. I invite you to check it out first. Since it's so simple today I am going to use another Django based website. Lurking on GitHub I came across <a href="https://taiga.io/">Taiga</a>. It's a project management platform. It looks useful and beautiful so why not try it?
<h2 id="setup">Setup</h2>
Taiga writes in a PostgreSQL database and on a filesystem. So I know I will need an FS-Bucket add-on and a PostgreSQL add-on. It's composed of two different projects. There is the backend written in Python using Django. The other is an AngularJS frontend. Most of the work will consist of making sure this can be configured with environment variables.

To start configuring the backend we need to:
<ul>
 	<li>Clone the project: <code>git clone https://gitHub.com/taigaio/taiga-back.git</code></li>
 	<li>Get in the project: <code>cd taiga-back</code></li>
 	<li>Create our Postgres add-on: <code>clever addon create postgresql-addon --plan dev --region eu taigaPG</code></li>
 	<li>Create our FS Bucket add-on: <code>clever addon create fs-bucket --plan s --region eu taigaFS</code></li>
 	<li>Create our application: <code>clever create --type python taiga --region par</code></li>
 	<li>Link our Postgres add-on: <code>clever service link-addon taigaPG</code></li>
 	<li>Link our FS Bucket add-on: <code>clever service link-addon taigaFS</code></li>
 	<li>Define the python version to use: <code>clever env set PYTHON_VERSION 3</code></li>
 	<li>Define where to mount our FS Bucket: <code>clever env set CC_FS_BUCKET /data:`clever env | awk  -F = '/BUCKET_HOST/ { print $2}'` </code></li>
 	<li>Define the secret used by the app: <code>clever env set SECRET theveryultratopsecretkey</code></li>
 	<li>Define the frontend domain name: <code>clever env set FRONT_DOMAIN taigald.cleverapps.io"</code></li>
 	<li>Define the HTTP schema: <code>clever env set HTTP_SCHEMA https"</code></li>
 	<li>Define where to store media: <code>clever env set STORAGE_MEDIA /data/media"</code></li>
 	<li>Define where to store static files: <code>clever env set STORAGE_STATIC /data/static"</code></li>
</ul>
Now it's time to tell Taiga how to retrieve and use our environment variables. To do so we need to create a new file called <code>local.py</code> under the <code>settings</code> directory: <code>touch settings/local.py</code>

In this file we can setup everything:
<pre><code class="language-python">from .common import *
import os

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql',
        'NAME': os.getenv("POSTGRESQL_ADDON_DB"),
        'USER': os.getenv("POSTGRESQL_ADDON_USER"),
        'PASSWORD': os.getenv("POSTGRESQL_ADDON_PASSWORD"),
        'HOST': os.getenv("POSTGRESQL_ADDON_HOST"),
        'PORT': os.getenv("POSTGRESQL_ADDON_PORT"),
    }
}

MEDIA_ROOT = os.path.join(BASE_DIR, os.getenv("STORAGE_MEDIA"))
STATIC_ROOT = os.path.join(BASE_DIR, os.getenv("STORAGE_STATIC"))
MEDIA_URL = ""https://" +  os.getenv("FRONT_DOMAIN") + os.getenv("STORAGE_MEDIA")
STATIC_URL = "https://" +  os.getenv("FRONT_DOMAIN") + os.getenv("STORAGE_STATIC")
SITES["front"]["scheme"] = os.getenv("HTTP_SCHEMA")
SITES["front"]["domain"] = os.getenv("FRONT_DOMAIN")

SECRET_KEY = os.getenv("SECRET")

DEBUG = False
PUBLIC_REGISTER_ENABLED = True
</code></pre>
Taiga expects all your folders to be already created. To make sure this happens we can use a <a href="https://www.clever.cloud/developers/doc/develop/build-hooks/#hooks-types">pre-build hook</a>.
<ul>
 	<li>Create the hook script: <code>mkdir clevercloud; touch clevercloud/buildDirectories.sh &amp;&amp; chmod +x ./clevercloud/buildDirectories.sh</code></li>
 	<li>Use the following code for the shell script:
<pre><code class="language-bash">[ -d $STORAGE_STATIC ] || mkdir -p $STORAGE_STATIC
[ -d $STORAGE_MEDIA ] || mkdir -p $STORAGE_MEDIA
</code></pre>
</li>
 	<li>Define the hook: <code>clever env set CC_PRE_BUILD_HOOK ./clevercloud/buildDirectories.sh</code></li>
</ul>
Something else we need to do since there are going to be two applications is to setup a proper domain name. Here I am using <code>cleverapps.io</code>, which is automatically configured for SSL support: <code>clever domain add taigabackld.cleverapps.io</code>

You can commit all the new files in a new branch. You are now done with the minimal backend configuration.

Moving on to the frontend configuration. They have a prebuilt version of the site so that is something we can use.
<ul>
 	<li>Clone the project: <code>git clone https://gitHub.com/taigaio/taiga-front-dist.git</code></li>
 	<li>Get in the project: <code>cd taiga-back</code></li>
 	<li>Get the latest stable version: <code>git checkout stable</code></li>
 	<li>Copy the default configuration file: <code>cp dist/conf.example.json dist/conf.json</code></li>
 	<li>Change the backend URL: <code>sed -i 's,http://localhost:8000/api/v1/,http://taigabackld.cleverapps.io/api/v1/,g' dist/conf.json</code></li>
 	<li>Create the static website: <code>clever create --type static-apache taiga-front</code></li>
 	<li>Link this website to our FS Bucket addon: <code>clever service link-addon taigaFS</code></li>
 	<li>Setup its mount point: <code>clever env set CC_FS_BUCKET /dist/data:`clever env | awk  -F = '/BUCKET_HOST/ { print $2}'` </code></li>
 	<li>Add a domain name: <code>clever domain add taigald.cleverapps.io</code></li>
</ul>
Since the root of the site is the <code>dist</code> folder, we need to configure it. This can be done by creating a <code>clevercloud/php.json</code> file containing:
<pre><code class="language-json">{
  "deploy": {
    "webroot": "/dist"
  }
}
</code></pre>
Now go ahead and commit this. You are done with the configuration of this project.
<h2 id="deploy">Deploy</h2>
We have two applications to deploy. First the backend. It's a Python runtime so here's what you need to do:
<ul>
 	<li>Define the Python module we want to start: <code>clever env set CC_PYTHON_MODULE taiga.wsgi</code></li>
 	<li>Define the Python backend to use: <code>clever env set PYTHON_BACKEND gunicorn</code></li>
 	<li>Deploy the app: <code>clever deploy</code></li>
</ul>
If everything goes well you should see the logs of the application being built, then logs should show your app is ready. We then need to initialize the data. Run <code>clever ssh</code> and it will connect you to the running VM. From there, get into your application folder, for me it's <code>cd app_254da6af-3642-4c98-afd3-48e46e3adb23/</code>. Now we can use python scripts to intialize all the things:
<pre><code class="language-bash">python manage.py migrate --noinput
python manage.py loaddata initial_user
python manage.py loaddata initial_project_templates
python manage.py compilemessages
python manage.py collectstatic --noinput
python manage.py sample_data
</code></pre>
Last one takes a bit of time and is not mandatory. It's some sample data if you want to try an existing install of Taiga.

Moving on to the front end part. All you need to do is run <code>clever deploy</code> and then <code>clever open</code>. You should have Taiga open in your default browser, ready for you to login with user <code>admin</code> and password <code>123123</code>.

That's it, have fun with your new project management website :)]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Why Auto Increment Is A Terrible Idea</title>
		<link>https://www.clever.cloud/blog/engineering/2015/05/20/why-auto-increment-is-a-terrible-idea/</link>
		
		<dc:creator><![CDATA[Clement Delafargue]]></dc:creator>
		<pubDate>Wed, 20 May 2015 11:03:00 +0000</pubDate>
				<category><![CDATA[Engineering]]></category>
		<category><![CDATA[postgresql]]></category>
		<guid isPermaLink="false">https://www2.cleverapps.io/wp/blog/technology/2015/05/20/why-auto-increment-is-a-terrible-idea/</guid>

					<description><![CDATA[<p><img width="1400" height="540" src="https://cdn.clever-cloud.com/uploads/2020/12/primary-key-type-1.jpg" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="primary key type 1" decoding="async" loading="lazy" srcset="https://cdn.clever-cloud.com/uploads/2020/12/primary-key-type-1.jpg 1400w, https://cdn.clever-cloud.com/uploads/2020/12/primary-key-type-1-300x116.jpg 300w, https://cdn.clever-cloud.com/uploads/2020/12/primary-key-type-1-1024x395.jpg 1024w, https://cdn.clever-cloud.com/uploads/2020/12/primary-key-type-1-768x296.jpg 768w, https://cdn.clever-cloud.com/uploads/2020/12/primary-key-type-1-1368x528.jpg 1368w" sizes="auto, (max-width: 1400px) 100vw, 1400px" /></p><p>As big users of PostgreSQL, we had the opportunity of re-thinking the idioms common in the world of relational DBs.</p>
<p>Today, I&#39;ll talk about why we stopped using serial integers for our primary keys, and why we&#39;re now extensively using Universally Unique IDs (or UUIDs) almost everywhere.</p>
<h3 id="tldr">TL;DR</h3>
<p>Use UUIDs as primary keys. They can be freely exposed without disclosing sensitive information, they are not predictable and they are performant.</p>
<span id="more-2799"></span>

<h3 id="primary-keys-technical-keys-and-semantic-keys">Primary keys, technical keys and semantic keys</h3>
<p>A relational database is a graph where nodes are called entities and edges relations. To be able to express a relation between entities, we need to be able to uniquely refer to any entity: that&#39;s the role of a primary key.</p>
<p>The role of a primary key is to provide a stable, indexable reference to an entity. You have two ways to construct your primary key: either as a <em>semantic</em> key, or as a <em>technical</em> key.</p>
<p>A <em>semantic</em> primary key is extracted from the entities attributes (ie you use one or several fields of your entity as its primary key).</p>
<p>A <em>technical</em> primary key is completely unrelated to the fields of its entity. It&#39;s constructed when the entity is inserted in the DB.</p>
<p>Ideally, semantic keys would be better, as it allows for a very simple way to understand and compare entities. But relational DBs are built upon a fundamentally mutable model. The current state of the world is stored in the database, and entities are subject to mutation. Relational DBs are <strong>very</strong> good at storing a <em>relatively</em> small amount of data, and are not well suited for immutable databases.</p>
<p>That&#39;s why to be able to have <strong>stable</strong> primary keys, we commonly resort to <em>serial IDs</em>. Serial IDs are a technical key, as they&#39;re not related to the actual contents of its entity.</p>
<p>To be fair, you can configure your foreign key to have <code>ON UPDATE CASCADE</code> to have primary key updates automatically propagated everywhere within the database, but it doesn&#39;t solve the problem if you&#39;ve exposed primary key values outside the DB.</p>
<h4 id="whats-a-serial-id">What&#39;s a serial ID?</h4>
<p>Basically, a serial id is a number that increases everytime you insert a row. The database does the bookkeeping for you, so it&#39;s transparent for the developer.</p>
<pre><code class="language-sql">create table entity(
  entity_id serial primary key,
  attribute text not null
);
</code></pre>
<p>We can then insert values in the table; postgres will handle the <code>entity_id</code> field.</p>
<pre><code class="language-sql">&gt; insert into entity (attribute) values (&#39;ohai&#39;);
INSERT 0 1

&gt; select * from entity;
    entity_id | attribute 
-----------+-----------
            1 | ohai
(1 row)
</code></pre>
<p>The row has been inserted, and the entity has an automatically attributed id. In postgresql, <code>serial</code> is implemented through a <em>sequence</em>, which acts a bit like a counter. We can inspect its current state:</p>
<pre><code class="language-sql">&gt; select currval(&#39;entity_entity_id_seq&#39;::regclass);
currval 
---------
        1
(1 row)
</code></pre>
<p>OK, so we have a perfectly good primary key for our entities. What&#39;s the problem?</p>
<h3 id="why-serial-ids-can-be-a-problem">Why serial IDs can be a problem</h3>
<h4 id="information-disclosure">Information disclosure</h4>
<p>The current value corresponds to the last value used as a primary key. Since the sequence starts at 1 and is incremented 1 by 1, <code>currval</code> roughly corresponds in our case to the number of rows in the table (not exactly, because of deletions).</p>
<p>So, if you want to count the number of rows in a given table, all you have to do is to have the system generate a new entity and inspect its ID.</p>
<p>So, do users have access to primary keys? The answer is often yes: primary keys are very often exposed to the user, most often in URLs, as we want URLs to be stable (see <a href="http://www.w3.org/Provider/Style/URI.html">cool URIs don&#39;t change</a>).</p>
<p>Let&#39;s say you&#39;re a company operating a SaaS, <strong>all it takes to know your user count is to create an account</strong>. A number of social networks boasting impressive user bases were pwn3d this way. Just by creating an account and looking at a link.</p>
<h4 id="entity-enumerations">Entity enumerations</h4>
<p>An even bigger problem is that it&#39;s very easy to enumerate the entities in any given table. You start from 1, and you keep on incrementing the value. It becomes very easy to scrape all your entities. It leads to spamming (just don&#39;t start from 1, as you don&#39;t want to spam the admin team ;-) ), or worse. If you have light access control, only based on the knowledge of a given URL, then anybody can display private information.</p>
<h4 id="non-uniqueness-across-tables">Non uniqueness across tables</h4>
<p>Since each table has its own sequence, an identical value will be found as the primary key of different entities. Now imagine you make a tab-completed typo when deleting a row. Yeah, you&#39;ve just deleted an arbitrary row somewhere in your DB. Let&#39;s hope you don&#39;t have too many <code>ON DELETE CASCADE</code> configured.</p>
<h3 id="workarounds">Workarounds</h3>
<p>You can configure your sequence to start at an arbitrary point, have an increment bigger than one, or even share the sequence between tables. In any case, you&#39;re still disclosing information about your growth, and you&#39;ll just reach integer overflow quicker. Not really a perfect solution.</p>
<h3 id="a-word-on-uuids">A word on UUIDs</h3>
<p>You may already have seen stuff like <code>c0b656b1-7351-4dc2-84c8-62a2afb41e66</code> somewhere. This is a UUID (or <em>Universally Unique IDentifier</em>).</p>
<p>Which is nice. UUIDs are guaranteed to be <em>Universally Unique</em>, which makes them good candidates for primary keys (and neatly solve the issue of having primary keys non unique across tables).</p>
<p>More precisely, UUIDs are 128 bits values, with textual representation in hex digits. It bears repeating, because many people think that UUIDs are stored as text.</p>
<h4 id="uuids-are-128-bit-values">UUIDs are 128 bit values</h4>
<p>There are different versions of UUIDs, based on how they&#39;re created. Within the 128 bits, 4 are used to encode the version. The kind we&#39;re interested in is UUIDv4, which is based on randomness.</p>
<h4 id="uuidv4-are-perfectly-well-indexed-by-postgresql">UUIDv4 are perfectly well indexed by PostgreSQL</h4>
<h4 id="uuidv4-values-are-random">UUIDv4 values are random</h4>
<p>UUIDv4 values being random, you don&#39;t have a guaranteed uniqueness. However, the probability of a collision is rather small (see <a href="https://en.wikipedia.org/wiki/Universally_unique_identifier#Collisions">Random UUID probability of duplicates</a>).</p>
<p>Also, keep in mind that in the extremely unlikely case (you&#39;re more likely to get hit by a meteorite) of colliding UUIDs, it will be caught by the DB thanks to the primary key constraint.</p>
<p>UUIDv4 adds two reserved bits to the already used ones, so we&#39;re left with 122 bits of information.</p>
<pre><code class="language-text">λ&gt; 2 ^ 122
5316911983139663491615228241121378304
</code></pre>
<p>This should be enough for your needs.</p>
<p>The fact that UUIDv4 values are random gives us interesting properties:</p>
<ul>
<li>you can&#39;t enumerate values</li>
<li>you don&#39;t know how many values are present in each table</li>
<li>you don&#39;t have to talk to the database to construct a value</li>
</ul>
<p>The two first properties are nice, scroll up if you don&#39;t remember why. The third one deserves some extra explanations.</p>
<p>Sequences are mutable state, you need atomicity on get-and-increment, to preserve uniqueness. So everytime you need to insert an entity, you need the DB to give you its primary key. The entities in your code are incomplete until you talk to the DB. Since a sequential key is technical, not semantic, this can usually be handled by your ORM (or data mapper, ORMs are bad, m&#39;kay?). When inserting several related entities, this can cause additional problems, because you&#39;re not only lacking the primary keys, but also the foreign keys too, which are semantic, not just technical.</p>
<p>The UUIDv4 generation algorithm is well documented and available virtually anywhere, so you can generate whole entities without ever talking to the database. This makes the code simpler and clearer as you don&#39;t have to handle partially-created entities, and you can test your entity-generation code without having to talk to a <strong>giant blob of mutable state over the network</strong>.</p>
<p>Also, <code>serial</code> is a 32 bit integer. You&#39;ll reach overflow at some point. Debugging it and migrating a production database to 64 bit integers is an interesting experience, but maybe you can take my word for it and avoid it altogether. With UUIDs it&#39;s a problem you just don&#39;t have.</p>
<p>Also, if you&#39;re brave enough to run a SQL database in a multi-master setup (please, please, please, DON&#39;T), then you&#39;re relieved from the shenanigans of having conflict avoiding sequence generation. But please don&#39;t run SQL databases in multi-master setups. I have done that: one star, would not recommend.</p>
<h3 id="uuids-in-postgresql">UUIDs in PostgreSQL</h3>
<p>PostgreSQL supports UUIDs, through the type <code>uuid</code>.</p>
<pre><code class="language-sql">&gt; select &#39;697dffc9-8ba5-410c-b677-227475a73530&#39;::uuid;
uuid                 
--------------------------------------
    697dffc9-8ba5-410c-b677-227475a73530
(1 row)
</code></pre>
<p>By default PostgreSQL doesn&#39;t have the ability to generate UUIDv4 values. You need the <code>uuid-ossp</code> extension for that. From <code>9.4</code>, UUIDv4 generation is also provided by the <code>pgcrypto</code> extension.</p>
<pre><code class="language-sql">CREATE EXTENSION &quot;uuid-ossp&quot;;
-- or CREATE EXTENSION &quot;pgcrypto&quot;;
create table entity(
  entity_id uuid primary key default uuid_generate_v4(),
  -- or entity_id uuid primary key default gen_random_uuid(),
  attribute text not null
);
</code></pre>
<pre><code class="language-sql">&gt; insert into entity (attribute) values (&#39;toto&#39;);
INSERT 0 1
&gt; table entity;
                entity_id               | attribute 
--------------------------------------+-----------
    b2a3d43b-5b81-4127-be29-d849de607d78 | toto
(1 row)
</code></pre>
<p>You can use UUIDs without the <code>uuid-ossp</code> extension, but you will have to provide UUIDs when inserting entities (which is a good thing to do anyway).</p>
<h3 id="when-uuids-are-not-what-you-need">When UUIDs are not what you need</h3>
<p>If you don&#39;t have mutable state, then you don&#39;t need a technical primary key, and you can use a semantic key.</p>
<p>If you have strong storage constraints, UUIDs can cause a problem, since they use 2 to 4 times as many space as a serial or big serial. So if you have strong size constraints <strong>and if you don&#39;t expose the primary keys</strong>, then UUIDs may be overkill. Also, UUIDs being random, you lose locality, and your index ends up scattered. This causes a definite performance hit when confronted to high insert rates. Also, this creates extra disk use.</p>
<p>In my experience, UUIDs are a safe default. You can question it when you have strong performance constraints and a safe environment.</p>
<h3 id="how-to-generate-uuids-in-language">How to generate UUIDs in $LANGUAGE</h3>
<h4 id="java-scala">Java, Scala</h4>
<p>It&#39;s in the standard library.</p>
<pre><code class="language-java">java.util.UUID.randomUUID
</code></pre>
<h4 id="nodejs">Node.js</h4>
<pre><code class="language-bash">npm install uuid
</code></pre>
<pre><code class="language-javascript">var uuid = require(&quot;uuid&quot;);

uuid.v4();
</code></pre>
<h4 id="php">PHP</h4>
<p>Install <code>ramsey/uuid</code> from composer.</p>
<pre><code class="language-php">$uuid4 = Uuid::uuid4();
</code></pre>
<h4 id="haskell">Haskell</h4>
<p>Install <code>uuid</code> from hackage</p>
<pre><code class="language-haskell">uuid :: IO UUID
uuid = nextRandom
</code></pre>
]]></description>
										<content:encoded><![CDATA[<p><img width="1400" height="540" src="https://cdn.clever-cloud.com/uploads/2020/12/primary-key-type-1.jpg" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="primary key type 1" decoding="async" loading="lazy" srcset="https://cdn.clever-cloud.com/uploads/2020/12/primary-key-type-1.jpg 1400w, https://cdn.clever-cloud.com/uploads/2020/12/primary-key-type-1-300x116.jpg 300w, https://cdn.clever-cloud.com/uploads/2020/12/primary-key-type-1-1024x395.jpg 1024w, https://cdn.clever-cloud.com/uploads/2020/12/primary-key-type-1-768x296.jpg 768w, https://cdn.clever-cloud.com/uploads/2020/12/primary-key-type-1-1368x528.jpg 1368w" sizes="auto, (max-width: 1400px) 100vw, 1400px" /></p><p>As big users of PostgreSQL, we had the opportunity of re-thinking the idioms common in the world of relational DBs.</p>
<p>Today, I&#39;ll talk about why we stopped using serial integers for our primary keys, and why we&#39;re now extensively using Universally Unique IDs (or UUIDs) almost everywhere.</p>
<h3 id="tldr">TL;DR</h3>
<p>Use UUIDs as primary keys. They can be freely exposed without disclosing sensitive information, they are not predictable and they are performant.</p>
<span id="more-2799"></span>

<h3 id="primary-keys-technical-keys-and-semantic-keys">Primary keys, technical keys and semantic keys</h3>
<p>A relational database is a graph where nodes are called entities and edges relations. To be able to express a relation between entities, we need to be able to uniquely refer to any entity: that&#39;s the role of a primary key.</p>
<p>The role of a primary key is to provide a stable, indexable reference to an entity. You have two ways to construct your primary key: either as a <em>semantic</em> key, or as a <em>technical</em> key.</p>
<p>A <em>semantic</em> primary key is extracted from the entities attributes (ie you use one or several fields of your entity as its primary key).</p>
<p>A <em>technical</em> primary key is completely unrelated to the fields of its entity. It&#39;s constructed when the entity is inserted in the DB.</p>
<p>Ideally, semantic keys would be better, as it allows for a very simple way to understand and compare entities. But relational DBs are built upon a fundamentally mutable model. The current state of the world is stored in the database, and entities are subject to mutation. Relational DBs are <strong>very</strong> good at storing a <em>relatively</em> small amount of data, and are not well suited for immutable databases.</p>
<p>That&#39;s why to be able to have <strong>stable</strong> primary keys, we commonly resort to <em>serial IDs</em>. Serial IDs are a technical key, as they&#39;re not related to the actual contents of its entity.</p>
<p>To be fair, you can configure your foreign key to have <code>ON UPDATE CASCADE</code> to have primary key updates automatically propagated everywhere within the database, but it doesn&#39;t solve the problem if you&#39;ve exposed primary key values outside the DB.</p>
<h4 id="whats-a-serial-id">What&#39;s a serial ID?</h4>
<p>Basically, a serial id is a number that increases everytime you insert a row. The database does the bookkeeping for you, so it&#39;s transparent for the developer.</p>
<pre><code class="language-sql">create table entity(
  entity_id serial primary key,
  attribute text not null
);
</code></pre>
<p>We can then insert values in the table; postgres will handle the <code>entity_id</code> field.</p>
<pre><code class="language-sql">&gt; insert into entity (attribute) values (&#39;ohai&#39;);
INSERT 0 1

&gt; select * from entity;
    entity_id | attribute 
-----------+-----------
            1 | ohai
(1 row)
</code></pre>
<p>The row has been inserted, and the entity has an automatically attributed id. In postgresql, <code>serial</code> is implemented through a <em>sequence</em>, which acts a bit like a counter. We can inspect its current state:</p>
<pre><code class="language-sql">&gt; select currval(&#39;entity_entity_id_seq&#39;::regclass);
currval 
---------
        1
(1 row)
</code></pre>
<p>OK, so we have a perfectly good primary key for our entities. What&#39;s the problem?</p>
<h3 id="why-serial-ids-can-be-a-problem">Why serial IDs can be a problem</h3>
<h4 id="information-disclosure">Information disclosure</h4>
<p>The current value corresponds to the last value used as a primary key. Since the sequence starts at 1 and is incremented 1 by 1, <code>currval</code> roughly corresponds in our case to the number of rows in the table (not exactly, because of deletions).</p>
<p>So, if you want to count the number of rows in a given table, all you have to do is to have the system generate a new entity and inspect its ID.</p>
<p>So, do users have access to primary keys? The answer is often yes: primary keys are very often exposed to the user, most often in URLs, as we want URLs to be stable (see <a href="http://www.w3.org/Provider/Style/URI.html">cool URIs don&#39;t change</a>).</p>
<p>Let&#39;s say you&#39;re a company operating a SaaS, <strong>all it takes to know your user count is to create an account</strong>. A number of social networks boasting impressive user bases were pwn3d this way. Just by creating an account and looking at a link.</p>
<h4 id="entity-enumerations">Entity enumerations</h4>
<p>An even bigger problem is that it&#39;s very easy to enumerate the entities in any given table. You start from 1, and you keep on incrementing the value. It becomes very easy to scrape all your entities. It leads to spamming (just don&#39;t start from 1, as you don&#39;t want to spam the admin team ;-) ), or worse. If you have light access control, only based on the knowledge of a given URL, then anybody can display private information.</p>
<h4 id="non-uniqueness-across-tables">Non uniqueness across tables</h4>
<p>Since each table has its own sequence, an identical value will be found as the primary key of different entities. Now imagine you make a tab-completed typo when deleting a row. Yeah, you&#39;ve just deleted an arbitrary row somewhere in your DB. Let&#39;s hope you don&#39;t have too many <code>ON DELETE CASCADE</code> configured.</p>
<h3 id="workarounds">Workarounds</h3>
<p>You can configure your sequence to start at an arbitrary point, have an increment bigger than one, or even share the sequence between tables. In any case, you&#39;re still disclosing information about your growth, and you&#39;ll just reach integer overflow quicker. Not really a perfect solution.</p>
<h3 id="a-word-on-uuids">A word on UUIDs</h3>
<p>You may already have seen stuff like <code>c0b656b1-7351-4dc2-84c8-62a2afb41e66</code> somewhere. This is a UUID (or <em>Universally Unique IDentifier</em>).</p>
<p>Which is nice. UUIDs are guaranteed to be <em>Universally Unique</em>, which makes them good candidates for primary keys (and neatly solve the issue of having primary keys non unique across tables).</p>
<p>More precisely, UUIDs are 128 bits values, with textual representation in hex digits. It bears repeating, because many people think that UUIDs are stored as text.</p>
<h4 id="uuids-are-128-bit-values">UUIDs are 128 bit values</h4>
<p>There are different versions of UUIDs, based on how they&#39;re created. Within the 128 bits, 4 are used to encode the version. The kind we&#39;re interested in is UUIDv4, which is based on randomness.</p>
<h4 id="uuidv4-are-perfectly-well-indexed-by-postgresql">UUIDv4 are perfectly well indexed by PostgreSQL</h4>
<h4 id="uuidv4-values-are-random">UUIDv4 values are random</h4>
<p>UUIDv4 values being random, you don&#39;t have a guaranteed uniqueness. However, the probability of a collision is rather small (see <a href="https://en.wikipedia.org/wiki/Universally_unique_identifier#Collisions">Random UUID probability of duplicates</a>).</p>
<p>Also, keep in mind that in the extremely unlikely case (you&#39;re more likely to get hit by a meteorite) of colliding UUIDs, it will be caught by the DB thanks to the primary key constraint.</p>
<p>UUIDv4 adds two reserved bits to the already used ones, so we&#39;re left with 122 bits of information.</p>
<pre><code class="language-text">λ&gt; 2 ^ 122
5316911983139663491615228241121378304
</code></pre>
<p>This should be enough for your needs.</p>
<p>The fact that UUIDv4 values are random gives us interesting properties:</p>
<ul>
<li>you can&#39;t enumerate values</li>
<li>you don&#39;t know how many values are present in each table</li>
<li>you don&#39;t have to talk to the database to construct a value</li>
</ul>
<p>The two first properties are nice, scroll up if you don&#39;t remember why. The third one deserves some extra explanations.</p>
<p>Sequences are mutable state, you need atomicity on get-and-increment, to preserve uniqueness. So everytime you need to insert an entity, you need the DB to give you its primary key. The entities in your code are incomplete until you talk to the DB. Since a sequential key is technical, not semantic, this can usually be handled by your ORM (or data mapper, ORMs are bad, m&#39;kay?). When inserting several related entities, this can cause additional problems, because you&#39;re not only lacking the primary keys, but also the foreign keys too, which are semantic, not just technical.</p>
<p>The UUIDv4 generation algorithm is well documented and available virtually anywhere, so you can generate whole entities without ever talking to the database. This makes the code simpler and clearer as you don&#39;t have to handle partially-created entities, and you can test your entity-generation code without having to talk to a <strong>giant blob of mutable state over the network</strong>.</p>
<p>Also, <code>serial</code> is a 32 bit integer. You&#39;ll reach overflow at some point. Debugging it and migrating a production database to 64 bit integers is an interesting experience, but maybe you can take my word for it and avoid it altogether. With UUIDs it&#39;s a problem you just don&#39;t have.</p>
<p>Also, if you&#39;re brave enough to run a SQL database in a multi-master setup (please, please, please, DON&#39;T), then you&#39;re relieved from the shenanigans of having conflict avoiding sequence generation. But please don&#39;t run SQL databases in multi-master setups. I have done that: one star, would not recommend.</p>
<h3 id="uuids-in-postgresql">UUIDs in PostgreSQL</h3>
<p>PostgreSQL supports UUIDs, through the type <code>uuid</code>.</p>
<pre><code class="language-sql">&gt; select &#39;697dffc9-8ba5-410c-b677-227475a73530&#39;::uuid;
uuid                 
--------------------------------------
    697dffc9-8ba5-410c-b677-227475a73530
(1 row)
</code></pre>
<p>By default PostgreSQL doesn&#39;t have the ability to generate UUIDv4 values. You need the <code>uuid-ossp</code> extension for that. From <code>9.4</code>, UUIDv4 generation is also provided by the <code>pgcrypto</code> extension.</p>
<pre><code class="language-sql">CREATE EXTENSION &quot;uuid-ossp&quot;;
-- or CREATE EXTENSION &quot;pgcrypto&quot;;
create table entity(
  entity_id uuid primary key default uuid_generate_v4(),
  -- or entity_id uuid primary key default gen_random_uuid(),
  attribute text not null
);
</code></pre>
<pre><code class="language-sql">&gt; insert into entity (attribute) values (&#39;toto&#39;);
INSERT 0 1
&gt; table entity;
                entity_id               | attribute 
--------------------------------------+-----------
    b2a3d43b-5b81-4127-be29-d849de607d78 | toto
(1 row)
</code></pre>
<p>You can use UUIDs without the <code>uuid-ossp</code> extension, but you will have to provide UUIDs when inserting entities (which is a good thing to do anyway).</p>
<h3 id="when-uuids-are-not-what-you-need">When UUIDs are not what you need</h3>
<p>If you don&#39;t have mutable state, then you don&#39;t need a technical primary key, and you can use a semantic key.</p>
<p>If you have strong storage constraints, UUIDs can cause a problem, since they use 2 to 4 times as many space as a serial or big serial. So if you have strong size constraints <strong>and if you don&#39;t expose the primary keys</strong>, then UUIDs may be overkill. Also, UUIDs being random, you lose locality, and your index ends up scattered. This causes a definite performance hit when confronted to high insert rates. Also, this creates extra disk use.</p>
<p>In my experience, UUIDs are a safe default. You can question it when you have strong performance constraints and a safe environment.</p>
<h3 id="how-to-generate-uuids-in-language">How to generate UUIDs in $LANGUAGE</h3>
<h4 id="java-scala">Java, Scala</h4>
<p>It&#39;s in the standard library.</p>
<pre><code class="language-java">java.util.UUID.randomUUID
</code></pre>
<h4 id="nodejs">Node.js</h4>
<pre><code class="language-bash">npm install uuid
</code></pre>
<pre><code class="language-javascript">var uuid = require(&quot;uuid&quot;);

uuid.v4();
</code></pre>
<h4 id="php">PHP</h4>
<p>Install <code>ramsey/uuid</code> from composer.</p>
<pre><code class="language-php">$uuid4 = Uuid::uuid4();
</code></pre>
<h4 id="haskell">Haskell</h4>
<p>Install <code>uuid</code> from hackage</p>
<pre><code class="language-haskell">uuid :: IO UUID
uuid = nextRandom
</code></pre>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Databases are out of beta !</title>
		<link>https://www.clever.cloud/blog/company/2013/06/14/databases-pricing/</link>
		
		<dc:creator><![CDATA[Adrien Cretté]]></dc:creator>
		<pubDate>Fri, 14 Jun 2013 00:00:00 +0000</pubDate>
				<category><![CDATA[Company]]></category>
		<category><![CDATA[databases]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[postgresql]]></category>
		<category><![CDATA[Pricing]]></category>
		<category><![CDATA[release]]></category>
		<category><![CDATA[SQL]]></category>
		<guid isPermaLink="false">https://www2.cleverapps.io/wp/blog/technology/2013/06/14/databases-pricing/</guid>

					<description><![CDATA[Lire la version française Since the beginning, anyone can use mutual Clever Cloud databases for free because it was in beta. Actually, this test period is over and databases will be charged from July 1st 2013. In order to fit high performance needs, we will launch dedicated databases soon 🙂 The finesse pricing is daily. [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><em><a href="#fr">Lire la version française</a></em></p>
<p>Since the beginning, anyone can use mutual Clever Cloud databases for free because it was in beta.<br />
Actually, this test period is over and databases will be charged from July 1st 2013.</p>
<p><span id="more-2724"></span></p>
<p>In order to fit high performance needs, we will launch dedicated databases soon <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
<p>The finesse pricing is daily. It means that once you create a database, you are charged for one day usage, and so on.<br />
For example, a S database will cost 0,23 €/day.</p>
<p>The pricing plans for PostgreSQL and MySQL will be the following:</p>
<div class="table-db">
<div class="table-db-img"><img decoding="async" src="https://www2.cleverapps.io/app/uploads/2021/08/mysql-table.png" /></div>
<table class="table-pricing-services">
<caption>MySQL pricing plans</caption>
<thead>
<tr>
<td></td>
<td>S</td>
<td>M</td>
<td>L</td>
</tr>
</thead>
<tbody>
<tr>
<td>Connexions</td>
<td>15</td>
<td>30</td>
<td>40</td>
</tr>
<tr>
<td>Size</td>
<td>1 Go</td>
<td>5 Go</td>
<td>10 Go</td>
</tr>
<tr>
<td>Price</td>
<td>7 €/month (0,23 €/day)</td>
<td>35 €/month (1,17 €/day)</td>
<td>70 €/month (2,33 €/day)</td>
</tr>
</tbody>
</table>
</div>
<div class="table-db">
<div class="table-db-img"><img decoding="async" src="https://www2.cleverapps.io/app/uploads/2021/08/postgresql-table.png" /></div>
<table class="table-pricing-services">
<caption>PostgreSQL pricing plans</caption>
<thead>
<tr>
<td></td>
<td>S</td>
<td>M</td>
<td>L</td>
</tr>
</thead>
<tbody>
<tr>
<td>Connexions</td>
<td>15</td>
<td>30</td>
<td>40</td>
</tr>
<tr>
<td>Size</td>
<td>1 Go</td>
<td>5 Go</td>
<td>10 Go</td>
</tr>
<tr>
<td>Price</td>
<td>7 €/month (0,23 €/day)</td>
<td>35 €/month (1,17 €/day)</td>
<td>70 €/month (2,33 €/day)</td>
</tr>
</tbody>
</table>
</div>
<p>You will be able to configure the number of Scalers dedicated to your database <a href="https://www.clever.cloud/pricing/" target="_blank" rel="noopener noreferrer">as you can do with apps</a>.</p>
<p>These databases will be more powerful, larger and more scalable than the mutualised databases.</p>
<hr />
<p><em>Version française</em></p>
<p>Depuis le début, tout le monde pouvait utiliser gratuitement les bases de données mutuelles sur Clever Cloud puisqu&#8217;elles étaient en beta. Désormais, cette phase de test s&#8217;achève et l’utilisation des bases de données sera facturée à partir du 1er juillet 2013.</p>
<p>Les tarifs pour une PostgreSQL et une MySQL seront les suivants:</p>
<div class="table-db">
<div class="table-db-img"><img decoding="async" src="https://www2.cleverapps.io/app/uploads/2021/08/postgresql-table.png" /></div>
<table class="table-pricing-services">
<caption>Tarification PostgreSQL</caption>
<thead>
<tr>
<td></td>
<td>S</td>
<td>M</td>
<td>L</td>
</tr>
</thead>
<tbody>
<tr>
<td>Connexions</td>
<td>15</td>
<td>30</td>
<td>40</td>
</tr>
<tr>
<td>Taille</td>
<td>1 Go</td>
<td>5 Go</td>
<td>10 Go</td>
</tr>
<tr>
<td>Prix (HT)</td>
<td>7 €/mois (0,23 €/jour)</td>
<td>35 €/mois (1,17 €/jour)</td>
<td>70 €/mois (2,33 €/jour)</td>
</tr>
</tbody>
</table>
</div>
<div class="table-db">
<div class="table-db-img"><img decoding="async" src="https://www2.cleverapps.io/app/uploads/2021/08/mysql-table.png" /></div>
<table class="table-pricing-services">
<caption>Tarification MySQL</caption>
<thead>
<tr>
<td></td>
<td>S</td>
<td>M</td>
<td>L</td>
</tr>
</thead>
<tbody>
<tr>
<td>Connexions</td>
<td>15</td>
<td>30</td>
<td>40</td>
</tr>
<tr>
<td>Taille</td>
<td>1 Go</td>
<td>5 Go</td>
<td>10 Go</td>
</tr>
<tr>
<td>Prix (HT)</td>
<td>7 €/mois (0,23 €/jour)</td>
<td>35 €/mois (1,17 €/jour)</td>
<td>70 €/mois (2,33 €/jour)</td>
</tr>
</tbody>
</table>
</div>
<p>L’ajustement du pricing est quotidien. Cela signifie qu’une fois que vous avez créé la base de données, vous serez facturé pour une journée d’usage, et ainsi de suite.</p>
<p>À titre d’exemple, une base de données de taille S coûtera 0,23 €/jour.</p>
<p>Pour répondre aux besoins de haute performance, nous lancerons bientôt des bases de données dédiées <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
<p>Il sera possible de configurer le nombre de Scalers dédiés à la base de données, comme il est déjà possible de le faire <a href="https://www.clever.cloud/fr/tarification/" target="_blank" rel="noopener noreferrer">avec les applications</a>.</p>
<p>Ces bases de données seront plus puissantes, plus scalables et auront plus de capacité de stockage que les bases de données mutualisées.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>PostgreSQL release</title>
		<link>https://www.clever.cloud/blog/company/2013/04/05/pg-release/</link>
		
		<dc:creator><![CDATA[Adrien Cretté]]></dc:creator>
		<pubDate>Fri, 05 Apr 2013 00:00:00 +0000</pubDate>
				<category><![CDATA[Company]]></category>
		<category><![CDATA[postgresql]]></category>
		<category><![CDATA[release]]></category>
		<category><![CDATA[Security]]></category>
		<guid isPermaLink="false">https://www2.cleverapps.io/wp/blog/technology/2013/04/05/pg-release/</guid>

					<description><![CDATA[French version below We have updated PostgrSQL following the security flaw detected in versions 9 and 8. To be more exact, there were 3 flaws, with one more important: CVE-2013-1899. This one could lead to corrupt postgres datas. Two smaller ones came after it: CVE-2013-1900 and CVE-2013-1901. These flaws affected the 4 last versions: 9.2, [&#8230;]]]></description>
										<content:encoded><![CDATA[<div class="center" style="margin: 0 auto 20px; width: 330px">
  <a href="https://www2.cleverapps.io/app/uploads/2021/08/postgresql.png" rel="noopener noreferrer" target="_blank"><br />
    <img decoding="async" alt="postgresql"  src="https://www2.cleverapps.io/app/uploads/2021/08/postgresql.png"/><br />
  </a>
</div>
<p><em>French version below</em>  </p>
<p>We have updated PostgrSQL following the security flaw detected in versions 9 and 8. To be more exact, there were 3 flaws, with one more important: CVE-2013-1899. This one could lead to corrupt postgres datas. Two smaller ones came after it: CVE-2013-1900 and CVE-2013-1901.</p>
<p><span id="more-2715"></span></p>
<p>These flaws affected the 4 last versions: 9.2, 9.1, 9.0 and 8.4 (8.3 is no longer supported by Clever Cloud).</p>
<p>Owing the critical nature of the issue, an announce was done last week indicating that public repositories will be closed until the relase of april, 4th.</p>
<p>All our clusters has been updated since, leading to a shut down of a few seconds.</p>
<p>Moreover, we also took advantages of this opportunity to manage the distribution of 3 of 4 new versions of Exherbo.</p>
<p>The Clever Cloud&#39;s support remains at your disposal for any questions: <a href="mailto:support@clever-cloud.com">mailto:support@clever-cloud.com</a>.</p>
<hr>
<p><em>Version française</em></p>
<p>Nous avons effectué la mise à jour de PostgreSQL suite à la faille de sécurité détectée dans les versions 9 et 8.</p>
<p>Plus exactement, il y a eu 3 failles dont une très importante : la CVE-2013-1899. Celle-ci pouvait amener à la corruption des données postgres. Deux autres plus petites lui ont succédé: CVE-2013-1900 et CVE-2013-1901</p>
<p>Ces failles touchaient les 4 dernières branches: 9.2, 9.1, 9.0 et 8.4 (8.3 n&#39;étant pas supportée par Clever Cloud).</p>
<p>Compte tenu de la nature critique de l&#39;incident, une annonce a été faite la semaine dernière indiquant que les dépôts publics seraient fermés en attendant la release du 4 avril.</p>
<p>Tous nos clusters ont depuis été mis à jour, entrainant une coupure de quelques secondes.</p>
<p>De plus, nous en avons profité pour gérer la distribution de 3 des 4 nouvelles versions Exherbo.</p>
<p>Le support Clever Cloud reste à votre disposition si vous avez des questions : <a href="mailto:support@clever-cloud.com">mailto:support@clever-cloud.com</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
