<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Edoardo Dusi</title>
    <description>The latest articles on DEV Community by Edoardo Dusi (@edodusi).</description>
    <link>https://dev.to/edodusi</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F450%2Fdb56bf22-2496-4505-9230-98f05d5dcdee.png</url>
      <title>DEV Community: Edoardo Dusi</title>
      <link>https://dev.to/edodusi</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/edodusi"/>
    <language>en</language>
    <item>
      <title>SQLite for JavaScript bundles, plus a distributed version on Lambda</title>
      <dc:creator>Edoardo Dusi</dc:creator>
      <pubDate>Thu, 03 Dec 2026 11:40:34 +0000</pubDate>
      <link>https://dev.to/aws/sqlite-for-javascript-bundles-plus-a-distributed-version-on-lambda-3c5g</link>
      <guid>https://dev.to/aws/sqlite-for-javascript-bundles-plus-a-distributed-version-on-lambda-3c5g</guid>
      <description>&lt;p&gt;A JavaScript bundler takes hundreds (sometimes thousands) of modules and turns them into a single file a browser can run. Every bundler you use, &lt;em&gt;webpack&lt;/em&gt; and &lt;em&gt;esbuild&lt;/em&gt; included, keeps its own little &lt;strong&gt;database&lt;/strong&gt; inside that file: a table of modules, a way to look them up, a cache of what already ran. It just never calls it that!&lt;/p&gt;

&lt;p&gt;In August, Farid Zakaria wrote &lt;a href="https://fzakaria.com/2026/08/23/your-executable-is-a-sqlite-database" rel="noopener noreferrer"&gt;Your executable is a SQLite database&lt;/a&gt;, a post arguing that ELF, the format of every Linux binary, is a database that refuses to admit it. I spent a good part of last year on bundlers (because &lt;em&gt;why not&lt;/em&gt;) and gave a talk about &lt;a href="https://www.youtube.com/watch?v=8GJb6fC5ceA" rel="noopener noreferrer"&gt;how they work&lt;/a&gt; at DEVWorld, so obviously I immediately thought: what if a JavaScript bundle admitted it? What if the output of a bundler were a real SQLite file, and linking, tree-shaking and patching were SQL queries?&lt;/p&gt;

&lt;p&gt;Ok, you will probably never ship a bundle as a database, and I won't try to convince you to. But &lt;a href="https://sqlite.org/mostdeployed.html" rel="noopener noreferrer"&gt;SQLite runs almost everywhere&lt;/a&gt; and pushing it into a job it was not really meant for is a good way to do a deep dive. And maybe an edge case like this holds the answer to a problem you actually have.&lt;/p&gt;

&lt;p&gt;What I put in this article:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What a bundler really does and what is the real challenge&lt;/li&gt;
&lt;li&gt;How a bundle maps onto the parts of a native executable: object files, symbol tables, relocations, a linker&lt;/li&gt;
&lt;li&gt;How this experiment compares with esbuild on three real apps&lt;/li&gt;
&lt;li&gt;Why distributing the build across 512 AWS Lambda functions does not make it 512 times faster!&lt;/li&gt;
&lt;li&gt;What a website that bundles itself on the first visit looks like, and why it is a job for AWS Lambda Web Functions&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It is also a story about working with an AI agent, Kiro Crew in my case: prompt, steer, review, question, challenge, measure. Come for the fun, stay for the useful lesson.&lt;/p&gt;

&lt;h2&gt;
  
  
  The first version passed its own tests
&lt;/h2&gt;

&lt;p&gt;I started the way many of us start now: an afternoon of vibe coding gave me a working prototype with a long walkthrough. It parsed ES modules, stored them in SQLite, ran in Node and in the browser, and came with eight passing tests and a list of "superpowers": tree-shaking as a SQL query, hot-patching a dependency in place, a 2.5 MB bundle for a real TodoMVC app.&lt;/p&gt;

&lt;p&gt;It looked great! So I did what you should always do with agents: &lt;strong&gt;stopped believing and started checking&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;I opened the prototype in &lt;a href="https://kiro.dev/crew" rel="noopener noreferrer"&gt;Kiro Crew&lt;/a&gt;, and the first thing I asked for was tests the prototype had not written for itself. Kiro Crew wrote fourteen tiny programs, each testing one rule of how JavaScript modules behave: for example, when a module changes an exported variable, every module that imports it must see the new value. Each program runs in plain Node and through the bundle, and the two must print exactly the same thing.&lt;/p&gt;

&lt;p&gt;The prototype passed 25 of 56 checks.&lt;/p&gt;

&lt;p&gt;Then I checked its claims one by one:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Claim&lt;/th&gt;
&lt;th&gt;Reality&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Tree-shaking with one SQL query&lt;/td&gt;
&lt;td&gt;It only removed modules nothing imported, and the bundler never adds those. On a real build it removed nothing; the test inserted a fake orphan to have something to delete.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A 2.5 MB bundle for TodoMVC&lt;/td&gt;
&lt;td&gt;The file on disk was 8.4 MB: after measuring, the build stored a copy of the whole page, including the database itself, inside the database.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Hot-patching in place&lt;/td&gt;
&lt;td&gt;It changed the dependency for every module with the same import, and the compiled output went stale.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;The bundle can query itself&lt;/td&gt;
&lt;td&gt;In the fast version, the query function returned a hard-coded number whatever you asked.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;None of this is a dig at vibe coding. Simon Willison &lt;a href="https://simonwillison.net/2025/Mar/19/vibe-coding/" rel="noopener noreferrer"&gt;puts the line in the right place&lt;/a&gt;: "When I talk about vibe coding I mean building software with an LLM without reviewing the code it writes." That is what the prototype was, and it was the right tool to test the idea in an afternoon. To trust the result, you have to switch from vibing to steering: give the agent feedback, check what comes back, and repeat until you understand what the program does. Strict tests against Node were the first round of steering.&lt;/p&gt;

&lt;h2&gt;
  
  
  Rebuilding it, with an agent that gets challenged
&lt;/h2&gt;

&lt;p&gt;From here on, when I say "we" I mean me and Kiro Crew. The loop was always the same: write the failing test, let the agent propose a fix, review the diff, ask why, push back when the answer did not convince me, and measure before believing.&lt;/p&gt;

&lt;p&gt;The "SQLite bundler" got a new name, &lt;a href="https://github.com/edodusi/rowpack" rel="noopener noreferrer"&gt;rowpack&lt;/a&gt;, and a simple rule: every claim in the README needs a number behind it. The prototype is the first commit in the repository, so you can see the whole diff.&lt;/p&gt;

&lt;p&gt;The key change is how imports work. Since I know how webpack does it, I steered the agent toward the same idea: webpack defines a getter for every export, so instead of copying values from one module into another, every import becomes a live read from the other module's namespace. A use of &lt;code&gt;count&lt;/code&gt; imported from &lt;code&gt;./counter.js&lt;/code&gt; is rewritten to something like &lt;code&gt;__rp_i0.count&lt;/code&gt;, a getter that always returns the current value. Live bindings, cycles and the "cannot access before initialization" error all come out right, because nothing is ever copied.&lt;/p&gt;

&lt;p&gt;All fixtures now print exactly what Node prints, through all three engines, with and without tree-shaking: 149 tests in total. The real-world check is &lt;a href="https://github.com/tarhi-saad/TodoMVC-Vanilla-ES6" rel="noopener noreferrer"&gt;TodoMVC Vanilla ES6&lt;/a&gt; (53 modules once you count flatpickr from npm, 27 SVGs, two stylesheets and a sound file): it renders and behaves identically in headless Chrome whether esbuild or rowpack built it.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is inside the database
&lt;/h2&gt;

&lt;p&gt;Think of the bundle as an executable that kept its build notes. A native binary has sections for code, a symbol table that says which names it exports, relocations that say where code refers to a name, and a list of libraries it needs. &lt;em&gt;rowpack&lt;/em&gt; has a table for each:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Table&lt;/th&gt;
&lt;th&gt;Native executable&lt;/th&gt;
&lt;th&gt;What it holds&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;statements&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;.text&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;every top-level statement of every module&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;bindings&lt;/code&gt;, &lt;code&gt;refs&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;&lt;code&gt;.symtab&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;which statement declares and reads which name&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;relocations&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;.rela&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;every place code refers to a name, by offset&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;dependencies&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;DT_NEEDED&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;each import and what it resolved to&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;load_image&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;program headers&lt;/td&gt;
&lt;td&gt;what the loader reads at startup&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Because the bundle is a plain SQLite file, the tools you would build for a bundler already exist. &lt;code&gt;ldd&lt;/code&gt; is a view:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# ./ (the rowpack repo root, after npm install)&lt;/span&gt;
npx rowpack build demos/hello/index.js -o hello.sqlite
sqlite3 -box hello.sqlite &lt;span class="s2"&gt;"SELECT importer, specifier, resolves_to FROM ldd"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;┌────────────┬───────────────┬───────────────┐
│  importer  │   specifier   │  resolves_to  │
├────────────┼───────────────┼───────────────┤
│ ./index.js │ ./math.js     │ ./math.js     │
│ ./index.js │ ./config.json │ ./config.json │
│ ./index.js │ ./style.css   │ ./style.css   │
│ ./index.js │ ./logo.svg    │ ./logo.svg    │
└────────────┴───────────────┴───────────────┘
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The page built from it can even carry a small SQL console, so the browser tab you are looking at is literally a database you can query.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fjjafartsbdtxp3sto0pv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fjjafartsbdtxp3sto0pv.png" alt="A demo page linked by SQL, with a SQL console in the corner listing the bundle's dependencies from the ldd view" width="800" height="509"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Linking is a recursive query
&lt;/h2&gt;

&lt;p&gt;Linking means answering one question for every import: which binding does this name point to? With &lt;code&gt;export { x } from './a.js'&lt;/code&gt; and &lt;code&gt;export * from './b.js'&lt;/code&gt;, the answer can be several modules away, and the ECMAScript spec has an exact algorithm for it, called &lt;a href="https://tc39.es/ecma262/#sec-resolveexport" rel="noopener noreferrer"&gt;ResolveExport&lt;/a&gt;. It follows re-export chains, expands &lt;code&gt;export *&lt;/code&gt;, and drops any name that two &lt;code&gt;export *&lt;/code&gt; statements resolve to different bindings.&lt;/p&gt;

&lt;p&gt;That is a graph walk, and SQL has graph walks built in: recursive common table expressions. Here is the heart of it, trimmed:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="c1"&gt;-- ./src/sql.js (trimmed): every name a module exports, and where it points&lt;/span&gt;
&lt;span class="k"&gt;WITH&lt;/span&gt; &lt;span class="no"&gt;RECURSIVE&lt;/span&gt; &lt;span class="nf"&gt;names&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;module_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;target_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;target_key&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="c1"&gt;-- names written in the module itself&lt;/span&gt;
  &lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;module_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
         &lt;span class="k"&gt;CASE&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;kind&lt;/span&gt; &lt;span class="k"&gt;WHEN&lt;/span&gt; &lt;span class="s1"&gt;'local'&lt;/span&gt; &lt;span class="k"&gt;THEN&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;module_id&lt;/span&gt; &lt;span class="k"&gt;ELSE&lt;/span&gt; &lt;span class="n"&gt;d&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;resolved_id&lt;/span&gt; &lt;span class="k"&gt;END&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
         &lt;span class="k"&gt;CASE&lt;/span&gt; &lt;span class="k"&gt;WHEN&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;kind&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'local'&lt;/span&gt; &lt;span class="k"&gt;THEN&lt;/span&gt; &lt;span class="s1"&gt;'L:'&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;local_name&lt;/span&gt; &lt;span class="k"&gt;ELSE&lt;/span&gt; &lt;span class="s1"&gt;'E:'&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;imported_name&lt;/span&gt; &lt;span class="k"&gt;END&lt;/span&gt;
  &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;exports&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt; &lt;span class="k"&gt;LEFT&lt;/span&gt; &lt;span class="k"&gt;JOIN&lt;/span&gt; &lt;span class="n"&gt;dependencies&lt;/span&gt; &lt;span class="n"&gt;d&lt;/span&gt; &lt;span class="k"&gt;ON&lt;/span&gt; &lt;span class="n"&gt;d&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;importer_id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;module_id&lt;/span&gt; &lt;span class="k"&gt;AND&lt;/span&gt; &lt;span class="n"&gt;d&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;idx&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;dep_idx&lt;/span&gt;
  &lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;kind&lt;/span&gt; &lt;span class="k"&gt;IN&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'local'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'indirect'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="k"&gt;UNION&lt;/span&gt;
  &lt;span class="c1"&gt;-- names that arrive through "export * from", unless the module exports them itself&lt;/span&gt;
  &lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;module_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;module_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'E:'&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;
  &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;exports&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt;
  &lt;span class="k"&gt;JOIN&lt;/span&gt; &lt;span class="n"&gt;dependencies&lt;/span&gt; &lt;span class="n"&gt;d&lt;/span&gt; &lt;span class="k"&gt;ON&lt;/span&gt; &lt;span class="n"&gt;d&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;importer_id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;module_id&lt;/span&gt; &lt;span class="k"&gt;AND&lt;/span&gt; &lt;span class="n"&gt;d&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;idx&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;dep_idx&lt;/span&gt;
  &lt;span class="k"&gt;JOIN&lt;/span&gt; &lt;span class="n"&gt;names&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt; &lt;span class="k"&gt;ON&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;module_id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;d&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;resolved_id&lt;/span&gt;
  &lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;kind&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'star'&lt;/span&gt; &lt;span class="k"&gt;AND&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;gt;&lt;/span&gt; &lt;span class="s1"&gt;'default'&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;names&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A second recursive query follows each &lt;code&gt;E:&lt;/code&gt; hop until it lands on a real binding, and a &lt;code&gt;GROUP BY ... HAVING count(*) = 1&lt;/code&gt; drops the ambiguous names. The whole linker runs in about 3 ms on lodash-es's 641 modules, and it is the same query whether you run it from rowpack or paste it into the &lt;code&gt;sqlite3&lt;/code&gt; shell.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tree-shaking is another recursive query
&lt;/h2&gt;

&lt;p&gt;Tree-shaking is the same idea pointed the other way. Every top-level statement is a row. A statement must stay if it has side effects, or if a statement that stays reads a name it declares. Start from the side effects and the entry point, walk the reference rows, and whatever you never reach can go.&lt;/p&gt;

&lt;p&gt;The walk honours &lt;code&gt;"sideEffects": false&lt;/code&gt; in &lt;code&gt;package.json&lt;/code&gt;, the convention bundlers use to know which files are safe to drop. On lodash-es with five functions imported, rowpack keeps 157 of 641 modules and 456 of 1,927 statements. esbuild keeps 156. The extra one is &lt;code&gt;lodash.js&lt;/code&gt;, the package's entry point, which holds nothing but 322 re-exports: rowpack keeps its row to wire the namespace through it, but it adds zero bytes to the static output, so the shipped code has the same set of modules.&lt;/p&gt;

&lt;p&gt;Those re-export-only files bit us once. Our first version of the walk skipped straight past one, &lt;code&gt;value.js&lt;/code&gt;, deleted it, and silently dropped one function from lodash's namespace. Comparing the output against Node caught it, and it is a test now.&lt;/p&gt;

&lt;h2&gt;
  
  
  The numbers against esbuild
&lt;/h2&gt;

&lt;p&gt;A database is a nice thing to inspect and a slow thing to boot, so rowpack has two ways to run a bundle.&lt;/p&gt;

&lt;p&gt;The first is the SQL engine: the page ships SQLite compiled to WebAssembly, fetches everything the entry needs with one recursive query, and links modules at runtime. The second is a static linker that works like &lt;code&gt;ld&lt;/code&gt;: it lays every module out in evaluation order in one scope, gives every name a unique identifier, and patches each relocation to point straight at the binding it names. What comes out is a flat script, which is what you would ship.&lt;/p&gt;

&lt;p&gt;All numbers are medians on an Apple M5 Pro, Node 26, esbuild 0.28 and Chrome 156. Both outputs are minified with esbuild's minifier, so the size comparison measures the bundling alone.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Build time (warm)&lt;/th&gt;
&lt;th&gt;rowpack&lt;/th&gt;
&lt;th&gt;esbuild&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;TodoMVC&lt;/td&gt;
&lt;td&gt;32 ms&lt;/td&gt;
&lt;td&gt;14 ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;lodash-es, 5 functions&lt;/td&gt;
&lt;td&gt;129 ms&lt;/td&gt;
&lt;td&gt;64 ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;lodash-es, everything&lt;/td&gt;
&lt;td&gt;120 ms&lt;/td&gt;
&lt;td&gt;59 ms&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Size, minified and brotli&lt;/th&gt;
&lt;th&gt;rowpack static&lt;/th&gt;
&lt;th&gt;esbuild&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;TodoMVC&lt;/td&gt;
&lt;td&gt;243.0 KB&lt;/td&gt;
&lt;td&gt;240.6 KB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;lodash-es, 5 functions&lt;/td&gt;
&lt;td&gt;8.3 KB&lt;/td&gt;
&lt;td&gt;8.5 KB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;lodash-es, everything&lt;/td&gt;
&lt;td&gt;30.6 KB&lt;/td&gt;
&lt;td&gt;30.2 KB&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Chrome, app ready&lt;/th&gt;
&lt;th&gt;esbuild&lt;/th&gt;
&lt;th&gt;rowpack static&lt;/th&gt;
&lt;th&gt;rowpack SQL engine&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;TodoMVC&lt;/td&gt;
&lt;td&gt;26 ms&lt;/td&gt;
&lt;td&gt;29 ms&lt;/td&gt;
&lt;td&gt;63 ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;lodash-es, 5 functions&lt;/td&gt;
&lt;td&gt;10 ms&lt;/td&gt;
&lt;td&gt;9 ms&lt;/td&gt;
&lt;td&gt;40 ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;lodash-es, everything&lt;/td&gt;
&lt;td&gt;19 ms&lt;/td&gt;
&lt;td&gt;21 ms&lt;/td&gt;
&lt;td&gt;59 ms&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The static output lands within a few percent of esbuild on size and startup. esbuild still builds about twice as fast, which is fair: it is a production tool written in Go, and rowpack is a toy written in JavaScript that talks to SQLite. The SQL engine adds 30 to 40 ms, and about half of that is booting 688 KB of SQLite before the first module is linked.&lt;/p&gt;

&lt;p&gt;For scale, the prototype took 0.17 seconds to build TodoMVC and 2.4 to 2.8 seconds for lodash-es on the same laptop, with no tree-shaking and an 8 MB database.&lt;/p&gt;

&lt;h2&gt;
  
  
  distcc for JavaScript
&lt;/h2&gt;

&lt;p&gt;The next question was obvious, at least to me: can I spread the build across more machines? In the C world, &lt;a href="https://www.distcc.org/" rel="noopener noreferrer"&gt;distcc&lt;/a&gt; ships each file to another machine, compiles it there and sends the result back. Compiling one module in rowpack is also a pure function, from source text to rows, so the same trick should work with AWS Lambda.&lt;/p&gt;

