<?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 Hugo Venturini on Medium]]></title>
        <description><![CDATA[Stories by Hugo Venturini on Medium]]></description>
        <link>https://medium.com/@hugo_14178?source=rss-9aaf097f5c8a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*ssoxfpKy8pGgbBiD</url>
            <title>Stories by Hugo Venturini on Medium</title>
            <link>https://medium.com/@hugo_14178?source=rss-9aaf097f5c8a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 10:54:45 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@hugo_14178/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[Treat Agent Output Like Compiler Output]]></title>
            <link>https://medium.com/@hugo_14178/treat-agent-output-like-compiler-output-bae9dfb753ee?source=rss-9aaf097f5c8a------2</link>
            <guid isPermaLink="false">https://medium.com/p/bae9dfb753ee</guid>
            <category><![CDATA[generative-ai-tools]]></category>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[compilers]]></category>
            <dc:creator><![CDATA[Hugo Venturini]]></dc:creator>
            <pubDate>Tue, 19 May 2026 14:20:04 GMT</pubDate>
            <atom:updated>2026-05-19T14:20:04.153Z</atom:updated>
            <content:encoded><![CDATA[<h4>Why our discomfort with AI-generated code reveals exactly what we haven’t built yet, and what the compiler analogy teaches us about trusting coding agents.</h4><p><em>(initially posted </em><a href="https://skiplabs.io/blog/codegen_as_compiler"><em>here</em></a><em>)</em></p><p>Philip Su’s recent post argues that code reviews are not just impractical in the age of coding agents, they’re headed toward being <em>irresponsible</em>. He’s right on trend. But I think the framing of “<strong>lights-out codebases</strong>” skips over the more interesting and uncomfortable question: <strong>why does lights-out feel so scary</strong>, and what does that fear actually tell us?</p><p>The answer, I think, is hiding in something we already used once before and then promptly forgot we did: the compiler.</p><h3><strong>Nobody Reviews Compiler Output</strong></h3><p>Think about how you relate to your compiler. You write C++, Rust, Go, and the toolchain spits out a binary. Do you open that binary and read through the assembly? Do you schedule a meeting with a colleague to review the object code before shipping?</p><p>Of course not. That would be absurd. And not because you blindly trust compilers, you don’t. Compilers have bugs. Compilers have had famously catastrophic bugs. But you’ve constructed an entire apparatus that makes reviewing the output <em>unnecessary</em>: you write tests against observable behavior, you have type systems that constrain what the output can do, you have reproducible builds, you have fuzzing and sanitizers and formal verification in high-stakes domains. You trust the <em>process</em>, not the artifact.</p><p>We haven’t built that apparatus for coding agents. And that, not the output itself, is what’s actually missing.</p><h3><strong>The Real Diagnosis</strong></h3><p>Consider that a developer like Michael Novati landed 417 PRs in a single day in February. That’s enough to argue that reviewing AI-generated code is volumetrically impossible. And it is. But I’d push the diagnosis further: <strong>the volume isn’t the problem, it’s a symptom that exposes the problem</strong>.</p><p>The problem is that we’re still treating agent output the way we used to treat junior developer output, as something that needs a human to eyeball it before it’s real. That made sense when code reviews were the primary quality gate. It makes no sense when they can’t be.</p><p>The compiler analogy is clarifying here not because it tells us to trust agents blindly, but because it shows us what a mature pipeline looks like once you stop treating artifacts as things to be <em>read</em> and start treating them as things to be <em>verified</em>. We don’t review compiled binaries. We run them against test suites, we check them against specifications, we instrument them in production. We moved the quality control upstream (type systems, linters, formal specs) and downstream (testing, monitoring, rollback), and eliminated the manual middle.</p><p>That’s exactly the move we need to make with agents. We’re not there yet. And the reason the lights-out framing makes engineers nervous isn’t irrationality, it’s that the upstream and downstream apparatus barely exists.</p><p><strong>## What’s Actually Missing</strong></p><p>If compiler output requires no human review because of what surrounds it, then agent output will require no human review when we’ve built the equivalent. What does that actually mean?</p><p><strong>Upstream:</strong> Compilers have type systems, formal contracts about what code <em>means</em> before it runs. For agents, this equivalent is still primitive. We have prompts, we have some scaffolding, but we don’t yet have robust formal specifications that an agent is verifiably executing against. The closest analogs, TDD, contract testing, design-by-specification, exist but are not yet standard practice when <em>agents</em> are the author.</p><p><strong>The verification layer:</strong> Compilers are deterministic. Given the same source, you get the same output. Agents are not. This means the test suite that used to catch <em>human</em> mistakes needs to be substantially more comprehensive when the author can produce plausible-but-subtly-wrong code at 50x the rate. The idea of using AI to check AI, pre- and post-action reviews, dedicated security agents, is the right direction. But it’s nascent, and we’re nowhere near treating it as infrastructure.</p><p><strong>Downstream:</strong> The production monitoring and rollback culture that makes deploying compiled binaries safe is reasonably mature. Canary deploys, feature flags, observability tooling, this stuff works. Applying it rigorously to agent-generated changes is tractable. It just isn’t yet habitual.</p><h3><strong>The Uncomfortable Part</strong></h3><p>Here’s the contrarian edge: the engineers most resistant to lights-out codebases are often the same engineers who would resist, if they could time-travel back, the idea that you don’t need to review your linker’s output. The intuition feels protective. It is actually just unfamiliarity with where the trust has been relocated.</p><p>Trusting compiler output isn’t naïve. It’s the result of decades of investment in making that trust warranted. We didn’t skip the hard work, we did the hard work in a different place. The same logic applies here. The question isn’t “should we trust agent output?” It’s “have we built the infrastructure that makes that trust reasonable?”</p><p>Right now, mostly, we haven’t. That’s not an argument against moving toward lights-out codebases, we’re being pushed there regardless. It’s an argument for being honest about what “moving there responsibly” actually requires.</p><p>Hardware chip companies already work with black-box components verified by acceptance tests rather than human review. That’s the model. But notice: chip verification is a <em>discipline</em>, with tooling, with formal methods, with teams of people whose entire job is designing the test harness. We are going to need the software equivalent, and it is probably going to be harder, because software has far less formal specification culture than hardware.</p><h3><strong>What To Build</strong></h3><p>The lights-out codebase is coming. Su is right about that. But rather than simply accepting it as an inevitability to brace for, we should treat it as a <em>design target,</em> one that tells us exactly what we need to build:</p><ul><li>Formal specification layers that agents execute against, not just prompts</li><li>Test infrastructure robust enough to substitute for the code comprehension that reviews provide</li><li>AI-checks-AI pipelines as first-class CI infrastructure, not bolt-on curiosity</li><li>Production instrumentation good enough that bad agent behavior is caught fast and rolled back faster</li></ul><p>The compiler didn’t make us stop caring about correctness. It moved where correctness is enforced. That’s the project in front of us. The scary part isn’t the lights-out codebase. The scary part is how few teams are treating what replaces the review as serious engineering work.</p><p><em>This post was written in response to Philip Su’s “</em><a href="https://molochinations.substack.com/p/no-more-code-reviews-lights-out-codebases"><em>No More Code Reviews: Lights-Out Codebases Ahead</em></a><em>&quot;</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bae9dfb753ee" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Discussion with Lucas, a SkipLabs engineer]]></title>
            <link>https://medium.com/skiplabs/discussion-with-lucas-a-skiplabs-engineer-0b535277a311?source=rss-9aaf097f5c8a------2</link>
            <guid isPermaLink="false">https://medium.com/p/0b535277a311</guid>
            <category><![CDATA[cache-invalidation]]></category>
            <category><![CDATA[interview]]></category>
            <category><![CDATA[reactive-backend]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[skip]]></category>
            <dc:creator><![CDATA[Hugo Venturini]]></dc:creator>
            <pubDate>Wed, 16 Jul 2025 12:32:20 GMT</pubDate>
            <atom:updated>2025-07-16T12:32:20.595Z</atom:updated>
            <content:encoded><![CDATA[<h4>Ever wondered what it’s like to work on cutting-edge technologie for cache invalidation and beyond?</h4><p>This chat with a Lucas, a <a href="https://skiplabs.io/">SkipLabs</a> engineer, gives you the inside scoop on building tools that tackle gnarly data synchronization problems. We have created something called the <a href="https://github.com/SkipLabs/skip">Skip Framework</a>, which runs on our own programming language, SkipLang, pretty cool stuff. What makes this interview particularly interesting is how it bounces between the nuts and bolts of performance testing (like figuring out why stream creation was too slow) and the bigger picture of where tech is headed. You’ll get a feel for SkipLabs’ laid-back engineering culture where people work independently but always have each other’s backs, plus some thoughtful takes on everything from open source development to why we still edit code like it’s 1995. Whether you’re into the technical weeds of load testing or curious about how small teams tackle ambitious projects, there’s something here for you.</p><h3>How long have you been working at SkipLabs?</h3><p>I joined <a href="https://skiplabs.io/">SkipLabs</a> in November 2022, so it’s been a little over two and a half years now.</p><h3>In a few words, what do you do at SkipLabs?</h3><p>At <a href="https://skiplabs.io/">SkipLabs</a>, we develop tools focused on reactive programming. Our goal is to solve complex data synchronization problems while making this approach accessible and cost-effective in terms of infrastructure.</p><p>In practical terms, reactive programming is a declarative way of expressing computations: instead of manually handling state transitions, you simply describe state as a function of multiple inputs.</p><p>To make this approach tangible and usable on a daily basis, we created the Skip Framework — a reactive programming framework designed to be both powerful and easy to adopt.</p><h3>How would you describe the engineering culture at SkipLabs?</h3><p>I’d say the engineering culture at <a href="https://skiplabs.io/">SkipLabs</a> is built first and foremost on trust and individual responsibility. Everyone pulls their weight and doesn’t hesitate to get their hands dirty when needed — even with tasks that may be a bit thankless. There’s a real collective drive to move things forward, and it shows in the general vibe: everyone is experienced, which allows us to work in parallel in a smooth and efficient way.</p><p>We operate in a fairly open and independent manner, with very few meetings. And despite this autonomy, there’s a lot of mutual support — whenever a question arises, someone is always there to help. Our expertise is quite diverse, which is a real strength. Several people on the team have a strong background in programming languages and a deep interest in low-level systems — especially compilers and <a href="https://llvm.org/">LLVM</a>, which sit at the heart of our stack.</p><p>On the tech side, the Skip Framework is currently exposed via a TypeScript API, and soon also via a native API in SkipLang. At the core of it all is a programming language, SkipLang, designed by Julien (previously at Facebook). The language was built to provide strong guarantees about data mutability — making it clear what can and cannot change, to enable safe and efficient cache invalidation. We use this language today. It has its own compiler, written in SkipLang itself, which targets <a href="https://llvm.org/">LLVM</a> as a backend. This gives us strong performance while maintaining high portability: the framework can be compiled natively or to WebAssembly, which makes it possible, for example, to run it directly in a browser. In addition to SkipLang and TypeScript, we also use some Python and Bash — classic tools to keep everything running smoothly.</p><h3>So how do you approach scalability challenges?</h3><p>For me, scalability starts with the ability to accurately measure performance. Before even thinking about optimization, you need reliable metrics — and ideally, with minimal manual intervention. Manual handling quickly becomes a source of errors, especially in systems as complex as ours.</p><p>It’s crucial to measure what you actually want to observe — not just loosely correlated metrics. Once you have a solid measurement foundation, you can start large-scale analysis, deep profiling, pinpoint real bottlenecks, and invest where it really matters. Right now, we’re specifically working on load testing Skip to better understand how our system behaves under different loads, and to validate our horizontal scalability. It’s a progressive process, but essential to ensuring strong performance in varied environments.</p><h3>And in your latest tests, what were the main bottlenecks you identified?</h3><p>One of the first bottlenecks we found was in the creation of streams. Once a stream is set up, performance is excellent, even with multiple users subscribing in parallel. But the initial creation phase can be a bit too slow. We’re currently working on a fix to improve that.</p><p>This kind of issue really shows how important fine-grained, automated tracing is — to avoid local changes negatively affecting other parts of the system. Working as a team also means writing code that helps — or at least doesn’t hinder — others’ work. This is why we’re implementing recurring load tests that run automatically in our CI. The goal is to detect performance regressions early and make sure different optimizations continue to work well together, even as the codebase evolves.</p><h3>And in those load tests, what metrics do you prioritize?</h3><p>There are several, but the most important is: how many users can we serve under acceptable conditions for a given budget? We aim to stay close to real-world use cases. Depending on the services being tested, some loads involve heavy writing, others are mostly read-heavy. Some may involve lots of shared data, others significant server-side computation before results are pushed out.</p><p>One key metric is replication time: when a client writes data, how long does it take for that data to be visible to all other affected clients? This delay depends on the associated computation graph, so it can vary a lot — but it’s an essential metric for us. Once we’ve defined what counts as an acceptable client-side response time, we check how many clients we can serve with a single instance. Then we measure how that capacity scales when adding more servers — that’s our horizontal scalability curve.</p><h3>And on the server side, what do you measure?</h3><p>There, we focus on how well we’re using available resources. For example: how many server instances can we run efficiently on a given machine? Are we fully utilizing RAM, CPU cores? There’s no point in paying for unused capacity. We complement that with regular profiling to ensure there are no avoidable bottlenecks in our server stack. It’s an ongoing effort, but it gives us real visibility into the system’s actual performance.</p><h3>Beyond technical challenges, what do you see as the bigger issues in this field?</h3><p>I see three fundamental challenges:</p><ul><li><strong>Correctness</strong> — We want clients to receive data that is both fresh and accurate, with mathematical guarantees that what they see is consistent with the system’s state. That’s non-negotiable.</li><li><strong>Performance</strong> — All of that has to happen as fast as possible, even at large scale. Offering low-latency reactivity is a bold promise — and a serious technical challenge.</li><li><strong>Developer ergonomics</strong> — This is often underestimated but just as crucial. Our goal is for developers to express business logic as declaratively and clearly as possible. Ideally, they focus only on what they want to produce, not how data will sync or update. It’s our job to ensure that works smoothly behind the scenes.</li></ul><p>To achieve this, we need a sound and efficient computation model, solid implementation, and a clean codebase. That’s what we’re building with Skip: a technical foundation that lets you offload complexity without compromising rigor.</p><h3>What do you enjoy most about your work right now?</h3><p>Benchmarking itself isn’t necessarily what excites me most — but right now it’s pretty thrilling, because we’re entering a new phase of the project. After months of prototyping and refining the core of the framework, we’re finally putting it through real-world load testing. Now we can truly measure how far this new paradigm can go under real conditions. It’s gratifying to see that what we’ve built — brick by brick — is starting to hold up at scale, and that the choices we’ve made are beginning to pay off.</p><h3>Taking a step back, what would you like to see evolve in computing today?</h3><p>There are quite a few things I’d like to see change, but if I had to summarize, I’d highlight three key areas that matter most to me:</p><h3>Valuing open source as a shared public good:</h3><p>I believe open source — or more broadly, digital commons — are still vastly underdeveloped relative to their importance. These are software foundations that benefit everyone and deserve more collective investment.</p><p>At <a href="https://skiplabs.io/">SkipLabs</a>, we work in open source under <a href="https://en.wikipedia.org/wiki/MIT_License">MIT license</a>, and that’s one of the reasons I joined the team.</p><h3>Rethinking how we interact with code:</h3><p>Today, as developers, our interaction with code is still quite “primitive”: we’re just editing letters on a page. Even though modern editors add powerful features, it’s still largely syntax-level work. I’d like us to move toward tools that support semantic interaction with code — like version control that understands the intent behind a change, not just a diff of characters. That would unlock deeper collaboration, better understanding, and smarter analysis tools. It’s a major area for innovation.</p><h3>Mainstreaming cryptography in the digital public sphere:</h3><p>I think we should make broader use of asymmetric cryptography for things involving public speech, traceability, or authorship — without necessarily resorting to blockchain. Digital signatures alone are enough in many cases.</p><p>Right now, these tools are still largely inaccessible to the general public, which is a real problem. I think it’s crucial to defend a web architecture that respects individual freedoms — and that includes broad adoption of tools like encrypted email, and digital signatures, ideally within an open-source ecosystem.</p><h3>Thanks, Lucas</h3><p>Thanks to you !</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0b535277a311" width="1" height="1" alt=""><hr><p><a href="https://medium.com/skiplabs/discussion-with-lucas-a-skiplabs-engineer-0b535277a311">Discussion with Lucas, a SkipLabs engineer</a> was originally published in <a href="https://medium.com/skiplabs">SkipLabs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Cache Invalidation and Reactive Systems]]></title>
            <link>https://medium.com/skiplabs/cache-invalidation-and-reactive-systems-7a80dd4e156a?source=rss-9aaf097f5c8a------2</link>
            <guid isPermaLink="false">https://medium.com/p/7a80dd4e156a</guid>
            <category><![CDATA[reactive-programming]]></category>
            <category><![CDATA[skip]]></category>
            <category><![CDATA[reactive-backend]]></category>
            <category><![CDATA[backend]]></category>
            <category><![CDATA[cache-invalidation]]></category>
            <dc:creator><![CDATA[Hugo Venturini]]></dc:creator>
            <pubDate>Fri, 04 Jul 2025 12:18:52 GMT</pubDate>
            <atom:updated>2025-07-28T07:32:21.477Z</atom:updated>
            <content:encoded><![CDATA[<h4>A technical blog post examining cache invalidation challenges in distributed systems and presenting SkipLabs’ reactive backend approach as an alternative to traditional strategies.</h4><blockquote>(originally published <a href="https://skiplabs.io/blog/cache_invalidation">here</a> on July 4, 2025)</blockquote><p>Phil Karlton famously said <em>there are only two hard things in computer science: cache invalidation and naming things</em>. While naming things may be subjective, <a href="https://en.wikipedia.org/wiki/Cache_invalidation">cache invalidation</a> is a problem that only gets harder as our systems grow more complex. As applications scale and users expect real-time data everywhere, traditional approaches to cache management crack under pressure.</p><p>Here’s the thing about cache invalidation: it sits right at the center of the classic performance versus consistency trade-off. Mess it up, and your users are stuck looking at stale data. Maybe they see yesterday’s stock prices, or worse, they’re making business decisions based on outdated metrics. But nail the consistency part while implementing it poorly, and you’ve just thrown away all the performance benefits that made you add caching in the first place. This fundamental tension has been driving innovation in caching strategies for decades, from simple <a href="https://en.wikipedia.org/wiki/Time_to_live">Time-to-live (TTL)</a> expiration to increasingly complex dependency tracking systems.</p><h3>The Infrastructure Caching Challenge</h3><p>Modern applications cache everywhere, from <a href="https://en.wikipedia.org/wiki/CPU_cache">CPU L1/L2 caches</a> to <a href="https://en.wikipedia.org/wiki/Content_delivery_network">CDN edge caches</a> to application-level query caches, and each layer brings its own invalidation headaches that get exponentially worse across distributed systems. You’ve probably dealt with the classic cache invalidation strategies, and you know they all suck in their own special ways: TTL forces you to choose between stale data and cache misses, manual invalidation becomes impossible to maintain as dependencies grow, and event-driven invalidation couples your business logic to caching infrastructure.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*C4XJ1WdDibgVT5JxrzDJOg.png" /><figcaption>TTL Caching: When Stale Data Breaks User Experience</figcaption></figure><p>Then there’s the distributed systems reality check. <a href="https://en.wikipedia.org/wiki/Network_partition">Network partitions</a> happen, clocks drift, and eventual consistency models mean that even your best-designed invalidation strategies can fail spectacularly. Your invalidation message gets delayed, lost, or arrives out of order, and suddenly half your cache nodes are serving stale data while the other half got the memo. These edge cases are the worst: they’re nearly impossible to test properly and usually only surface when you’re already under production load.</p><p>If you’re running database-backed applications, you’re dealing with multiple cache layers between your data store and your users. A single database update might need to invalidate entries in <a href="https://en.wikipedia.org/wiki/Redis">Redis</a>, <a href="https://en.wikipedia.org/wiki/Memcached">Memcached</a>, your application’s memory cache, and your CDN caches. Coordinating this invalidation across all these different systems while maintaining performance and consistency? That’s the kind of engineering challenge that makes you question your career choices.</p><p>Ok, I may be a little dramatic here, but now that we agree on the problem we’re talking about…</p><h3>SkipLabs: A Reactive Approach to Cache Invalidation</h3><p>At <a href="https://skiplabs.io/">SkipLabs</a>, we take a different approach to the cache invalidation problem through reactive backend architecture. Instead of treating caching as a separate concern requiring manual coordination, SkipLabs builds reactivity right into the core of your data processing pipeline. When your underlying data changes, all dependent computations and cached results automatically update in a cascading fashion.</p><p>The reactive model that SkipLabs uses draws from functional reactive programming and incremental computation research. When data changes, the system automatically figures out which computations depend on that data and updates them incrementally. You don’t need manual cache invalidation because the <em>cache</em> is always in sync with the underlying data through the reactive dependency graph.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5gUJyvFR57fxvcv-bZPqyQ.png" /><figcaption>Automatic Cache Updates with SkipLabs</figcaption></figure><p>SkipLabs pulls this off through a sophisticated runtime that tracks fine-grained dependencies between data and computations. Unlike traditional caching systems where invalidation is something you bolt on afterward, the SkipLabs runtime makes invalidation an intrinsic part of how computation works. When data changes, the runtime precisely identifies which cached computations are affected and updates them incrementally.</p><p>The platform handles the complex scenarios that make traditional caching systems cry: joins across multiple data sources, aggregations over massive datasets, deeply nested dependency chains. By modeling these relationships explicitly, SkipLabs can provide strong consistency guarantees while keeping the performance benefits of caching.</p><h3>Pros and Cons of the Reactive Approach</h3><p>The reactive approach has some compelling advantages. First, you can finally stop writing manual invalidation logic. No more tracking complex dependency relationships or trying to remember which cache keys to invalidate when data changes. Your codebase becomes more maintainable, and you’ll have fewer bugs related to stale data keeping you up at night.</p><p>Performance can be significantly better than traditional caching in many scenarios. Because the system understands your dependency graph, it can perform minimal incremental updates rather than nuking entire cache regions. For applications with complex data relationships, this means much more efficient cache utilization and faster response times when data changes.</p><p>The consistency guarantees are typically stronger than what you get with eventually consistent caching systems. Updates propagate automatically through the dependency graph, so there’s less risk of serving stale data or having different parts of your application showing inconsistent views.</p><p>But let’s be real about the trade-offs. The complexity doesn’t disappear, it just moves from your application code into the runtime system. This can make debugging and performance tuning more challenging when things go wrong. You need to understand the reactive model and how your code will execute within it, which represents a significant learning curve for you and your team.</p><p>Converting existing code to the Skip runtime without properly structuring and decomposing its dependency structure can incur more resource overhead than it saves through incrementality. The benefits of reactive systems shine when computations are well-structured for incremental updates, but poorly designed dependency graphs can actually hurt performance compared to simpler caching strategies.</p><p>The reactive model also puts constraints on how you can structure your applications and access data. Not every existing codebase can be easily adapted to work within a reactive framework, you might need significant architectural changes to realize the benefits. To me, this is the hardest problem to solve.</p><h3>Wrap-up</h3><p>Cache invalidation continues to be one of the most challenging problems in software engineering, with traditional approaches forcing difficult trade-offs between performance, consistency, and complexity. The reactive approach that platforms like SkipLabs are pioneering offers a promising alternative that could fundamentally change how we think about caching and data consistency.</p><p>Reactive systems aren’t a silver bullet, they come with their own complexities and trade-offs. But they represent an important evolution in how we build data-intensive applications. As the technology matures and developer tooling improves, reactive backends may become viable for a much broader range of applications.</p><p>The key insight is that cache invalidation isn’t just a technical problem to solve, it’s a fundamental design challenge that shapes how we architect our systems. Whether you’re using traditional invalidation strategies or exploring reactive approaches like SkipLabs, the goal remains the same: giving users fast, consistent access to data while maintaining system scalability and developer sanity. The reactive approach gives us a new tool for tackling this enduring challenge in computer science.</p><p>We have a <a href="https://discord.gg/2nzP2PZj">Discord server</a>, why don’t you swing by and say hi, ask a question or two?</p><h3>What’s Next?</h3><p>I’d love to hear what aspects of cache invalidation and reactive systems you’d like me to dive deeper into. Are you interested in:</p><ul><li>Detailed performance results for a reactive approach?</li><li>Deep technical implementation details of how SkipLabs tracks dependencies?</li><li>Real-world case studies of teams migrating from traditional caching to reactive systems?</li><li>Practical migration strategies for existing codebases?</li><li>Other distributed systems challenges that reactive architectures could solve?</li></ul><p>Drop me a line and let me know what you’d find most valuable, your feedback helps shape what I write about next.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7a80dd4e156a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/skiplabs/cache-invalidation-and-reactive-systems-7a80dd4e156a">Cache Invalidation and Reactive Systems</a> was originally published in <a href="https://medium.com/skiplabs">SkipLabs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Backend Pressure from a Reactive Point of View]]></title>
            <link>https://medium.com/skiplabs/backend-pressure-from-a-reactive-point-of-view-0fb02fffc82d?source=rss-9aaf097f5c8a------2</link>
            <guid isPermaLink="false">https://medium.com/p/0fb02fffc82d</guid>
            <category><![CDATA[developer-tools]]></category>
            <category><![CDATA[reactive-backend]]></category>
            <category><![CDATA[backend]]></category>
            <category><![CDATA[skip]]></category>
            <dc:creator><![CDATA[Hugo Venturini]]></dc:creator>
            <pubDate>Sun, 22 Jun 2025 15:08:05 GMT</pubDate>
            <atom:updated>2025-06-22T15:08:05.282Z</atom:updated>
            <content:encoded><![CDATA[<h4>A technical exploration of how reactive systems can solve backend pressure through persistent computational structures, introducing Skip as a framework</h4><p><em>(originally posted </em><a href="https://skiplabs.io/blog/backend_pressure"><em>here</em></a><em> on Jun 20, 2025)</em></p><p>Backend systems face constant pressure from multiple directions: user requests demanding instant responses, databases struggling under query loads, and servers managing finite computational resources. This backend pressure — the cumulative stress of handling concurrent requests while maintaining performance and resource constraints — manifests in bottlenecks, latency spikes, and system instability. Traditional approaches often treat these pressures as isolated problems — adding a cache here, optimizing a query there — resulting in complex patches that fix symptoms but ignore deeper architectural issues.</p><p>The conventional solution? Event-driven architectures and streaming systems. But here’s the problem: these approaches force developers to manually create and manage streams, handle async complexity, deal with event schemas, and debug distributed streaming pipelines. You end up spending more time on streaming infrastructure than on your actual business logic.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*M_gG1Cya3BkFvjEu.png" /></figure><p>Think of a financial portfolio app: instead of calculating portfolio performance each time a user loads their dashboard, the server maintains continuous streams where position changes flow through pricing calculations, which flow through performance metrics, which flow through sector aggregations. Or an e-commerce site where product price changes automatically update product views, category aggregations, search indices, and recommendation scores in real-time. Rather than computing results on demand, reactive systems keep computational pipelines running continuously, so the answers are always up-to-date and ready for immediate use — reducing latency and spreading load over time instead of spiking under demand.</p><h3>Precomputed Reactive Structures</h3><p>A reactive approach maintains continuous streams: position changes flow through pricing calculations, which flow through performance metrics, which flow through sector aggregations. The portfolio view stays current automatically, and user requests return instantly regardless of portfolio complexity.</p><p>And here’s the key insight that changes everything: we should be able to treat complex computations as persistent data structures rather than transient operations. These structures exist in memory, stay synchronized with source data, and serve requests without additional computation. This is the fundamental principle behind Skip’s approach, which we’ll explore in detail later.</p><h3>Cache Invalidation as Dependency Management</h3><p>Traditional caching introduces the notorious cache invalidation problem: when source data changes, systems must remember to invalidate all dependent cached values. This leads to either stale data or overly aggressive invalidation that negates caching benefits.</p><p>Reactive systems eliminate manual cache invalidation by treating cached values as materialized views with explicit dependencies. When source data changes, the system automatically pushes updates through the dependency graph to wherever they are needed — whether that’s materialized views, API endpoints, or system edges. Cache invalidation becomes dependency propagation.</p><p>For example, when a product price changes in an e-commerce system, the reactive pipeline automatically updates product views, category aggregations, search indices, and recommendation scores. Hand-written reactive systems typically handle simple event propagation but require a lot of extra code written by developers in the backend to manage complex stateful views and aggregations. Skip enables this ideal: the developer declares dependencies once; the system maintains consistency thereafter through automatic dependency management of complex computational states.</p><p>How can Skip enable this ideal? Three words for you: granular incremental updates.</p><h3>Granular Incremental Updates</h3><p>Skip reactive backends can perform granular, incremental updates rather than full recalculation when source data changes. If one product among thousands changes price, only the affected portions of aggregated views require updates. Category totals recalculate only for the affected category. Search indices update only relevant entries.</p><p>This granularity reduces computational overhead and memory churn. Systems can maintain complex materialized views that would be prohibitively expensive to recalculate entirely on each change.</p><p>Granular updates also improve system responsiveness. Instead of blocking while recalculating entire datasets, systems can process changes incrementally and continue serving requests throughout the update process.</p><p>I know what you’re thinking: “This sounds great, but what’s the catch?” Well, like most things in engineering, there are trade-offs to consider.</p><h3>Memory-Computation Trade-offs</h3><p>We make a trade-off: memory for computation time and request latency. Maintaining precomputed structures requires more memory than computing results on demand. However, memory costs have decreased significantly relative to computation costs and user experience requirements.</p><p>The trade-off becomes particularly favorable for read-heavy workloads where the same complex computations serve multiple requests. Computing once and serving many times provides better resource utilization than recomputing identical results repeatedly.</p><p>So we’ve covered the theory and the benefits, but what about the practical side? Well, implementing this isn’t without its challenges.</p><h3>Implementation Considerations</h3><p>Implementing reactive backends requires careful consideration of data flow patterns and dependency graphs. Systems must handle backpressure when computation cannot keep pace with data changes. They must also manage memory usage as materialized views grow with data volume.</p><p>Monitoring remains important for reactive systems, though the metrics of interest shift from traditional patterns. Traditional metrics like request latency remain relevant, but reactive systems require additional visibility into stream processing rates, backpressure events, and materialized view sizes to understand system health.</p><h3>Skip’s Approach to Reactive Systems</h3><p>What if there was a completely different way to tackle this complexity? What if we could get all the benefits of reactive systems without having to build or manage the streams ourselves? This is where Skip comes from.</p><p>Skip is a reactive framework that automatically creates and manages streams for you based on declarative computations. You write code as if time is frozen — defining what your outputs should look like based on your inputs at a single point in time — and Skip automatically turns this into live reactive streams that update clients in real-time. No manual stream wiring, no event handling complexity, no dependency tracking. Just declarative logic that automatically becomes reactive infrastructure.</p><p>Think of it this way: instead of programming reactive streams directly, you write functions that describe relationships between data. Skip automatically generates the optimal reactive streams to keep everything synchronized and delivers updates to clients seamlessly.</p><p>This approach fundamentally changes how we think about backend pressure because you’re no longer computing results on demand or managing complex event flows. Skip handles the reactive infrastructure while you focus on the business logic relationships between your data.</p><h3>Wrap up</h3><p>Reactive programming addresses backend pressure by shifting computation from request time to background processing. This approach enables instant response times, automatic cache consistency, and granular updates that scale with system complexity.</p><p>The fundamental insight is treating complex computations as persistent, automatically maintained data structures rather than transient operations. This perspective changes how systems handle scaling, caching, and data consistency, often simplifying architecture while improving performance.</p><p>If you’re dealing with read-heavy workloads where the same complex computations serve multiple requests, reactive approaches offer a compelling alternative to traditional request-response patterns. Start by identifying your most computationally expensive read operations — those are prime candidates for reactive transformation. Look for scenarios where you’re repeatedly calculating the same results, dealing with complex cache invalidation logic, or struggling with response times under load.</p><p>The challenge has always been the complexity of building and managing these reactive systems manually. Skip changes this by automatically handling the stream creation, dependency tracking, and incremental updates that make reactive backends practical. Instead of spending weeks building reactive infrastructure, you can focus on declaring the relationships between your data and let Skip generate the optimal streaming architecture.</p><p>The reactive paradigm isn’t a silver bullet, but for systems facing mounting backend pressure from concurrent requests and complex computations, Skip provides a viable path toward managing computational load without sacrificing response times or data consistency. As your system complexity grows, the benefits of automatic dependency management and incremental updates become increasingly valuable.</p><h3>What’s next?</h3><p>In our one of our next posts, we’ll dive deep into load testing Skip-powered systems and share concrete performance data that demonstrates these benefits in practice. We’ll explore how Skip’s reactive architecture behaves under various load patterns and what metrics matter most when evaluating performance.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0fb02fffc82d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/skiplabs/backend-pressure-from-a-reactive-point-of-view-0fb02fffc82d">Backend Pressure from a Reactive Point of View</a> was originally published in <a href="https://medium.com/skiplabs">SkipLabs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[React + Vite in front of a Skip Service: the template]]></title>
            <link>https://medium.com/skiplabs/react-vite-in-front-of-a-skip-service-the-template-ddf46f0b849c?source=rss-9aaf097f5c8a------2</link>
            <guid isPermaLink="false">https://medium.com/p/ddf46f0b849c</guid>
            <category><![CDATA[typescript]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[reactive-programming]]></category>
            <category><![CDATA[skip]]></category>
            <dc:creator><![CDATA[Hugo Venturini]]></dc:creator>
            <pubDate>Fri, 30 May 2025 19:25:21 GMT</pubDate>
            <atom:updated>2025-07-28T07:30:40.270Z</atom:updated>
            <content:encoded><![CDATA[<h4>Build a modern chat app with real-time updates using Skip’s reactive data system, React, and Vite</h4><blockquote>(originally posted <a href="https://skiplabs.io/blog/skip_with_react_vite">here</a> on May 23, 2025)</blockquote><p>Hello skippers. Today, we are introducing a new template to our collection: React + Vite. While our previous blog posts focused on building skip services, this new template represents our first step into the frontend, bringing together the best of both worlds: front and back.</p><pre>npx create-skip-service my-skip-chat - template with_react_vite</pre><h3>What’s Inside the Template?</h3><p>Our React + Vite template for Skip Services comes with everything you need to get started on building a modern web application: an easy to manipulate end-to-end data flow from the user interface to the backend, and vice-versa (reactive programming enthusiasts, I have your attention now).</p><h3>Getting Started</h3><p>To create a new project with our React + Vite template, simply run:</p><pre>npx create-skip-service my-skip-chat --template with_react_vite --verbose<br>cd my-skip-chat # enter the project directory<br>./setup.sh # and set up the project</pre><p>Setting up the project will end up with:</p><pre>✅ Setup complete!<br><br>To run the application:<br>1. Start the reactive service:<br>cd reactive_service &amp;&amp; pnpm start<br><br>2. In a new terminal, start the frontend:<br>cd frontend &amp;&amp; pnpm dev<br><br>The frontend will be available at http://localhost:5173</pre><p>This could hardly ever be simpler :-p</p><h3>If you open the project directory</h3><p>In both subprojects, `frontend` and `reactive_service`, we’ve hardcoded some values, and taken shortcuts here and there in order to be straight to the point: making reactive programming easy to get, easy to grasp, easy to adopt, easy to embrace, easy to marry… ok, one step too far.</p><p>One or two cool things you will want to try:</p><ul><li>plugging into a DB from the backend, we can give you some help : <a href="https://medium.com/skiplabs/building-a-real-time-blog-with-skip-and-postgresql-5514a9cd8ea1">Building a Real-time Blog with Skip and PostgreSQL</a></li><li>having several conversations on screen, one per tab</li><li>integrating your user-management system</li><li>integrating an AI agent to discuss into the chat</li></ul><p>We have a <a href="https://discord.gg/2nzP2PZj">Discord server</a>, why don’t you swing by and say hi, ask a question or two?</p><h3>What’s Next?</h3><p>For the next Skip article, what should I tackle first? You tell me!</p><ul><li>Scaling your Skip service horizontally?</li><li>Having an AI agent interacting in the chat ?</li><li>Managing authorization and privacy per user?</li><li>What else would be most useful to you now?</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ddf46f0b849c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/skiplabs/react-vite-in-front-of-a-skip-service-the-template-ddf46f0b849c">React + Vite in front of a Skip Service: the template</a> was originally published in <a href="https://medium.com/skiplabs">SkipLabs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A CLI to streamline the creation of Skip services]]></title>
            <link>https://medium.com/skiplabs/a-cli-to-streamline-the-creation-of-skip-services-015ac27bc0c2?source=rss-9aaf097f5c8a------2</link>
            <guid isPermaLink="false">https://medium.com/p/015ac27bc0c2</guid>
            <category><![CDATA[typescript]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[skip]]></category>
            <category><![CDATA[reactive-programming]]></category>
            <category><![CDATA[command-line]]></category>
            <dc:creator><![CDATA[Hugo Venturini]]></dc:creator>
            <pubDate>Fri, 23 May 2025 14:14:24 GMT</pubDate>
            <atom:updated>2025-07-28T07:30:00.898Z</atom:updated>
            <content:encoded><![CDATA[<h4>Quickly set up new Skip service projects with customizable templates</h4><blockquote>originally posted <a href="https://skiplabs.io/blog/announcing_create_skip_service_cli">here</a> on May 23, 2025</blockquote><p>Hello Skippers. Today, we are excited to announce the release of create-skip-service: A CLI Tool for Skip Service Development. It aims to simplify the development workflow by providing a convenient way to bootstrap new Skip services.</p><pre>npx create-skip-service &lt;project-name&gt; &lt;options&gt;</pre><h3>What are we talking about?</h3><p>create-skip-service is a CLI tool that helps developers quickly set up new Skip service projects with customizable templates, saving the time you’d need to write boilerplate code. It’s designed to follow best practices and provide a consistent starting point for all Skip service development.</p><h3>Key Features</h3><ul><li><strong>Quick Project Setup:</strong> A one-liner to have a fully working service</li><li><strong>Template System:</strong> Pick the right template for you, ask us for templates you need</li><li><strong>Git Integration:</strong> Automatic Git repository initialization (optional)</li><li><strong>Customizable:</strong> Once installed, templates are meant to be enhanced for YOUR project</li><li><strong>Verbose Logging:</strong> Detailed output for debugging and understanding the setup process, so you know what’s going on</li></ul><h3>Getting Started</h3><p><a href="https://en.wikipedia.org/wiki/KISS_principle">KISS</a> — here is the one-liner to get started:</p><pre>npx create-skip-service my-service</pre><h3>Basic Usage</h3><p>Of course, we’ve kept in mind that not all projects are alike, so here are a few options to get what’s right for you:</p><pre># Create a new service with default template<br>npx create-skip-service my-service<br><br># Create a service with a postgres integration<br>npx create-skip-service my-service - template with_postgres<br><br># Create a service without Git initialization<br>npx create-skip-service my-service - nogit<br><br># Run with verbose logging<br>npx create-skip-service my-service - verbose</pre><h3>Available Options</h3><ul><li>— template, -t: Specify the template to use (default: “default”)</li><li>— nogit: To NOT initialize a Git repository, otherwise git is initialized with a first commit</li><li>— verbose, -v: Run with verbose logging</li><li>— quite, -q: Run with minimal logging</li><li>— force, -f: Force overwrite if directory exists</li></ul><h3>Why create-skip-service?</h3><p>We created this tool to address several common challenges in Skip service development:</p><ol><li><strong>Efficiency</strong>: Reduce the time spent on project setup and configuration</li><li><strong>Standardization</strong>: Provide a unified way to create and manage Skip services</li><li><strong>Flexibility</strong>: Support different templates and configurations while maintaining consistency</li></ol><h3>Contributing</h3><p>We welcome contributions to create-skip-service! Whether it’s bug reports, feature requests, or code contributions, your input helps make this tool better for everyone.</p><p>- GitHub Repository: <a href="https://github.com/SkipLabs/create-skip-service">SkipLabs/create-skip-service</a></p><p>- Issues: <a href="https://github.com/SkipLabs/create-skip-service/issues">GitHub Issues</a></p><h3>What’s Next?</h3><p>We’re actively working on improving create-skip-service with plans for:</p><ul><li>Additional template options</li><li>Enhanced configuration options</li><li>More detailed documentation</li><li>Community-driven template contributions</li></ul><h3>Try It Out!</h3><p>Give it a go! And keep us posted on what you are building. Feedback is bliss, right?</p><pre>npx create-skip-service my-service</pre><h3>Wrapping Up</h3><p>create-skip-service represents our commitment to making Skip service development more efficient and enjoyable. By handling the boilerplate setup automagically¹, we believe this tool will help developers focus on what matters most — building great services.</p><p>As of today, we are already on our way to improving and augmenting the number of options and templates. Come back and help us sort priorities!</p><p>We have a <a href="https://discord.gg/2nzP2PZj">Discord server</a>, why don’t you swing by and say hi?</p><h3>What’s Next?</h3><p>For the next Skip article, what should I tackle first? You tell me!</p><ul><li>Scaling your Skip service horizontally?</li><li>Integrating with frontend frameworks like React?</li><li>Managing authorization and privacy per user?</li><li>What else would be most useful to you <strong>now</strong>?</li></ul><p>¹ not a typo ;-)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=015ac27bc0c2" width="1" height="1" alt=""><hr><p><a href="https://medium.com/skiplabs/a-cli-to-streamline-the-creation-of-skip-services-015ac27bc0c2">A CLI to streamline the creation of Skip services</a> was originally published in <a href="https://medium.com/skiplabs">SkipLabs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building a Real-time Blog with Skip and PostgreSQL]]></title>
            <link>https://medium.com/skiplabs/building-a-real-time-blog-with-skip-and-postgresql-5514a9cd8ea1?source=rss-9aaf097f5c8a------2</link>
            <guid isPermaLink="false">https://medium.com/p/5514a9cd8ea1</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[postgresql]]></category>
            <category><![CDATA[reactive-programming]]></category>
            <category><![CDATA[skip]]></category>
            <category><![CDATA[typescript]]></category>
            <dc:creator><![CDATA[Hugo Venturini]]></dc:creator>
            <pubDate>Wed, 21 May 2025 08:48:24 GMT</pubDate>
            <atom:updated>2025-05-21T08:49:56.485Z</atom:updated>
            <content:encoded><![CDATA[<h4>Step-by-step to create a reactive service with PostgreSQL and with Skip by <a href="https://skiplabs.io/">SkipLabs</a>, a proof-of-concept</h4><blockquote>originally posted <a href="https://skiplabs.io/blog/postgresql_and_skip">here</a> on May 16, 2025</blockquote><p>Hello Skippers. Today, we are going to plug a <a href="https://www.postgresql.org/">PostgreSQL</a> service and our starting point is the following project on GitHub: <a href="https://github.com/SkipLabs/postgres_and_skip_poc">Skip Postgres Demo</a>. We will demonstrate how to use Skip’s reactive data streaming with a PostgreSQL backend. This project implements a simple blog post system with real-time updates using Skip’s streaming capabilities.</p><figure><img alt="A technical diagram showing a high level data flow between a PostgreSQL database, a reactive Skip-based application and a server. The diagram includes a database labeled “PostgreSQL” connected via an arrow to a “Skip Service.” This service is then linked to a “Server”. The server is linked to the database. The arrows indicate a unidirectional flow from the database to an external service, illustrating real-time updates." src="https://cdn-images-1.medium.com/max/1024/1*DUL5rm0m2lZj3BzcmmEBcg.png" /><figcaption>High-level architecture</figcaption></figure><p>Before we get too far ahead, two things… (1) what you need and (2) what you will learn:</p><h3>What you need:</h3><ul><li><a href="https://nodejs.org/en">Node.js</a> (Latest LTS version recommended)</li><li>pnpm package manager</li><li><a href="https://www.docker.com/">Docker</a> (for PostgreSQL)</li><li>(optional) a Json pretty printer in the terminal, I use <a href="https://jqlang.org/">jq</a></li></ul><h3>What you will learn:</h3><ul><li>Real-time post streaming using Skip’s reactive data system</li><li>PostgreSQL integration for data persistence</li><li>RESTful API endpoints for post management</li><li>Support for streaming data access</li></ul><h3>Okay..ready?….let’s go!</h3><p>We are starting from a REST server for the simplest blog post system and we are going to add real-time updates features to it.</p><p>Let’s check out the project:</p><pre>git clone https://github.com/SkipLabs/postgres_and_skip_poc.git<br>cd postgres_and_skip_poc/<br>git checkout $(git rev-list - max-parents=0 main)</pre><p>And yes, you are right we are not starting on top of the main branch, but don’t worry we’ll get there in no time.</p><p>Run the init_and_start_server.sh script, it will start a PostgreSQL database in a Docker container and fill it in with some data. It will then install and build the whole project with `pnpm` to finally start it!</p><pre>./init_and_start_server.sh</pre><p>The last lines should look something like:</p><pre>🚀 Starting server…<br><br>&gt; skip-postgres@1.0.0 start /your/path/skip-postgres<br>&gt; node dist/index.js<br>Server running at http://localhost:3000</pre><p>In a new terminal, we are going to check that the REST API is up:</p><p>First, let’s display one of the articles:</p><pre>curl localhost:3000/posts/7 | jq</pre><p>Note that here there’s an easy shortcut — I use <a href="https://jqlang.org/">jq</a>, which will make life more convenient to read JSON output.</p><p>As you can see, the article is not published:</p><pre>&quot;published_at&quot;: null,<br>&quot;created_at&quot;: &quot;&lt;some_date&gt;&quot;,<br>&quot;updated_at&quot;: &quot;&lt;some_date&gt;&quot;</pre><p>We are going to publish and unpublish it:</p><pre>curl -X PATCH http://localhost:3000/posts/7/publish | jq<br>curl -X PATCH http://localhost:3000/posts/7/unpublish | jq</pre><p>You should see the modification as results of the calls.</p><p>A working REST API.</p><p>And now here comes the fun part, let’s make it a reactive API</p><h3>The Skip Service</h3><p>First of all, kill your running server.</p><p>We are about to checkout the top of the main branch and install the necessary bits:</p><pre>git checkout main<br>pnpm add -D @skipruntime/core @skipruntime/helpers @skipruntime/server<br>pnpm add @skip-adapter/postgres</pre><p>A Skip service has collections as inputs and mappers to transform them into resources as outputs.</p><p>In our case, in file <a href="https://github.com/SkipLabs/postgres_and_skip_poc/blob/main/src/skipservice.ts">skipservice.ts</a> you will find:</p><ol><li>A type you want to be notified about: <a href="https://github.com/SkipLabs/postgres_and_skip_poc/blob/main/src/skipservice.ts#L16-L29">PostWithAuthor</a> which contains information from two tables: Users and Posts (see <a href="https://github.com/SkipLabs/postgres_and_skip_poc/blob/main/src/db/schema.sql">schema.sql</a>).</li><li>A mapper <a href="https://github.com/SkipLabs/postgres_and_skip_poc/blob/main/src/skipservice.ts#L32-L65">PostMapper</a> which creates instances of this type from an EagerCollection(an EagerCollection is always kept up-to-date).</li><li>A resource <a href="https://github.com/SkipLabs/postgres_and_skip_poc/blob/main/src/skipservice.ts#L73-L85">PostResource</a> which implements a function from a <a href="https://github.com/SkipLabs/postgres_and_skip_poc/blob/main/src/skipservice.ts#L67-L69">PostsResourceInputs</a> to an EagerCollection&lt;number, PostWithAuthor&gt;</li></ol><p>And it is when we instantiate our service that we plug it to the PostgreSQL, when we define an instance of <a href="https://github.com/SkipLabs/reactive_social_network_service_poc/blob/main/src/skipservice.mts#L10-L19">SkipService</a>, we receive a context as input. This context provides a method useExternalResource.</p><p>Remember that in Skip, Resources are the outputs of your service that clients can subscribe to, while Collections are the inputs that feed data into your service. When you create a graph using createGraph, you define how these Collections are transformed into Resources. Once you’ve set up your graph and connected it to your external services (like PostgreSQL in our case), you just need a few lines of code in your server to expose these Resources to clients:</p><pre>app.get(<br> &#39;/streams/posts/:uid&#39;,<br> asyncHandler(async (req, res) =&gt; {<br>   const uid = Number(req.params.uid);<br>   const uuid = await serviceBroker.getStreamUUID(&#39;posts&#39;, uid);<br>   res.redirect(301, `${SKIP_READ_URL}/v1/streams/${uuid}`);<br> })<br>);<br><br><br>app.get(<br> &#39;/streams/posts&#39;,<br> asyncHandler(async (req, res) =&gt; {<br>   const uuid = await serviceBroker.getStreamUUID(&#39;posts&#39;);<br>   res.redirect(301, `${SKIP_READ_URL}/v1/streams/${uuid}`);<br> })<br>);</pre><p>You can find these lines in <a href="https://github.com/SkipLabs/postgres_and_skip_poc/blob/main/src/index.ts#L65-L80">src/index.ts#L65-L80</a></p><p>We are adding two endpoints:</p><p>- /streams/posts/:uid which is a stream of changes for a given an ID post</p><p>- /streams/posts which is a stream of changes for the entire posts table</p><p>Let’s play with it, in three terminals:</p><h3>Terminal 1: Start the Server</h3><pre>./init_and_start_server.sh</pre><p>Server and services are ready when you see:</p><pre>Skip control service listening on port 8081<br>Skip streaming service listening on port 8080<br>Server running at http://localhost:3000</pre><h3>Terminal 2: Subscribe to Post Updates</h3><pre>curl -LN http://localhost:3000/streams/posts/7 | \<br>  while read -r line; do<br>    echo &quot;$line&quot; | grep &#39;^data:&#39; | sed &#39;s/^data: //&#39; | jq .<br>  done</pre><blockquote>💡 <strong>Note</strong>: The shell command above includes some formatting magic to make the output readable. It filters for data lines and pretty-prints the JSON using jq.</blockquote><h3>Terminal 3: Modify the Post</h3><pre>curl -X PATCH http://localhost:3000/posts/7/publish | jq<br>curl -X PATCH http://localhost:3000/posts/7/unpublish | jq</pre><p>Watch Terminal 2 while you run these commands in Terminal 3 — you’ll see the real-time updates!</p><h3>Wrapping-up</h3><p>In our <a href="https://medium.com/skiplabs/reactive-social-network-service-with-skip-3cb99656b542">previous blog post</a>, we have walked you through how to create a Skip service for a reactive social network, with code! Check it out here: <a href="https://github.com/SkipLabs/reactive_social_network_service_poc">Reactive Social Network Service (Proof of Concept)</a>.</p><p>Now we have learned how to plug a PostgreSQL service using Skip!</p><h3>What’s Next?</h3><p>For the next Skip article, what should I tackle first? You tell me!</p><ul><li>Scaling your Skip service horizontally?</li><li>Integrating with frontend frameworks like React?</li><li>Managing authorization and privacy per user?</li><li>What else would be most useful to you NOW?</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5514a9cd8ea1" width="1" height="1" alt=""><hr><p><a href="https://medium.com/skiplabs/building-a-real-time-blog-with-skip-and-postgresql-5514a9cd8ea1">Building a Real-time Blog with Skip and PostgreSQL</a> was originally published in <a href="https://medium.com/skiplabs">SkipLabs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Reactive Social Network Service with Skip]]></title>
            <link>https://medium.com/skiplabs/reactive-social-network-service-with-skip-3cb99656b542?source=rss-9aaf097f5c8a------2</link>
            <guid isPermaLink="false">https://medium.com/p/3cb99656b542</guid>
            <category><![CDATA[developer-tools]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[reactive-programming]]></category>
            <category><![CDATA[skip]]></category>
            <category><![CDATA[typescript]]></category>
            <dc:creator><![CDATA[Hugo Venturini]]></dc:creator>
            <pubDate>Mon, 19 May 2025 12:16:37 GMT</pubDate>
            <atom:updated>2025-06-06T08:41:12.794Z</atom:updated>
            <content:encoded><![CDATA[<h4>Step-by-step to create a basic social network service, with Skip by <a href="https://skiplabs.io/">SkipLabs</a>, a proof-of-concept</h4><blockquote>originally posted <a href="https://skiplabs.io/blog/reactive_social_network_service_poc">here</a> on April 30, 2025</blockquote><p>Reactive programming often sounds complex — but it doesn’t have to be. What if you could actually see how data responds to change, in real time, right from your terminal?</p><p>In this tutorial, we walk through building a small proof-of-concept social network backend using <a href="https://www.skiplabs.io/">Skip</a> and TypeScript. It tracks users, groups, and their friendships — with automatic updates to “active friends” using Skip’s reactive computation graph.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JK8e-tTtail7iWcglZyZOg.png" /></figure><p>You’ll learn how to:</p><ul><li>Set up a reactive Skip service</li><li>Define users and groups as live-updating resources</li><li>Connect it all to a REST API using <a href="https://expressjs.com/">Express</a></li><li>Observe real-time updates as the data evolves</li></ul><blockquote>“The simpler, the merrier” — this project keeps things minimal, focused, and easy to explore.</blockquote><p>From Alice adding a new friend to live data reactions, this guide makes reactive systems tangible.</p><h3>The Simpler, the Better</h3><p>Ever heard the saying, “The simpler, the better”? Well, that especially holds true when it comes to learning — particularly in reactive programming. Think of it like what we expect from a social network: <em>reactivity</em> in response to change. Sure, a full-blown social network has more bells and whistles than a carnival, but here we’re just tackling a small piece of it. This guide keeps things light and breezy, focusing on the essentials to show how to build a reactive system using <strong>Skip</strong>. It’s a proof of concept.</p><p>By keeping things simple and working right in the terminal, we can easily follow how data flows and how changes propagate without getting lost in complexity.</p><p>We’ll start by setting up a Node project with TypeScript. Then, we’ll define our data types. Since this is a social network, we want to represent friends and determine if they’re active in a given group. We’ll define members with names and associated groups, and for each group, we’ll track whether a given member is active. After that, we’ll build the Skip service, and finally, we’ll wrap things up with a web server that uses the reactive service. All this will be wrapped up in an example where Alice makes a new friend.</p><p>You can follow along with <a href="https://github.com/SkipLabs/reactive_social_network_service_poc">the full code on GitHub</a>, structured with a commit for each step:</p><h3>Step 1: The TypeScript Project</h3><p>The whole first step can be found <a href="https://github.com/SkipLabs/reactive_social_network_service_poc/commit/b424165666b45a9d17b969f2422941f748556c85">here on GitHub</a>.</p><p>This first project really is Basic TypeScript 101, but watch out for some details such as the configuration of package.jsonand tsconfig.json. These two files can be sneaky little configuration traps if you’re not careful. They might seem straightforward, but trust me, they can trip you up when you least expect it. So, keep an eye out and make sure everything is set up just right.</p><p>Let’s create a directory for this proof-of-concept:</p><pre>mkdir reactive_social_network_service<br>cd reactive_social_network_service</pre><p>And now the TypeScript project:</p><pre>npm init -y<br>npm install - save-dev typescript @types/node<br>mkdir -p src<br>npx tsc --init \<br> --target ES2022 \<br> --module nodenext \<br> --rootDir &quot;./src&quot; \<br> --outDir &quot;./dist&quot; \<br> --moduleResolution nodenext</pre><p>Configuration of package.json to prepare the project for what’s about to come:</p><pre>npm pkg set type=&quot;module&quot;<br>npm pkg set scripts.build=&quot;tsc&quot;<br>npm pkg set scripts.start=&quot;node dist/index.js&quot;<br>npm pkg set scripts.clean=&quot;rm -rf dist node_modules&quot;</pre><p>We are now ready to enter the Skip world!</p><h3>Step 2: The Skip Service</h3><p>The whole second step can be found <a href="https://github.com/SkipLabs/reactive_social_network_service_poc/commit/a63289aaae2404e62d1d212d870be042ab47f3e5">here on GitHub</a>.</p><p>We are going to need SkipLabs packages:</p><pre>npm add @skiplabs/skip</pre><p>So you better understand where we are heading, here is what the source directory will eventually look like:</p><pre>src<br>├── activefriends.mts<br>├── data.mts<br>├── index.ts<br>├── skipservice.mts<br>└── types.mts</pre><p>And we start with the necessary types. In a nutshell, Skip defines a resource as the output of a Skip service. A resource is updated and maintained reactively. A collection is the core data structure over which reactive computations operate. An EagerCollection is always kept up-to-date. LazyCollection exists as well for evaluation upon queries only, but we are not using them in this proof-of-concept.</p><p>Here the code for src/types.mts:</p><pre>import {<br>    type EagerCollection,<br>} from &quot;@skipruntime/core&quot;;<br><br>type UserID = number;<br>type GroupID = number;<br>type User = { name: string; active?: boolean; friends: UserID[] };<br>type Group = { name: string; members: UserID[] };<br><br>type ServiceInputs = {<br>    users: EagerCollection&lt;UserID, User&gt;;<br>    groups: EagerCollection&lt;GroupID, Group&gt;;<br>};<br><br>type ResourceInputs = {<br>    users: EagerCollection&lt;UserID, User&gt;;<br>    activeMembers: EagerCollection&lt;GroupID, UserID&gt;;<br>};<br><br>export type {<br>    UserID,<br>    GroupID,<br>    User,<br>    Group,<br>    ServiceInputs,<br>    ResourceInputs,<br>};</pre><p>Now some data to get started. Outside this proof-of-concept, this would come from your database.</p><p>Four users and two groups e.g. Carol is in both groups but inactive.</p><p>Here is the code for src/data.mts:</p><pre>import { InitialData } from &quot;@skipruntime/core&quot;;<br>import { ServiceInputs } from &quot;./types.mjs&quot;;<br><br>// Initial data for the social network service<br>const initialData: InitialData&lt;ServiceInputs&gt; = {<br>    users: [<br>        [0, [{ name: &quot;Bob&quot;, active: true, friends: [1, 2] }]],<br>        [1, [{ name: &quot;Alice&quot;, active: true, friends: [0, 2] }]],<br>        [2, [{ name: &quot;Carol&quot;, active: false, friends: [0, 1] }]],<br>        [3, [{ name: &quot;Eve&quot;, active: true, friends: [] }]],<br>    ],<br>    groups: [<br>        [1001, [{ name: &quot;Group 1&quot;, members: [1, 2, 3] }]],<br>        [1002, [{ name: &quot;Group 2&quot;, members: [0, 2] }]],<br>    ],<br>};<br><br>export { initialData };</pre><p>Let’s talk about active friends! For that, we need to define a filter for that active boolean. We are going to use a mapper. In Skip, a mapper describes a computation from keys/values in one collection to keys/values in another collection. It forms the edges of the Skip reactive computation graph, specifying transformations and compositions of data to produce intermediate results and outputs.</p><p>We are defining two mappers and a resource: one mapper to retrieve active members out of a given group, one mapper to retrieve friends of a given user out of a given group, and a resource which will hold active friends for a given user.</p><p>Here is the code for src/activefriends.mts:</p><pre>import {<br>    type EagerCollection,<br>    type Json,<br>    type Mapper,<br>    type Resource,<br>    type Values,<br>} from &quot;@skipruntime/core&quot;;<br><br>import { GroupID, Group, UserID, User, ResourceInputs } from &quot;./types.mjs&quot;;<br><br>// Mapper functions for reactive data transformations<br>class ActiveMembers implements Mapper&lt;GroupID, Group, GroupID, UserID&gt; {<br>    constructor(private users: EagerCollection&lt;UserID, User&gt;) { }<br><br>    // Maps group members to active users only<br>    mapEntry(gid: GroupID, group: Values&lt;Group&gt;): Iterable&lt;[GroupID, UserID]&gt; {<br>        return group<br>            .getUnique()<br>            .members.flatMap((uid: UserID) =&gt;<br>                this.users.getUnique(uid).active ? [[gid, uid]] : [],<br>            );<br>    }<br>}<br><br>// Filters group members to only include friends of a specific user<br>class FilterFriends implements Mapper&lt;GroupID, UserID, GroupID, UserID&gt; {<br>    constructor(private readonly user: User) { }<br><br>    mapEntry(gid: GroupID, uids: Values&lt;UserID&gt;): Iterable&lt;[GroupID, UserID]&gt; {<br>        return uids<br>            .toArray()<br>            .flatMap((uid: UserID) =&gt; (this.user.friends.includes(uid) ? [[gid, uid]] : []));<br>    }<br>}<br><br>// Resource that provides active friends for a given user<br>class ActiveFriends implements Resource&lt;ResourceInputs&gt; {<br>    private readonly uid: UserID;<br><br>    constructor(params: Json) {<br>        if (typeof params != &quot;number&quot;)<br>            throw new Error(&quot;Missing required number parameter &#39;uid&#39;&quot;);<br>        this.uid = params;<br>    }<br><br>    // Creates a collection of active friends for the specified user<br>    instantiate(inputs: ResourceInputs): EagerCollection&lt;GroupID, UserID&gt; {<br>        const user = inputs.users.getUnique(this.uid);<br>        return inputs.activeMembers.map(FilterFriends, user);<br>    }<br>}<br><br>export { ActiveMembers, ActiveFriends };</pre><p>And now the Skip service itself. It encompasses a server and a broker.</p><p>Here is the code for src/skipservice.mts:</p><pre>import { runService } from &quot;@skipruntime/server&quot;;<br>import { SkipServiceBroker } from &quot;@skipruntime/helpers&quot;;<br><br>import { ResourceInputs, ServiceInputs } from &quot;./types.mjs&quot;;<br>import { initialData } from &quot;./data.mjs&quot;;<br>import { ActiveFriends, ActiveMembers } from &quot;./activefriends.mjs&quot;;<br><br>// Service configuration and reactive graph definition<br>const service = {<br>    initialData,<br>    resources: { active_friends: ActiveFriends },<br>    // Creates the reactive data flow graph<br>    createGraph(input: ServiceInputs): ResourceInputs {<br>        const users = input.users;<br>        const activeMembers = input.groups.map(ActiveMembers, users);<br>        return { users, activeMembers };<br>    },<br>};<br><br>// Start the reactive service with specified ports<br>const server = await runService(service, {<br>    streaming_port: 8080,<br>    control_port: 8081,<br>});<br><br>// Initialize the service broker for client communication<br>const serviceBroker = new SkipServiceBroker({<br>    host: &quot;localhost&quot;,<br>    control_port: 8081,<br>    streaming_port: 8080,<br>});<br><br>export { server, serviceBroker };</pre><h3>Step 3: The Server</h3><p>The whole first step can be found <a href="https://github.com/SkipLabs/reactive_social_network_service_poc/commit/5fb3308540468243eeb10972d2ace887d5d3678b">here on GitHub</a>].</p><p>To use the Skip service, we are creating an <a href="https://expressjs.com/">Express</a> server:</p><pre>npm install express<br>npm install - save-dev @types/express</pre><p>This server will expose an API to monitor active friends, and modify users and groups.</p><p>Here is the code for src/index.ts:</p><pre>import express, { Request, Response } from &quot;express&quot;;<br>import { server, serviceBroker } from &quot;./skipservice.mjs&quot;;<br><br>// Initialize Express app<br>const app = express();<br>app.use(express.json());<br><br>// Store a reference to the Express server<br>const expressServer = app.listen(8082, () =&gt; {<br>    console.log(`Web server listening at port 8082`);<br>});<br><br>// Utility function to handle errors<br>const handleError = (res: Response, error: unknown) =&gt; {<br>    console.error(&quot;Error: &quot;, error);<br>    res.status(500).json(error);<br>};<br><br>// Route handlers<br>const getActiveFriends = async (req: Request, res: Response) =&gt; {<br>    try {<br>        const uuid = await serviceBroker.getStreamUUID(&quot;active_friends&quot;, Number(req.params.uid));<br>        res.redirect(301, `http://localhost:8080/v1/streams/${uuid}`);<br>    } catch (error) {<br>        handleError(res, error);<br>    }<br>};<br><br>const updateEntity = async (entity: string, idParam: string, req: Request, res: Response) =&gt; {<br>    try {<br>        const id = Number(req.params[idParam]);<br>        await serviceBroker.update(entity, [[id, [req.body]]]);<br>        res.status(200).json({});<br>    } catch (error) {<br>        handleError(res, error);<br>    }<br>};<br><br>// Define routes<br>app.get(&quot;/active_friends/:uid&quot;, getActiveFriends);<br>app.put(&quot;/users/:uid&quot;, (req: Request, res: Response) =&gt; updateEntity(&quot;users&quot;, &quot;uid&quot;, req, res));<br>app.put(&quot;/groups/:gid&quot;, (req: Request, res: Response) =&gt; updateEntity(&quot;groups&quot;, &quot;gid&quot;, req, res));<br><br>// Graceful shutdown handler for:<br>// - SIGINT: Ctrl+C in terminal<br>// - SIGTERM: System termination requests (kill command, container orchestration, etc.)<br>[&quot;SIGTERM&quot;, &quot;SIGINT&quot;].forEach((sig) =&gt; process.on(sig, async () =&gt; {<br>    await server.close();<br>    expressServer.close(() =&gt; {<br>        console.log(&quot;\nServers shut down.&quot;);<br>    });<br>}));</pre><p>Let’s install, build and start it!</p><pre>npm install<br>npm run build<br>npm run start</pre><p>Starting the server will display something like:</p><pre>&gt; reactive_social_network_service@1.0.0 start<br>&gt; node dist/index.js<br><br>Skip control service listening on port 8081<br>Skip streaming service listening on port 8080<br>Web server listening at port 8082</pre><p>The Express server listens to the steaming service for updates, and it is now time see it in action!</p><h3>Step 4: Let’s See It Work</h3><p>We are going to use three terminals: one is already running the server and the service, one will issue writes on port 8081, and one will watch changes on port 8082.</p><p>While the service is running, in a fresh terminal, we are going to listen for changes on Alice’s friends (index 1):</p><pre>curl -LN http://localhost:8082/active_friends/1 # Alice&#39;s active friends</pre><p>The previous command will continue listening after displaying the following, hence you won’t get any prompt back.</p><pre>event: init<br>id: &lt;SOME_HASH&gt;<br>data: [[1002,[0]]]</pre><p>Leave it like that and open the third and last terminal in which we are going to add and remove values to the initial data: the list of Alice friends is about to evolve:</p><pre>curl http://localhost:8081/v1/inputs/users \<br>    -X PATCH \<br>    --json &#39;[[1, [<br>    {<br>        &quot;name&quot;: &quot;Alice&quot;,<br>        &quot;active&quot;: true,<br>        &quot;friends&quot;: [0, 2, 3]<br>        }<br>    ]]]&#39;</pre><p>What do you see in the second terminal? The data is being reactively updated. Go ahead and try other modifications e.g. Bob turns inactive, Alice removes Carol from her group of friends.</p><h3>Wrapping Up</h3><p>Reactive programming doesn’t have to be intimidating. With Skip, we’ve seen how simple it is to wire up reactivity — from raw data all the way to live updates in an API. The idea is simple: when something changes, everything that depends on it updates automatically. And that’s exactly what we built.</p><p>Of course, this is just the beginning. You now have a foundation for reactive services, and from here, the possibilities are wide open. Want to plug it into a real-time dashboard? Hook it into a game? Build collaborative tools?</p><h3>What’s next?</h3><p>For the next Skip article, what should I tackle first? You tell me!</p><ul><li>Listening to live changes from a PostgreSQL database?</li><li>Scaling your Skip service horizontally?</li><li>Integrating with frontend frameworks like React?</li><li>Managing authorization and privacy per user?</li><li>What else would be useful to your projects?</li></ul><p>We’ve exposed reactive programming in the nude, ‘scuse my french. The reactive world can be vast and complex but SKIP will be your guide and now you’ve got a solid start.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3cb99656b542" width="1" height="1" alt=""><hr><p><a href="https://medium.com/skiplabs/reactive-social-network-service-with-skip-3cb99656b542">Reactive Social Network Service with Skip</a> was originally published in <a href="https://medium.com/skiplabs">SkipLabs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>