<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Shaaf Syed on foojay.io - Friends of OpenJDK</title><link>https://foojayio.github.io/website/today/author/shaaf/</link><description>Articles written by Shaaf Syed on foojay.io - Friends of OpenJDK</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Thu, 02 Oct 2025 13:24:28 +0000</lastBuildDate><atom:link href="https://foojayio.github.io/website/today/author/shaaf/index.xml" rel="self" type="application/rss+xml"/><item><title>Think in Graphs, Not Just Chains: JGraphlet for TaskPipelines</title><link>https://foojayio.github.io/website/today/think-in-graphs-not-just-chains-jgraphlet-for-taskpipelines/</link><pubDate>Thu, 02 Oct 2025 13:24:28 +0000</pubDate><guid>https://foojayio.github.io/website/today/think-in-graphs-not-just-chains-jgraphlet-for-taskpipelines/</guid><description>&lt;h2 id="h2-0-let-s-dive-into-the-eight-core-principles-that-define-jgraphlet"&gt;&lt;strong&gt;&lt;strong&gt;JGraphlet is a tiny, zero-dependency Java library for building task pipelines. It uses a graph model where you define tasks as nodes and connect them to create simple or complex workflows (like fan-in/fan-out). It supports both asynchronous (default) and synchronous tasks, has a simple API, allows data sharing via a PipelineContext, and offers optional caching to avoid re-computing results.&lt;/strong&gt;&lt;/strong&gt;
**Its power comes not from a long list of features, but from a small set of core design principles that work together in harmony.
At the heart of JGraphlet is simplicity, backed by a Graph. Add Tasks to a pipeline and connect them to create your graph. Each &lt;code&gt;Task&lt;/code&gt; has an input and output. A &lt;code&gt;TaskPipeline&lt;/code&gt; builds and executes a pipeline while managing the I/O for each Task.
For example, a &lt;code&gt;Map&lt;/code&gt; for Fan-in, a &lt;code&gt;Record&lt;/code&gt; for your own data model, etc. A Task pipeline also has a way &lt;code&gt;PipelineContext&lt;/code&gt; to share data between Tasks, and Tasks can also be cached, so the computation doesn&amp;rsquo;t need to take place again and again.
You can choose how your Task pipeline flow should be, and you can decide whether it should be synchronous &lt;code&gt;SyncTask&lt;/code&gt; or asynchronous. By default, all Tasks are asynchronous.
Let&amp;rsquo;s dive into the eight core principles that define JGraphlet.&lt;/h2&gt;
&lt;h3 id="h3-1-1-a-graph-first-execution-model"&gt;1. A Graph-First Execution Model&lt;/h3&gt;
&lt;p&gt;JGraphlet treats your workflow as a Directed Acyclic Graph (DAG). You define tasks as nodes and explicitly draw the connections (edges) between them. This makes complex patterns like fan-out (one task feeding many) and fan-in (many tasks feeding one) natural.
&lt;strong&gt;Example:&lt;/strong&gt;&lt;/p&gt;</description></item></channel></rss>