&lt;p&gt;We put the same compile code behind three front doors:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;A Lambda function&lt;/strong&gt; (what the docs now call an &lt;a href="https://docs.aws.amazon.com/lambda/latest/dg/lambda-functions-chapter.html" rel="noopener noreferrer"&gt;Event Function&lt;/a&gt;), called through the Invoke API: one request per execution environment, scaled out by Lambda&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A &lt;a href="https://docs.aws.amazon.com/lambda/latest/dg/web-functions.html" rel="noopener noreferrer"&gt;Lambda Web Function&lt;/a&gt; with one thread&lt;/strong&gt;: an HTTPS endpoint, where one environment serves many requests at once&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A Lambda Web Function with a worker thread per vCPU&lt;/strong&gt;: the same, with the CPU work spread across threads&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fyv1zkn6zv1rm2ndg2kfz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fyv1zkn6zv1rm2ndg2kfz.png" alt="The laptop runs the graph walk and SQLite, and sends module sources to three backends in eu-west-1: a Lambda function through the Invoke API, and two Lambda Web Functions over HTTPS with SigV4" width="800" height="448"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The laptop walks the import graph, ships the source of each module it finds, and stores the rows that come back. We built three apps sending anywhere from 1 to 512 requests at the same time, with 1 or 25 modules in each request, and checked that every remote build was byte-identical to the local one. Best warm times:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;App&lt;/th&gt;
&lt;th&gt;Local&lt;/th&gt;
&lt;th&gt;Lambda function&lt;/th&gt;
&lt;th&gt;Web Function, 1 thread&lt;/th&gt;
&lt;th&gt;Web Function, threads&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;lodash-es, 641 modules&lt;/td&gt;
&lt;td&gt;112 ms&lt;/td&gt;
&lt;td&gt;863 ms&lt;/td&gt;
&lt;td&gt;836 ms&lt;/td&gt;
&lt;td&gt;885 ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;date-fns, 827 modules&lt;/td&gt;
&lt;td&gt;279 ms&lt;/td&gt;
&lt;td&gt;1,087 ms&lt;/td&gt;
&lt;td&gt;1,016 ms&lt;/td&gt;
&lt;td&gt;1,011 ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;three.js, 388 modules&lt;/td&gt;
&lt;td&gt;179 ms&lt;/td&gt;
&lt;td&gt;1,453 ms&lt;/td&gt;
&lt;td&gt;1,314 ms&lt;/td&gt;
&lt;td&gt;1,423 ms&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Distributed rowpack is four to eight times slower than rowpack on a laptop! The reason is the shape of the problem. The bundler only learns which modules a file imports after compiling it, so it discovers the graph one level at a time, and every level costs a round trip to the cloud plus the compile, 100 ms or so. These apps are six to eight levels deep, and that floor stays put however many functions you add: past 8 to 32 requests at once, the curves go flat. Batching mattered far more: one module per request took up to five seconds, 25 per request brought it under one.&lt;/p&gt;

&lt;p&gt;One result fooled me for a while. The first runs showed every Web Function request taking about 230 ms, against 70 ms for the Lambda function. It looked like a service difference. It was my client: I had set &lt;code&gt;pipelining: 0&lt;/code&gt; in the HTTP library, which quietly turns off keep-alive, so every request paid for a new TLS handshake. With connections reused, both sit around 50 ms. Measure your client before you blame the service!&lt;/p&gt;

&lt;p&gt;The two kinds of function are different tools, and this benchmark suits one of them. A compile request is a short burst of pure CPU, and a Lambda function, with one request per environment, scales out to a burst like that with no configuration. A Web Function is built for many concurrent requests in one environment: an HTTP server you write as usual, streaming responses, and &lt;a href="https://aws.amazon.com/lambda/pricing/" rel="noopener noreferrer"&gt;pricing&lt;/a&gt; that charges CPU only while it is active (plus memory while an environment exists), so a request that mostly waits barely touches the CPU bill. So we built something that needs exactly that.&lt;/p&gt;

&lt;h2&gt;
  
  
  A website with no JavaScript until you visit it
&lt;/h2&gt;

&lt;p&gt;This is where the experiment stops having any excuse to be useful, and that is why I like it. What if a website did not have its JavaScript bundled at all, until the first person opened it?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fuxzgsco7hqasmq3fnyar.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fuxzgsco7hqasmq3fnyar.png" alt="The browser calls CloudFront. CloudFront forwards the page request to an IamAuth Lambda Web Function, signed with origin access control, and serves bundles from S3. The Web Function sends cache misses to a Lambda function and stores object files and bundles in S3" width="800" height="473"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The first visitor's request reaches Amazon CloudFront, which forwards it to a Lambda Web Function. The function:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;hashes the source of every module of the app it ships with&lt;/li&gt;
&lt;li&gt;looks in Amazon S3 for an object file with that hash&lt;/li&gt;
&lt;li&gt;sends the modules S3 does not have to the compile function, in batches, and stores what comes back&lt;/li&gt;
&lt;li&gt;links the bundle with SQL, uploads it to S3, and finishes the page&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;While that happens, the response streams to the browser: "No JavaScript exists for this page yet", then a progress bar as modules compile. When the bundle is ready, the page loads it. Everyone after that gets the page and the bundle from CloudFront.&lt;/p&gt;

&lt;p&gt;The object files are the piece that makes it more than a toy. Each compiled module becomes its own tiny SQLite database, about 1 KB gzipped, and the bundler links them with SQLite's &lt;code&gt;ATTACH DATABASE&lt;/code&gt; and one &lt;code&gt;INSERT ... SELECT&lt;/code&gt; per table, the same way a linker combines &lt;code&gt;.o&lt;/code&gt; files. Named by the hash of their source, they form a build cache in S3, like the ones real build tools use.&lt;/p&gt;

&lt;p&gt;The numbers, from the deployed site:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;First visit, empty cache:&lt;/strong&gt; 388 modules compiled on Lambda in 42 requests, built in 2.25 seconds&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;After a one-line change to the app:&lt;/strong&gt; 1 module compiled, 387 reused from S3, built in 1.2 seconds&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Every visit after that:&lt;/strong&gt; about 0.2 seconds, from CloudFront&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If several people open the page at the same moment, only one build runs. The function takes a lock with an S3 conditional write (&lt;code&gt;If-None-Match: *&lt;/code&gt;), which only succeeds if the object does not exist yet, and the others see "another visitor started this build" until the result is ready. I tested it with three simultaneous first visits: one build, three finished pages.&lt;/p&gt;

&lt;p&gt;The page itself is a three.js scene with one box per module of its own bundle, sized by the bytes it shipped and read from the bundle database. The site draws its own build. &lt;a href="https://d71lsc3tuq15d.cloudfront.net" rel="noopener noreferrer"&gt;Open it yourself&lt;/a&gt;: unless you are the first visitor since the last change, you will get the cached version in about 0.2 seconds, which is the point.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ffbjgeo9ihd1j49b7vjb1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ffbjgeo9ihd1j49b7vjb1.png" alt="A three.js scene of 256 boxes, one per module of the bundle, with a note saying the page was built on first visit: 388 modules compiled on Lambda in 42 requests, built in 2,251 ms" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is the shape Web Functions are made for: one long request that streams and spends most of its time waiting on S3 and Lambda.&lt;/p&gt;

&lt;p&gt;Only the page is public. The function accepts requests from this CloudFront distribution alone, the bucket is private, and the function can only build the one app it ships with, whatever the request says.&lt;/p&gt;

&lt;h2&gt;
  
  
  What did I learn?
&lt;/h2&gt;

&lt;p&gt;Unfortunately, our findings do not show that bundling into SQLite is useful in the real world. esbuild is faster to build, and once you link the output into a flat script, the database is gone anyway. What the experiment does show is a different way of looking at the problem:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;A bundler is a linker, and a linker is a set of queries.&lt;/strong&gt; Writing ResolveExport and tree-shaking as recursive SQL made them shorter and easier to check than the code I would have written by hand.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A build artifact you can query is a debugging tool.&lt;/strong&gt; Asking "why is this module in my bundle?" is one &lt;code&gt;SELECT&lt;/code&gt; away.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Object files are a cache by construction.&lt;/strong&gt; Content-addressed per-module output is what made the second visit fast, and it would work the same way in any build system.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Distribution is limited by the shape of the work.&lt;/strong&gt; The depth of the import graph set the floor, whatever the number of functions. Before you spread work across many machines, measure how deep your dependency chain is.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Different serverless tools fit different shapes.&lt;/strong&gt; Short CPU bursts suited one request per environment; a long, streaming, mostly waiting request suited a Web Function.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And about working with an agent: the vibe-coded prototype was impressive and mostly wrong, and steering is what turned it into something that works. Write tests against a reference, read the diffs, ask why, push back, and measure before you believe anything. Kiro Crew wrote most of the code. Knowing how webpack handles imports, deciding what to test and noticing when a number smelled wrong was still my job.&lt;/p&gt;

&lt;p&gt;The code is on GitHub at &lt;a href="https://github.com/edodusi/rowpack" rel="noopener noreferrer"&gt;edodusi/rowpack&lt;/a&gt;, MIT licensed, with the benchmarks, the AWS deployment (CDK, with a teardown script) and the architecture diagrams.&lt;/p&gt;

&lt;p&gt;Your bundle can be a database. It just shouldn't have to boot one.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>sqlite</category>
      <category>aws</category>
      <category>serverless</category>
    </item>
    <item>
      <title>LLMs are compressors. So I chatted with gzip</title>
      <dc:creator>Edoardo Dusi</dc:creator>
      <pubDate>Mon, 16 Nov 2026 15:49:31 +0000</pubDate>
      <link>https://dev.to/aws/llms-are-compressors-so-i-chatted-with-gzip-12ji</link>
      <guid>https://dev.to/aws/llms-are-compressors-so-i-chatted-with-gzip-12ji</guid>
      <description>&lt;p&gt;I had a conversation with a chatbot this morning:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;› who is edo?
● a senior developer advocate at aws, turning hard tech into talks developers remember.

› what talk did edo give at oredev?
● bundlers: a deep dive into modern javascript build tools, nov 2025; honey, i shrunk
  the bits: how modern http compression works, nov 2025.

› what is the capital of italy?
● i don't know. that question surprises me too much.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;First answer is correct, second is correct, third is an honest refusal. Nothing special for a chatbot, right? Except that this one has no neural network, no GPU and no weights. Every letter of every answer was chosen by &lt;strong&gt;gzip&lt;/strong&gt; (except the refusal, I'll get to that). At each step it tries every possible next letter and keeps the one that compresses smallest. The same DEFLATE algorithm that compresses the HTTP responses of the page you're reading.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fy04z9xy4d0u8fbv22zu4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fy04z9xy4d0u8fbv22zu4.png" alt="The gzip chat page in dark mode: a header that says model gzip, parameters 0, and four questions with their answers, the last one a refusal" width="800" height="729"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can &lt;a href="https://d2v8qi14yayt65.cloudfront.net" rel="noopener noreferrer"&gt;try it yourself&lt;/a&gt;: click a question, then switch to &lt;em&gt;untrained&lt;/em&gt; to see what gzip writes with no data. But to understand why this apparently silly experiment (not my original idea, BTW) works at all, we have to talk about what &lt;em&gt;compressing&lt;/em&gt; really means.&lt;/p&gt;

&lt;p&gt;What's in this article:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;why compressing and predicting are the same job&lt;/li&gt;
&lt;li&gt;what gzip "predicts", and how to make it write&lt;/li&gt;
&lt;li&gt;what it took to turn it into a chat, and where it breaks&lt;/li&gt;
&lt;li&gt;why, in the end, the code around the model does most of the work.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Oh, about the POC itself, I built it with &lt;a href="https://github.com/kirodotdev/KiroCrew" rel="noopener noreferrer"&gt;Kiro Crew&lt;/a&gt;, an AI agent that wrote the code while I steered the design, so when I say "we" below, that's the two of us.&lt;/p&gt;

&lt;h2&gt;
  
  
  LLMs are compressors
&lt;/h2&gt;

&lt;p&gt;In 2023 a team at &lt;strong&gt;Google DeepMind&lt;/strong&gt; published a paper whose title is also its thesis: &lt;a href="https://arxiv.org/abs/2309.10668" rel="noopener noreferrer"&gt;Language Modeling Is Compression&lt;/a&gt;. They took 1 GB of English Wikipedia and compressed it with classic tools and with language models.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;gzip&lt;/em&gt;, given the whole file at once, shrinks it to 32.3% of its size. But a language model can only read a few kilobytes at a time, so for a like-for-like test they also cut the file into 2 KB pieces, and on those pieces gzip only gets to 48.1% (each piece starts with no context, so gzip has less to copy).&lt;/p&gt;

&lt;p&gt;Chinchilla, a 70 billion parameter model, on the same 2 KB pieces, compressed the same file to &lt;strong&gt;8.3%&lt;/strong&gt; of its size. About &lt;em&gt;six times better than gzip&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;To be fair, if you count the model itself as part of the compressed file (the receiver needs it to decompress), Chinchilla's rate becomes 14,008%. gzip's whole program is a few kilobytes. That's why LLMs are impractical compressors, at least for a 1 GB file.&lt;/p&gt;

