<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Distlang on Medium]]></title>
        <description><![CDATA[Stories by Distlang on Medium]]></description>
        <link>https://medium.com/@distlang?source=rss-1ccbf34e5952------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*EdzgBFD4xjyZSrWgY5cvsg.png</url>
            <title>Stories by Distlang on Medium</title>
            <link>https://medium.com/@distlang?source=rss-1ccbf34e5952------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 22:35:33 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@distlang/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[End to End Example: From App to Dashboard in Minutes (2026)]]></title>
            <link>https://medium.com/@distlang/end-to-end-example-from-app-to-dashboard-in-minutes-2026-5e13aac11ae4?source=rss-1ccbf34e5952------2</link>
            <guid isPermaLink="false">https://medium.com/p/5e13aac11ae4</guid>
            <category><![CDATA[distributed-systems]]></category>
            <category><![CDATA[metrics]]></category>
            <category><![CDATA[learning-to-code]]></category>
            <category><![CDATA[serverless]]></category>
            <category><![CDATA[observability]]></category>
            <dc:creator><![CDATA[Distlang]]></dc:creator>
            <pubDate>Mon, 27 Apr 2026 21:28:39 GMT</pubDate>
            <atom:updated>2026-04-27T21:28:39.969Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lfbZg5uuKgaKIZeRNi2ctQ.jpeg" /></figure><p>An end-to-end metrics example covers the full pipeline from instrumenting application code to seeing live data on a dashboard. This glossary defines every term in that chain: counters, histograms, metric sets, flush semantics, ingestion, and visualization. Traditional setups with Prometheus and Grafana take hours. API-first approaches designed for serverless and edge runtimes can compress that timeline to minutes, with no agents, sidecars, or infrastructure to manage.</p><h3>What “End to End” Means in a Metrics Pipeline</h3><p>The phrase “end to end” gets used loosely in monitoring. In the broadest sense, <a href="https://www.browserstack.com/guide/end-to-end-monitoring">end-to-end monitoring tracks the entire user journey</a> across every layer of a system, from the UI to the database. That’s a strategy. What developers actually search for when they type “end to end example: from app to dashboard in minutes” is something more specific: a concrete developer workflow.</p><p>Here, “end to end” means the complete path a data point travels:</p><ol><li><strong>Instrument</strong> code to record a metric</li><li><strong>Buffer</strong> the data in a client library</li><li><strong>Flush</strong> the buffer to a backend</li><li><strong>Ingest</strong> the data into a time-series store</li><li><strong>Visualize</strong> the result on a dashboard</li></ol><p>Each of those stages has its own vocabulary. Understanding the terms at every stage is the difference between spending an afternoon reading docs and getting your first chart in minutes.</p><p>There’s a useful concept from API product management called TTFHW, or Time to First Hello World. It measures <a href="https://www.moesif.com/blog/technical/api-product-management/What-is-TTFHW/">how quickly a customer first derives value from a platform</a>. “Time to first dashboard” is the observability equivalent. It answers a simple question: how long from opening the docs to seeing a real chart with real data? That number defines whether a tool respects your time.</p><p>If you want to understand <a href="https://distlang.com/blog/introducing-distlang/">why Distlang was built</a> around this principle, it comes down to one belief: the pipeline from app to dashboard should take minutes, not days.</p><h3>Key Terms at Each Pipeline Stage</h3><h3>Instrumentation</h3><p>This is where data originates. You add a few lines of code to your application, and those lines create numeric data points every time something happens.</p><p><strong>Counter.</strong> A counter is a cumulative metric that only goes up (or resets to zero). It’s perfect for things you want to count indefinitely: HTTP requests served, errors returned, user signups processed. As <a href="https://dev.to/godofgeeks/metrics-types-counter-gauge-histogram-4le1">one explainer on DEV Community puts it</a>, a counter represents a running total that increases monotonically. You never decrement a counter. If you need to know “how many requests happened in the last five minutes,” you query the rate of change on a counter.</p><p><strong>Histogram.</strong> A histogram records the distribution of observed values across configurable buckets. Think response times: you don’t just want the average latency, you want to know what percentage of requests completed under 100ms, under 250ms, under 1s. <a href="https://prometheus.io/docs/concepts/metric_types/">Prometheus documentation describes a histogram as essentially a bucketed counter</a>, which is a useful mental model. Each bucket holds a count of observations that fell within its range.</p><p><strong>Gauge.</strong> A gauge represents a current value that can go up or down. Active connections, queue depth, memory usage. Unlike counters, gauges have no implied direction.</p><p><strong>Metric set.</strong> A metric set is a logical grouping of related metrics. All the counters and histograms for a single API route, for a background job, or for a checkout flow might live in one metric set. This grouping matters because it determines how your dashboard organizes data. When you define a metric set in the <a href="https://distlang.com/docs/metrics/javascript/">Distlang JavaScript client</a>, you declare all counters and histograms for that group in one place.</p><h3>Recording and Flushing</h3><p><strong>Client library / SDK.</strong> This is the code-level tool that buffers metric data points before sending them. A good client library handles batching (collecting multiple data points into a single payload), serialization, and error recovery. It sits between your application logic and the network.</p><p><strong>Flush.</strong> Flushing is the act of sending buffered metrics from the client to the backend. In a traditional long-running server, this is unremarkable. The process stays alive, a background thread sends data every 10 or 60 seconds, and life goes on.</p><p>In serverless, flush semantics become critical.</p><p><strong>waitUntil() and </strong><strong>after().</strong> Serverless functions are short-lived. They spin up, handle a request, and terminate. If your metrics client hasn’t finished sending data before the function shuts down, that data is lost. Both Cloudflare Workers and Vercel provide mechanisms to keep the function alive after the response has been sent to the user.</p><p>On Cloudflare Workers, you use ctx.waitUntil(promise). On Vercel (Next.js), you use after(callback). As the <a href="https://www.inngest.com/blog/vercel-cloudflare-wait-until">Inngest blog explains</a>, waitUntil is useful for asynchronous work that shouldn’t block the response, things like sending metrics, logging, or cache updates. Without these patterns, serverless metrics are unreliable.</p><p>The <a href="https://distlang.com/docs/metrics/cloudflare/">Distlang Cloudflare Workers guide</a> shows how to wire ctx.waitUntil() directly into the flush call, and the <a href="https://distlang.com/docs/metrics/vercel/">Vercel guide</a> does the same for after(). Both are copy-paste examples designed to make the end to end flow from app to dashboard achievable in minutes.</p><h3>Ingestion and Storage</h3><p><strong>API-first ingestion.</strong> Instead of running an agent or scraper that polls your application for metrics, you send data directly to an HTTP endpoint. This is the only model that works cleanly in serverless and edge runtimes where you can’t install background daemons.</p><p><strong>Agent vs. agentless.</strong> Traditional monitoring tools use sidecar processes or daemons (agents) that run alongside your application, scraping metrics endpoints at regular intervals. Prometheus is the canonical example: it pulls data from /metrics endpoints on your servers. This model assumes a persistent host. In a Cloudflare Worker or a Vercel Edge Function, there is no persistent host. There is no place to run an agent. Agentless, push-based ingestion is the only option.</p><p>This isn’t a theoretical problem. Prometheus core maintainer Bartłomiej Płotka acknowledged in a <a href="https://groups.google.com/g/prometheus-developers/c/FPe0LsTfo2E">developer group discussion</a> that pushing metrics from FaaS environments means “you take enormous latency hit to spin up a new TCP connection just for that,” and that the push model for serverless involves “discovery/backoffs/persistent buffer/auth and all pains of push model + some aggregation proxy.”</p><p><strong>TSDB (Time-Series Database).</strong> The backend that stores metric data points with timestamps. Prometheus includes its own TSDB. InfluxDB is another popular option. Hosted services abstract this entirely, so you never manage storage directly. You can <a href="https://distlang.com/docs/metrics/api/">explore the Distlang Metrics API</a> to see how an API-first approach handles ingestion without requiring you to run your own TSDB.</p><p><strong>Retention.</strong> How long metric data is kept before it’s deleted. Common windows are 7 days, 14 days, and 30 days. Shorter retention is cheaper. Longer retention matters for trend analysis. Most developers building an end to end example from app to dashboard in minutes start with short retention and extend it as their needs grow.</p><p><strong>API token.</strong> A single authentication credential used to identify your account when sending metrics. Simpler tools use one long-lived token per account. You can set yours up in the <a href="https://distlang.com/docs/metrics/api-tokens/">API token configuration guide</a>.</p><h3>Visualization</h3><p><strong>Dashboard.</strong> A visual interface that renders time-series data as charts, graphs, and tables. Dashboards are where the “in minutes” promise either holds up or falls apart.</p><p><strong>Auto-generated dashboard.</strong> Some tools create a default dashboard the moment data arrives, with no manual configuration required. You define a metric set, send data, and a dashboard appears with charts for each counter and histogram. This is the approach Distlang Metrics takes: every metric set gets its own hosted dashboard at <a href="https://dash.distlang.com/">dash.distlang.com</a>.</p><p><strong>AI-suggested charts.</strong> Newer tools use incoming metric names and labels to automatically suggest chart titles, descriptions, and visualization types. This eliminates the blank-canvas problem where a developer stares at an empty dashboard wondering what panels to create.</p><p><strong>Panels / widgets.</strong> Individual chart components within a dashboard. A panel might show a line graph of request counts over time, a bar chart of latency distribution, or a single number representing the current error rate.</p><h3>Why “In Minutes” Matters</h3><p>The phrase “in minutes” in an end to end example from app to dashboard is not marketing fluff. It’s a reaction to a real problem.</p><h3>The Traditional Setup Tax</h3><p>Setting up Grafana alone takes <a href="https://howlongfor.com/technology/set-up-grafana">30 minutes to 4 hours depending on your goals</a>. A basic installation with one data source and a few panels can be done in under an hour. Building a monitoring stack with custom dashboards, alerting rules, and multiple data sources takes 2 to 4 hours. If you’re also deploying Prometheus with exporters from scratch, add another 1 to 3 hours.</p><p>That’s a realistic minimum of 2 to 7 hours before you see your first chart. And that’s assuming everything works on the first try.</p><h3>The Maintenance Tax</h3><p>Setup time is only the beginning. In a widely shared blog post that went viral on Hacker News in late 2025, developer Henrik Gerdes <a href="https://henrikgerdes.me/blog/2025-11-grafana-mess/">documented Grafana’s deprecation churn</a>: Grafana OnCall deprecated, Grafana Agent and Agent Flow deprecated within 2 to 3 years of creation, and the Angular to React migration that broke most existing dashboards.</p><p>Practitioners in the <a href="https://news.ycombinator.com/item?id=45934940">Hacker News thread</a> were blunt. One commenter wrote: “I just want the thing to alert me when something’s down, and ideally if the check doesn’t change and the datasource and metric don’t change, the dashboard definition and the alert definition should be the same for the last and the next 10 years.”</p><h3>Serverless Compounds Everything</h3><p>Traditional monitoring assumes long-running processes on persistent hosts. Serverless breaks that assumption completely. As the Baselime team (now part of Cloudflare) wrote, <a href="https://baselime.io/blog/why-is-serverless-observability-hard">serverless applications are a mess to observe</a> with standard monitoring approaches because of their stateless, ephemeral nature.</p><p>If your function lives for 50 milliseconds, you can’t run a Prometheus scraper against it. You can’t install a Datadog agent. You need a push-based, agentless approach that flushes data before the function terminates.</p><h3>Choice Paralysis Is Real</h3><p>Server monitoring has become <a href="https://dev.to/rahulxsingh/60-server-monitoring-observability-tools-4ade">one of the most crowded categories in developer tooling</a>, with over 200 products competing for attention. In a March 2026 Hacker News thread asking about alternatives to Prometheus and Grafana, one practitioner captured the mood perfectly: “I’ve been doing monitoring since before it was called observability with good old Nagios, and the modern observability stack is insane.”</p><p>Another noted that Prometheus “only solves the ‘metrics’ part, and to handle logs and traces, more quite heavy and complex components have to be added to the observability stack. This didn’t feel right.”</p><p>The end to end example from app to dashboard in minutes exists as a concept precisely because the status quo is broken. Developers shouldn’t need a weekend project to see a chart.</p><h3>The End-to-End Flow in Practice</h3><p>Here’s how the glossary terms above connect in a real workflow. This isn’t a step-by-step tutorial (the <a href="https://distlang.com/docs/metrics/quickstart/">Distlang Metrics quickstart</a> covers that), but a walkthrough of how each concept maps to an actual developer experience.</p><p><strong>Define a metric set.</strong> You declare a metric set in your code, specifying the counters and histograms you want to track. For example: a counter for total requests and a histogram for response latency.</p><p><strong>Instrument your handler.</strong> Inside your request handler (a Cloudflare Worker fetch handler, a Vercel route handler, a plain Express endpoint), you increment the counter and observe a value on the histogram.</p><p><strong>Flush via waitUntil or after.</strong> At the end of the handler, you call the client’s flush method wrapped in ctx.waitUntil() (on Workers) or after() (on Vercel). The response goes back to the user immediately. The flush happens in the background.</p><p><strong>Data hits the API.</strong> The client sends an HTTP POST with the buffered metrics to the ingestion endpoint. Authentication happens via a bearer token.</p><p><strong>Dashboard auto-generates.</strong> The first time data arrives for a metric set, a dashboard appears. Charts are created for each counter and histogram. AI suggests titles and descriptions. No manual panel configuration needed.</p><p>That’s the full end to end pipeline from app to dashboard, and with an API-first approach, it genuinely takes minutes. The difference between this and the traditional path is the absence of infrastructure: no Prometheus server, no Grafana instance, no TSDB to manage, no exporters to configure.</p><p>To understand <a href="https://distlang.com/blog/what-helpers-are-in-distlang/">how helpers and layers reduce this pipeline complexity further</a>, think of metrics as a capability you import rather than infrastructure you operate.</p><h3>Common Confusion Points</h3><p><strong>“End-to-end monitoring” vs. “end-to-end metrics example.”</strong> The first is a strategy for full-stack visibility across infrastructure. The second is a developer workflow for getting metrics from code to chart. They share terminology but serve different audiences.</p><p><strong>Counter vs. gauge.</strong> Counters only increase. Gauges go up and down. If you’re tracking total requests, use a counter. If you’re tracking active connections right now, use a gauge. Getting this wrong leads to nonsensical charts.</p><p><strong>Histogram vs. summary.</strong> Histograms use predefined buckets and aggregate server-side. Summaries calculate quantiles client-side. For most API-first metrics services, histograms are the right choice because the backend handles aggregation.</p><p><strong>Metrics vs. logs vs. traces.</strong> Metrics are numeric time-series data (what happened over time, expressed as numbers). Logs are event records (what happened once, expressed as text). Traces follow a single request across multiple services. An end to end example from app to dashboard in minutes focuses on metrics specifically, though some platforms bundle all three.</p><p><strong>Flush vs. fire-and-forget.</strong> In serverless, you cannot just call an async HTTP request and hope it completes. If the function terminates before the request finishes, the data is lost. Using waitUntil() or after() ensures the flush completes. This is the most common mistake developers make when building serverless metrics for the first time.</p><h3>Quick-Reference Table</h3><p>TermWhat It MeansPipeline StageCounterCumulative numeric metric (only increases)InstrumentHistogramDistribution of values across bucketsInstrumentGaugeCurrent-value metric (can increase or decrease)InstrumentMetric setLogical group of related metricsInstrumentClient library / SDKCode that buffers and serializes metric dataRecordFlushSend buffered metrics to the backendSendwaitUntil() / after()Keep serverless function alive to complete flushSendAPI tokenSingle auth credential for metrics ingestionAuthenticateTSDBTime-series database storing metrics with timestampsStoreRetentionHow long metric data is kept (7d, 14d, 30d)StoreDashboardVisual rendering of metric data as chartsVisualizeAuto-generated dashboardDashboard created automatically when data arrivesVisualize</p><h3>Getting Started</h3><p>If you’ve read this far, you understand every term in the end to end metrics pipeline from app to dashboard. The next step is building one.</p><p>The <a href="https://distlang.com/docs/metrics/quickstart/">Distlang Metrics quickstart</a> walks through the full flow in a single page: define a metric set, instrument a handler, flush, and see your dashboard. It’s designed to get you from zero to a live dashboard in minutes, with no infrastructure to provision. The free tier includes 500k rows per month, 7-day retention, unlimited metric sets, and AI chart suggestions.</p><h3>FAQ</h3><h3>What does “end to end” mean in the context of metrics?</h3><p>It means the complete path from instrumenting your application code (recording a counter or histogram) through flushing that data to a backend, storing it, and rendering it on a dashboard. Every stage of the pipeline is covered.</p><h3>How long does it take to set up Prometheus and Grafana from scratch?</h3><p>Realistic estimates put the total at 2 to 7 hours. Grafana alone takes 30 minutes to 4 hours depending on complexity, and adding Prometheus with exporters adds another 1 to 3 hours on top.</p><h3>Why can’t I use Prometheus in serverless environments?</h3><p>Prometheus uses a pull model: it scrapes metrics from endpoints on long-running servers. Serverless functions are ephemeral and terminate after each request. There’s no persistent endpoint for Prometheus to scrape. You need a push-based, agentless approach instead.</p><h3>What is the difference between a counter and a gauge?</h3><p>A counter only goes up (or resets to zero). Use it for totals: requests, errors, events. A gauge can go up and down. Use it for current-state measurements: active connections, memory usage, queue depth.</p><h3>What is waitUntil() and why does it matter for metrics?</h3><p>waitUntil() is a method available in Cloudflare Workers (and similar patterns exist on other platforms) that keeps the function alive after the response has been sent. This gives your metrics client time to flush buffered data without blocking the user’s response.</p><h3>What is an auto-generated dashboard?</h3><p>Some metrics tools create a dashboard automatically the first time data arrives for a metric set. Charts are generated for each counter and histogram without any manual panel configuration. This eliminates the blank-canvas problem and is a key reason why an end to end example from app to dashboard can happen in minutes rather than hours.</p><h3>Do I need to run my own time-series database?</h3><p>Not with API-first metrics services. You send data over HTTP to a hosted endpoint, and storage is handled for you. Running your own TSDB (like Prometheus’s built-in storage or InfluxDB) is only necessary if you need full control over retention, replication, and query infrastructure.</p><h3>What’s the difference between metrics, logs, and traces?</h3><p>Metrics are numeric values tracked over time (request count, latency percentiles). Logs are text records of individual events (error messages, request details). Traces follow a single request as it moves through multiple services. Most end to end metrics examples focus on counters and histograms specifically.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5e13aac11ae4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Exploring Application Layering in distlang with simpleApp]]></title>
            <link>https://medium.com/@distlang/layering-a82b41863486?source=rss-1ccbf34e5952------2</link>
            <guid isPermaLink="false">https://medium.com/p/a82b41863486</guid>
            <category><![CDATA[cloudflare-workers]]></category>
            <category><![CDATA[distributed-systems]]></category>
            <category><![CDATA[serverless]]></category>
            <category><![CDATA[aws-lambda]]></category>
            <category><![CDATA[vercel]]></category>
            <dc:creator><![CDATA[Distlang]]></dc:creator>
            <pubDate>Tue, 21 Apr 2026 21:57:04 GMT</pubDate>
            <atom:updated>2026-04-21T21:57:04.639Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GymiJkTlpg4eYuEis4Go8w.png" /></figure><p>Microservices became popular because they helped teams split systems into smaller parts that were easier to own, deploy, and scale. That kind of separation is useful, but it also introduces a different kind of complexity. Once behavior is spread across multiple services or components, more effort goes into coordination, communication, retries, shared state, and failure handling. In many systems, the operational burden comes less from the business logic itself and more from the plumbing between parts.</p><p>One way to manage that complexity is to build software in layers of abstraction. A lower layer can provide a capability. A higher layer can use that capability to define a more complete application pattern. If that higher layer proves useful, it can become the foundation for still more specialized layers above it.</p><p>That is the direction we are exploring in <em>distlang</em>. In the previous post, we introduced <a href="https://distlang.com/blog/what-helpers-are-in-distlang"><em>ObjectDB</em></a> as a helper that gives applications a simple storage capability. You can think of it as a lower layer in the system. It provides persistence without forcing application code to absorb provider-specific database wiring.</p><p><em>simpleApp</em> is a higher layer built on top of that kind of capability. Instead of exposing only storage operations, it starts to describe a reusable application shape. It gives us a way to compose multiple handler sets around shared infrastructure and shared state, while keeping each part focused on a narrower responsibility. The diagram below shows how <em>simpleApp</em> works, with each app containing multiple handlers. After building, you get two different deployments of those handlers talking to the same shared database.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/847/1*wZr0hVfdK4kocyRgMMZqrQ.png" /></figure><p>The Echo app is a small example of this layering model. It is intentionally simple, but it shows the direction clearly. One part of the app accepts configuration and stores it. Another part reads that configuration and uses it to shape the response. The important point is not the echo behavior itself. The important point is that a higher-level application layer can coordinate multiple handlers by relying on a lower-level storage layer. The diagram below shows how the configuration handlers and the app-specific logic can be expressed in one file for the Echo application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/753/1*Y5fGTe0ylu59G4wb1YGeBA.png" /></figure><p>Before looking at the code, it helps to know what each part is doing. The app defines a bucket and a key that hold shared configuration. Then it defines one handler set for writing configuration and another handler set for reading that configuration during request handling. Finally, <em>simpleApp</em> composes those handlers together with <em>ObjectDB</em>, which provides the shared storage capability underneath.</p><pre>import { simpleApp } from &quot;distlang/layers&quot;;<br>import { helpers } from &quot;distlang&quot;;</pre><pre>const configBucket = &quot;simpleapp&quot;;<br>const echoCountKey = &quot;global-echo-count&quot;;</pre><pre>const handlerSet1 = {<br>  routes: {<br>    POST: {<br>      &quot;/echo/config&quot;: async ({ req, db }) =&gt; {<br>        const body = await req.json();<br>        const requested = Number(body &amp;&amp; body.times);<br>        const times = Number.isFinite(requested) &amp;&amp; requested &gt; 0 ? Math.floor(requested) : 1;</pre><pre>        await db.buckets.create(configBucket);<br>        await db.put(configBucket, echoCountKey, { times });</pre><pre>        return Response.json({<br>          ok: true,<br>          configured: { times },<br>          target: &quot;handlerSet1&quot;,<br>        });<br>      },<br>    },<br>  },<br>};</pre><pre>const handlerSet2 = {<br>  routes: {<br>    GET: {<br>      &quot;/echo/:text&quot;: async ({ db, params }) =&gt; {<br>        const configured = await db.get(configBucket, echoCountKey);<br>        const times = configured &amp;&amp; Number.isFinite(Number(configured.times))<br>          ? Math.max(1, Math.floor(Number(configured.times)))<br>          : 1;</pre><pre>        const textToEcho = params &amp;&amp; typeof params.text === &quot;string&quot; ? params.text : &quot;hello&quot;;<br>        return new Response(`${Array(times).fill(textToEcho).join(&quot;\n&quot;)}\n`);<br>      },<br>    },<br>  },<br>};</pre><pre>export default simpleApp.instantiate(handlerSet1, handlerSet2, helpers.ObjectDB);</pre><p>There are a few useful things to notice in this example.</p><p>handlerSet1 exposes POST /echo/config. That route accepts a JSON payload, reads the times value, normalizes it, and writes it into shared storage. In other words, this part of the application is responsible for configuration.</p><p>handlerSet2 exposes GET /echo/:text. That route reads the stored configuration, falls back to a default value when nothing has been configured yet, and uses the result to decide how many times to repeat the requested text. This part of the application is responsible for runtime behavior.</p><p>The last line is where the layering becomes explicit:</p><p>simpleApp.instantiate(handlerSet1, handlerSet2, helpers.ObjectDB)</p><p>This is the composition step. <em>simpleApp</em> takes separate handler sets and combines them around a shared capability. <em>ObjectDB</em> provides the lower-layer storage behavior. <em>simpleApp</em> uses that behavior to define a higher-level application structure.</p><p>The curl output makes this easier to see in practice. A request to the configuration endpoint updates the stored repeat count. A request to the echo endpoint then reflects that new value immediately. The two handlers have different responsibilities, but they are still cooperating through the shared layer underneath.</p><pre>:~/workspace/distlanglabs/distlang$ curl -X POST &quot;http://127.0.0.1:5656/echo/config&quot; -H &quot;Content-Type: application/json&quot; -d &#39;{&quot;times&quot;:5}&#39; | jq <br>  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current<br>                                 Dload  Upload   Total   Spent    Left  Speed<br>100    70  100    59  100    11  23723   4422 --:--:-- --:--:-- --:--:-- 35000<br>{<br>  &quot;ok&quot;: true,<br>  &quot;configured&quot;: {<br>    &quot;times&quot;: 5<br>  },<br>  &quot;target&quot;: &quot;handlerSet1&quot;<br>}<br>:~/workspace/distlanglabs/distlang$ curl &quot;http://127.0.0.1:5657/echo/hi&quot;<br>hi<br>hi<br>hi<br>hi<br>hi<br>:~/workspace/distlanglabs/distlang$ curl -X POST &quot;http://127.0.0.1:5656/echo/config&quot; -H &quot;Content-Type: application/json&quot; -d &#39;{&quot;times&quot;:2}&#39; | jq <br>  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current<br>                                 Dload  Upload   Total   Spent    Left  Speed<br>100    70  100    59  100    11  33966   6332 --:--:-- --:--:-- --:--:-- 70000<br>{<br>  &quot;ok&quot;: true,<br>  &quot;configured&quot;: {<br>    &quot;times&quot;: 2<br>  },<br>  &quot;target&quot;: &quot;handlerSet1&quot;<br>}<br>:~/workspace/distlanglabs/distlang$ curl &quot;http://127.0.0.1:5657/echo/hi&quot;<br>hi<br>hi<br>:~/workspace/distlanglabs/distlang$</pre><p>What makes this interesting is that layering does not need to stop at <em>simpleApp</em>.</p><p>If <em>ObjectDB</em> is a lower layer that provides storage capability, and <em>simpleApp</em> is a higher layer that defines a reusable application pattern, then more specialized layers can be built on top of that pattern over time.</p><p>For example, an <em>AuthorizedSimpleApp</em> could provide the same kind of application structure but include authentication and authorization as part of the layer itself. A future <em>MultiDBApp</em> could coordinate multiple storage systems so a single database is not the only source of truth or the only point of failure. Other layers could introduce reliability policies, metrics, queueing behavior, or workflow-specific conventions.</p><p>The goal is not to define every application shape in advance. The goal is to make it possible to build upward in reusable layers, where each layer absorbs one category of complexity and presents a simpler model to the layer above it.</p><p>That is the part we are exploring with <em>simpleApp</em>. It is not just a convenience wrapper around handlers. It is an early example of how <em>distlang</em> might let applications grow through layered abstractions: first a capability, then an application pattern, then potentially richer and more opinionated patterns on top of that.</p><p>Just as important, this kind of layering should not reduce <em>distlang</em> to a single deployment model or a single provider path. These layers are meant to improve the application model, not narrow the infrastructure choices underneath it.</p><p>If good distributed-systems habits can become first-class parts of a layer, then stronger application patterns can become portable too. That could make better defaults around authorization, redundancy, failure handling, and storage coordination available across platforms instead of forcing every application to rebuild those ideas from scratch.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a82b41863486" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introducing Distlang]]></title>
            <link>https://medium.com/@distlang/introducing-distlang-01c5ea466c9b?source=rss-1ccbf34e5952------2</link>
            <guid isPermaLink="false">https://medium.com/p/01c5ea466c9b</guid>
            <category><![CDATA[language]]></category>
            <category><![CDATA[serverless]]></category>
            <category><![CDATA[compilers]]></category>
            <category><![CDATA[distributed-systems]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <dc:creator><![CDATA[Distlang]]></dc:creator>
            <pubDate>Tue, 21 Apr 2026 21:41:11 GMT</pubDate>
            <atom:updated>2026-04-21T21:41:11.642Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VqGQCp-_tE_jdMjmIKA_Vg.png" /></figure><p>Distributed systems have become the default way we build software.<br>But the way we <em>program</em> them has not changed much.</p><p>Most modern systems are still assembled manually from queues, services, databases, retries, and observability tooling. Microservices helped break applications into smaller components, but they did not fundamentally change the abstraction level of distributed programming.</p><p>If you’re curious about the philosophy behind this project, you can read more <a href="https://distlang.com/about">here</a> This post explains the first step toward that vision.</p><h3>A shift toward serverless systems</h3><p>Over the last decade, serverless platforms have quietly changed how applications scale.Instead of provisioning servers and orchestrating services, developers can deploy small pieces of logic that run on demand. The platform handles replication, scaling, and resource allocation automatically.</p><p>This model has a few powerful properties:</p><ul><li>compute scales with demand</li><li>idle resources disappear</li><li>deployment units become smaller and more focused</li><li>infrastructure concerns move into the platform</li></ul><p>Serverless systems begin to resemble a runtime environment rather than traditional infrastructure. However, serverless platforms introduced a new problem. Each cloud provider created <em>its own runtime model, APIs, and deployment mechanisms</em>. Applications written for one platform are rarely portable to another.</p><h3>The first step: portable distributed applications</h3><p>Distlang starts with a simple goal. Write applications once and deploy them across multiple serverless platforms. Instead of writing directly against vendor-specific APIs, applications target a common runtime model. A build step then compiles that application into the appropriate deployment artifacts for each platform.</p><p>The early versions of Distlang focus on supporting platforms such as:</p><ul><li>Cloudflare Workers</li><li>AWS Lambda</li><li>other serverless runtimes over time</li></ul><p>The idea is straightforward:</p><p>Application -&gt; Distlang build -&gt; Cloudflare / AWS / other runtimes</p><p>In this model, infrastructure becomes a <em>deployment target</em>, not something the application is tightly coupled to.</p><h3>Where this is going</h3><p>Portable deployment is only the first step.</p><p>The larger goal is to explore whether distributed systems themselves can be expressed at a higher level of abstraction — similar to how programming languages abstracted away machine instructions decades ago. That broader motivation is explained in more detail on the <a href="https://distlang.com/about">About</a> page:</p><p>Over the coming weeks we will publish:</p><ul><li>a simple example application</li><li>the structure of the Distlang runtime</li><li>how the build system targets multiple serverless platforms</li><li>early experiments with distributed primitives</li></ul><h3>Participate in the project</h3><p>Distlang is an early experiment, and the direction of the project will evolve through discussion and collaboration.</p><p>If the ideas in this post resonate with you, we would love to hear your thoughts — whether it’s about runtime design, distributed primitives, or how a language like this could fit into real-world systems.</p><p>You can follow the development and contribute ideas here: <a href="https://github.com/distlanglabs/distlang"><em>https://github.com/distlanglabs/distlang</em></a></p><p>Issues, discussions, and design ideas are all welcome. The goal of this project is to explore new abstractions for distributed systems together.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=01c5ea466c9b" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>