<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
    <title>Sjen Oorg</title>
    <subtitle>On AI Ecology, Software &amp; The Good Life.</subtitle>
    <link rel="self" type="application/atom+xml" href="https://sjen.codeberg.page/atom.xml"/>
    <link rel="alternate" type="text/html" href="https://sjen.codeberg.page"/>
    <generator uri="https://www.getzola.org/">Zola</generator>
    <updated>2026-06-28T00:00:00+00:00</updated>
    <id>https://sjen.codeberg.page/atom.xml</id>
    <entry xml:lang="en">
        <title>3 Agentic Coding Principles</title>
        <published>2026-06-28T00:00:00+00:00</published>
        <updated>2026-06-28T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://sjen.codeberg.page/posts/agnetic-coding-security/"/>
        <id>https://sjen.codeberg.page/posts/agnetic-coding-security/</id>
        
        <content type="html" xml:base="https://sjen.codeberg.page/posts/agnetic-coding-security/">&lt;p&gt;The world has changed, let&#x27;s not build software with coding agents like we&#x27;ve built in the last 30 years. We need a new approach, that leverages the advantages that this wondrous new technology brings. Here are 3 principles to help us move software forward:&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Use no or very few dependencies&lt;&#x2F;strong&gt; - &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;www.techtarget.com&#x2F;searchsecurity&#x2F;news&#x2F;366643420&#x2F;Verizon-DBIR-Key-takeaways-for-CISOs&quot;&gt;48% of data breaches&lt;&#x2F;a&gt; are seen to come from the software supply chain. Cut out the legacy tech debt, code it new, with much better structures, standards &amp;amp; tests.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;Use AI to greatly reduce &amp;amp; eliminate enterprise complexity&lt;&#x2F;strong&gt;, which is also &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;www.paloaltonetworks.com&#x2F;resources&#x2F;research&#x2F;unit-42-incident-response-report&quot;&gt;found to be a major security risk for attacks leveraging leaky integration &amp;amp; complexity&lt;&#x2F;a&gt;. Have code be direct, targeted, tested &amp;amp; without ambiguity to its purpose and structure.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;Improve responsiveness, efficiency &amp;amp; user experience.&lt;&#x2F;strong&gt; Currently most apps have their own bespoke design language, layout ideas, etc.. Cut it! Use the best of Apple, Google &amp;amp; other design leaders in the industry - align to those structures, and use that language for all apps, and stop with the fancy and supposedly innovative user experience. It is a pure waste of energy, users want apps that work, feel and work like the best of the industry leaders, so let agents just use that language. No more design or UX debates. I could imagine that new, spec-driven design languages will come that help us align and simplify this further. Also in the future maybe more services will be headless through agents, so this prepares us for that future as well.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;In conclusion, let&#x27;s leverage this amazing agentic moment to simplify, secure &amp;amp; dramatically improve the structure and quality of all software. My feeling is that the code quality, architecture &amp;amp; user features can be improved proportionally to the reduction in libraries and code quantity, and that would be a win-win for everyone, and most of all USERS.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>The AI Gateway</title>
        <published>2026-06-22T00:00:00+00:00</published>
        <updated>2026-06-22T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://sjen.codeberg.page/drafts/ai-gateway-architecture/"/>
        <id>https://sjen.codeberg.page/drafts/ai-gateway-architecture/</id>
        
        <content type="html" xml:base="https://sjen.codeberg.page/drafts/ai-gateway-architecture/">&lt;h2 id=&quot;tldr&quot;&gt;TLDR;&lt;&#x2F;h2&gt;
&lt;p&gt;Developers write code. They call models. They build agents and give them tools.
They do this without a proxy.
The keys leak. The bills run high. The data goes out and does not come back.
Old gateways do not understand tokens. They do not know prompts.
You need an AI gateway.&lt;&#x2F;p&gt;
&lt;hr &#x2F;&gt;
&lt;h2 id=&quot;the-chaos&quot;&gt;The Chaos&lt;&#x2F;h2&gt;
&lt;p&gt;It is the wild west.
Developers hardcode API keys. They send customer data to external servers. They give autonomous agents direct access to databases and shell environments.&lt;&#x2F;p&gt;
&lt;script src=https:&#x2F;&#x2F;sjen.codeberg.page&#x2F;js&#x2F;mermaid.js&gt;&lt;&#x2F;script&gt;
&lt;script src=https:&#x2F;&#x2F;sjen.codeberg.page&#x2F;js&#x2F;main.js&gt;&lt;&#x2F;script&gt;

&lt;pre class=&quot;mermaid&quot;&gt;
  graph TD
    App1[App] --&gt;|Raw Prompts &amp; Secrets| OpenAI[OpenAI API]
    App2[Agent] --&gt;|Direct Raw SQL &amp; Shell| DB[(Company Database)]
    App2 --&gt;|Raw Prompts| Gemini[Gemini API]
    App3[App] --&gt;|Hardcoded Keys| Anthropic[Anthropic API]
&lt;&#x2F;pre&gt;

&lt;script&gt;
  if (typeof mermaidRenderRun === &#x27;undefined&#x27;) {
    window.mermaidRenderRun = true;
    function runMermaid() {
      const useDark = document.querySelector(&quot;html&quot;).classList.contains(&quot;dark&quot;);
      mermaidRender(useDark ? &quot;dark&quot; : &quot;light&quot;);
    }
    if (document.readyState === &quot;loading&quot;) {
      document.addEventListener(&quot;DOMContentLoaded&quot;, runMermaid);
    } else {
      runMermaid();
    }
  }
&lt;&#x2F;script&gt;
&lt;p&gt;A standard gateway does not help. It knows HTTP and REST. It does not know tokens. It cannot read prompts. It does not understand tool calls.&lt;&#x2F;p&gt;
&lt;hr &#x2F;&gt;
&lt;h2 id=&quot;the-gateway&quot;&gt;The Gateway&lt;&#x2F;h2&gt;
&lt;p&gt;An AI gateway is a clean proxy. It sits in the middle. It sees all the communication.&lt;&#x2F;p&gt;
&lt;script src=https:&#x2F;&#x2F;sjen.codeberg.page&#x2F;js&#x2F;mermaid.js&gt;&lt;&#x2F;script&gt;
&lt;script src=https:&#x2F;&#x2F;sjen.codeberg.page&#x2F;js&#x2F;main.js&gt;&lt;&#x2F;script&gt;