&lt;p&gt;Then in section 3.4, the paper argues that if a predictor can be used as a compressor, then a compressor can also be used as a predictor...so they made gzip write text. After reading a page of Wikipedia, this is what it wrote:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;(0k5Ezatme,isbebmvcsouL(nxscbiife peu7vevwt parr,iswfommeeaa are nombban hm
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It's gibberish, and the authors explain why: their setup only looks one step ahead, which is biased for gzip, and "it's likely that looking multiple steps ahead would improve the results". That wasn't the purpose of their paper, so they stopped there.&lt;/p&gt;

&lt;p&gt;But it's the purpose of my article, so I tried.&lt;/p&gt;

&lt;p&gt;If you want the long, friendly version of the theory, Annie Sexton's &lt;a href="https://ngrok.com/blog/compression-is-prediction" rel="noopener noreferrer"&gt;Compression is prediction&lt;/a&gt; on the ngrok blog is a great read. This is the short version.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why compressing means predicting
&lt;/h2&gt;

&lt;p&gt;Think about your phone keyboard. I want to write "see you tomorrow", and it suggests "see", "you" and "tomorrow", one tap each: fourteen letters, three taps. Now give me a phone whose keyboard learned Italian, and while I type "home" it suggests "ho", "hai", "hanno". All wrong, so I type every letter by hand. The guesser changed, so the message became more expensive.&lt;/p&gt;

&lt;p&gt;Now imagine the person receiving my message has exactly the same keyboard. When the guess is right, I don't send the word at all, I send "yes, take your guess". Only when the guess is wrong do I need to send the correction. &lt;strong&gt;You only send what the receiver can't guess.&lt;/strong&gt; That's compression! Every compressor works like this: the same guesser is on both sides, and only the misses must travel.&lt;/p&gt;

&lt;p&gt;This isn't a metaphor I made up.&lt;/p&gt;

&lt;p&gt;In 1951 Claude Shannon ran exactly this game in &lt;a href="https://archive.org/details/bstj30-1-50" rel="noopener noreferrer"&gt;Prediction and Entropy of Printed English&lt;/a&gt;. He asked a person to guess a phrase letter by letter, and wrote a dash every time they got it right on the first try:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;THE ROOM WAS NOT VERY LIGHT A SMALL OBLONG
----ROO------NOT-V-----I------SM----OBL---
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;On the full passage (where spaces count as letters too), 89 letters out of 129 were dashes. Shannon's point was that the second line contains the same information as the first. If you have an &lt;em&gt;identical twin&lt;/em&gt; of the person who guessed, the twin can rebuild the sentence from the dashes alone.&lt;/p&gt;

&lt;p&gt;The price of a letter is its &lt;strong&gt;surprise&lt;/strong&gt;. A guess the model is sure about costs almost nothing, a surprise is expensive. In bits, a symbol you expected with probability p costs &lt;code&gt;-log2(p)&lt;/code&gt;: a coin flip is 1 bit, a sure thing is 0. With this game Shannon estimated that ordinary English carries something like one bit per letter, instead of the 4.7 bits of a random letter.&lt;/p&gt;

&lt;p&gt;So a compressor is exactly as good as its guesses. Take one sentence and three different guessers:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;"To be or not to be, that is the question."&lt;/th&gt;
&lt;th&gt;Size&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Plain text, 41 bytes&lt;/td&gt;
&lt;td&gt;328 bits&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;DEFLATE, the algorithm inside gzip&lt;/td&gt;
&lt;td&gt;320 bits&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A small LLM (Qwen2.5-0.5B, about 1 GB of weights) on both sides&lt;/td&gt;
&lt;td&gt;30 bits&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The LLM has read Shakespeare, so after "to be" almost nothing is a surprise. gzip has read nothing, so it saves one byte (BTW a &lt;code&gt;.gz&lt;/code&gt; file, with its 18 bytes of header, ends up bigger than the text).&lt;/p&gt;

&lt;p&gt;This is a demo I ran on stage. For every token, the model lists its guesses, and the sender only notes where the real token was in that list: rank 1 means the first guess was right. Only those ranks travel, and the receiver runs the same model, picks the guess at each rank, and rebuilds the sentence byte for byte. Ranks are just the easy way to see it: the 30 bits in the table is what a real coder (arithmetic coding) pays with the model's probabilities, about &lt;code&gt;-log2(p)&lt;/code&gt; per token, so a confident guess costs a fraction of a bit.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9mi6eqh4s5lb11lbiyha.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9mi6eqh4s5lb11lbiyha.gif" alt="A terminal running Qwen2.5-0.5B on &amp;quot;To be or not to be, that is the question.&amp;quot;: each token gets a rank and a cost in bits, &amp;quot;To&amp;quot;, &amp;quot;be&amp;quot; and &amp;quot;or&amp;quot; are expensive, almost everything after is rank 1 and nearly free, the ranks 40 4 97 1 1 1 2 1 1 1 1 2 travel, and the receiver rebuilds the sentence byte for byte" width="800" height="650"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;"To", "be" and "or" cost 24 of the 30 bits, because until then the model doesn't know it's Shakespeare. Everything after is a first guess and almost free. (The "gzip 456 bits" on screen is the &lt;code&gt;.gz&lt;/code&gt; file made by Python, header included. Python's zlib gets the stream to 39 bytes, one less than Node's.) Let's look at what gzip guesses with.&lt;/p&gt;

&lt;h2&gt;
  
  
  gzip's model is its own past
&lt;/h2&gt;

&lt;p&gt;DEFLATE is two algorithms stacked. The first, &lt;strong&gt;LZ77&lt;/strong&gt;, replaces repeated text with a pointer: "copy 12 bytes from 40 bytes back". The second, Huffman coding, gives shorter codes to the things that show up more often. What matters here is the first one: text that repeats is cheap, text that's new is expensive.&lt;/p&gt;

&lt;p&gt;Oh, and gzip can only look 32 KB back, that's its whole context window.&lt;/p&gt;

&lt;p&gt;So gzip predicts exactly one thing: that the text will repeat what it has already seen. On a long Wikipedia dump that's a decent bet, because a lot of patterns repeat. On one line of Shakespeare there's nothing to copy, so the bet loses.&lt;/p&gt;

&lt;h2&gt;
  
  
  Making gzip write
&lt;/h2&gt;

&lt;p&gt;If gzip's guess is "whatever compresses best", we can ask it to write with a simple loop. Take the text so far, add every possible next character, compress each version, and keep the one that came out smallest. That's the character gzip "expected". Then repeat. In an LLM this is called &lt;em&gt;greedy decoding&lt;/em&gt;, at temperature 0.&lt;/p&gt;

&lt;p&gt;We never touch gzip's code, the only question we ask it is "how many bytes is this?"&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// src/engine.ts (simplified)&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;zlib&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="s1"&gt;'node:zlib'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="no"&gt;ALPHABET&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"abcdefghijklmnopqrstuvwxyz .,':;0123456789\n"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// The only thing we ever ask gzip&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;size&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;dictionary&lt;/span&gt;&lt;span class="o"&gt;?:&lt;/span&gt; &lt;span class="nc"&gt;Buffer&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;
  &lt;span class="n"&gt;zlib&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;deflateRawSync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;level&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;9&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;dictionary&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;length&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// The next character gzip "expects": the one that keeps the output smallest&lt;/span&gt;
&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;nextChar&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;dictionary&lt;/span&gt;&lt;span class="o"&gt;?:&lt;/span&gt; &lt;span class="nc"&gt;Buffer&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="n"&gt;best&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="no"&gt;ALPHABET&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="n"&gt;bestSize&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;Infinity&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;c&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="no"&gt;ALPHABET&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;size&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;text&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;dictionary&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="n"&gt;bestSize&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;best&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;bestSize&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;best&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's the naive version, and if you run it on the sentence about the cat below, it writes "mat" and then "aaaa" forever. The talk version of this demo did the same at first. The reason is that sizes come in whole bytes, so a preference of a few bits disappears, all 43 characters tie, and the first one in the alphabet wins. The fix has two parts, and only ever uses sizes. When characters tie, the real engine continues each one for 4 more characters and keeps the one whose continuation compresses best. This is the paper's "looking multiple steps ahead". To compare those continuations it has to see differences smaller than a byte. DEFLATE writes bits but rounds the output up to whole bytes, so a difference of a few bits usually doesn't show. Adding filler of different lengths moves where that rounding falls, so the engine compresses each continuation 16 times with a different filler, and the sum shows the small differences.&lt;/p&gt;

&lt;p&gt;This is untrained gzip, with no data and nothing but the text you type:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F6g6cvzzjjd3rohrwb8cx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F6g6cvzzjjd3rohrwb8cx.png" alt="The untrained mode of gzip chat: the cat sentence continued by copying, the Hamlet line looping on itself, and xyz turning into a row of a" width="800" height="729"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;"the cat sat on the mat. the dog sat on the log. the cat sat on the " becomes "&lt;strong&gt;mat. the dog sat on the log. the cat sat&lt;/strong&gt;". It copies.&lt;/li&gt;
&lt;li&gt;"to be or not to be, that is the " becomes "&lt;strong&gt;or not to be, that is the or not to be&lt;/strong&gt;". It loops, because the cheapest thing to write is a copy of what it just wrote.&lt;/li&gt;
&lt;li&gt;"xyz" becomes "&lt;strong&gt;aaaaaaaa&lt;/strong&gt;". Nothing to copy, no preference.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So gzip can write, but only what it has already read. Let's give it something to read!&lt;/p&gt;

&lt;h2&gt;
  
  
  Training gzip
&lt;/h2&gt;

&lt;p&gt;zlib has a feature called the &lt;strong&gt;preset dictionary&lt;/strong&gt;: text that gzip reads before it starts compressing, as if it had already seen it. (Strictly speaking it's a DEFLATE feature: the &lt;code&gt;.gz&lt;/code&gt; file format has no room for a dictionary, so the code calls raw DEFLATE.) Whatever is in the dictionary becomes cheap to copy. That's gzip's "training data", and like its memory, it's capped at 32 KB.&lt;/p&gt;

&lt;p&gt;I first did this for a talk. I gave gzip the talk's own notes plus a few questions and answers, and let the room ask it things. Highlight of the talk, if you ask me.&lt;/p&gt;

&lt;p&gt;The trick that turns completion into a chat is the format. If the dictionary is full of lines like &lt;code&gt;q: who is edo? a: a senior developer advocate...&lt;/code&gt;, and I give gzip &lt;code&gt;q: &amp;lt;your question&amp;gt;? a:&lt;/code&gt;, the cheapest continuation is an answer copied from a line that looks like yours. That's a chat template, the same trick as giving a base LLM a few example questions and answers in its prompt.&lt;/p&gt;

&lt;p&gt;It also hallucinates, with zero parameters. Ask it something it doesn't know, and it confidently copies the answer of whatever line looks closest.&lt;/p&gt;

&lt;h2&gt;
  
  
  RAG, with gzip only
&lt;/h2&gt;

&lt;p&gt;In the demo, the knowledge comes from my website: 477 questions sharing 104 answers, 26 KB. The answers are sentences from the site, lightly shortened (apart from a few about the chat itself), and a script turns the lists of talks and articles into pairs. The questions, and the many ways to word each one, were written by Kiro Crew. So yes, an LLM wrote gzip's training data.&lt;/p&gt;

&lt;p&gt;To answer, gzip first has to find the right pair. The idea is old and lovely: two texts that share a lot cost little more to compress together than apart. Compare one question with two stored ones:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;"which city is edo in?" with...&lt;/th&gt;
&lt;th&gt;Alone&lt;/th&gt;
&lt;th&gt;Together&lt;/th&gt;
&lt;th&gt;Extra bytes&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;"which city does edo live in?"&lt;/td&gt;
&lt;td&gt;26 + 33&lt;/td&gt;
&lt;td&gt;40&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;7&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;"what is the schema tax?"&lt;/td&gt;
&lt;td&gt;26 + 28&lt;/td&gt;
&lt;td&gt;48&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;20&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The first pair shares "which city ... edo ... in?", so gzip copies those words and adding the question costs almost nothing. Turn that into a number between 0 and 1 (the size together, minus the smaller one alone, divided by the bigger one) and you get the &lt;a href="https://en.wikipedia.org/wiki/Normalized_compression_distance" rel="noopener noreferrer"&gt;normalized compression distance&lt;/a&gt;: close to 0 means the same text, close to 1 means nothing in common.&lt;/p&gt;

&lt;p&gt;That number also gives gzip a way to say no. If even the closest stored question is too far away (a distance above 0.45), it doesn't copy anything. It answers "i don't know. that question surprises me too much". If your question is too surprising, gzip has nothing to copy, and my code says so with a sentence I wrote.&lt;/p&gt;

&lt;p&gt;Then it writes, with only the closest pairs as its dictionary. How many? We measured it on the 15 test questions that have an answer, with the refusal turned off, and fewer pairs work better:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;What gzip reads while writing&lt;/th&gt;
&lt;th&gt;Right answers (of 15)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;the closest pair&lt;/td&gt;
&lt;td&gt;10&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;the 3 closest pairs&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;11&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;the 10 closest&lt;/td&gt;
&lt;td&gt;8&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;the 30 closest&lt;/td&gt;
&lt;td&gt;6&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;all 477, closest last&lt;/td&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;all 477, no retrieval&lt;/td&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;(Written out as pairs, all 477 take 54 KB, so in the last two rows gzip only sees the last 32 KB.)&lt;/p&gt;

&lt;p&gt;Every extra pair is one more place to copy from by mistake. A nice side effect: retrieval also removes the 32 KB limit, because gzip only ever reads a few hundred bytes per answer.&lt;/p&gt;

&lt;p&gt;How good is it? We scored it on 20 questions written before scoring and never added to the data. It answered 10 of the 15 it had an answer for (the refusal costs one right answer, the MCP one), and refused all 5 it had no answer for, like the president of Italy or my email address. It's a demo number, not a benchmark, before you quote it.&lt;/p&gt;

&lt;p&gt;The failures are more interesting than the score.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F4o4jzyjbwnajf97649hp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F4o4jzyjbwnajf97649hp.png" alt="gzip chat answering &amp;quot;does edo have kids?&amp;quot; correctly, and &amp;quot;does edo have offspring?&amp;quot; with the description of the podcast" width="800" height="729"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;"does edo have kids?" works, because someone wrote "kids" down. To gzip, "does edo have offspring?" is exactly as far from "does edo have a podcast?" as from "does edo have kids?" (eight stored questions tie). The podcast one comes first in the file, so I get my podcast described to me. gzip matches &lt;strong&gt;bytes&lt;/strong&gt;, not &lt;strong&gt;meaning&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The second kind is subtler: even when retrieval finds the right question, gzip can copy the wrong answer, when two answers cost exactly the same bytes and the alphabet breaks the tie.&lt;/p&gt;

&lt;h2&gt;
  
  
  How it runs
&lt;/h2&gt;

&lt;p&gt;gzip chat is one Node.js HTTP server with no dependencies, deployed as an &lt;a href="https://docs.aws.amazon.com/lambda/latest/dg/web-functions.html" rel="noopener noreferrer"&gt;AWS Lambda Web Function&lt;/a&gt; behind Amazon CloudFront.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fgn0c7wnp6ocz8vqh4bj4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fgn0c7wnp6ocz8vqh4bj4.png" alt="The browser calls Amazon CloudFront, which caches answers. The first time a question is asked, CloudFront forwards it, signed with SigV4, to the gzip-chat Lambda Web Function in eu-west-1, which holds zlib and 26 KB of Q&amp;amp;A" width="800" height="302"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;gzip is deterministic: the same question always gets the same answer. So CloudFront caches every answer for a day (the question travels in the URL, so it's the cache key), and only the first person to ask something new wakes the function. A new answer takes from a few milliseconds to under two seconds of CPU, and the function scales to zero when nobody is asking.&lt;/p&gt;

&lt;p&gt;One confession: the letter-by-letter typing on the page is theatre. The server sends the whole answer at once, and the page animates it so you can watch it like a chat. In the next version I will add some "discombobulating..." somewhere.&lt;/p&gt;

&lt;p&gt;The code is on &lt;a href="https://github.com/edodusi/gzip-chat" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;, with the eval (&lt;code&gt;npm run eval&lt;/code&gt;), a one-command deploy and a teardown script.&lt;/p&gt;

&lt;h2&gt;
  
  
  So, is gzip an LLM?
&lt;/h2&gt;

&lt;p&gt;NO!&lt;/p&gt;

&lt;p&gt;gzip makes almost every choice: every letter of an answer, which stored question is closest, when an answer ends. I wrote the rules and the data: the knowledge file, the &lt;code&gt;q: ... a:&lt;/code&gt; template, the 0.45 cutoff, the 3 pairs, the refusal sentence. When it answers right, it has almost always copied a stored answer word for word. It's a search engine with a copy machine attached. A RAG in miniature.&lt;/p&gt;

&lt;p&gt;In my opinion that's still a good way to understand how an LLM chatbot works, just in reverse. An LLM chatbot has the same parts: a model that predicts the next token, and around it the chat template, the retrieval, the system prompt and the stop rules, code that people wrote. We call this the &lt;strong&gt;harness&lt;/strong&gt;. In gzip chat the harness does almost all the work, because the model can only copy.&lt;/p&gt;

&lt;p&gt;An LLM learned from billions of sentences that "kids" and "offspring" show up in the same places, so it knows they mean the same thing, and nobody has to write down every wording or decide for it when to say "i don't know". gzip only remembers bytes, so every way to say something has to be written down for it. That's what all those parameters buy you: a thin harness. And it's why an LLM had to write gzip's "training data".&lt;/p&gt;

&lt;p&gt;Both of them only send you what you couldn't guess. The better the guesser, the less the rest of the system has to do.&lt;/p&gt;

</description>
      <category>llm</category>
      <category>compression</category>
      <category>aws</category>
      <category>serverless</category>
    </item>
    <item>
      <title>Is stateless MCP just REST? I ran 180 tests to find out</title>
      <dc:creator>Edoardo Dusi</dc:creator>
      <pubDate>Mon, 26 Oct 2026 16:22:52 +0000</pubDate>
      <link>https://dev.to/aws/is-stateless-mcp-just-rest-i-ran-180-tests-to-find-out-5dib</link>
      <guid>https://dev.to/aws/is-stateless-mcp-just-rest-i-ran-180-tests-to-find-out-5dib</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Update, 2026-11-03:&lt;/strong&gt; an earlier version of this post said REST reads its contract only once. That's wrong for this harness: Converse is stateless, so the REST contract is re-sent on every call, exactly like the MCP schemas. A reader, &lt;a href="https://dev.to/izgorodin/comment/3jfi4"&gt;izgorodin&lt;/a&gt;, spotted it and proposed a control experiment. I ran it, and the results are in the new section after Result 4. The 35% gap is real, but it comes from how dense the description is, not from where it sits.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In July 2026 the Model Context Protocol &lt;a href="https://blog.modelcontextprotocol.io/posts/2026-07-28/" rel="noopener noreferrer"&gt;dropped sessions&lt;/a&gt;. The handshake is gone, the &lt;code&gt;Mcp-Session-Id&lt;/code&gt; header is gone, and every request now stands on its own. Within a week the internet did what the internet does, compressing that change into a slogan: MCP is dead, REST won, it was always just REST with extra steps.&lt;/p&gt;

&lt;p&gt;In the &lt;a href="https://modelcontextprotocol.io/specification/2026-07-28/changelog" rel="noopener noreferrer"&gt;2026-07-28 MCP spec&lt;/a&gt;, &lt;code&gt;tools/list&lt;/code&gt; no longer varies per connection, and a server that needs cross-call state now mints an explicit handle and passes it back as an ordinary tool argument. In other words, a stateless MCP server is now a list of tool names with JSON schemas, presented to the model, which emits a tool call that the host dispatches.&lt;/p&gt;

&lt;p&gt;Say that out loud and the REST comparison writes itself. Maybe even the slogan. A REST API is &lt;em&gt;also&lt;/em&gt; stateless HTTP.&lt;/p&gt;

&lt;p&gt;I always loved that "computer scientist" has the word &lt;strong&gt;scientist&lt;/strong&gt; in it, so I want proof and measurements, even for silly slogans. I found no measurement, so I built one.&lt;/p&gt;

&lt;p&gt;I took a single backend and exposed it twice, once as a stateless MCP server and once as a plain REST API, handed both to the same agent with the same tasks, and recorded what changed across 180 runs. I'm surprised that the result is less dramatic than the slogan and actually more useful: on a small tool surface the two are a tie, and on a realistic one they diverge for one structural reason each.&lt;/p&gt;

&lt;p&gt;I'm not here to tell you "which protocol is better". But I will tell you that these two carry the &lt;strong&gt;same information in different shapes&lt;/strong&gt;. MCP puts the tool surface in front of the model as typed schemas. REST puts it there as a contract in prose, then leans on a single generic HTTP call. Both go out on every turn, so the difference is how many tokens each one spends saying the same thing, and it is measurable.&lt;/p&gt;

&lt;p&gt;I'm giving you the data, the harness, and a way to make a decision based on your case, not your mood.&lt;/p&gt;

&lt;h2&gt;
  
  
  The experiment
&lt;/h2&gt;

&lt;p&gt;I wanted any difference I measured to be the shape of the contract instead of the business logic. There is exactly one backend, a classic demo: a small store with products, inventory, orders and customers, that answers the same way every run.&lt;/p&gt;

&lt;p&gt;Two interfaces wrap that same backend over the same six operations:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;MCP&lt;/strong&gt; is modeled as native tool use on &lt;a href="https://docs.aws.amazon.com/bedrock/latest/userguide/conversation-inference.html" rel="noopener noreferrer"&gt;Amazon Bedrock's Converse API&lt;/a&gt;, because this is exactly the stateless MCP shape: the model receives tool names and JSON schemas every turn and emits a &lt;code&gt;toolUse&lt;/code&gt; block that the host dispatches&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;REST&lt;/strong&gt; gives the model one tool, &lt;code&gt;http_request&lt;/code&gt;, plus an OpenAPI-style contract in the system prompt. The model constructs the path itself. This interface also implements a real &lt;code&gt;ETag&lt;/code&gt; and &lt;code&gt;304 Not Modified&lt;/code&gt; cache, because conditional reads are the one thing REST can express that MCP tool use currently cannot&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I gave both the same set of tasks: a simple lookup, a two-hop (order to customer name), an aggregate across a customer's orders, a missing-information recovery (an order that does not exist), a conditional (can I order an out-of-stock item?), and a repeated read that I use to test caching.&lt;/p&gt;

&lt;p&gt;The setup:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Model: Claude Haiku 4.5 on Amazon Bedrock, &lt;code&gt;eu-central-1&lt;/code&gt;, temperature 0. I picked this small, fast model because it keeps the sandbox cost down, and a smaller model is the harder test: it is quicker to fumble a schema or burn tokens, so a difference between the two interfaces shows up instead of being hidden by a frontier model's reasoning&lt;/li&gt;
&lt;li&gt;Five trials per task per interface, so thirty runs each per condition&lt;/li&gt;
&lt;li&gt;Metrics per run: success, input and output tokens, latency, round-trips, tool calls, cache hits. A round-trip here is one model turn, so a task that makes a single tool call and then answers counts as two&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Result 1: on a small surface, it is a tie
&lt;/h2&gt;

&lt;p&gt;With six tools, the internet slogan seems to be correct!&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Six tools, five trials per task, thirty runs per interface.&lt;/em&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Metric&lt;/th&gt;
&lt;th&gt;MCP&lt;/th&gt;
&lt;th&gt;REST&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Success rate&lt;/td&gt;
&lt;td&gt;100%&lt;/td&gt;
&lt;td&gt;100%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Avg total tokens&lt;/td&gt;
&lt;td&gt;2,838&lt;/td&gt;
&lt;td&gt;2,867&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Avg input tokens&lt;/td&gt;
&lt;td&gt;2,705&lt;/td&gt;
&lt;td&gt;2,692&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Median latency&lt;/td&gt;
&lt;td&gt;2,116 ms&lt;/td&gt;
&lt;td&gt;2,070 ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Avg round-trips&lt;/td&gt;
&lt;td&gt;2.5&lt;/td&gt;
&lt;td&gt;2.5&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cache hits (304)&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;You can see we have the same correctness, number of round-trips, token counts and latency. If you have a handful of tools, the choice between a small MCP server and a small REST contract is just a matter of taste, not efficiency. But look at that &lt;code&gt;Cache hits&lt;/code&gt; column...I'll come back to it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Result 2: the schema tax is real, and it scales
&lt;/h2&gt;

&lt;p&gt;Then I changed the one thing I figured was about to matter: the API surface size. I ran the whole suite again with twenty-four extra endpoints, modeling a realistic store API with roughly thirty operations. On the MCP side those are &lt;em&gt;twenty-four more tool schemas&lt;/em&gt;. On the REST side they are &lt;em&gt;twenty-four more lines in the contract&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Let's see how that changed our bill:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Thirty tools, five trials per task, thirty runs per interface.&lt;/em&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Metric&lt;/th&gt;
&lt;th&gt;MCP&lt;/th&gt;
&lt;th&gt;REST&lt;/th&gt;
&lt;th&gt;Delta&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Success rate&lt;/td&gt;
&lt;td&gt;100%&lt;/td&gt;
&lt;td&gt;100%&lt;/td&gt;
&lt;td&gt;tie&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Avg total tokens&lt;/td&gt;
&lt;td&gt;6,558&lt;/td&gt;
&lt;td&gt;4,231&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;MCP +35%&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Avg input tokens&lt;/td&gt;
&lt;td&gt;6,406&lt;/td&gt;
&lt;td&gt;4,038&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;MCP +37%&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Median latency&lt;/td&gt;
&lt;td&gt;1,996 ms&lt;/td&gt;
&lt;td&gt;1,810 ms&lt;/td&gt;
&lt;td&gt;MCP +9%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Avg round-trips&lt;/td&gt;
&lt;td&gt;2.67&lt;/td&gt;
&lt;td&gt;2.67&lt;/td&gt;
&lt;td&gt;tie&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Again, same success rate and same round-trips, but &lt;strong&gt;35% more tokens&lt;/strong&gt;. The reason is simple: a stateless MCP server re-sends every tool schema on every turn, so the model pays for the full catalog every time, even if it doesn't use every tool. REST re-sends its contract every turn too, but a one-line contract entry costs about a third of a JSON tool schema, so it grows much more slowly.&lt;/p&gt;

&lt;p&gt;Per task, the gap is remarkable:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Task&lt;/th&gt;
&lt;th&gt;MCP input tokens&lt;/th&gt;
&lt;th&gt;REST input tokens&lt;/th&gt;
&lt;th&gt;MCP overhead&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;order_status&lt;/td&gt;
&lt;td&gt;4,673&lt;/td&gt;
&lt;td&gt;2,850&lt;/td&gt;
&lt;td&gt;+1,823&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;customer_total&lt;/td&gt;
&lt;td&gt;4,732&lt;/td&gt;
&lt;td&gt;2,910&lt;/td&gt;
&lt;td&gt;+1,822&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;missing_order&lt;/td&gt;
&lt;td&gt;4,647&lt;/td&gt;
&lt;td&gt;2,805&lt;/td&gt;
&lt;td&gt;+1,842&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;order_customer&lt;/td&gt;
&lt;td&gt;7,181&lt;/td&gt;
&lt;td&gt;4,500&lt;/td&gt;
&lt;td&gt;+2,681&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;repeat_read&lt;/td&gt;
&lt;td&gt;7,318&lt;/td&gt;
&lt;td&gt;4,687&lt;/td&gt;
&lt;td&gt;+2,631&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;stock_mech&lt;/td&gt;
&lt;td&gt;9,884&lt;/td&gt;
&lt;td&gt;6,475&lt;/td&gt;
&lt;td&gt;+3,409&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Roughly 1,800 extra input tokens for a one-call task, and more for multi-call tasks, because the schema tax is paid &lt;strong&gt;once per round-trip&lt;/strong&gt;. The more the agent has to go back to the tools, the more times it re-reads the whole catalog.&lt;/p&gt;

&lt;p&gt;To be fair, this is the worst case for MCP and the best case for REST. Prompt caching on the provider side, and filtering the tool list down to what a task plausibly needs, both cut this cost. But neither is free and neither is automatic, and the structural fact remains that MCP's token cost grows with surface size about three times faster than a terse REST contract's does.&lt;/p&gt;

&lt;p&gt;This is my measurement, so I invite you to test on your own setup and challenge my findings.&lt;/p&gt;

&lt;h2&gt;
  
  
  Result 3: where REST wins outright
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;repeat_read&lt;/code&gt; task asks the agent to read an order, report the total, then read it again to confirm it is unchanged. This is deliberate, to test caching.&lt;/p&gt;

&lt;p&gt;The REST agent read the order, got an &lt;code&gt;ETag&lt;/code&gt;, and on the second read sent &lt;code&gt;If-None-Match&lt;/code&gt; with that tag. The server answered &lt;code&gt;304 Not Modified&lt;/code&gt; with an empty body, and the agent reused the value it already had. Five cache hits in five trials. The MCP agent could not do this, because MCP tool use has no standard notion of a conditional read or a revalidation header. It called the tool again and paid for the full result a second time. No cache, baby!&lt;/p&gt;

&lt;p&gt;The boring and old HTTP protocol with its caching mechanisms, conditional requests and revalidation, easily beats the shiny new MCP protocol on re-reads, because when your agent calls a tool it always starts from scratch, even when reading multiple times data that rarely changes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Result 4: where MCP wins outright
&lt;/h2&gt;

&lt;p&gt;So far everything seems to be in favour of REST. I tried to build a scenario that should favour MCP.&lt;/p&gt;

&lt;p&gt;Picture a strict, unfamiliar API. A reporting endpoint whose region codes are &lt;code&gt;EUR&lt;/code&gt;, &lt;code&gt;NAM&lt;/code&gt; and &lt;code&gt;APC&lt;/code&gt;, not &lt;code&gt;EU&lt;/code&gt; or &lt;code&gt;Europe&lt;/code&gt; or &lt;code&gt;EMEA&lt;/code&gt;. Metric names you cannot guess from a description. A date format that must be exactly &lt;code&gt;YYYY-MM-DD&lt;/code&gt;. The kind of API an agent meets for the first time.&lt;/p&gt;

&lt;p&gt;MCP gives the model its normal typed tool schema: the enum values are correctly spelled, the format is declared, and the host validates the call before it is dispatched. REST gets what people actually write for a terse API: a contract that names the endpoint and the parameters but does not enumerate every valid value. The agent has to infer them. I asked both, in plain language, questions like "what was net revenue in Europe on 2026-10-20?"&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Strict API, one operation, six trials per task, thirty runs per interface.&lt;/em&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Metric&lt;/th&gt;
&lt;th&gt;MCP&lt;/th&gt;
&lt;th&gt;REST (terse contract)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Final success&lt;/td&gt;
&lt;td&gt;100%&lt;/td&gt;
&lt;td&gt;100%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;First-call success&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;100%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;0%&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Malformed calls&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;30 (one per task)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Avg tool calls&lt;/td&gt;
&lt;td&gt;1.0&lt;/td&gt;
&lt;td&gt;2.0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Avg round-trips&lt;/td&gt;
&lt;td&gt;2.0&lt;/td&gt;
&lt;td&gt;3.0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Avg total tokens&lt;/td&gt;
&lt;td&gt;1,841&lt;/td&gt;
&lt;td&gt;3,041 (&lt;strong&gt;+65%&lt;/strong&gt;)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Median latency&lt;/td&gt;
&lt;td&gt;1,720 ms&lt;/td&gt;
&lt;td&gt;3,006 ms (&lt;strong&gt;+75%&lt;/strong&gt;)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Both get there in the end, so this is not about MCP being "more correct." It is about getting it right the first time. The MCP agent mapped "Europe" to &lt;code&gt;EUR&lt;/code&gt; on the first call, every single run, because the schema told it the allowed values up front. The REST agent guessed &lt;code&gt;EU&lt;/code&gt; or &lt;code&gt;Europe&lt;/code&gt;, got a &lt;code&gt;400&lt;/code&gt;, read the error, and fixed it on the second call, every single run. That self-correction is impressive, but it costs an extra round-trip, 65% more tokens and nearly double the latency, every time.&lt;/p&gt;

&lt;p&gt;To be honest, I could make REST match MCP by pasting the full JSON schema, enums and all, into the contract. But that is exactly the per-turn token tax that made MCP lose Result 2. The schema has to live somewhere. MCP puts it in front of the model and pays for it every turn. A terse REST contract saves those tokens right up until the API is strict enough that the saving turns into a wrong guess. No free lunch, only a choice about where you spend.&lt;/p&gt;

&lt;h2&gt;
  
  
  Update: the control run
&lt;/h2&gt;

&lt;p&gt;After the post went out, &lt;a href="https://dev.to/izgorodin/comment/3jfi4"&gt;izgorodin&lt;/a&gt; read my results files more carefully than I did! The REST arm's input tokens &lt;strong&gt;&lt;em&gt;grow with every turn&lt;/em&gt;&lt;/strong&gt;, so the contract is not read once. Converse is stateless, my harness doesn't use prompt caching, and the system prompt goes out on every call exactly like the tool config. Both interfaces &lt;strong&gt;&lt;em&gt;pay for their description on every turn&lt;/em&gt;&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;So where does the 35% come from? izgorodin proposed the experiment that answers it: give REST the same thirty JSON schemas MCP gets, pasted into its contract. If its tokens land next to MCP, the gap is about the &lt;em&gt;format&lt;/em&gt; of the description, not the &lt;em&gt;protocol&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;I added that third arm and ran all three in the same session: 180 more runs, 100% success everywhere.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Average input tokens per run, five trials per task, thirty runs per arm.&lt;/em&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Surface&lt;/th&gt;
&lt;th&gt;MCP&lt;/th&gt;
&lt;th&gt;REST (terse)&lt;/th&gt;
&lt;th&gt;REST (with schemas)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;6 tools&lt;/td&gt;
&lt;td&gt;2,705&lt;/td&gt;
&lt;td&gt;2,692&lt;/td&gt;
&lt;td&gt;3,550&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;30 tools&lt;/td&gt;
&lt;td&gt;6,406&lt;/td&gt;
&lt;td&gt;4,038&lt;/td&gt;
&lt;td&gt;7,542&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The cleaner number is what the extra operations cost on every model call. Going from six to thirty operations adds:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Arm&lt;/th&gt;
&lt;th&gt;Extra input tokens per call&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;REST (terse contract lines)&lt;/td&gt;
&lt;td&gt;+422&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;MCP (tool schemas)&lt;/td&gt;
&lt;td&gt;+1,307&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;REST (same schemas in the contract)&lt;/td&gt;
&lt;td&gt;+1,384&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Same schemas, same cost. REST is even slightly more expensive, because its contract also carries the paths and the HTTP notes. Round-trips are identical, and both REST arms still get their five &lt;code&gt;304&lt;/code&gt;s.&lt;/p&gt;

&lt;p&gt;So the schema tax is real, and any interface pays it: it's the price of a dense description, charged on every turn. A JSON schema costs about three times a one-line contract entry, and that ratio is the whole 35%. It also turns Result 2 and Result 4 into one knob: how many tokens you spend describing your API on every call, and what you get back for them. A terse contract buys you cheap turns and wrong first guesses. A typed schema buys you first-call success at three times the price.&lt;/p&gt;

&lt;h2&gt;
  
  
  What this does not measure
&lt;/h2&gt;

&lt;p&gt;A benchmark you cannot poke holes in is a benchmark that is lying! Here are mine.&lt;/p&gt;

&lt;p&gt;This is a very controlled scenario. One model, one small domain, six tasks. There is no authentication, no streaming, no &lt;em&gt;human in the loop&lt;/em&gt;. The "wire bytes" I counted are a proxy, not a packet capture. Latency differences stayed inside the noise and were dominated by the model, not the protocol, so do not read the 9% as a protocol verdict.&lt;/p&gt;

&lt;p&gt;And to be very clear, this measures per-request efficiency, which is not why most people reach for MCP. MCP's actual value is the ecosystem. Write one server and any agent can use it, without a previous knowledge of the contract. That portability is real and this harness does not price it. REST's hidden cost is the opposite: every consumer writes and maintains its own client, based on a shared contract.&lt;/p&gt;

&lt;p&gt;Efficiency is one axis, but it's not the only one.&lt;/p&gt;

&lt;p&gt;There is also a safety axis, which this harness does not touch: a stateless, per-request boundary is easier to reason about than a long-lived session, with authorization checked per call and no sticky server-side state to ride. That deserves its own measurement, so I'm thinking of a follow-up here.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to decide
&lt;/h2&gt;

&lt;p&gt;Is stateless MCP just REST with extra steps? No.&lt;/p&gt;

&lt;p&gt;It is REST with no cache, but with a typed, self-describing discovery layer bolted on top. Batteries included. Which one you want depends on your specific scenario:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Small, stable, portable tool set&lt;/strong&gt; that you want many agents to reuse: MCP wins. The schema tax is small and the ecosystem payoff is real.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Strict or unfamiliar API&lt;/strong&gt; with non-obvious parameters: MCP wins again. Typed, validated discovery means the agent calls correctly on the first try instead of guessing, failing, and retrying.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Large, loose API with cache-heavy reads and a single consumer&lt;/strong&gt;: a cache-friendly REST contract is the better developer experience. You avoid the schema tax and you get &lt;code&gt;304&lt;/code&gt;s for free.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Somewhere in between&lt;/strong&gt;: measure it. That is the whole point of the harness.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There is no winner-take-all. It is a trade-off about how much you spend describing your API, and what you get back for it, and now I hope it is a trade-off you can put some numbers on.&lt;/p&gt;

&lt;h2&gt;
  
  
  Run it yourself
&lt;/h2&gt;

&lt;p&gt;The full harness is on GitHub: &lt;a href="https://github.com/edodusi/mcp-vs-rest-bench" rel="noopener noreferrer"&gt;mcp-vs-rest-bench&lt;/a&gt;. The backend, the two interfaces, the task suite, the runner, and the raw results JSON. It runs against Amazon Bedrock on demand, so there is nothing to tear down, no standing infrastructure, and a full five-trial sweep costs a few cents of Haiku tokens. Point it at your own stack, your own tasks, your own model, and settle your own version of the argument.&lt;/p&gt;

&lt;p&gt;Don't decide with vibes. Decide with data.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>mcp</category>
      <category>api</category>
    </item>
    <item>
      <title>Announcing Storyblok Svelte SDK v5: now fully compatible with Svelte 5</title>
      <dc:creator>Edoardo Dusi</dc:creator>
      <pubDate>Mon, 28 Apr 2025 09:34:22 +0000</pubDate>
      <link>https://dev.to/storyblok/announcing-storyblok-svelte-sdk-v5-now-fully-compatible-with-svelte-5-3j3i</link>
      <guid>https://dev.to/storyblok/announcing-storyblok-svelte-sdk-v5-now-fully-compatible-with-svelte-5-3j3i</guid>
      <description>&lt;p&gt;We're thrilled to announce the release of &lt;a href="https://github.com/storyblok/storyblok-svelte" rel="noopener noreferrer"&gt;storyblok-svelte v5&lt;/a&gt;, a complete refactoring of our dedicated SDK built specifically for Svelte 5 and its &lt;a href="https://svelte.dev/blog/runes" rel="noopener noreferrer"&gt;runes system&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;This new version takes full advantage of Svelte's latest innovations to provide you with the most powerful, developer-friendly tools to integrate your Storyblok content into your Svelte applications.&lt;/p&gt;

&lt;h2&gt;
  
  
  Embracing the future with Svelte 5
&lt;/h2&gt;

&lt;p&gt;Svelte always stood out for its compiler-focused approach that delivers exceptional performance with minimal runtime overhead.&lt;/p&gt;

&lt;p&gt;With the introduction of &lt;strong&gt;runes&lt;/strong&gt;, the framework took another leap forward into simplicity and power.&lt;/p&gt;

&lt;p&gt;As passionate supporters of the Svelte ecosystem, we've &lt;a href="https://github.com/storyblok/storyblok-svelte/pull/1127" rel="noopener noreferrer"&gt;completely rebuilt our SDK&lt;/a&gt; to embrace these innovations, ensuring that Storyblok users can take full advantage of these new features, while maintaining compatibility with previous versions.&lt;/p&gt;

&lt;p&gt;Let's see what's changed!&lt;/p&gt;

&lt;h2&gt;
  
  
  Cleaner component integration
&lt;/h2&gt;

&lt;p&gt;Working with Storyblok components in Svelte 5 is now more elegant than ever:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="c"&gt;&amp;lt;!-- Before (Svelte 4) --&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;script&amp;gt;&lt;/span&gt;
  &lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;blok&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;

&lt;span class="c"&gt;&amp;lt;!-- After (Svelte 5) --&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;script&amp;gt;&lt;/span&gt;
 &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;blok&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;$props&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This simplified syntax makes your components more concise while fully leveraging Svelte 5's reactive system.&lt;/p&gt;

&lt;h2&gt;
  
  
  Enhanced Rich Text rendering
&lt;/h2&gt;

&lt;p&gt;Our rich text renderer is now fully compatible with Svelte 5's reactivity system:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;script&amp;gt;&lt;/span&gt;
  &lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;renderRichText&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@storyblok/svelte&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;blok&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;$props&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

  &lt;span class="c1"&gt;// Automatically updates when content changes&lt;/span&gt;
  &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;richTextContent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;$derived&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;renderRichText&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;blok&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;content&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Rich text content now updates seamlessly when edited in the Visual Editor without any extra code.&lt;/p&gt;

&lt;h2&gt;
  
  
  Seamless Visual Editor experience
&lt;/h2&gt;

&lt;p&gt;The integration with Storyblok's Visual Editor is smoother than ever with our improved &lt;code&gt;storyblokEditable&lt;/code&gt; action.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;script&amp;gt;&lt;/span&gt;
  &lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;storyblokEditable&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@storyblok/svelte&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;blok&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;$props&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;use:storyblokEditable=&lt;/span&gt;&lt;span class="s"&gt;{blok}&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"feature"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;h2&amp;gt;&lt;/span&gt;{blok.headline}&lt;span class="nt"&gt;&amp;lt;/h2&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;{blok.text}&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This ensures your components are properly highlighted while you edit your content.&lt;/p&gt;

&lt;h2&gt;
  
  
  Improved error messages
&lt;/h2&gt;

&lt;p&gt;The new error messages will help you solve issues within your integration faster.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Component "feature" not found. Please register it in storyblokInit:
storyblokInit({
  accessToken: "&amp;lt;your-token&amp;gt;",
  components: {
    "feature": YourComponent
  }
})
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Instead of generic messages, you'll now receive helpful guidance on how to fix problems.&lt;/p&gt;

&lt;h2&gt;
  
  
  Improved TypeScript support
&lt;/h2&gt;

&lt;p&gt;For TypeScript users, we've enhanced our type definitions for better autocomplete and error checking.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;SbBlokData&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@storyblok/svelte&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kr"&gt;interface&lt;/span&gt; &lt;span class="nx"&gt;FeatureBlok&lt;/span&gt; &lt;span class="kd"&gt;extends&lt;/span&gt; &lt;span class="nx"&gt;SbBlokData&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;headline&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;text&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;image&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;filename&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;alt&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;};&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// Type-safe blok access&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;blok&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;$props&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;blok&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;FeatureBlok&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Getting Started with v5
&lt;/h2&gt;

&lt;p&gt;Ready to upgrade? Here's how to get started:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; @storyblok/svelte@latest
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then update your initialization code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;storyblokInit&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;apiPlugin&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@storyblok/svelte&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;Feature&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;$lib/Feature.svelte&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;Grid&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;$lib/Grid.svelte&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nf"&gt;storyblokInit&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;accessToken&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;YOUR_TOKEN&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;use&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;apiPlugin&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
  &lt;span class="na"&gt;components&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;feature&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Feature&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;grid&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Grid&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For components, update your scripts to use the new Svelte 5 syntax:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;script&amp;gt;&lt;/span&gt;
  &lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;storyblokEditable&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@storyblok/svelte&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;blok&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;$props&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;article&lt;/span&gt; &lt;span class="na"&gt;use:storyblokEditable=&lt;/span&gt;&lt;span class="s"&gt;{blok}&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;h2&amp;gt;&lt;/span&gt;{blok.headline}&lt;span class="nt"&gt;&amp;lt;/h2&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"content"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;{blok.content}&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/article&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Learn by example
&lt;/h2&gt;

&lt;p&gt;We've created a comprehensive SvelteKit playground that demonstrates all the new features in action.&lt;/p&gt;

&lt;p&gt;Check out our &lt;a href="https://github.com/storyblok/storyblok-svelte" rel="noopener noreferrer"&gt;GitHub repository&lt;/a&gt; to see the example code and learn best practices for building with Storyblok and SvelteKit.&lt;/p&gt;

&lt;h2&gt;
  
  
  Looking forward
&lt;/h2&gt;

&lt;p&gt;This release reassures our commitment to provide first-class support for modern web frameworks.&lt;/p&gt;

&lt;p&gt;We believe that Svelte's approach to building web applications aligns perfectly with Storyblok's mission to make content management more efficient and enjoyable.&lt;/p&gt;

&lt;p&gt;We're excited to see what you build with this new version of our SDK, and we're already working on more features to improve your Storyblok + Svelte experience.&lt;/p&gt;

&lt;p&gt;For more information, check out our &lt;a href="https://www.storyblok.com/docs" rel="noopener noreferrer"&gt;official documentation&lt;/a&gt; or join our &lt;a href="https://discord.gg/jKrbAMz" rel="noopener noreferrer"&gt;Discord community&lt;/a&gt; to share your feedback and questions.&lt;/p&gt;

&lt;p&gt;Happy building!&lt;/p&gt;

</description>
      <category>svelte</category>
      <category>webdev</category>
      <category>javascript</category>
      <category>storyblok</category>
    </item>
    <item>
      <title>Storyblok unveils new PHP packages in collaboration with SensioLabs</title>
      <dc:creator>Edoardo Dusi</dc:creator>
      <pubDate>Thu, 27 Mar 2025 14:28:40 +0000</pubDate>
      <link>https://dev.to/storyblok/storyblok-unveils-new-php-packages-in-collaboration-with-sensiolabs-khp</link>
      <guid>https://dev.to/storyblok/storyblok-unveils-new-php-packages-in-collaboration-with-sensiolabs-khp</guid>
      <description>&lt;p&gt;At Storyblok, we firmly believe in PHP and the power of open source software. Both have shaped the web as we know it today and continue to be crucial in its evolution.&lt;/p&gt;

&lt;p&gt;That's why we're thrilled to announce that long with our partners &lt;a href="https://sensiolabs.com/" rel="noopener noreferrer"&gt;SensioLabs&lt;/a&gt;, creators of &lt;a href="https://symfony.com/" rel="noopener noreferrer"&gt;Symfony&lt;/a&gt;, we've completely rebuilt our PHP packages from the ground up.&lt;/p&gt;

&lt;p&gt;This collaboration represents more than just an update. It's a complete re-imagining on how PHP developers can interact with Storyblok. By working with SensioLabs, we've ensured these new packages adhere to modern practices, offer excellent Symfony support, and provide a significantly improved developer experience.&lt;/p&gt;

&lt;p&gt;Today, we're announcing four brand-new PHP packages designed to make integrating Storyblok into your projects seamlessly.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/storyblok/php-content-api-client" rel="noopener noreferrer"&gt;Content Delivery API Client&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/storyblok/symfony-bundle" rel="noopener noreferrer"&gt;Symfony Bundle&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/storyblok/php-management-api-client" rel="noopener noreferrer"&gt;Management API Client&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/storyblok/php-tiptap-extension" rel="noopener noreferrer"&gt;Tiptap Extension&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Our previous PHP client and associated packages will be deprecated as we move forward with these improved solutions.&lt;/p&gt;

&lt;p&gt;Let's explore each package and what it brings to the table.&lt;/p&gt;

&lt;h2&gt;
  
  
  Content Delivery API Client
&lt;/h2&gt;

&lt;p&gt;The &lt;a href="https://github.com/storyblok/php-content-api-client" rel="noopener noreferrer"&gt;Content Delivery API Client&lt;/a&gt; is a type-safe PHP SDK designed to retrieve content from Storyblok. It provides an elegant way to interact with your Storyblok space, with built-in support for fetching &lt;strong&gt;stories&lt;/strong&gt;, &lt;strong&gt;links&lt;/strong&gt;, &lt;strong&gt;datasources&lt;/strong&gt;, &lt;strong&gt;tags&lt;/strong&gt;, and &lt;strong&gt;assets&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Use this client to easily fetch content for your project:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="kn"&gt;use&lt;/span&gt; &lt;span class="nc"&gt;Storyblok\Api\StoriesApi&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kn"&gt;use&lt;/span&gt; &lt;span class="nc"&gt;Storyblok\Api\StoryblokClient&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kn"&gt;use&lt;/span&gt; &lt;span class="nc"&gt;Storyblok\Api\Request\StoryRequest&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nv"&gt;$client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;StoryblokClient&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;baseUri&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&amp;lt;https://api.storyblok.com&amp;gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;token&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'your_storyblok_token'&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nv"&gt;$storiesApi&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;StoriesApi&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$client&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nv"&gt;$response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;$storiesApi&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;bySlug&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'folder/slug'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;StoryRequest&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;language&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'de'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;));&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;More advanced features like filtering, pagination, and sorting, are also supported, giving you precise control over the data.&lt;/p&gt;

&lt;h2&gt;
  
  
  Symfony Bundle
&lt;/h2&gt;

&lt;p&gt;The &lt;a href="https://github.com/storyblok/symfony-bundle" rel="noopener noreferrer"&gt;Storyblok Symfony Bundle&lt;/a&gt; takes integration to the next level for Symfony applications. Developed in direct collaboration with SensioLabs, it leverages the Content Delivery API Client while adding Symfony-specific features like automatic client configuration and Symfony Profiler integration.&lt;/p&gt;

&lt;p&gt;Get started by adding these lines to your &lt;code&gt;config/packages/storyblok.yaml&lt;/code&gt; file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;storyblok&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;base_uri&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;%env(STORYBLOK_API_BASE_URI)%'&lt;/span&gt;
  &lt;span class="na"&gt;token&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;%env(STORYBLOK_API_TOKEN)%'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With this minimal setup, the bundle handles all the configuration, allowing you to immediately inject and use Storyblok's APIs within your controllers and services.&lt;/p&gt;

&lt;p&gt;The bundle also handles environment-specific configuration, making it easy to switch between development and production environments.&lt;/p&gt;

&lt;h2&gt;
  
  
  Management API Client
&lt;/h2&gt;

&lt;p&gt;The &lt;a href="https://github.com/storyblok/php-management-api-client" rel="noopener noreferrer"&gt;Management API Client&lt;/a&gt; allows you to programmatically manage your Storyblok content, providing you with a comprehensive set of tools for creating, updating, and organizing content within your spaces.&lt;/p&gt;

&lt;p&gt;This client simplifies complex content management tasks with an intuitive API:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="kn"&gt;use&lt;/span&gt; &lt;span class="nc"&gt;Storyblok\ManagementApi\ManagementApiClient&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kn"&gt;use&lt;/span&gt; &lt;span class="nc"&gt;Storyblok\ManagementApi\Endpoints\StoryApi&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kn"&gt;use&lt;/span&gt; &lt;span class="nc"&gt;Storyblok\ManagementApi\Data\Story&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kn"&gt;use&lt;/span&gt; &lt;span class="nc"&gt;Storyblok\ManagementApi\Data\StoryComponent&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nv"&gt;$client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;ManagementApiClient&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$accessToken&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nv"&gt;$storyApi&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;StoryApi&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$client&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;$spaceId&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nv"&gt;$content&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;StoryComponent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"article-page"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nv"&gt;$content&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"title"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"New Article"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nv"&gt;$content&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"body"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"This is the content"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nv"&gt;$story&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Story&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="s2"&gt;"An Article"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s2"&gt;"an-article-slug"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nv"&gt;$content&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nv"&gt;$storyCreated&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;$storyApi&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$story&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;data&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="k"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"Story created, ID: "&lt;/span&gt; &lt;span class="mf"&gt;.&lt;/span&gt; &lt;span class="nv"&gt;$storyCreated&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;id&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This package is especially valuable for content migration, bulk operations, and building custom editorial workflows.&lt;/p&gt;

&lt;h2&gt;
  
  
  PHP Tiptap Extension
&lt;/h2&gt;

&lt;p&gt;The &lt;a href="https://github.com/storyblok/php-tiptap-extension" rel="noopener noreferrer"&gt;PHP Tiptap Extension&lt;/a&gt; provides an extension specifically designed for Storyblok's rich text fields processing.&lt;/p&gt;

&lt;p&gt;This framework-agnostic package makes rendering rich text fields from Storyblok straightforward and flexible in any PHP project, whether you're using Symfony, Laravel, or any other PHP framework.&lt;/p&gt;

&lt;p&gt;You can easily transform Storyblok's rich text content into HTML with customizable rendering:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="kn"&gt;use&lt;/span&gt; &lt;span class="nc"&gt;Tiptap\Editor&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kn"&gt;use&lt;/span&gt; &lt;span class="nc"&gt;Storyblok\Tiptap\Extension\Storyblok&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nv"&gt;$editor&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Editor&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;
    &lt;span class="s1"&gt;'extensions'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
        &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Storyblok&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
    &lt;span class="p"&gt;],&lt;/span&gt;
&lt;span class="p"&gt;]);&lt;/span&gt;

&lt;span class="nv"&gt;$editor&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;setContent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;...&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Content from your API&lt;/span&gt;

&lt;span class="k"&gt;echo&lt;/span&gt; &lt;span class="nv"&gt;$editor&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;getHTML&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It also allows you to provide your own Block renderer, and it is included in our Symfony Bundle package.&lt;/p&gt;

&lt;p&gt;With all these releases comes a renewed PHP Technology Hub in our official website, a starting point for all your future integrations between your PHP projects and Storyblok.&lt;/p&gt;

&lt;h2&gt;
  
  
  Important note about legacy packages
&lt;/h2&gt;

&lt;p&gt;As part of this launch, the following PHP packages are now entering a deprecation phase:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://github.com/storyblok/php-client" rel="noopener noreferrer"&gt;storyblok/php-client&lt;/a&gt; (our original PHP Client)&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/storyblok/storyblok-php-richtext-renderer" rel="noopener noreferrer"&gt;storyblok/storyblok-php-richtext-renderer&lt;/a&gt; (for handling richtext fields)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If your current projects use these packages, don't worry, they will continue to work.&lt;/p&gt;

&lt;p&gt;That said, we strongly encourage all users to move to these new solutions, which offer significant advantages including modern PHP 8+ features, better type safety, and extensive testing.&lt;/p&gt;