&lt;pre class=&quot;mermaid&quot;&gt;
  graph TD
    classDef gw fill:#fff9c4,stroke:#fbc02d,stroke-width:2px;
    
    App[AI App] --&gt; GW[AI Gateway]
    Agent[Agent] --&gt; GW
    
    subgraph Target [&quot;Target Systems&quot;]
        Models[LLM APIs &lt;br&#x2F;&gt;Northbound]
        Tools[Databases &amp; APIs &lt;br&#x2F;&gt;Southbound]
    end
    
    GW --&gt;|Redacted &amp; Cached Request| Models
    GW --&gt;|Validated Parameters| Tools
&lt;&#x2F;pre&gt;

&lt;script&gt;
  if (typeof mermaidRenderRun === &#x27;undefined&#x27;) {
    window.mermaidRenderRun = true;
    function runMermaid() {
      const useDark = document.querySelector(&quot;html&quot;).classList.contains(&quot;dark&quot;);
      mermaidRender(useDark ? &quot;dark&quot; : &quot;light&quot;);
    }
    if (document.readyState === &quot;loading&quot;) {
      document.addEventListener(&quot;DOMContentLoaded&quot;, runMermaid);
    } else {
      runMermaid();
    }
  }
&lt;&#x2F;script&gt;
&lt;p&gt;Governance requires three distinct proxies inside the gateway.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;1-the-model-proxy-northbound&quot;&gt;1. The Model Proxy (Northbound)&lt;&#x2F;h3&gt;
&lt;p&gt;This proxy faces the model providers.
The client talks to the gateway. The gateway talks to Gemini, Anthropic, or OpenAI.&lt;&#x2F;p&gt;
&lt;script src=https:&#x2F;&#x2F;sjen.codeberg.page&#x2F;js&#x2F;mermaid.js&gt;&lt;&#x2F;script&gt;
&lt;script src=https:&#x2F;&#x2F;sjen.codeberg.page&#x2F;js&#x2F;main.js&gt;&lt;&#x2F;script&gt;

&lt;pre class=&quot;mermaid&quot;&gt;
  sequenceDiagram
    App-&gt;&gt;Gateway: User Prompt (includes raw email &amp; secret key)
    Note over Gateway: Scans content for secrets &amp; email
    Note over Gateway: Redacts sensitive data
    Note over Gateway: Injects real model key from vault
    Gateway-&gt;&gt;LLM: Clean Prompt + Secure Key
    LLM-&gt;&gt;Gateway: Response
    Note over Gateway: Logs token usage
    Gateway-&gt;&gt;App: Response
&lt;&#x2F;pre&gt;

&lt;script&gt;
  if (typeof mermaidRenderRun === &#x27;undefined&#x27;) {
    window.mermaidRenderRun = true;
    function runMermaid() {
      const useDark = document.querySelector(&quot;html&quot;).classList.contains(&quot;dark&quot;);
      mermaidRender(useDark ? &quot;dark&quot; : &quot;light&quot;);
    }
    if (document.readyState === &quot;loading&quot;) {
      document.addEventListener(&quot;DOMContentLoaded&quot;, runMermaid);
    } else {
      runMermaid();
    }
  }
&lt;&#x2F;script&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Secrets&lt;&#x2F;strong&gt;: The gateway holds the keys. The developer gets an internal token. The real API key never leaves the vault.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;Privacy&lt;&#x2F;strong&gt;: The gateway scans the prompt. It redacts emails, passwords, and credit cards before they go to the cloud.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;Cost&lt;&#x2F;strong&gt;: It caches responses. If two users ask the same question, the second user gets the cached answer. It is fast, and it costs nothing.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h3 id=&quot;2-the-tool-proxy-southbound&quot;&gt;2. The Tool Proxy (Southbound)&lt;&#x2F;h3&gt;
&lt;p&gt;Agents use tools. Tools are functions that query databases, read files, or call internal APIs.
An agent with unmonitored tools is dangerous.&lt;&#x2F;p&gt;
&lt;script src=https:&#x2F;&#x2F;sjen.codeberg.page&#x2F;js&#x2F;mermaid.js&gt;&lt;&#x2F;script&gt;
&lt;script src=https:&#x2F;&#x2F;sjen.codeberg.page&#x2F;js&#x2F;main.js&gt;&lt;&#x2F;script&gt;

&lt;pre class=&quot;mermaid&quot;&gt;
  sequenceDiagram
    Agent-&gt;&gt;Gateway: Execute Tool: delete_user(id=99)
    Note over Gateway: Gateway checks Client Identity
    Note over Gateway: Verifies authorization for &#x27;delete_user&#x27;
    Gateway--xTools: Blocked (Unauthorized)
    Gateway--&gt;&gt;Agent: Error: Tool execution rejected
&lt;&#x2F;pre&gt;

&lt;script&gt;
  if (typeof mermaidRenderRun === &#x27;undefined&#x27;) {
    window.mermaidRenderRun = true;
    function runMermaid() {
      const useDark = document.querySelector(&quot;html&quot;).classList.contains(&quot;dark&quot;);
      mermaidRender(useDark ? &quot;dark&quot; : &quot;light&quot;);
    }
    if (document.readyState === &quot;loading&quot;) {
      document.addEventListener(&quot;DOMContentLoaded&quot;, runMermaid);
    } else {
      runMermaid();
    }
  }
&lt;&#x2F;script&gt;
&lt;p&gt;The tool proxy stops the damage:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Validation&lt;&#x2F;strong&gt;: The gateway checks the parameters. It ensures the model is not passing malicious SQL or shell commands.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;Authentication&lt;&#x2F;strong&gt;: The gateway verifies if this specific client is allowed to run this tool.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;Human Gate&lt;&#x2F;strong&gt;: If a tool changes state—like deleting a user or sending money—the gateway pauses. It asks a human for approval. The agent waits.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h3 id=&quot;3-the-agent-proxy-east-west&quot;&gt;3. The Agent Proxy (East-West)&lt;&#x2F;h3&gt;
&lt;p&gt;Agents talk to other agents. They delegate tasks.
This proxy coordinates the mesh:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Integrity&lt;&#x2F;strong&gt;: It signs messages. An unauthorized agent cannot inject instructions.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;Loop Control&lt;&#x2F;strong&gt;: Agents can get stuck in infinite discussions. The proxy counts the messages. It stops the loop before the tokens burn your budget.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;hr &#x2F;&gt;
&lt;h2 id=&quot;a-simple-gateway-in-code&quot;&gt;A Simple Gateway in Code&lt;&#x2F;h2&gt;
&lt;p&gt;This is how you start. Here is a simple middleware written in Python. It redacts data, logs tokens, and proxies the call.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;python&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;import&lt;&#x2F;span&gt;&lt;span&gt; os&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;import&lt;&#x2F;span&gt;&lt;span&gt; re&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;import&lt;&#x2F;span&gt;&lt;span&gt; httpx&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;from&lt;&#x2F;span&gt;&lt;span&gt; fastapi&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; import&lt;&#x2F;span&gt;&lt;span&gt; FastAPI&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt; HTTPException&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt; Request&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;from&lt;&#x2F;span&gt;&lt;span&gt; fastapi&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span&gt;responses&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; import&lt;&#x2F;span&gt;&lt;span&gt; JSONResponse&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;import&lt;&#x2F;span&gt;&lt;span&gt; logging&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;app&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; FastAPI&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;logging&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span&gt;basicConfig&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable&quot;&gt;level&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt;logging&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;INFO&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-comment&quot;&gt;#&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; Hemingway-style: Simple, concrete rules.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-constant&quot;&gt;SENSITIVE_PATTERNS&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; [&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;    r&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage&quot;&gt;(?i)&lt;&#x2F;span&gt;&lt;span class=&quot;z-string z-regexp&quot;&gt;password&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;\s&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;*&lt;&#x2F;span&gt;&lt;span class=&quot;z-string z-regexp&quot;&gt;=&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;\s&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;*&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;[&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant z-character z-escape&quot;&gt;\&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;]&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;[&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;^&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant z-character z-escape&quot;&gt;\&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;]&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;+&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;[&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant z-character z-escape&quot;&gt;\&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;]&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;    r&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage&quot;&gt;(?i)&lt;&#x2F;span&gt;&lt;span class=&quot;z-string z-regexp&quot;&gt;api&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;[&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;-&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;_&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;]&lt;&#x2F;span&gt;&lt;span class=&quot;z-string z-regexp&quot;&gt;key&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;\s&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;*&lt;&#x2F;span&gt;&lt;span class=&quot;z-string z-regexp&quot;&gt;=&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;\s&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;*&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;[&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant z-character z-escape&quot;&gt;\&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;]&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;[&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;^&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant z-character z-escape&quot;&gt;\&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;]&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;+&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;[&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant z-character z-escape&quot;&gt;\&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;]&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;    r&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;\b&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;[&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;A&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;-&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;Z&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;a&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;-&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;z&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;0&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;-&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;9&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;.&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;_&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;%&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;+&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;-&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;]&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;+&lt;&#x2F;span&gt;&lt;span class=&quot;z-string z-regexp&quot;&gt;@&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;[&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;A&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;-&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;Z&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;a&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;-&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;z&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;0&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;-&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;9&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;.&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;-&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;]&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;+&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant z-character z-escape&quot;&gt;\.&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;[&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;A&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;-&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;Z&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;|&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;a&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;-&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;z&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;]&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;{2,}&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;\b&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;def&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; clean_prompt&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-parameter z-function&quot;&gt;prompt&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt; str&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt; -&amp;gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt; str&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    cleaned&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; prompt&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;    for&lt;&#x2F;span&gt;&lt;span&gt; pattern&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; in&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; SENSITIVE_PATTERNS&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        cleaned&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; re&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span&gt;sub&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span&gt;pattern&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;[REDACTED]&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt; cleaned&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;    return&lt;&#x2F;span&gt;&lt;span&gt; cleaned&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;@&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;app&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;.&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;post&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;&#x2F;v1&#x2F;chat&#x2F;completions&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;async&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; def&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; proxy&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-parameter z-function&quot;&gt;request&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span&gt; Request&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    body&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; =&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; await&lt;&#x2F;span&gt;&lt;span&gt; request&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span&gt;json&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-comment&quot;&gt;    #&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; Clean the input&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    messages&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; body&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span&gt;get&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;messages&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt; [&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;    for&lt;&#x2F;span&gt;&lt;span&gt; msg&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; in&lt;&#x2F;span&gt;&lt;span&gt; messages&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;        if&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;content&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; in&lt;&#x2F;span&gt;&lt;span&gt; msg&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; and&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt; isinstance&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span&gt;msg&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;content&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt; str&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            msg&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;content&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; clean_prompt&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span&gt;msg&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;content&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    headers&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;        &amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;Authorization&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; f&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;Bearer &lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;{&lt;&#x2F;span&gt;&lt;span&gt;os&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span&gt;getenv&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;OPENAI_API_KEY&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;}&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;        &amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;Content-Type&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;application&#x2F;json&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;    async&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; with&lt;&#x2F;span&gt;&lt;span&gt; httpx&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span&gt;AsyncClient&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; as&lt;&#x2F;span&gt;&lt;span&gt; client&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;        try&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            response&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; =&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; await&lt;&#x2F;span&gt;&lt;span&gt; client&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span&gt;post&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;                &amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;https:&#x2F;&#x2F;api.openai.com&#x2F;v1&#x2F;chat&#x2F;completions&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt; &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-variable&quot;&gt;                json&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt;body&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt; &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-variable&quot;&gt;                headers&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt;headers&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt; &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-variable&quot;&gt;                timeout&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;=&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;30.0&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            )&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            response&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span&gt;raise_for_status&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            data&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; response&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span&gt;json&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-comment&quot;&gt;            #&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; Log the cost&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            usage&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; data&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span&gt;get&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;usage&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            logging&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span&gt;info&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;                f&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;Client: &lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;{&lt;&#x2F;span&gt;&lt;span&gt;request&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span&gt;client&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span&gt;host&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;}&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; | &lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;                f&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;Tokens: &lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;{&lt;&#x2F;span&gt;&lt;span&gt;usage&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span&gt;get&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;total_tokens&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; 0&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;}&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            )&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;            return&lt;&#x2F;span&gt;&lt;span&gt; JSONResponse&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable&quot;&gt;content&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt;data&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;        except&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt; Exception&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; as&lt;&#x2F;span&gt;&lt;span&gt; e&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            logging&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span&gt;error&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;f&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;Failed: &lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;str&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span&gt;e&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;}&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;            raise&lt;&#x2F;span&gt;&lt;span&gt; HTTPException&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable&quot;&gt;status_code&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;=&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;500&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable&quot;&gt; detail&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;=&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;Gateway Error&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;hr &#x2F;&gt;
&lt;h2 id=&quot;deployment&quot;&gt;Deployment&lt;&#x2F;h2&gt;
&lt;p&gt;Deploy the gateway close to your code. Use a sidecar.
Store your cache in Redis. It must be fast.
Enforce schemas on your tools.&lt;&#x2F;p&gt;
&lt;p&gt;If you build with AI, stop calling models directly. Use a gateway. It is the only safe way.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>The Massive Danger &amp; Opportunity of Agentic Coding</title>
        <published>2026-06-20T00:00:00+00:00</published>
        <updated>2026-06-20T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://sjen.codeberg.page/posts/agentic-coding/"/>
        <id>https://sjen.codeberg.page/posts/agentic-coding/</id>
        
        <content type="html" xml:base="https://sjen.codeberg.page/posts/agentic-coding/">&lt;h2 id=&quot;tldr&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#tldr&quot; aria-label=&quot;Anchor link for: tldr&quot;&gt;TLDR;&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Coding agents can help us product &lt;strong&gt;much, much less code&lt;&#x2F;strong&gt; to solve our problems, with higher security &amp;amp; lower complexity. This seems counterintuitive, since vibe coding seems to be letting people create much more code with possibly lower quality, but it doesn&#x27;t have to be that way. Read on for details...&lt;&#x2F;p&gt;
&lt;h2 id=&quot;introduction&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#introduction&quot; aria-label=&quot;Anchor link for: introduction&quot;&gt;Introduction&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Coding agents can create large amounts of code in seconds, based on any prompt from anyone. It is truly a revolution in software development and systems organization.&lt;&#x2F;p&gt;
&lt;p&gt;Some people are advocating for new frameworks or engineering practicies to deal with the mass of new code that will be coming. This talk from Google I&#x2F;O 2026 sums it up.&lt;&#x2F;p&gt;
&lt;iframe width=&quot;560&quot; height=&quot;315&quot; src=&quot;https:&#x2F;&#x2F;www.youtube.com&#x2F;embed&#x2F;2n41YjR5QfU?si=CeUQp32ScEOzTP9h&quot; title=&quot;YouTube video player&quot; frameborder=&quot;0&quot; allow=&quot;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share&quot; referrerpolicy=&quot;strict-origin-when-cross-origin&quot; allowfullscreen&gt;&lt;&#x2F;iframe&gt;
&lt;h2 id=&quot;solutions&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#solutions&quot; aria-label=&quot;Anchor link for: solutions&quot;&gt;Solutions&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;I understand and agree with the problem, however have a different take on the best solution. This is a chance to improve and reduce our software footprint, to finally get software under control and running efficiently to help solve problems more directly, and not create layers and layers of abstractions just so we humans can understand and work with the systems.&lt;&#x2F;p&gt;
&lt;p&gt;This is a chance to get back to simplicity, performance &amp;amp; targeted implementations, without all of the bloat &amp;amp; misguided abstraction layers. Think about your favorite apps &amp;amp; CLI tools - they are fast, snappy, efficient &amp;amp; self-contained. They don&#x27;t break, and are robust and trustworthy.&lt;&#x2F;p&gt;
&lt;p&gt;Agnetic coding can help us bring all software up to that level. This means:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;New software should have &lt;strong&gt;significantly less lines of code&lt;&#x2F;strong&gt; and abstraction layers than our typical software today.&lt;&#x2F;li&gt;
&lt;li&gt;We should now be creating significantly less code and &lt;strong&gt;no technical debt&lt;&#x2F;strong&gt; - the agents code and test almost perfectly, as long as we keep them guided &amp;amp; targeted in their tasks.&lt;&#x2F;li&gt;
&lt;li&gt;New software engineers should train on &lt;strong&gt;efficient coding solutions&lt;&#x2F;strong&gt; from agents, analyzing the right prompts to get secure, practical &amp;amp; tested solutions from agents that should require much less operational &amp;amp; development overhead to deploy, update &amp;amp; run. Agentic engineers need to still understand performance, resource management &amp;amp; software architecture to correctly coach, prompt &amp;amp; validate the agent&#x27;s output, but they no longer need to code everything or most things themselves. But they need &lt;strong&gt;to understand&lt;&#x2F;strong&gt; the code, and what makes a good solution compared to a sloppy or leaky solution, so cultivating &lt;strong&gt;good taste&lt;&#x2F;strong&gt; in software design and execution is critical (like today, but just not coded with our own fingers).&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h2 id=&quot;conclusion&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#conclusion&quot; aria-label=&quot;Anchor link for: conclusion&quot;&gt;Conclusion&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;My feeling is that some companies want to sell teams on a story of increased complexity and code bloat through vibe coding. This is misguided and dangerous, in my opinion. We should be focusing on &lt;strong&gt;less but better code&lt;&#x2F;strong&gt;, and much simpler, faster &amp;amp; more secure software solutions, starting now. It is a new age for software engineering, and if we can follow these principles, it can be much better than the bloated &amp;amp; overly expensive stacks that we have today.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>AI Portals</title>
        <published>2026-06-20T00:00:00+00:00</published>
        <updated>2026-06-20T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://sjen.codeberg.page/projects/ai-portals/"/>
        <id>https://sjen.codeberg.page/projects/ai-portals/</id>
        
        <content type="html" xml:base="https://sjen.codeberg.page/projects/ai-portals/"></content>
        
    </entry>
    <entry xml:lang="en">
        <title>Flatpak is One of My &#x27;Desert Island Apps&#x27;</title>
        <published>2026-05-15T00:00:00+00:00</published>
        <updated>2026-05-15T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://sjen.codeberg.page/posts/flatpak/"/>
        <id>https://sjen.codeberg.page/posts/flatpak/</id>
        
        <content type="html" xml:base="https://sjen.codeberg.page/posts/flatpak/">&lt;h2 id=&quot;tldr&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#tldr&quot; aria-label=&quot;Anchor link for: tldr&quot;&gt;TLDR;&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;What is a &lt;strong&gt;Desert Island App&lt;&#x2F;strong&gt;? They are the apps that I truly rely on, that I would take on my laptop to a desert island (with internet), and are just core to my digital life and work. &lt;strong&gt;&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;flathub.org&quot;&gt;Flatpak and Flathub&lt;&#x2F;a&gt;&lt;&#x2F;strong&gt; is for sure one of my &lt;strong&gt;Desert Island Apps&lt;&#x2F;strong&gt;.&lt;&#x2F;p&gt;
&lt;hr &#x2F;&gt;
&lt;h2 id=&quot;introduction&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#introduction&quot; aria-label=&quot;Anchor link for: introduction&quot;&gt;Introduction&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Linux desktop app distribution has had different approaches over the years - from Debian (deb), Fedora (rpm), Arch (PKGBUILD), and others, but all dealing with varying library versions across different distributions. Users were often stuck between outdated &quot;stable&quot; repositories or risking system breakage by adding third-party repos (the dreaded &quot;dependency hell&quot;).&lt;&#x2F;p&gt;
&lt;p&gt;Then came &lt;strong&gt;Flatpak&lt;&#x2F;strong&gt; (originally known as &lt;code&gt;xdg-app&lt;&#x2F;code&gt; when Alexander Larsson first started working on it).&lt;&#x2F;p&gt;
&lt;p&gt;Today, Flatpak is not just another package format—it is for me the gold standard for desktop software distribution on Linux. It represents a beautifully engineered compromise that respects both security and user experience, running seamlessly on everything from SteamOS to Debian and Fedora Silverblue.&lt;&#x2F;p&gt;
&lt;hr &#x2F;&gt;
&lt;h2 id=&quot;achieving-balance&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#achieving-balance&quot; aria-label=&quot;Anchor link for: achieving-balance&quot;&gt;Achieving Balance&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;What makes Flatpak truly special is how it solves the tension between &lt;strong&gt;isolation&lt;&#x2F;strong&gt; (for security) and &lt;strong&gt;integration&lt;&#x2F;strong&gt; (for usability).&lt;&#x2F;p&gt;
&lt;p&gt;In other environments, sandboxing is often an all-or-nothing affair. If you sandbox an application too tightly, it can&#x27;t open a file chooser, print a document, or share your screen. If you integrate it too deeply, you lose security.&lt;&#x2F;p&gt;
&lt;p&gt;Flatpak solves this with a two-pronged architecture:&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;The Sandbox (Bubblewrap):&lt;&#x2F;strong&gt; Flatpak uses &lt;code&gt;bubblewrap&lt;&#x2F;code&gt; under the hood to create isolated unprivileged user namespaces. Applications run with their own view of the filesystem, network, and process space.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;The Portal (XDG Desktop Portals):&lt;&#x2F;strong&gt; This is the secret. Instead of giving an application direct access to your microphone, camera, or home directory, the application talks to a &lt;strong&gt;Portal&lt;&#x2F;strong&gt; API. When the app wants to open a file, the system pops up a native file chooser &lt;em&gt;outside&lt;&#x2F;em&gt; the sandbox. Once you select the file, the portal passes only that specific file descriptor back to the app.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;This means you get modern, granular macOS&#x2F;Android-style permissions on Linux without breaking the desktop experience. It just works.&lt;&#x2F;p&gt;
&lt;hr &#x2F;&gt;
&lt;h2 id=&quot;comparing-the-competitors&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#comparing-the-competitors&quot; aria-label=&quot;Anchor link for: comparing-the-competitors&quot;&gt;Comparing the Competitors&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;How does Flatpak hold up against other software management systems? Let&#x27;s look at the pros and cons of each.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;1-flatpak&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#1-flatpak&quot; aria-label=&quot;Anchor link for: 1-flatpak&quot;&gt;1. Flatpak&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Pros:&lt;&#x2F;strong&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;True Sandbox Security:&lt;&#x2F;strong&gt; Granular control over permissions with portal integration.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;OSTree Deduplication:&lt;&#x2F;strong&gt; Uses OSTree (like &quot;Git for OS binaries&quot;) to share common runtimes (GNOME, KDE, Freedesktop), saving massive amounts of disk space.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;Decentralized but United:&lt;&#x2F;strong&gt; Anyone can host a Flatpak repository, but &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;flathub.org&#x2F;&quot;&gt;Flathub&lt;&#x2F;a&gt; serves as a fantastic, semi-official hub.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;Consistent Across Distros:&lt;&#x2F;strong&gt; A Flatpak built today runs identically on Ubuntu, Fedora, Arch, or openSUSE.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;Cons:&lt;&#x2F;strong&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Not for CLI&#x2F;System Services:&lt;&#x2F;strong&gt; Flatpak is intentionally designed only for desktop (GUI) applications.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;Disk Footprint:&lt;&#x2F;strong&gt; If you only have one Flatpak app, downloading the entire runtime might feel heavy (though this cost amortizes quickly as you add more apps).&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h3 id=&quot;2-snap-canonical-ubuntu&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#2-snap-canonical-ubuntu&quot; aria-label=&quot;Anchor link for: 2-snap-canonical-ubuntu&quot;&gt;2. Snap (Canonical &#x2F; Ubuntu)&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Pros:&lt;&#x2F;strong&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Versatile:&lt;&#x2F;strong&gt; Can package CLI tools, system daemons (like databases), and desktop apps alike.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;Canonical Backing:&lt;&#x2F;strong&gt; Deeply integrated into Ubuntu with a massive enterprise ecosystem.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;Cons:&lt;&#x2F;strong&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Proprietary&#x2F;Centralized Backend:&lt;&#x2F;strong&gt; The Snap Store backend is closed-source and owned exclusively by Canonical. You cannot host your own independent Snap repository easily.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;Performance:&lt;&#x2F;strong&gt; Snaps use compressed SquashFS loops, leading to notoriously slow cold-startup times (especially for complex apps like browsers).&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;Intrusive Updates:&lt;&#x2F;strong&gt; Auto-updates can sometimes be forced on the user with limited control.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h3 id=&quot;3-appimage&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#3-appimage&quot; aria-label=&quot;Anchor link for: 3-appimage&quot;&gt;3. AppImage&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Pros:&lt;&#x2F;strong&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Zero Install:&lt;&#x2F;strong&gt; Just download a single file, make it executable, and run it. No daemons, no root, no setup.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;Ultra-Portable:&lt;&#x2F;strong&gt; Perfect for offline use or quick trials of an application.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;Cons:&lt;&#x2F;strong&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;No Sandbox by Default:&lt;&#x2F;strong&gt; AppImages run with full user privileges. If an AppImage is compromised, your whole home directory is vulnerable.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;No Centralized Updates:&lt;&#x2F;strong&gt; Updating an AppImage usually requires downloading a whole new file manually, unless the developer implements a custom updater.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;Poor Desktop Integration:&lt;&#x2F;strong&gt; Does not automatically integrate with your system&#x27;s application launcher or file associations without third-party helpers.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h3 id=&quot;4-native-package-managers-apt-dnf-pacman&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#4-native-package-managers-apt-dnf-pacman&quot; aria-label=&quot;Anchor link for: 4-native-package-managers-apt-dnf-pacman&quot;&gt;4. Native Package Managers (APT, DNF, Pacman)&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Pros:&lt;&#x2F;strong&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Peak Efficiency:&lt;&#x2F;strong&gt; Native compilation, shared dynamic libraries, and zero overhead.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;System Integrity:&lt;&#x2F;strong&gt; Keeps the entire operating system consistent and minimal.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;Cons:&lt;&#x2F;strong&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Dependency Hell:&lt;&#x2F;strong&gt; Upgrading one application can force upgrades on system libraries, potentially breaking other software.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;Slow Update Cycles:&lt;&#x2F;strong&gt; Stable distributions (like Debian or Ubuntu LTS) often have outdated versions of user-facing desktop applications.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;hr &#x2F;&gt;
&lt;h2 id=&quot;a-massive-kudos-to-the-pioneers&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#a-massive-kudos-to-the-pioneers&quot; aria-label=&quot;Anchor link for: a-massive-kudos-to-the-pioneers&quot;&gt;A Massive Kudos to the Pioneers&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Flatpak did not happen by accident. It is the result of years of dedicated work by some of the most brilliant minds in the free software ecosystem.&lt;&#x2F;p&gt;
&lt;p&gt;We owe a massive thank you to:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Alexander Larsson (Red Hat):&lt;&#x2F;strong&gt; The original architect who pioneered &lt;code&gt;xdg-app&lt;&#x2F;code&gt; and laid down the core concepts of OSTree runtimes and Bubblewrap integration. His vision of a decoupled desktop application layer has transformed how we use Linux.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;The Red Hat &amp;amp; Fedora Teams:&lt;&#x2F;strong&gt; For providing the engineering muscle, sponsoring developers, and proving that immutable base systems (like Silverblue) combined with Flatpaks are the future of stable computing.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;The Endless OS Team:&lt;&#x2F;strong&gt; An early adopter that pushed Flatpak to its limits, ensuring that the packaging format worked flawlessly in offline, low-bandwidth, and education-focused deployments around the world.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;Collabora:&lt;&#x2F;strong&gt; For their continuous contributions to &lt;code&gt;bubblewrap&lt;&#x2F;code&gt;, pressure testing the sandbox, and ensuring Flatpak&#x27;s enterprise-grade reliability.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;The GNOME and KDE Communities:&lt;&#x2F;strong&gt; For embracing Flatpak fully, updating their toolkits to natively support XDG Desktop Portals, and making sandboxed apps look and feel native on any desktop environment.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;The Flathub Maintainers &amp;amp; Contributors:&lt;&#x2F;strong&gt; For creating an open, community-driven application hub that has become the de facto app store for Linux, making app publishing incredibly straightforward for developers.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;A huge &lt;strong&gt;THANK YOU&lt;&#x2F;strong&gt; to everyone who has worked on Flatpak, it is a marvel and an amazing platform that helps me, and millions of other Linux users, every day.&lt;&#x2F;p&gt;
&lt;p&gt;For those reasons, &lt;strong&gt;Flatpak&lt;&#x2F;strong&gt; is definitely one of my &lt;strong&gt;Desert Island Apps&lt;&#x2F;strong&gt;. What are yours?&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>MCP Tool Authorization at Scale</title>
        <published>2026-04-28T00:00:00+00:00</published>
        <updated>2026-04-28T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://sjen.codeberg.page/talks/apigee-mcp-at-scale/"/>
        <id>https://sjen.codeberg.page/talks/apigee-mcp-at-scale/</id>
        
        <content type="html" xml:base="https://sjen.codeberg.page/talks/apigee-mcp-at-scale/"></content>
        
    </entry>
    <entry xml:lang="en">
        <title>Powering Retail Agents with ADK, UCP &amp; Apigee</title>
        <published>2026-02-24T00:00:00+00:00</published>
        <updated>2026-02-24T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://sjen.codeberg.page/talks/powering-retail-agents/"/>
        <id>https://sjen.codeberg.page/talks/powering-retail-agents/</id>
        
        <content type="html" xml:base="https://sjen.codeberg.page/talks/powering-retail-agents/"></content>
        
    </entry>
    <entry xml:lang="en">
        <title>Favorite Books &amp; Films of 2025</title>
        <published>2026-01-04T00:00:00+00:00</published>
        <updated>2026-01-04T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://sjen.codeberg.page/posts/favorite-2025/"/>
        <id>https://sjen.codeberg.page/posts/favorite-2025/</id>
        
        <content type="html" xml:base="https://sjen.codeberg.page/posts/favorite-2025/">&lt;p&gt;These books and films really stood out for me last year.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;books&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#books&quot; aria-label=&quot;Anchor link for: books&quot;&gt;Books&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;The Maniac (2023)&lt;&#x2F;strong&gt; - Benjamin Labatut
What an engrossing tail of the enigmatic character of John von Neumann, a shaper of the 20th century who is relatively unknown today. But what a tale it is, with his origins in theoretical mathematics in Hungary, Berlin and then America, ending with the atomic bomb and geopolitical game theory. The books concludes with the story of Demis Hassabis and the AI AlphaGo journey at DeepMind, which while not quite as engrossing, is also quite interesting as a new generation of computational achievements.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;The Price of Peace: Money, Democracy, and the Life of John Maynard Keynes (2020)&lt;&#x2F;strong&gt; - Zachary D. Carter
Absolutely engrossing story of John Maynard Keynes and his contributions to monetary policy, economics, and human society. From financing England during WWI to Roosevelt and the formation of the World Bank after WWII. Absolutely inspiring and eye opening about how our new world of fluid money was created out of the ruins of the old regime.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;East West Street: On the Origins of &quot;Genocide&quot; and &quot;Crimes Against Humanity&quot; (2016)&lt;&#x2F;strong&gt; - Philippe Sands
After doing some traveling in Krakow and Warsaw, I loved this personal look into the origins of genocide, and the humanity that was erased by the Nazis in Poland and eastern Europe.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;Schindler&#x27;s List (1982)&lt;&#x2F;strong&gt; - Thomas Keneally -
On the same themes, this book is such a beautiful and enriching look into the lost humanity and suffering of Jews and other outcast groups in Krakow, and how one very average businessman fought back within the system.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;Wind, Sand and Stars (1939)&lt;&#x2F;strong&gt; - Antoine de Saint-Exupéry -
After watching a new film based on this book, I wanted to read the source, and really enjoyed the tales of living, flying and ruminating about life and death in North Africa during the early years of aviation.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;God&#x27;s Fury, England&#x27;s Fire (2008)&lt;&#x2F;strong&gt; - Michael Braddick - This story of how a country chaotically came to beheading a King and asserting the will of Parliament was utterly engrossing to me. Also how the battles were relatively civilized compared to the destruction on the continent during the Thirty Years War (thinking of the burning of Magdeburg), and how protestant calvinist thought and political theory came to topple a king, 140 years before the French Revolution.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;Winter of the World (2012)&lt;&#x2F;strong&gt; - Ken Follett - Ken Follett can always get me with his historical tales, and this one about the human journey through WWII from several different perspectives was extremely touching to me. The existential relief of the residents of Berlin when the Berlin Air Lift started to bring in food and fuel after years of starvation, for example, or the story of how one american scientist was convinced to hand over critical information about the atomic bomb to a Russian agent. Human, engrossing &amp;amp; fascinating looks into history and the individuals living through it.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;Why England Slept (1940)&lt;&#x2F;strong&gt; - John F. Kennedy - Fascinating look into why England took so long to react to Hitler and the threats coming from Germany leading up to WWII.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;Sternstunden der Menschheit - Decisive Moments in History (1927)&lt;&#x2F;strong&gt; - Stefan Zweig -
Beautiful small stories of dramatic decisions and moments through history, from the fall of Constantinople to the story of the composer Handel struggling in London, truly inspiring and wonderful.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;I, Claudius &amp;amp; Claudius the God (1986)&lt;&#x2F;strong&gt; - Robert Graves -
Deeply fascinating look into the life of a Roman historian, emperor and human. The story of the invasion of England was amazing.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;The Stoic Challenge (2019)&lt;&#x2F;strong&gt; - William B. Irvine -
Very useful and interesting look into stoic philosophy for living.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;Millennium (2008)&lt;&#x2F;strong&gt; - Tom Holland - Fascinating story and journey of Europe &amp;amp; Christianity fighting to survive around the year 1000.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;How the World Really Works: A Scientist’s Guide to Our Past, Present and Future (2022)&lt;&#x2F;strong&gt; - Vaclav Smil - Thought provoking guide to the scientific discoveries that really power our modern world: steel, aluminum, concrete, &amp;amp; fertilizer. Chips &amp;amp; digital don&#x27;t even come close to that impact, and are decidedly &quot;virtual&quot; compared to the real impact of transportation and food that those earlier discoveries provide. Interesting!&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h2 id=&quot;films&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#films&quot; aria-label=&quot;Anchor link for: films&quot;&gt;Films&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Pan&#x27;s Labyrinth (2007)&lt;&#x2F;strong&gt; - Guillermo del Toro
Beautiful little fairy tale and story.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;Predator: Badlands (2025)&lt;&#x2F;strong&gt; - Dan Trachtenberg
Simple and great little predator film.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;Frost&#x2F;Nixon (2009)&lt;&#x2F;strong&gt; - Ron Howard
A good simple movie with moving characters.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;Ghostlight (2024)&lt;&#x2F;strong&gt; - Alex Thompson, Kelly O&#x27;Sullivan
Beautiful little film about life and theater.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;A Real Pain (2024)&lt;&#x2F;strong&gt; - Jesse Eisenberg
After taking my own trips around Poland in the last few years, I really enjoyed this character portrait (except for the last shot, but it didn&#x27;t ruin the film).&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;Judgement at Nuremberg (1961)&lt;&#x2F;strong&gt; - Stanley Kramer
What a masterpiece.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;Oddity (2024)&lt;&#x2F;strong&gt; - Damian Mc Carthy
Wow, what a great suspense film.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;Maria (2024)&lt;&#x2F;strong&gt; - Pablo Larraín
This film paints a full picture of an artist&#x27;s life, tragedy and all.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;Companion (2025)&lt;&#x2F;strong&gt; - Drew Hancock
Fun romp through the future world of lifelike robots.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;The Brutalist (2025)&lt;&#x2F;strong&gt; - Brady Corbet
Full portrait of a life, which I very much enjoyed.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;Spotlight (2015)&lt;&#x2F;strong&gt; - Tom McCarthy
Great newspaper film.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;Black Bag (2025)&lt;&#x2F;strong&gt; - Steven Soderbergh
Great spy caper.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;The Big Sleep (1946)&lt;&#x2F;strong&gt; - Howard Hawks
Classic great film.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;Henry V (1989)&lt;&#x2F;strong&gt; - Kenneth Branagh
Really enjoyed this adaptation, always wanted to get around to watching it, was worth the wait.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Cost to Profit Center – Building AI &amp; API Monetization Platforms</title>
        <published>2025-10-22T00:00:00+00:00</published>
        <updated>2025-10-22T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://sjen.codeberg.page/talks/cost-to-profit-center/"/>
        <id>https://sjen.codeberg.page/talks/cost-to-profit-center/</id>
        
        <content type="html" xml:base="https://sjen.codeberg.page/talks/cost-to-profit-center/"></content>
        
    </entry>
    <entry xml:lang="en">
        <title>Building API First products in 2025 Panel</title>
        <published>2025-10-22T00:00:00+00:00</published>
        <updated>2025-10-22T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://sjen.codeberg.page/talks/nordic-2025-panel/"/>
        <id>https://sjen.codeberg.page/talks/nordic-2025-panel/</id>
        
        <content type="html" xml:base="https://sjen.codeberg.page/talks/nordic-2025-panel/"></content>
        
    </entry>
    <entry xml:lang="en">
        <title>Agentic Portals</title>
        <published>2025-09-20T00:00:00+00:00</published>
        <updated>2025-09-20T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://sjen.codeberg.page/projects/agentic-portals/"/>
        <id>https://sjen.codeberg.page/projects/agentic-portals/</id>
        
        <content type="html" xml:base="https://sjen.codeberg.page/projects/agentic-portals/"></content>
        
    </entry>
    <entry xml:lang="en">
        <title>API Tester</title>
        <published>2025-09-20T00:00:00+00:00</published>
        <updated>2025-09-20T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://sjen.codeberg.page/projects/api-tester/"/>
        <id>https://sjen.codeberg.page/projects/api-tester/</id>
        
        <content type="html" xml:base="https://sjen.codeberg.page/projects/api-tester/"></content>
        
    </entry>
    <entry xml:lang="en">
        <title>Apigee Templater</title>
        <published>2024-03-15T00:00:00+00:00</published>
        <updated>2024-03-15T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://sjen.codeberg.page/projects/apigee-templater/"/>
        <id>https://sjen.codeberg.page/projects/apigee-templater/</id>
        
        <content type="html" xml:base="https://sjen.codeberg.page/projects/apigee-templater/"></content>
        
    </entry>
    <entry xml:lang="en">
        <title>Rust Performance on Google Cloud Run</title>
        <published>2022-07-11T00:00:00+00:00</published>
        <updated>2022-07-11T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://sjen.codeberg.page/posts/rust-cloud-run/"/>
        <id>https://sjen.codeberg.page/posts/rust-cloud-run/</id>
        
        <content type="html" xml:base="https://sjen.codeberg.page/posts/rust-cloud-run/">&lt;p&gt;Based on &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;seroter.com&#x2F;2022&#x2F;04&#x2F;18&#x2F;measuring-container-size-and-startup-latency-for-serverless-apps-written-in-c-node-js-go-and-java&#x2F;&quot;&gt;this comparison&lt;&#x2F;a&gt; of different programming language&#x27;s size and performance on Google Cloud Run, I decided to do the same test with some more languages. So in this post it&#x27;s Rust.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;demo-rust-service&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#demo-rust-service&quot; aria-label=&quot;Anchor link for: demo-rust-service&quot;&gt;Demo Rust Service&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;For this test of microservice deployment size and speed, I created a pretty identical service to Richard&#x27;s example.&lt;&#x2F;p&gt;
&lt;p&gt;Here&#x27;s my employee.rs file with a DTO struct for the employee data. Source code is here.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;use&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; serde&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;Deserialize&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; Serialize&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;#&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;derive&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;Debug&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; Deserialize&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; Serialize&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;pub&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; struct&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; Employee&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;  pub&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; Id&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; String&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;  pub&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; FullName&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; String&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;  pub&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; Location&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; String&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;  pub&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; JobTitle&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; String&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;And here are two functions in main.rs that serve the employee data, and run the web service.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;async&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; fn&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; employees&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other&quot;&gt;_req&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; Request&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;Body&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; -&amp;gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; Result&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;Response&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;Body&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; Infallible&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;  let&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other&quot;&gt; v&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; Vec&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other&quot;&gt;employee&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;::&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;Employee&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; =&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; vec!&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;    employee&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;::&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;Employee&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;      Id&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; String&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;::&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;from&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;100&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;      FullName&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; String&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;::&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;from&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;Jack Donaghy&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;      JobTitle&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; String&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;::&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;from&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;Writer&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;      Location&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; String&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;::&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;from&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;NYC&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;    employee&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;::&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;Employee&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;      Id&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; String&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;::&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;from&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;101&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;      FullName&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; String&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;::&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;from&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;Liz Lemon&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;      JobTitle&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; String&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;::&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;from&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;Executive&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;      Location&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; String&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;::&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;from&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;NYC&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  ]&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;  Ok&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;Response&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;::&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;new&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;serde_json&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;::&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;to_string&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;&amp;amp;&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other&quot;&gt;v&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;.&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;unwrap&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;.&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;into&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Here&#x27;s our main function with the listener configuration.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;#&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;tokio&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;main&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;async&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; fn&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; main&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;  let&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other&quot;&gt; addr&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; =&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; SocketAddr&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;::&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;from&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;0&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; 0&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; 0&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; 0&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; 8080&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;  let&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other&quot;&gt; make_svc&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; =&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; make_service_fn&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;|&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other&quot;&gt;_conn&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;|&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; async&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; Ok&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other&quot;&gt;_&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; Infallible&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;service_fn&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other&quot;&gt;employees&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt; }&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;  let&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other&quot;&gt; server&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; =&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; Server&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;::&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;bind&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;&amp;amp;&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other&quot;&gt;addr&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;.&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;serve&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other&quot;&gt;make_svc&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;  if&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; let&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; Err&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other&quot;&gt;e&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; =&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other&quot;&gt; server&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;.&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;await&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;    eprintln!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;server error: &lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;}&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other&quot;&gt; e&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;And that&#x27;s it, after running cargo run locally this service spins up and answers requests for employee data on port 8080.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;build-and-deploy-to-cloud-run&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#build-and-deploy-to-cloud-run&quot; aria-label=&quot;Anchor link for: build-and-deploy-to-cloud-run&quot;&gt;Build and deploy to Cloud Run&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;So now let&#x27;s build a docker image and deploy to Cloud Run, see the file deploy_gcp.sh for details.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-comment&quot;&gt;#&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; Build and publish image to our cloud registry&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;gcloud&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; builds&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; submit&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;-tag&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; gcr.io&#x2F;&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable&quot;&gt;$&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable&quot;&gt;1&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;&#x2F;rustservice&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-comment&quot;&gt;#&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; Deploy image to Cloud Run and allow unauthenticated traffic to service&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;gcloud&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; run&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; deploy&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; rustservice&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;-image&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; gcr.io&#x2F;&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable&quot;&gt;$&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable&quot;&gt;1&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;&#x2F;rustservice&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; &#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;  --platform&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; managed&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;-project&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable&quot;&gt; $&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable&quot;&gt;1&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;-region&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; us-central1&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; &#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;  --allow-unauthenticated&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Now we have our image published to our registry, at a pretty compact 10.9 MB using the Google&#x27;s Distroless CC base image (extra compact just for running applications, the build is done using the full 1.6 GB Rust image).&lt;&#x2F;p&gt;
&lt;p&gt;We also already have our service deployed to cloud run, and can test the service with curl.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;curl&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; https:&#x2F;&#x2F;rustservice2-qtw3rvj3ya-uc.a.run.app&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; |&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; jq&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;And which returns our test data.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;json&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-support&quot;&gt;    &amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;Id&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;100&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-support&quot;&gt;    &amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;FullName&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;Jack Donaghy&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-support&quot;&gt;    &amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;Location&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;NYC&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-support&quot;&gt;    &amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;JobTitle&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;Writer&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  }&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-support&quot;&gt;    &amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;Id&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;101&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-support&quot;&gt;    &amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;FullName&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;Liz Lemon&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-support&quot;&gt;    &amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;Location&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;NYC&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-support&quot;&gt;    &amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;JobTitle&lt;&#x2F;span&gt;&lt;span class=&quot;z-support&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;Executive&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;cold-run&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#cold-run&quot; aria-label=&quot;Anchor link for: cold-run&quot;&gt;Cold run&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Now let&#x27;s do the same performance test using hey that was done with the other frameworks.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;hey&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;n&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; 200&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;c&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; 10&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; https:&#x2F;&#x2F;rustservice2-qtw3rvj3ya-uc.a.run.app&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Here are the cold start results (calling from a VM running in the same us-central1 (Iowa) region).&lt;&#x2F;p&gt;
&lt;p&gt;Summary:
Total:        0.8240 secs
Slowest:      0.6409 secs
Fastest:      0.0051 secs
Average:      0.0271 secs
Requests&#x2F;sec: 242.7116&lt;&#x2F;p&gt;
&lt;p&gt;Total data:   30600 bytes
Size&#x2F;request: 153 bytes&lt;&#x2F;p&gt;
&lt;p&gt;Response time histogram:
0.005 [1]     |
0.069 [189]   |■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
0.132 [0]     |
0.196 [0]     |
0.259 [0]     |
0.323 [2]     |
0.387 [6]     |■
0.450 [0]     |
0.514 [0]     |
0.577 [0]     |
0.641 [2]     |&lt;&#x2F;p&gt;
&lt;p&gt;Latency distribution:
10% in 0.0060 secs
25% in 0.0064 secs
50% in 0.0072 secs
75% in 0.0087 secs
90% in 0.0127 secs
95% in 0.3021 secs
99% in 0.6339 secs&lt;&#x2F;p&gt;
&lt;p&gt;Details (average, fastest, slowest):
DNS+dialup:   0.0012 secs, 0.0051 secs, 0.6409 secs
DNS-lookup:   0.0004 secs, 0.0000 secs, 0.0078 secs
req write:    0.0000 secs, 0.0000 secs, 0.0012 secs
resp wait:    0.0258 secs, 0.0050 secs, 0.6152 secs
resp read:    0.0001 secs, 0.0000 secs, 0.0062 secs&lt;&#x2F;p&gt;
&lt;p&gt;Status code distribution:
[200] 200 responses&lt;&#x2F;p&gt;
&lt;h2 id=&quot;hot-run&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#hot-run&quot; aria-label=&quot;Anchor link for: hot-run&quot;&gt;Hot run&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Now running again with the hot instances resulted in these numbers.&lt;&#x2F;p&gt;
&lt;p&gt;Summary:
Total:        0.1737 secs
Slowest:      0.0300 secs
Fastest:      0.0059 secs
Average:      0.0084 secs
Requests&#x2F;sec: 1151.3049&lt;&#x2F;p&gt;
&lt;p&gt;Total data:   30600 bytes
Size&#x2F;request: 153 bytes&lt;&#x2F;p&gt;
&lt;p&gt;Response time histogram:
0.006 [1]     |
0.008 [177]   |■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
0.011 [11]    |■■
0.013 [1]     |
0.016 [0]     |
0.018 [0]     |
0.020 [0]     |
0.023 [0]     |
0.025 [0]     |
0.028 [0]     |
0.030 [10]    |■■&lt;&#x2F;p&gt;
&lt;p&gt;Latency distribution:
10% in 0.0064 secs
25% in 0.0068 secs
50% in 0.0073 secs
75% in 0.0078 secs
90% in 0.0083 secs
95% in 0.0282 secs
99% in 0.0291 secs&lt;&#x2F;p&gt;
&lt;p&gt;Details (average, fastest, slowest):
DNS+dialup:   0.0010 secs, 0.0059 secs, 0.0300 secs
DNS-lookup:   0.0002 secs, 0.0000 secs, 0.0045 secs
req write:    0.0000 secs, 0.0000 secs, 0.0003 secs
resp wait:    0.0072 secs, 0.0058 secs, 0.0107 secs
resp read:    0.0000 secs, 0.0000 secs, 0.0006 secs&lt;&#x2F;p&gt;
&lt;p&gt;Status code distribution:
[200] 200 responses&lt;&#x2F;p&gt;
&lt;h2 id=&quot;results-summary&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#results-summary&quot; aria-label=&quot;Anchor link for: results-summary&quot;&gt;Results summary&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Here&#x27;s a table of the 95% responses based on runtime &amp;amp; client location.&lt;&#x2F;p&gt;
&lt;p&gt;Call type Service running locally Service running on Cloud Run us-central1&lt;&#x2F;p&gt;
&lt;p&gt;Cold start 0.0009 secs 0.3021 secs&lt;&#x2F;p&gt;
&lt;p&gt;Hot start 0.0008 secs 0.0282 secs&lt;&#x2F;p&gt;
&lt;p&gt;And the full table with Dotnet, Go, Node, Java and Rust, averaging both cold and hot start 95% percentile results.&lt;&#x2F;p&gt;
&lt;p&gt;Language 95th percentile&lt;&#x2F;p&gt;
&lt;p&gt;dotnet 1.01s&lt;&#x2F;p&gt;
&lt;p&gt;go 0.33s&lt;&#x2F;p&gt;
&lt;p&gt;nodejs 1.32s&lt;&#x2F;p&gt;
&lt;p&gt;java 5.97s&lt;&#x2F;p&gt;
&lt;p&gt;rust 0.17s&lt;&#x2F;p&gt;
&lt;p&gt;And of course at the end, it all depends on which platform you are comfortable with and can use most effectively. But some basic performance expectations are of course important to consider. In a next step I would like to add Bun to this test, which uses a new Zig-based runtime for javascript.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Enable Innovation Everywhere | No-Code App Development with AppSheet</title>
        <published>2021-01-10T00:00:00+00:00</published>
        <updated>2021-01-10T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://sjen.codeberg.page/talks/no-code-innovation/"/>
        <id>https://sjen.codeberg.page/talks/no-code-innovation/</id>
        
        <content type="html" xml:base="https://sjen.codeberg.page/talks/no-code-innovation/"></content>
        
    </entry>
</feed>