&lt;p&gt;We'll be providing migration guides to help with the transition. Support for legacy packages will continue in the meantime, but all new features will exclusively target these new packages.&lt;/p&gt;

&lt;h2&gt;
  
  
  The future ahead
&lt;/h2&gt;

&lt;p&gt;These packages represent a renewed commitment to the PHP ecosystem and the open source community, and we want to express our sincere gratitude to &lt;strong&gt;SensioLabs&lt;/strong&gt; for their expertise and collaboration in this endeavor.&lt;/p&gt;

&lt;p&gt;This release is just the beginning. We're actively working on expanding our PHP support and have exciting plans for the future (to our &lt;strong&gt;Laravel&lt;/strong&gt; users: stay tuned!.&lt;/p&gt;

&lt;p&gt;We invite our wonderful community to try these packages, provide feedback, and contribute to their ongoing development. Get involved at &lt;a href="https://www.storyblok.com/community" rel="noopener noreferrer"&gt;Storyblok Community&lt;/a&gt;!&lt;/p&gt;

</description>
      <category>php</category>
      <category>symfony</category>
      <category>webdev</category>
      <category>programming</category>
    </item>
    <item>
      <title>SymfonyCon Vienna 2024: Recap of our Experience</title>
      <dc:creator>Edoardo Dusi</dc:creator>
      <pubDate>Wed, 18 Dec 2024 08:37:30 +0000</pubDate>
      <link>https://dev.to/storyblok/symfonycon-vienna-2024-recap-of-our-experience-mj0</link>
      <guid>https://dev.to/storyblok/symfonycon-vienna-2024-recap-of-our-experience-mj0</guid>
      <description>&lt;p&gt;My personal and professional journey with &lt;strong&gt;PHP&lt;/strong&gt; spans many years, though I've spent recent times focusing on JavaScript frameworks. On the 5th of December, I had the privilege of attending &lt;a href="https://live.symfony.com/2024-vienna-con/" rel="noopener noreferrer"&gt;SymfonyCon&lt;/a&gt; in Vienna with my manager Alex Jover Morales, courtesy of &lt;a href="https://sensiolabs.com/" rel="noopener noreferrer"&gt;SensioLabs&lt;/a&gt;. This conference wasn't just a technical event for me, it was a heartwarming return to the PHP community that has evolved tremendously over the years.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conference Highlights
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F021brnmjw4mwnfni2vn8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F021brnmjw4mwnfni2vn8.png" alt="SymfonyCon Keynote by Fabien Potencier" width="800" height="600"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The conference kicked off with an inspiring keynote by &lt;strong&gt;Fabien Potencier&lt;/strong&gt;, the author of &lt;a href="https://symfony.com/" rel="noopener noreferrer"&gt;Symfony&lt;/a&gt;. His presentation focused on &lt;a href="https://twig.symfony.com/" rel="noopener noreferrer"&gt;Twig&lt;/a&gt;, Symfony's powerful templating engine that allows developers to write clean, maintainable templates. The upcoming Twig release introduces exciting features that showcase the continuous innovation in the PHP ecosystem.&lt;/p&gt;

&lt;p&gt;One particularly fascinating technical session dove deep into &lt;strong&gt;HTTP compression algorithms&lt;/strong&gt;. The speaker compared different compression methods including &lt;em&gt;Zstandard&lt;/em&gt; (a high-performance compression algorithm developed by Facebook), &lt;em&gt;Brotli&lt;/em&gt; (Google's compression algorithm optimized for the web), and the widely-used &lt;em&gt;gzip&lt;/em&gt;. Understanding these compression techniques is &lt;strong&gt;crucial for optimizing web application performance&lt;/strong&gt; and reducing bandwidth usage.&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://ux.symfony.com/" rel="noopener noreferrer"&gt;Symfony UX&lt;/a&gt; presentation revealed promising statistics and future directions for this frontend framework. For those unfamiliar, &lt;strong&gt;Symfony UX&lt;/strong&gt; is a collection of JavaScript components that integrate seamlessly with Symfony applications, bringing reactive features to traditional server-rendered applications. The numbers shared during the talk suggest a &lt;strong&gt;bright future for this technology&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Platform.sh&lt;/em&gt;, a cloud hosting platform specialized in PHP applications, showcased their latest features, demonstrating how &lt;strong&gt;modern PHP deployment&lt;/strong&gt; can be both powerful and developer-friendly.&lt;/p&gt;

&lt;p&gt;A standout presentation came from Paul Dragoonis about &lt;a href="https://dagger.io/" rel="noopener noreferrer"&gt;Dagger&lt;/a&gt;, a programmable CI/CD engine created by the author of Docker, &lt;strong&gt;Solomon Hykes&lt;/strong&gt;. The talk illustrated how PHP developers can leverage Dagger to define their CI/CD pipelines as code, creating and managing Docker containers programmatically, a significant &lt;strong&gt;step forward for PHP deployment automation&lt;/strong&gt;.&lt;/p&gt;

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

&lt;p&gt;The "Strict PHP" session resonated strongly with my own philosophy of &lt;strong&gt;writing code for humans&lt;/strong&gt;, not machines. It emphasized the importance of clear, maintainable code that future developers (including ourselves) can easily understand and modify.&lt;/p&gt;

&lt;p&gt;Rob Allen's comparative analysis of &lt;strong&gt;GraphQL&lt;/strong&gt; (a query language for APIs), &lt;strong&gt;REST&lt;/strong&gt; (Representational State Transfer), and &lt;strong&gt;RPC&lt;/strong&gt; (Remote Procedure Call) provided valuable insights into choosing the right API architecture for different use cases.&lt;/p&gt;

&lt;p&gt;This is just a quick overview of some of the talks at the conference to give you an idea of some of the most interesting topics that I found there. There were many more over the two days and across three tracks.&lt;/p&gt;

&lt;h2&gt;
  
  
  SensioLabs
&lt;/h2&gt;

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

&lt;p&gt;I want to extend special thanks to &lt;strong&gt;Oskar Stark&lt;/strong&gt; and &lt;strong&gt;Silas Joisten&lt;/strong&gt; from SensioLabs for their incredible hospitality. Our discussions went beyond casual conference chat—we dove deep into technical conversations about PHP, Symfony, and some exciting collaborative projects in the works. &lt;strong&gt;SensioLabs has been using Storyblok&lt;/strong&gt; for their website and recently published &lt;a href="https://sensiolabs.com/blog/2024/sensiolabs-goes-headless-with-storyblok" rel="noopener noreferrer"&gt;a wonderful piece&lt;/a&gt; about their experience. While I can't reveal details yet, we're working on something remarkable together that we're eager to share with the community soon!&lt;/p&gt;

&lt;h2&gt;
  
  
  Coming Full Circle
&lt;/h2&gt;

&lt;p&gt;It was great to be back in the PHP community!&lt;/p&gt;

&lt;p&gt;It felt like coming home. This experience, along with my role as MC at &lt;strong&gt;phpday&lt;/strong&gt; in Italy this year, has reinforced my view that what makes the PHP ecosystem special is the &lt;strong&gt;passion and technical expertise&lt;/strong&gt; of its community members. Physical events like &lt;strong&gt;SymfonyCon&lt;/strong&gt; are priceless because they create chances to make meaningful connections and share knowledge that you just can't get online.&lt;/p&gt;

&lt;p&gt;The PHP community is still growing and coming up with new ideas, guided by the &lt;a href="https://thephp.foundation/" rel="noopener noreferrer"&gt;PHP Foundation&lt;/a&gt; and supported by frameworks like Symfony. Being part of this growth, even for a short time, reminds me why &lt;strong&gt;PHP is still a key part of web development&lt;/strong&gt;.&lt;/p&gt;

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

</description>
      <category>symfony</category>
      <category>storyblok</category>
      <category>php</category>
      <category>techtalks</category>
    </item>
    <item>
      <title>Announcing React SDK v4 with full support for React Server Components</title>
      <dc:creator>Edoardo Dusi</dc:creator>
      <pubDate>Fri, 22 Nov 2024 11:38:42 +0000</pubDate>
      <link>https://dev.to/storyblok/announcing-react-sdk-v4-with-full-support-for-react-server-components-3ld1</link>
      <guid>https://dev.to/storyblok/announcing-react-sdk-v4-with-full-support-for-react-server-components-3ld1</guid>
      <description>&lt;p&gt;The introduction of the &lt;a href="https://nextjs.org/docs/app" rel="noopener noreferrer"&gt;App Router paradigm in Next.js&lt;/a&gt; brought significant changes to the way developers build and structure applications. While it opened the door to exciting features like &lt;a href="https://react.dev/reference/rsc/server-components" rel="noopener noreferrer"&gt;React Server Components (RSC)&lt;/a&gt; and finer control over rendering, it also introduced complexity for packages that needed to seamlessly support both client-side and server-side environments.&lt;/p&gt;

&lt;p&gt;With the release of &lt;a href="https://github.com/storyblok/storyblok-react" rel="noopener noreferrer"&gt;@storyblok/react&lt;/a&gt; version 4.0.0, we are proud to offer full support for React Server Components in Next.js. This update simplifies implementation, enables live preview functionality in our Visual Editor, and ensures robust server rendering, all in a single, unified setup.&lt;/p&gt;

&lt;p&gt;Start using it now with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm i @storyblok/react@4
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;If you are using &lt;code&gt;@storyblok/react&lt;/code&gt; v3 with App Router, there are some breaking changes. Please continue reading this article to learn how to update your app.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h3&gt;
  
  
  What's new in @storyblok/react 4.0.0?
&lt;/h3&gt;

&lt;p&gt;Here's a quick rundown of the major improvements in this release:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Unified RSC support&lt;/strong&gt;&lt;br&gt;
Previously, React Server Components in Next.js required two different implementations for compatibility. With version 4.0.0, we've streamlined this and consolidated everything into one consistent approach.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Live preview with Visual Editor&lt;/strong&gt;&lt;br&gt;
Developers using the App Router can now enjoy live preview capabilities directly in the Storyblok Visual Editor, enhancing the development and content editing experience.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Seamless Server Rendering&lt;/strong&gt;&lt;br&gt;
Leverage the full server rendering capabilities of Next.js for improved performance and scalability of your applications&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  How to use it
&lt;/h2&gt;

&lt;h4&gt;
  
  
  Step 1: Initialize the SDK
&lt;/h4&gt;

&lt;p&gt;Start by creating a new file &lt;code&gt;lib/storyblok.js&lt;/code&gt; to initialize the SDK. Make sure to export the &lt;code&gt;getStoryblokApi()&lt;/code&gt; function.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// lib/storyblok.js&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;Page&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@/components/Page&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;Teaser&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@/components/Teaser&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;apiPlugin&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;storyblokInit&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@storyblok/react/rsc&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;getStoryblokApi&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;storyblokInit&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;accessToken&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;YOUR_ACCESS_TOKEN&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;use&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;apiPlugin&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
  &lt;span class="na"&gt;components&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;teaser&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Teaser&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;page&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Page&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;getStoryblokApi()&lt;/code&gt; function returns a shared instance of the Storyblok client that works across server and client components.&lt;/p&gt;

&lt;h4&gt;
  
  
  Step 2: Wrap Your Application with StoryblokProvider
&lt;/h4&gt;

&lt;p&gt;Next, create a &lt;code&gt;StoryblokProvider&lt;/code&gt; component to enable live editing on the client side. Wrap your entire app with this provider in the &lt;code&gt;app/layout.jsx&lt;/code&gt; file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// app/layout.jsx&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;StoryblokProvider&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@/components/StoryblokProvider&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;RootLayout&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;children&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;StoryblokProvider&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;html&lt;/span&gt; &lt;span class="nx"&gt;lang&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;en&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;body&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;children&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/body&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;      &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/html&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/StoryblokProvider&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, create the &lt;code&gt;StoryblokProvider&lt;/code&gt; component:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// components/StoryblokProvider.jsx&lt;/span&gt;
&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;use client&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;getStoryblokApi&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@/lib/storyblok&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;StoryblokProvider&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;children&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nf"&gt;getStoryblokApi&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt; &lt;span class="c1"&gt;// Re-initialize on the client&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;children&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Note that the &lt;code&gt;StoryblokProvider&lt;/code&gt; is a client component. This ensures that your client-side components can interact with Storyblok, including live editing in the Visual Editor.&lt;/p&gt;

&lt;h4&gt;
  
  
  Step 3: Fetch Content and Render Components
&lt;/h4&gt;

&lt;p&gt;In server components, use the &lt;code&gt;getStoryblokApi()&lt;/code&gt; function to fetch content from &lt;code&gt;Storyblok&lt;/code&gt;. Here’s an example &lt;code&gt;app/page.jsx&lt;/code&gt; file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// app/page.jsx&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;getStoryblokApi&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@/lib/storyblok&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;StoryblokStory&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@storyblok/react/rsc&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;Home&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;data&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;fetchData&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

  &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;div&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;StoryblokStory&lt;/span&gt; &lt;span class="nx"&gt;story&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;story&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/div&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;fetchData&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;storyblokApi&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;getStoryblokApi&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;storyblokApi&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;cdn/stories/home&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;version&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;draft&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Step 4: Use StoryblokServerComponent for server rendering
&lt;/h4&gt;

&lt;p&gt;For rendering components dynamically, always use the &lt;code&gt;StoryblokServerComponent&lt;/code&gt; from &lt;code&gt;@storyblok/react/rsc&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;storyblokEditable&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;StoryblokServerComponent&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@storyblok/react/rsc&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;Page&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;blok&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;main&lt;/span&gt; &lt;span class="p"&gt;{...&lt;/span&gt;&lt;span class="nf"&gt;storyblokEditable&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;blok&lt;/span&gt;&lt;span class="p"&gt;)}&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;blok&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;body&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;nestedBlok&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
      &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;StoryblokServerComponent&lt;/span&gt; &lt;span class="nx"&gt;blok&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;nestedBlok&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;nestedBlok&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;_uid&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;    &lt;span class="p"&gt;))}&lt;/span&gt;
  &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/main&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;Page&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This ensures compatibility with server-side rendering, even if you declare the component as a client component.&lt;/p&gt;

&lt;h2&gt;
  
  
  What’s Next?
&lt;/h2&gt;

&lt;p&gt;We’re preparing an updated official documentation to make adopting version 4 even smoother. In the meantime, all the essential steps are included in the &lt;a href="https://github.com/storyblok/storyblok-react?tab=readme-ov-file#nextjs-using-app-router" rel="noopener noreferrer"&gt;README&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Your feedback and contributions are vital to improving &lt;code&gt;@storyblok/react&lt;/code&gt;! If you have suggestions or issues, feel free to open an &lt;a href="https://github.com/storyblok/storyblok-react/issues" rel="noopener noreferrer"&gt;issue&lt;/a&gt; or contribute directly to the project.&lt;/p&gt;

</description>
      <category>storyblok</category>
      <category>javascript</category>
      <category>react</category>
      <category>webdev</category>
    </item>
    <item>
      <title>How (and why) to contribute to open source</title>
      <dc:creator>Edoardo Dusi</dc:creator>
      <pubDate>Thu, 01 Feb 2024 09:00:00 +0000</pubDate>
      <link>https://dev.to/sparkfabrik/how-and-why-to-contribute-to-open-source-1i9a</link>
      <guid>https://dev.to/sparkfabrik/how-and-why-to-contribute-to-open-source-1i9a</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;In the previous post on our blog, Daniela shared her thoughts and experiences on &lt;a href="https://dev.to/sparkfabrik/how-not-to-contribute-to-open-source-77k"&gt;how difficult it can be to contribute to open source&lt;/a&gt;. It was hard for me to review this post. I felt like I had failed as a senior developer, as a mentor, and as a &lt;strong&gt;long-time member of the open source community&lt;/strong&gt;. Then I started thinking about the current state of open source, and what Daniela wrote made sense: to a newcomer, everything seems to be driven by the hype, the star count, the likes, the followers, we have tech influencers, we have tech rockstars giving keynotes at conferences, we have recruiters scanning GitHub profiles.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Contributing today is about being visible, not about being helpful. And I think my generation of developers is to blame.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In this post, I will try to respond to Daniela and all the people who struggle to contribute to open source, and most importantly, I will try to talk about the motivations that should drive our contributions.&lt;/p&gt;

&lt;h2&gt;
  
  
  Contributing to Open Source
&lt;/h2&gt;

&lt;p&gt;First, definitions! Computer scientists have never been good at definitions. We call &lt;em&gt;"artificial intelligence"&lt;/em&gt; something that is not intelligent, and we call &lt;em&gt;"cloud"&lt;/em&gt; something that is on the ground and sometimes &lt;a href="https://news.microsoft.com/source/features/sustainability/project-natick-underwater-datacenter/" rel="noopener noreferrer"&gt;below sea level&lt;/a&gt;. We tried with &lt;strong&gt;Free Software&lt;/strong&gt; and we had to specify &lt;a href="https://www.gnu.org/philosophy/free-sw.en.html" rel="noopener noreferrer"&gt;what we meant by "free"&lt;/a&gt;, and when we realised we needed a more specific definition we created the &lt;strong&gt;Open Source Initiative&lt;/strong&gt; and we had to specify &lt;a href="https://opensource.org/osd/" rel="noopener noreferrer"&gt;what we meant by "open"&lt;/a&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;If we cannot agree on what open source means, we cannot agree on what it means to contribute to open source.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If we stick to the &lt;strong&gt;OSI definition&lt;/strong&gt;, which is derived from Debian's definition of Free Software, we are only talking about how the source code can be accessed, and how the license that governs the distribution of the software should be written.&lt;/p&gt;

&lt;p&gt;But when we talk about open source, we're not just talking about code, or at least I thought we were. We are talking about a way of approaching software, of designing it, developing it, distributing it, spreading it, making it something that benefits everyone. So being a developer in this context means &lt;strong&gt;thinking of software as a common good&lt;/strong&gt;, and then contributing means making it better, and if by better we mean more useful, more accessible, more secure, more powerful, more stable, easier to use, then it is clear that we are not just talking about writing code.&lt;/p&gt;

&lt;p&gt;It would be pointless to list all the non-coding contributions, I just want to point out &lt;strong&gt;participation&lt;/strong&gt; in groups that create guidelines, documentation and translations, those that try to spread best practices, or all the working groups that deal with standardization. But think about how much valuable discussion is generated in GitHub issues, discussion that leads to better software. &lt;strong&gt;None of these activities generate a green square&lt;/strong&gt; in the contribution grid on your GitHub profile, but each one helps improve the entire ecosystem.&lt;/p&gt;

&lt;p&gt;Once we agree on the definition of open source and what it means to contribute, we can move on to the second point in this reflection.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why contribute
&lt;/h2&gt;

&lt;p&gt;When I started university in Bologna in the early 2000s, the first community I came into contact with was a kind of Linux user group that organized, in a very informal way, so-called &lt;em&gt;"installation parties"&lt;/em&gt;, i.e. days when some more experienced users would guide us newbies through the first install of a Linux distribution.&lt;/p&gt;

&lt;p&gt;In addition to guiding us through the process of installing Gentoo, which was not a random choice, they would suggest &lt;strong&gt;what to do when we encountered a problem&lt;/strong&gt; or noticed something that could be improved. As you may have guessed, this included posting to our newsgroup, starting a discussion on the official Gentoo Forums, and even using the mailing list. This approach made it natural for me and my fellow travelers to think about &lt;em&gt;communicating with senior members of the community whenever the opportunity arose&lt;/em&gt;, at first just as generators of trivial questions, then more refined, and finally as proposers of solutions or improvements. I never made a commit to the Gentoo codebase, but &lt;strong&gt;I felt useful to the community&lt;/strong&gt; when I answered a colleague's question about how to fix a compile error by creating a symlink to a library that was in the wrong path.&lt;/p&gt;

&lt;p&gt;A few years later &lt;strong&gt;I started working with Drupal&lt;/strong&gt;, still one of the largest and most beautiful free software projects, and interacting with other users on issue trackers, suggesting patches, reporting bugs felt natural to me. Of course, getting the green light from automated tests on an uploaded patch was a good feeling, and when it was merged I felt like I could talk to &lt;em&gt;Dennis Ritchie&lt;/em&gt; as an equal, and so I am no stranger to this reward mechanism.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdp25y6ca2g0rin7c2xxz.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdp25y6ca2g0rin7c2xxz.jpg" alt="Drake accepting the Grammy Award with the caption 'I like to thank the reviewers" width="679" height="452"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;What drove me to contribute, however, &lt;strong&gt;was not the reward&lt;/strong&gt;. It became a necessity, as I was often a few bugs away from delivering a job to a client, and then I felt I had to at least give to others what I had received, so I found myself responding to those who encountered problems I knew how to overcome, or sometimes simply helping by providing my context that might help them understand how to reproduce the bug.&lt;/p&gt;

&lt;p&gt;It was therefore, and still is, &lt;strong&gt;a business motivation&lt;/strong&gt;. &lt;em&gt;"Don't reinvent the wheel"&lt;/em&gt; has been a mantra, building on what others have already introduced and perfected and then making it better, participating in advocacy groups that shape the future of a technology, and many other aspects of the open source world codified and regulated by organizations such as the OSI, but also the &lt;a href="https://www.linuxfoundation.org/" rel="noopener noreferrer"&gt;Linux Foundation&lt;/a&gt; or the &lt;a href="https://www.drupal.org/association" rel="noopener noreferrer"&gt;Drupal Association&lt;/a&gt;, are all aspects that directly impact our work and thus our business.&lt;/p&gt;

&lt;p&gt;Reading Daniela's post &lt;strong&gt;presented me with a completely different experience&lt;/strong&gt;. Talking to her, I realized first of all that she did not find the same conditions in the academic environment that I did, and later that she did not find the communities that I did.&lt;/p&gt;

&lt;p&gt;So the social, utilitarian, and "belonging" motivation that drove me, and I think many others around me, was missing, and &lt;strong&gt;what was left was rewards&lt;/strong&gt;. Of course, recognition had always helped to distinguish an active member of a community from others, but it had never generated &lt;em&gt;such strong pressures&lt;/em&gt; as to drive someone to contribute for the sole purpose of being visible. I seem to see this problem in the desperate search for a project to contribute to, any project, as long as it is popular and publicly acknowledges contributions, and especially if it is on GitHub, which here becomes the social network where a developer's popularity is measured.&lt;br&gt;
&lt;em&gt;(This also removes Drupal from the list of trendy projects...)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Gamification, badges, likes, they're nice things and we all love them, let's not be hypocritical, but if they're the main reason people contribute today, then we have a problem, and we probably created it ourselves. We've created an environment where &lt;strong&gt;it's more important to be visible than to be helpful&lt;/strong&gt;, and we've given that message to the new generation of developers, but we're telling them today that those motivations are wrong.&lt;/p&gt;

&lt;p&gt;So I think it's important to reiterate what it means to &lt;strong&gt;do open source&lt;/strong&gt;.&lt;br&gt;
Let's start from that foundation and try to adjust the focus.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to contribute - for real
&lt;/h2&gt;

&lt;p&gt;Let's start with a basic concept: &lt;strong&gt;you don't have to contribute!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;There are amazing programmers out there who have zero commits to public GitHub repos, yet they work with open source projects every day. Sometimes focusing on work or perhaps a busy personal life &lt;em&gt;makes it difficult to find time to contribute&lt;/em&gt;, and that's not a problem, it shouldn't make us feel guilty.&lt;br&gt;
Helping a colleague use a technology, making it more accessible by spreading it among your peers, are examples of activities that truly benefit the entire ecosystem but do not entitle you to a badge. &lt;/p&gt;

&lt;p&gt;But if, after making all these points, the desire to appear in a project's CHANGELOG remains, because it makes us more desirable in the eyes of a recruiter, or because it makes us feel more important in our community, which are all things I completely understand, then I can try to give some advice on how to contribute.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Start with what you use&lt;/strong&gt;: You work with libraries or frameworks every day, and by now you know them well; these are the perfect projects to start with. If you need to customize a certain feature to make it more useful for your project, or you find a bug, or you see that some of the documentation could be improved, that's your chance.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;There is no such thing as a "stupid contribution"&lt;/strong&gt;: If you think you have a solution to a problem or an idea for improving something, don't be afraid to share it. If you're not sure, ask for feedback, but know that every contribution is valuable, and the worst thing that can happen is that it's rejected.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Don't be afraid to ask&lt;/strong&gt;: If you don't understand something or aren't sure what to do, ask. There are many channels available, from the official documentation, to the issue tracker, to the community forum, to the chat, to the mailing list. Most (hopefully all) communities are welcoming and eager to help.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Don't overlook the non-code contributions&lt;/strong&gt;: You can help with translations, documentation, testing (&lt;em&gt;which by the way IS coding...&lt;/em&gt;), or even just by spreading the word about a project.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;There is more than just GitHub&lt;/strong&gt;: Many open source projects are not on GitHub, but they still need love. Just ask Drupal.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Join Discussions&lt;/strong&gt;: Issues and Discussions on GitHub are the most popular, but not the only, way to get started. You can learn a lot about a project from these discussions, commenting increases your visibility and participation in the community, and code contributions can often result.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Open Source is not just code. It's a way of thinking about software, and contributing means making it better.&lt;br&gt;
You don't &lt;strong&gt;have to&lt;/strong&gt; contribute, and I hope that in the future we can create a more welcoming environment for new contributors, and that the reward mechanism will change to reflect effort and dedication, rather than just commits.&lt;/p&gt;

&lt;p&gt;Thank you for reading this far, and if you have any questions or comments, please feel free to contact me at &lt;a href="https://continuousdelivery.social/@edo" rel="noopener noreferrer"&gt;Mastodon&lt;/a&gt; or &lt;a href="https://www.linkedin.com/in/edoardodusi/" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>community</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
    <item>
      <title>DruBOM: An SBOM for Drupal</title>
      <dc:creator>Edoardo Dusi</dc:creator>
      <pubDate>Mon, 29 Jan 2024 09:00:00 +0000</pubDate>
      <link>https://dev.to/sparkfabrik/drubom-an-sbom-for-drupal-3dp6</link>
      <guid>https://dev.to/sparkfabrik/drubom-an-sbom-for-drupal-3dp6</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Securing the software supply chain is a hot topic for organizations globally. The recent &lt;em&gt;SolarWinds hack&lt;/em&gt; demonstrated that even the most security-conscious organizations can be vulnerable, and as a result, government agencies and security experts worldwide agreed on the need for standards and best practices to achieve a more secure software ecosystem.&lt;/p&gt;

&lt;p&gt;One fundamental element is the ability to identify all components of a software project, including dependencies, and their versions. This is called a &lt;strong&gt;Software Bill of Materials (SBOM)&lt;/strong&gt;. With this information, organizations can track the components and their versions, and be able to identify and mitigate vulnerabilities.\&lt;br&gt;
There are several initiatives to create standard formats for SBOMs, including &lt;a href="https://cyclonedx.org/" rel="noopener noreferrer"&gt;CycloneDX&lt;/a&gt;, &lt;a href="https://spdx.dev/" rel="noopener noreferrer"&gt;SPDX&lt;/a&gt;, and &lt;a href="https://www.ntia.gov/sbom" rel="noopener noreferrer"&gt;others&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;We are working on a Drupal-specific SBOM called &lt;a href="https://www.drupal.org/project/drubom" rel="noopener noreferrer"&gt;DruBOM&lt;/a&gt;. In this post, we will explain what DruBOM is, how it works, and how you can use it.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is DruBOM?
&lt;/h2&gt;

&lt;p&gt;First of all, this is a Drupal module, it needs to be downloaded and installed using &lt;em&gt;Composer&lt;/em&gt;, and requires Drupal 9.3 and above or Drupal 10.3 and above.&lt;/p&gt;

&lt;p&gt;To generate the SBOM it integrates &lt;a href="https://github.com/anchore/syft" rel="noopener noreferrer"&gt;Anchore Syft&lt;/a&gt;, so this needs to be installed on the server. &lt;strong&gt;Syft&lt;/strong&gt; is a CLI tool written in Go that analyzes the contents of a container image or directory on the file system and generates an SBOM in various formats, including CycloneDX and SPDX.&lt;/p&gt;

&lt;p&gt;If these requirements are met, DruBOM will generate an SBOM for the Drupal project, including the Drupal core, modules, themes and libraries, as well as PHP and JavaScript dependencies. The default format is CycloneDX, but it can be configured to use other formats supported by Syft.&lt;/p&gt;

&lt;h2&gt;
  
  
  How does DruBOM work?
&lt;/h2&gt;

&lt;p&gt;The initial version of the module is very simple. It detects the Syft binary and calls it passing the Drupal root directory and the output format as parameters, then saves the output to the key-value store with the &lt;code&gt;drubom.sbom&lt;/code&gt; key and the current timestamp.&lt;/p&gt;

&lt;p&gt;You can then download the SBOM, or better yet, use it with automated tools to detect vulnerabilities and/or licensing issues.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to use DruBOM?
&lt;/h2&gt;

&lt;p&gt;The first step is to add the DruBOM module to your Drupal project.\&lt;br&gt;
Run &lt;code&gt;composer require sparkfabrik/drubom&lt;/code&gt; and then enable the module with &lt;code&gt;drush&lt;/code&gt; or via the Drupal administration interface.&lt;/p&gt;

&lt;p&gt;After installing and enabling the module, navigate to &lt;em&gt;Administration » Configuration » System » DruBOM settings&lt;/em&gt; and specify the path of the Syft binary. The binary must be executable by the PHP process.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; the PHP configuration must allow the use of &lt;code&gt;proc_open()&lt;/code&gt;, which is equivalent to &lt;code&gt;exec()&lt;/code&gt; in terms of security.&lt;/p&gt;

&lt;p&gt;Once the configuration is saved, generate the SBOM by clicking the &lt;strong&gt;Generate SBOM&lt;/strong&gt; button on the settings page or by visiting the &lt;code&gt;/drubom/generate&lt;/code&gt; path with a user who has the necessary permissions. The generated list will be saved on the Drupal DB and can be downloaded by clicking the &lt;strong&gt;Download SBOM&lt;/strong&gt; button.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4o33pw1ow28ryzvltne6.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4o33pw1ow28ryzvltne6.jpg" alt="DruBOM administration page" width="800" height="448"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Image: Screenshot of a DruBOM administration page&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;You can also use the &lt;code&gt;drush drubom:generate&lt;/code&gt; command to generate the SBOM from the command line. To download it, use the &lt;code&gt;drush drubom:download&lt;/code&gt; command.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's next?
&lt;/h2&gt;

&lt;p&gt;The scope of the module is very specific, so we don't expect it to grow much in terms of features. During the &lt;a href="https://www.drupal.org/community/events/drupal-global-contribution-weekend-italy-2024-2024-01-27" rel="noopener noreferrer"&gt;Drupal Contribution Weekend 2024&lt;/a&gt; we improved the documentation and the administration interface, added an integration with the System Status page in Drupal administration, and started integrating with &lt;a href="https://github.com/anchore/grype" rel="noopener noreferrer"&gt;Grype&lt;/a&gt; to also detect vulnerabilities, which is a step forward in terms of security.&lt;/p&gt;

&lt;p&gt;We consider this module to be fully stable and ready for production use, so we encourage you to try it out and give us feedback. If you find any problems, please report them to the &lt;a href="https://www.drupal.org/project/issues/drubom" rel="noopener noreferrer"&gt;issue queue&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>drupal</category>
      <category>opensource</category>
      <category>security</category>
      <category>sbom</category>
    </item>
    <item>
      <title>Journey to the center of DevRel - Part 1</title>
      <dc:creator>Edoardo Dusi</dc:creator>
      <pubDate>Thu, 11 Jan 2024 09:00:00 +0000</pubDate>
      <link>https://dev.to/sparkfabrik/journey-to-the-center-of-devrel-part-1-4k10</link>
      <guid>https://dev.to/sparkfabrik/journey-to-the-center-of-devrel-part-1-4k10</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Developer Relations&lt;/strong&gt;, also known as &lt;strong&gt;DevRel&lt;/strong&gt;, can be defined as the set of activities a company undertakes to build and maintain a relationship with the developer community, both internal and external. It is a relatively new role, and &lt;a href="https://www.youtube.com/watch?v=GZPs8SvpOKA&amp;amp;t=877s" rel="noopener noreferrer"&gt;it might be a bit philosophical&lt;/a&gt; as a job description: you will see that it involves many company departments, from marketing to engineering, from sales to HR.&lt;/p&gt;

&lt;p&gt;Last year we decided to start a DevRel program, and we'd like to share what we've learned. We want to talk about why we did it, the process we followed to get the role and the team up and running, the activities we carried out during the year, and the results we achieved. For those who are considering starting a similar program, and for those who are already doing it and want to compare their experience with ours, we hope this series of articles will be useful.&lt;/p&gt;

&lt;p&gt;Let'start with a bit of history.&lt;/p&gt;

&lt;h2&gt;
  
  
  DevRel through the years
&lt;/h2&gt;

&lt;p&gt;The role of DevRel has been around for a long time, but it is only in recent times that it has become a job title. In the past it was often associated with the role of &lt;strong&gt;evangelist&lt;/strong&gt;, a term many believe was coined by &lt;a href="https://en.wikipedia.org/wiki/Guy_Kawasaki" rel="noopener noreferrer"&gt;Guy Kawasaki&lt;/a&gt; in 1983 when he was working at Apple. In his book &lt;a href="https://guykawasaki.com/books/the-macintosh-way/" rel="noopener noreferrer"&gt;The Macintosh Way&lt;/a&gt; he wrote about it in the context of a software company:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;An evangelist.&lt;/strong&gt; A good evangelism program has a champion running it. This person lives and breathes the program. He is the figurehead, guiding light, and godfather for developers. He must thoroughly understand the company's product and technology.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;And added:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Constant contact.&lt;/strong&gt; Evangelizing developers is like bonding with a child. You need constant contact with them — talking to them on the phone, seeing their products, and taking them to lunch. A good practice is monthly mailings of technical notes, tips, tricks, and examples. Not only do the developers get information, they also get vibes that the company is on top of things and cares about them.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgdlweyfdos8oe0rb7cap.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgdlweyfdos8oe0rb7cap.jpeg" alt="Guy Kawasaki" width="800" height="533"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Image: Guy Kawasaki&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Apple sells hardware and software, so the goal of their evangelists was to convince developers to use their products by demonstrating that they were the best choice. Things change when we talk about a service company or a consultancy: we will come back to this later.&lt;/p&gt;

&lt;p&gt;Apple's customers were not just developers, and the same was true for companies such as Microsoft or Adobe, but getting them to advocate for their product was a great way to reach a wider audience. &lt;strong&gt;"The dentist's favourite toothpaste"&lt;/strong&gt; is a claim we are all familiar with, and this is more or less the same strategy.&lt;/p&gt;

&lt;p&gt;In fact, it was popularised in the early 2010s by companies like &lt;a href="https://www.twilio.com/" rel="noopener noreferrer"&gt;Twilio&lt;/a&gt; and &lt;a href="https://newrelic.com/" rel="noopener noreferrer"&gt;New Relic&lt;/a&gt;, which were among the first to hire developer advocates and create a &lt;a href="https://www.twilio.com/blog/developer-relations-at-twilio" rel="noopener noreferrer"&gt;developer relations team&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw5ahln4ps9e3rr6l0z10.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw5ahln4ps9e3rr6l0z10.jpeg" alt="A Twilio billboard in San Francisco, early 2010s" width="800" height="450"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Image: A Twilio billboard in San Francisco, early 2010s&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The marketing team at these companies understood that they needed to target developers, and when developers are your target audience, traditional marketing strategies don't work, as noted in the seminal book &lt;a href="https://www.devrel.agency/book" rel="noopener noreferrer"&gt;Developer Relations&lt;/a&gt; by Caroline Lewko and James Parton.&lt;/p&gt;

&lt;p&gt;So they started creating content for developers, &lt;strong&gt;speaking at conferences&lt;/strong&gt;, organising meetups, and generally connecting with developers where they were, using their language: our language. This quickly became a trend, and many other companies followed suit: today virtually every major tech company has a DevRel team, as do many startups and even some &lt;a href="https://github.com/ossf/DevRel-community" rel="noopener noreferrer"&gt;open source projects&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Now that the role of DevRel is well established, the competition is tough and even for a company that can invest a lot of resources in it, it is not easy to stand out from the crowd. As developers, we not only want to use the best quality tools, the hottest frameworks, the coolest technologies, but we also want to work with companies that share our values, that have a culture, that are inclusive, that &lt;em&gt;make us feel part of a community&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;When we started this journey at SparkFabrik, we had all of this in mind: &lt;strong&gt;Developer Relations is about building a community&lt;/strong&gt; that includes our employees and every engineer that comes in contact with us, it is about sharing our principles and vision, and it is about sharing our knowledge and experience with the community, contributing to open source projects and creating content that is useful to others.&lt;/p&gt;

&lt;p&gt;So, we had an understanding of the history of the role in our industry and a somewhat clear idea of what we thought it should be, but since we are a service company and we are not selling a product, even before starting to think about how to do it, we had to answer a fundamental question: &lt;strong&gt;why should we do it?&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Why DevRel?
&lt;/h2&gt;

&lt;p&gt;The first question we asked ourselves was: &lt;strong&gt;why should we do DevRel?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The fact that it is a trend in the industry is not a good enough reason to do it, and what works for other companies may not work for us, especially in the Italian market where we could find very few examples to follow.&lt;/p&gt;

&lt;p&gt;Many projects and big decisions at SparkFabrik are the result of a collaborative process, and this was no exception: &lt;em&gt;we started a workshop&lt;/em&gt;! We involved different departments, from marketing to engineering, from sales to HR, because we wanted to identify the impact of the figure in different areas of the company, and from the very beginning we recognised that we needed to divide it into two main categories: &lt;em&gt;external&lt;/em&gt; and &lt;em&gt;internal&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;You can usually apply this to traditional marketing: you want to attract new customers and new talent, and you also want to retain existing customers and employees. So you need to build &lt;em&gt;brand awareness&lt;/em&gt;, establish &lt;em&gt;thought leadership&lt;/em&gt; in the industry, be &lt;em&gt;a place where the best people want to work&lt;/em&gt; and customers want to work with.&lt;/p&gt;

&lt;p&gt;Developers are involved in all these aspects, often including the decision-making process when a company seeks a partner for a new project. By engaging with the community and demonstrating expertise and values, a company's services are more likely to be chosen when solutions are sought.&lt;/p&gt;

&lt;p&gt;In terms of talent acquisition, we agreed that developers tend to favour companies that engage with the community, contribute to open source projects, and offer resources for skill development. By participating in events, supporting hackathons, and maintaining a visible presence in the community, a company can attract potential customers and talented individuals.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8y608kmhh8vcsrbeo1ma.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8y608kmhh8vcsrbeo1ma.jpeg" alt="Daniela Bonvini @ angularday 2023" width="800" height="450"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Image: speaking at angularday 2023&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;All of this requires &lt;strong&gt;relations&lt;/strong&gt;. The success of a services company is increasingly intertwined with the developer ecosystem. As technology becomes more complex and interconnected, developers play a key role in driving innovation, service adoption and influencing decisions: by establishing a dedicated DevRel team, we have recognised the importance of strong relationships with the developer community.&lt;/p&gt;

&lt;p&gt;DevRel acts as a &lt;em&gt;bridge&lt;/em&gt; between our company and the developer community, facilitating open communication, gathering feedback and creating a collaborative environment. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Investing in DevRel is becoming an integral part of staying ahead in the competitive technology landscape.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Starting with a question such as "Why do we need something?" is an effective way of articulating the purpose and rationale behind a particular initiative, it resonates with different stakeholders, leads to a &lt;strong&gt;critical thinking&lt;/strong&gt; process of analysis, and sets the stage for &lt;strong&gt;continuous evaluation&lt;/strong&gt;, because as circumstances change the answer may evolve, and periodically revisiting the question ensures that the initiative remains relevant and aligned with the company's objectives.&lt;/p&gt;

&lt;p&gt;Having agreed on the fundamental "why" of implementing a Developer Relations program, we began to discuss more practical aspects of the team: defining &lt;strong&gt;goals and objectives&lt;/strong&gt;, designing &lt;strong&gt;activities and strategies&lt;/strong&gt;, and evaluating &lt;strong&gt;results and impact&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This will be the subject of the next article in this series, so if you are interested in learning more, stay tuned!&lt;/p&gt;

</description>
      <category>devrel</category>
      <category>community</category>
      <category>opensource</category>
    </item>
    <item>
      <title>OSCM: The Open Source Consumption Manifesto</title>
      <dc:creator>Edoardo Dusi</dc:creator>
      <pubDate>Mon, 04 Sep 2023 09:00:00 +0000</pubDate>
      <link>https://dev.to/sparkfabrik/oscm-the-open-source-consumption-manifesto-b3o</link>
      <guid>https://dev.to/sparkfabrik/oscm-the-open-source-consumption-manifesto-b3o</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;In our previous blog post, we &lt;a href="https://tech.sparkfabrik.com/en/blog/what-is-an-ospo/" rel="noopener noreferrer"&gt;explained what an Open Source Program Office (OSPO) is&lt;/a&gt; and why it is essential for companies that use or produce open source software (OSS). We also provided some guidance on how to create and manage an OSPO, and some useful resources for further learning. If you haven’t read it yet, we recommend you to do so before continuing with this article.&lt;/p&gt;

&lt;p&gt;Just a few days earlier, the &lt;strong&gt;Open Source Security Foundation (OpenSSF)&lt;/strong&gt; published the &lt;a href="https://openssf.org/blog/2023/08/24/join-us-in-adopting-the-open-source-consumption-manifesto/" rel="noopener noreferrer"&gt;Open Source Consumption Manifesto (OSCM)&lt;/a&gt;, a set of core values and guiding principles for software organizations that consume OSS and include it in their software supply chain, and we were thrilled to see that it aligns with our vision.&lt;/p&gt;

&lt;p&gt;The OpenSSF is a cross-industry collaboration that aims to improve the security of OSS, &lt;a href="https://www.infoq.com/news/2020/08/open-source-security-foundation/" rel="noopener noreferrer"&gt;founded in 2020&lt;/a&gt; as part of the &lt;strong&gt;Linux Foundation&lt;/strong&gt; and including among its first members leading companies and organizations, such as Google, Microsoft, IBM, GitHub, and others. The authors of this Manifesto are members of the &lt;a href="https://github.com/ossf/wg-endusers" rel="noopener noreferrer"&gt;OpenSSF End Users Working Group&lt;/a&gt;, which focuses on addressing the needs and challenges of OSS consumers and is chaired by Jonathan Meadows, a senior security engineer, and it was published in August 2023 as a blog post on the OpenSSF website inspired by another famous manifesto, the &lt;a href="https://agilemanifesto.org/" rel="noopener noreferrer"&gt;Agile Manifesto&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;We believe that after talking about OSPO, it is a good follow-up to talk about OSCM, because both topics are related to the challenges and opportunities of OSS for companies. While OSPO focuses on the organizational and strategic aspects of OSS, and helps companies to manage their relationship with the open source ecosystem, OSCM focuses on the technical and operational aspects, particularly on security.&lt;/p&gt;

&lt;p&gt;Let's see what the OSCM is about.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Open Source Consumption Manifesto
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqqoig2kbd9s1g10jfki5.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqqoig2kbd9s1g10jfki5.jpg" alt="OpenSSF Logo" width="799" height="420"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;OSCM&lt;/strong&gt; is a set of fifteen guidelines for companies and organizations that use OSS (that means, &lt;a href="https://octoverse.github.com/" rel="noopener noreferrer"&gt;almost all of them&lt;/a&gt;) to improve their security posture and reduce the associated risks, and it can be used as a reference to create a &lt;strong&gt;security strategy&lt;/strong&gt; for OSS consumption.&lt;/p&gt;

&lt;p&gt;The blog post that presents it starts reminding us that after the &lt;a href="https://www.wired.com/story/log4j-log4shell/" rel="noopener noreferrer"&gt;Log4Shell&lt;/a&gt; incident, &lt;a href="https://openssf.org/blog/2021/12/16/open-source-foundations-must-work-together-to-prevent-the-next-log4shell-scramble/" rel="noopener noreferrer"&gt;everything changed&lt;/a&gt;. People were talking about it everywhere, measures were taken &lt;a href="https://www.cisa.gov/news-events/cybersecurity-advisories/aa21-356a" rel="noopener noreferrer"&gt;at political level&lt;/a&gt;, and the community was shaken: it was a wake-up call, and it showed that OSS is not immune to security issues, even if it is generally considered &lt;a href="https://ubuntu.com/blog/does-open-source-software-have-the-same-safety-as-proprietary-software" rel="noopener noreferrer"&gt;more secure&lt;/a&gt; than proprietary software.&lt;/p&gt;

&lt;p&gt;But after the initial shock, did something really change? The authors of the Manifesto think that the answer is no, and that companies are not doing enough, using OSS without a clear strategy and without taking the necessary precautions to protect themselves and their customers.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;In November of 2022, Tenable found 72% of organizations remain vulnerable to Log4Shell. In December of the same year, Wired magazine drew attention to the lack of response as well. And as we drift further from December 2021, it only gets worse. Last month, software developers consumed hundreds of thousands of vulnerable versions of Log4j.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That's where the OSCM could make the difference: it's a collection of fifteen principles, or best practices, the result of a long discussion with feedbacks coming from members of different companies and disciplines, and it can help those who decide to adopt it to &lt;strong&gt;change their approach&lt;/strong&gt; to OSS consumption.&lt;/p&gt;

&lt;p&gt;We can summarize it in four core values:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Responsibility&lt;/strong&gt;: companies should take responsibility for the consumption of OSS, and security should be considered at every stage of the software development lifecycle (SDLC).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Awareness&lt;/strong&gt;: companies should be aware of the risks and benefits of consuming OSS, and they should be able to make informed decisions.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Collaboration&lt;/strong&gt;: companies should collaborate with the upstream developers of consumed components, and contribute to the improvement and sustainability of the OSS ecosystem.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Continuos improvement&lt;/strong&gt;: companies should continuously monitor, measure and improve the security of the open source components they consume.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Please read the &lt;a href="https://github.com/ossf/wg-endusers/tree/main/MANIFESTO" rel="noopener noreferrer"&gt;full text of the Manifesto&lt;/a&gt; for the complete list of principles and guidelines.&lt;/p&gt;

&lt;p&gt;Following the open source philosophy, it is a collaborative effort, so the authors invite everyone to join the working group, adopt it, sign it, and share it with others.&lt;/p&gt;

&lt;h3&gt;
  
  
  OSCM vs security models and frameworks
&lt;/h3&gt;

&lt;p&gt;Both OSPO and OSCM mention the importance of adopting a security strategy for the software supply chain, but they aren't frameworks or models and they don't provide a detailed plan to follow.&lt;/p&gt;

&lt;p&gt;There are established security models, and the OSCM mentions two of them: &lt;strong&gt;SLSA&lt;/strong&gt; and &lt;strong&gt;S2C2F&lt;/strong&gt;. Let's see what they are about.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://slsa.dev/" rel="noopener noreferrer"&gt;SLSA&lt;/a&gt; stands for &lt;strong&gt;Supply chain Levels for Software Artifacts&lt;/strong&gt;, and it is a framework that aims to provide a set of best practices for the software supply chain, with a focus on OSS. It was created by Google, and it is now part of the OpenSSF. It consists of four levels of assurance, from Level 1 to Level 4, that correspond to different degrees of protection against supply chain attacks.&lt;br&gt;
Our CTO Paolo Mainardi mentioned SLSA in &lt;a href="https://www.paolomainardi.com/posts/point-of-no-return-on-managing-software-dependencies/" rel="noopener noreferrer"&gt;a very good article on software supply chain security&lt;/a&gt;, and we also mentioned it in another &lt;a href="https://blog.sparkfabrik.com/en/secure-software-supply-chain-oci-artifacts-on-kubernetes" rel="noopener noreferrer"&gt;article about securing OCI Artifacts on Kubernetes&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/ossf/s2c2f" rel="noopener noreferrer"&gt;S2C2F&lt;/a&gt; stands for &lt;strong&gt;Secure Supply Chain Consumption Framework&lt;/strong&gt;, and it is a framework developed by Microsoft and contributed to the OpenSSF2. S2C2F is a consumption-focused framework, and it defines a set of practices and a maturity model-based implementation guide to help organizaziont improve the security of their software supply chain.&lt;/p&gt;

&lt;p&gt;These are technical details that are out of the scope of this article, but we think that it is important to mention them because the security strategy of a company should be based on a solid foundation, and these frameworks show that there are already some good starting points, companies don't have to start from scratch. If you want to know more about them or other ways to improve the security of your software supply chain, visit the &lt;a href="https://openssf.org/" rel="noopener noreferrer"&gt;OpenSSF website&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;The OSCM carries an intention of inclusion. It has changed over the course of our discussions, and we invite your future changes as well. Most of all, we hope the values and principles contained in the OSCM prove helpful. And that it serves as a guide to better open source consumption in your organization.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;We agree with the OpenSSF: &lt;strong&gt;time is running out&lt;/strong&gt;. The security of the software supply chain is a critical issue, and every company should start to take it very seriously. We covered the OSPO topic in our previous article, and complemented it with the OSCM in this one, to show you that there are concrete and viable solutions that you can start exploring today. Of course this is not the complete picture, and you should always consider your specific context, but we hope that this article can help you to get started.&lt;/p&gt;

&lt;p&gt;We would love to hear your thoughts, so please feel free to contact us via email or social media.&lt;/p&gt;

</description>
      <category>oscm</category>
      <category>security</category>
      <category>softwaresupplychain</category>
      <category>opensource</category>
    </item>
    <item>
      <title>What is an OSPO and why is it important?</title>
      <dc:creator>Edoardo Dusi</dc:creator>
      <pubDate>Mon, 28 Aug 2023 09:00:00 +0000</pubDate>
      <link>https://dev.to/sparkfabrik/what-is-an-ospo-and-why-is-it-important-4i</link>
      <guid>https://dev.to/sparkfabrik/what-is-an-ospo-and-why-is-it-important-4i</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://opensource.org/osd/" rel="noopener noreferrer"&gt;Open Source&lt;/a&gt; has become a major force in the software industry, powering many of the most popular and innovative applications and platforms in the world. From Linux to Android, from Drupal to WordPress, from Kubernetes to TensorFlow, open source software (OSS) is everywhere. It's estimated that &lt;a href="https://www.synopsys.com/software-integrity/resources/analyst-reports/open-source-security-risk-analysis.html" rel="noopener noreferrer"&gt;96% of all codebases&lt;/a&gt; contain OSS, and that &lt;a href="https://github.blog/2020-09-02-secure-your-software-supply-chain-and-protect-against-supply-chain-threats-github-blog/" rel="noopener noreferrer"&gt;at least 85% of enterprise codebases&lt;/a&gt; are built with open source components.&lt;/p&gt;

&lt;p&gt;In its &lt;a href="https://www.linuxfoundation.org/resources/publications/linux-foundation-annual-report-2022" rel="noopener noreferrer"&gt;Annual Report 2022&lt;/a&gt;, &lt;a href="https://www.linuxfoundation.org/" rel="noopener noreferrer"&gt;The Linux Foundation&lt;/a&gt; celebrates the growth of the global impact of open source, and its increasing adoption by companies and organizations of all sizes. The report also highlights its importance for the future of technology, and the need for companies to have a strategy for managing its use, particularly in the context of compliance, best practices, and security.&lt;/p&gt;

&lt;p&gt;In the whitepaper &lt;a href="https://www.linuxfoundation.org/resources/publications/open-source-missing-data-management-layer" rel="noopener noreferrer"&gt;Open Source:The Missing Data and Management Layer&lt;/a&gt; the LF states that leading tech companies such as Apple, Meta, Amazon and Google have detailed strategies in releasing, contributing and sponsoring OSS projects and conferences, and it's becoming a key part of the business strategy also for companies in other industries, such as Comcast, Bloomberg, and BMW.&lt;/p&gt;

&lt;p&gt;That's why a growing number of companies are creating a team dedicated to managing this relationship, and this team is called &lt;strong&gt;Open Source Program Office (OSPO)&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;In this blog post, we will explain what an OSPO is and why it is essential for companies at any stage of OSS adoption.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is an OSPO?
&lt;/h2&gt;

&lt;p&gt;In &lt;a href="https://www.linuxfoundation.org/research/the-evolution-of-the-open-source-program-office-ospo" rel="noopener noreferrer"&gt;The Evolution of the Open Source Program Office&lt;/a&gt; the &lt;a href="https://todogroup.org/" rel="noopener noreferrer"&gt;TODO Group&lt;/a&gt;, an open community born in 2012 that promotes sustainable OSS adoption and governance within organizations, proposed a Five-Stage OSPO Maturity Model, which describes the evolution of the adoption in companies and can be summarized as follows:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd5p00lutd5n37cnema9r.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd5p00lutd5n37cnema9r.jpg" alt="OSPO maturity model" width="800" height="320"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Stage 0: Adopting Open Source Ad Hoc&lt;/strong&gt;: the company uses OSS, but there is no formal process for managing it. Developers are free to use it to solve problems, but little attention is given to licence compliance or the long-term impact on the company's software supply chain.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Stage 1: Providing OSS Compliance, Inventory, and Developer Education&lt;/strong&gt;: the company recognizes that OSS is a key part of the business, and that they need to manage the legal compliance, security practices, developer education, and software inventory. The company creates an OSPO team to manage these activities.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Stage 2: Evangelizing OSS Use and Ecosystem Participation&lt;/strong&gt;: the company recognizes the importance of open source ecosystem for the business, and turn to the OSPOs to help them understand how to contribute to and participate to projects and events.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Stage 3: Hosting OSS Projects and Growing Communities&lt;/strong&gt;: the company hosts or is a primary sponsor of open source projects, dedicating resources to the development of a project and the growth of its community. OSPOs manage the ecosystem, coach project leaders, nurture the community, and seek the assistance of major foundations.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Stage 4: Becoming a Strategic Decision-Making Partner&lt;/strong&gt;: the OSPO is a strategic partner for the company, is involved in all major decisions related to OSS, becomes an internal technology consultant to the CTO and takes a leadership role in benchmarking what can be considered a good OSS project.&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;An OSPO serves as the center of competency for an organization's open source operations and structure. It is responsible for defining and implementing strategies and policies to guide these efforts. This can include setting policies around code use, distribution, selection, auditing, contributing, and other key areas; providing education and training to people (inside and outside the organization) involved in open source activities; supporting an organization's efficiency in developing software through encouraging sustainable usage of existing open source components and, where appropriate, contributing enhancements back to these project; when needed, guiding teams with open sourcing their software; ensuring engineering effectiveness; ensuring legal compliance; and promoting and building community engagement.&lt;/p&gt;

&lt;p&gt;-- &lt;a href="https://github.com/todogroup/ospodefinition.org" rel="noopener noreferrer"&gt;TODO Group&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The OSPO is a unit within a company. It can be a whole team or a single person, depending on the size of the company, the level of OSS adoption, and the company's strategy. But why is it important to have an OSPO?&lt;/p&gt;

&lt;h2&gt;
  
  
  Why is an OSPO important?
&lt;/h2&gt;

&lt;p&gt;OSS is a key part of the business strategy for many companies, but it also presents many challenges. Let's take a look at some of them.&lt;/p&gt;

&lt;h3&gt;
  
  
  License compliance
&lt;/h3&gt;

&lt;p&gt;Open source software is governed by &lt;a href="https://opensource.org/licenses/" rel="noopener noreferrer"&gt;various licenses&lt;/a&gt; that specify the rights and obligations of the users and contributors. Some licenses are more permissive, such as MIT or Apache, while others are more restrictive, such as GPL or AGPL. It is important to understand and respect the terms and conditions of each license, as well as the compatibility and conflicts between different licenses. Failing to do so can result in &lt;a href="https://www.synopsys.com/blogs/software-security/top-open-source-licenses/" rel="noopener noreferrer"&gt;legal risks&lt;/a&gt;, such as lawsuits, fines, or loss of intellectual property rights.&lt;/p&gt;

&lt;h3&gt;
  
  
  Security practices
&lt;/h3&gt;

&lt;p&gt;Open source software is &lt;a href="https://www.paolomainardi.com/posts/point-of-no-return-on-managing-software-dependencies/" rel="noopener noreferrer"&gt;exposed to a large and diverse user base&lt;/a&gt;, which can increase the chances of discovering and exploiting vulnerabilities. Some open source projects may not have adequate security measures, such as code reviews, testing, encryption, or authentication. Moreover, some components may come from &lt;strong&gt;untrusted or unknown sources&lt;/strong&gt;, which can pose a threat to the software supply chain. Therefore, it is essential to verify and validate the security of the OSS that is used or produced, as well as to monitor and update it regularly to address any security issues or vulnerabilities .&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://openssf.org/" rel="noopener noreferrer"&gt;Open Source Security Foundation&lt;/a&gt; (OpenSSF) is a cross-industry collaboration that brings together the industry's most important open source security initiatives and the companies that support them. The OpenSSF aims to improve the security of OSS by building a broader community, focused on security best practices, vulnerability disclosure, and security tooling, and it can be a valuable resource for companies that want to improve their security practices: it's essential for them to understand and manage the software supply chain, and to have a strategy for managing the use of OSS, and it may soon become a &lt;a href="https://digital-strategy.ec.europa.eu/en/policies/cybersecurity-act" rel="noopener noreferrer"&gt;law requirement&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Developer education
&lt;/h3&gt;

&lt;p&gt;Adopting OSS requires a different mindset and skillset than proprietary software. Developers need to be familiar with a new set of &lt;a href="https://opensource.com/resources/what-open-source" rel="noopener noreferrer"&gt;values&lt;/a&gt; and &lt;a href="https://github.com/ossf/wg-best-practices-os-developers" rel="noopener noreferrer"&gt;practices&lt;/a&gt;, such as collaboration, transparency, version control, issue tracking, and they need to be proficient in open source tools and platforms that enable communication, documentation, testing and deployment.&lt;/p&gt;

&lt;p&gt;Developers need to understand how to write high-quality and maintainable code that can be easily reused by others, how to contribute to open source projects, and how to participate in open source events. OSS is about community, and developers need to learn how to be part of it.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Any fool can write code that a computer can understand. Good programmers write code that humans can understand.&lt;/p&gt;

&lt;p&gt;-- &lt;a href="https://martinfowler.com/" rel="noopener noreferrer"&gt;Martin Fowler&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Software inventory
&lt;/h3&gt;

&lt;p&gt;Open source software involves a &lt;a href="https://blog.sonatype.com/software-supply-chain-a-definition-and-introductory-guide" rel="noopener noreferrer"&gt;large and complex network of dependencies and relationships&lt;/a&gt; between different components and projects. It can be challenging to keep track of all the open source software that is used or produced by a company, as well as their sources, versions, licenses, security status, and performance metrics. Having an accurate and up-to-date software inventory is crucial for managing the software lifecycle effectively and efficiently, and in some countries maintaining a Software Bill of Materials (SBOM) is a &lt;a href="https://www.cisa.gov/sbom" rel="noopener noreferrer"&gt;legal requirement&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Open source ecosystem
&lt;/h3&gt;

&lt;p&gt;OSS depends on the active and healthy participation of the open source community. The community consists of &lt;a href="https://landscape.cncf.io/" rel="noopener noreferrer"&gt;various stakeholders&lt;/a&gt;, such as developers, users, maintainers, sponsors, foundations, advocates. It is important to engage with the community in a respectful and constructive manner, as well as to contribute back to the community in various ways, such as reporting bugs, providing feedback, submitting patches, donating funds, or hosting events.&lt;/p&gt;

&lt;p&gt;This is not only a matter of good citizenship, but also a matter of business. Participating in the open source ecosystem can help to attract and retain talent, to build trust, reputation, influence, and value for the company. &lt;/p&gt;

&lt;p&gt;By addressing these challenges, an OSPO can help companies reap the benefits of open source software, while mitigating the risks. An OSPO can also help companies evolve and improve their open source maturity over time. At this point it should be clear that since OSS is vital, companies need to establish a structured way to manage it, and that's why an OSPO is so important. But how do you create an OSPO?&lt;/p&gt;

&lt;h2&gt;
  
  
  How to create an OSPO
&lt;/h2&gt;

&lt;p&gt;The TODO Group provides definitions, guides, and case studies of OSPOs already established in various companies. You can take a look at how the OSPO operates &lt;a href="https://todogroup.org/guides/casestudies/microsoft/" rel="noopener noreferrer"&gt;in Microsoft&lt;/a&gt;, for example.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq6n7x9kksgrxcrei4r6a.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq6n7x9kksgrxcrei4r6a.jpg" alt="OSPO Landscape" width="799" height="439"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Image: &lt;a href="https://landscape.todogroup.org/" rel="noopener noreferrer"&gt;The OSPO Landscape&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The starting point for any company that wants to create an OSPO should be the &lt;a href="https://todogroup.org/guides/create-program/" rel="noopener noreferrer"&gt;TODO guide&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;As with many other strategic decisions, we think that the company needs to clarify &lt;strong&gt;why&lt;/strong&gt; it wants to create an OSPO and what are its expected outcome and benefits. The OSPO should align with the company's vision and values, and be a natural extension of its culture, not an isolated unit. The company should also define the OSPO's &lt;strong&gt;mission&lt;/strong&gt;, &lt;strong&gt;goals&lt;/strong&gt;, and &lt;strong&gt;scope&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The company should also define the structure and the location of the OSPO. It can be centralized or decentralized, depending on the size and culture of the company. It can be a cross-functional team, with members from various departments such as engineering, legal, developer relations or marketing, or maybe it will be a single person reporting to the CTO and advising the other teams on open source matters.&lt;/p&gt;

&lt;p&gt;The OSPO should be responsible for defining the policies and processes, engage with the internal and external community, foster collaboration, provide the tools and resources to participate in projects and events: this unit needs &lt;strong&gt;a good leader&lt;/strong&gt;, with the right skills and experience and a deep understanding of the company's business and culture. A good reference for this role is the TODO Group's &lt;a href="https://todogroup.org/blog/sample-job-req/" rel="noopener noreferrer"&gt;Template Job Posting for Open Source Office Lead&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The process of identifying the goals, the structure and the leader of the OSPO should be transparent, because it will have a central role in the company's strategy and business. It should involve everyone from the CTO to the developers, making sure every input and feedback is taken into account.&lt;/p&gt;

&lt;p&gt;Once the OSPO is established, let's take a look at some of the first activities it should perform.&lt;/p&gt;

&lt;h2&gt;
  
  
  What does an OSPO do?
&lt;/h2&gt;

&lt;p&gt;There is no one-size-fits-all approach to managing open source software, and the OSPO should adapt to the company's needs and culture. However, according to &lt;a href="https://blog.opensource.org/what-is-an-open-source-program-office-and-why-you-should-have-one/" rel="noopener noreferrer"&gt;various sources&lt;/a&gt;, and examples from &lt;a href="https://opensource.microsoft.com/program/" rel="noopener noreferrer"&gt;companies that have already established an OSPO&lt;/a&gt;, we can summarize some common activities that an OSPO should perform as first steps:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Assess the current open source situation&lt;/strong&gt;: it should perform an audit of the company's OSS, to understand what is used and produced, and how it is used and produced. It should also assess the company's open source maturity, to understand what is the current level of adoption and what are the strengths and weaknesses. It could use frameworks such as the OSPO Maturity Model.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Get executive buy-in and support&lt;/strong&gt;: it should engage with the CTO and the other executives, to make sure they understand the importance of OSS for the company's business, and to get their support and backing for the OSPO's activities. It needs to demonstrate the value proposition and business case of OSS, and the expected costs and benefits. It also needs to secure the necessary resources and budget.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Build a cross-functional team&lt;/strong&gt;: even if the OSPO is a single person, &lt;strong&gt;this is not a one-persone job&lt;/strong&gt;, it needs to collaborate with various teams and departments to handle various aspects of open source management. An OSPO would recruit or assign people who have experience and expertise in OSS development, and good communication and collaboration skills, and define a clear reporting structure and authority.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Define policies and processes&lt;/strong&gt;: it should define the policies and processes for managing OSS, such as the selection, evaluation, and approval of components, the contribution to projects, the participation in events, the reporting of security vulnerabilities, the management of the software supply chain, the creation and maintenance of a software inventory, the creation and maintenance of a software bill of materials, the training of developers, and so on.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These are some of the activities that an OSPO should perform once it is established. Again, the OSPO is not a static or fixed entity, it is dynamic and evolving, because the open source landscape is constantly changing, and the company's strategy can change as well. So &lt;strong&gt;the best advice is to start small&lt;/strong&gt;, and then iterate and improve over time.&lt;/p&gt;

&lt;p&gt;Each company should find its own way, and the OSPO should fit its specific objectives and context.'&lt;/p&gt;

&lt;h2&gt;
  
  
  Resources
&lt;/h2&gt;

&lt;p&gt;If you want to learn more about OSPOs, here are some useful resources:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://ospo-news.ghost.io/" rel="noopener noreferrer"&gt;OSPONews from the TODO Group&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://events.linuxfoundation.org/open-source-summit-europe/about/ospocon/" rel="noopener noreferrer"&gt;OSPOCon&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.linuxfoundation.org/research/a-deep-dive-into-open-source-program-offices" rel="noopener noreferrer"&gt;A Deep Dive into Open Source Program Offices&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://linuxfoundation.eu/newsroom" rel="noopener noreferrer"&gt;Linux Foundation Europe Newsroom&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://blog.opensource.org/" rel="noopener noreferrer"&gt;Voices Of Open Source&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We also wrote about software supply chain security in a previous blog post &lt;a href="https://tech.sparkfabrik.com/en/blog/supply-chain-point-of-no-return/" rel="noopener noreferrer"&gt;The point of no return for software dependencies&lt;/a&gt;, and understanding this topic is essential for OSPOs.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;In this post, we saw that OSS is a valuable asset for companies, but also that using and producing OSS also come with some challenges. To address these challenges effectively and efficiently, a growing number of companies are creating a team dedicated to managing the use of open source software, and this team is called &lt;strong&gt;Open Source Program Office (OSPO)&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;An OSPO can help companies maximize their investment in OSS, and reduce the risks of using, contributing to, and releasing OSS. It can also help companies evolve and improve their open source maturity, strategy, governance, culture and operations.&lt;/p&gt;

&lt;p&gt;We hope you have enjoyed reading this post and learned something new. If your company already has an OSPO, we would love to hear about your experience, and if you are planning to create an OSPO, we would love to hear about your plans. Feel free to contact SparkFabrik on any of our social channels!&lt;/p&gt;

&lt;p&gt;Thank you for your time and attention. 😎&lt;/p&gt;

</description>
      <category>ospo</category>
      <category>opensource</category>
      <category>opensourceprogramoffice</category>
      <category>security</category>
    </item>
  </channel>
</rss>
