<?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 Eugene Novikov on Medium]]></title>
        <description><![CDATA[Stories by Eugene Novikov on Medium]]></description>
        <link>https://medium.com/@regyl?source=rss-d9e8c6e0800f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*viUpjipGtc-h5UWDHpcCiw.png</url>
            <title>Stories by Eugene Novikov on Medium</title>
            <link>https://medium.com/@regyl?source=rss-d9e8c6e0800f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 18:24:44 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@regyl/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[PostgreSQL: UUIDv4 vs UUIDv7]]></title>
            <link>https://medium.com/@regyl/postgresql-uuidv4-vs-uuidv7-90d1fb9e0a6d?source=rss-d9e8c6e0800f------2</link>
            <guid isPermaLink="false">https://medium.com/p/90d1fb9e0a6d</guid>
            <category><![CDATA[uuid]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[uuidv7]]></category>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[postgresql]]></category>
            <dc:creator><![CDATA[Eugene Novikov]]></dc:creator>
            <pubDate>Sun, 11 Oct 2026 15:42:36 GMT</pubDate>
            <atom:updated>2026-10-14T19:00:23.125Z</atom:updated>
            <content:encoded><![CDATA[<p>About a year ago, PostgreSQL 18 delivered native support for UUIDv7. In the article below, I’m gonna deep dive into the impact of UUIDv4 in comparison with the new UUIDv7.</p><h4>TL;DR</h4><ul><li>While on a small amount of data, the amount of time needed to insert v4 and v7 is so close; on a larger data set, UUIDv7 surprisingly wins with almost 10x faster results than a common UUIDv4.</li><li>Meanwhile, the resulting index size is growing linearly: v7 index size is always about a quarter less than v4.</li></ul><h4>LR;WI</h4><p>First, let’s define the main difference between UUIDv4 and UUIDv7. As <a href="https://www.rfc-editor.org/info/rfc9562/">RFC 9562</a> says:</p><blockquote>UUIDv7 features a time-ordered value field derived from the widely implemented and well-known Unix Epoch timestamp source, the number of milliseconds since midnight 1 Jan 1970 UTC</blockquote><p>What does it mean? Well, in general, this means that while UUIDv4 was implemented to generate truly (or pseudo) random values, UUIDv7 tries to solve the same problem but with a little difference: the first 48 bits are filled with a UTC timestamp.</p><p>I picked 2 main measurements to compare v4 and v7:</p><ul><li>Amount of time for insertion</li><li>Resulting index size on disk</li></ul><p>Measurements were performed on 1, 10, and 100 million rows. UUIDs were stored in a column marked as PRIMARY KEY, which means PostgreSQL will by default generate a unique B-tree index for them.</p><p>First, let’s take a glance at the results, then check out some source code. The charts below represent a comparison of the measurements we defined above.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*fGiGs1xDqulLgtlY9jf5ZA.png" /></figure><p><em>Important note: the exact values, of course, can differ on a different setup.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*PlUPnd2wxNVAH31JdS8bmg.png" /></figure><p><em>Important note 2: as described below, the tests were inserting all the data at once, without extra latency from application throughput and additional WALs per transaction.</em></p><p>While the first chat was kinda easy to understand, the second is more interesting: the amount of time needed to insert a large portion of UUIDv4 is much more than UUIDv7. The reason? The way how B-tree indexes work under the hood.</p><p>In general, to insert a new UUIDv7, all you need is to find the last leaf. At the same time, to insert a UUIDv4, PostgreSQL has to load completely unrelated pages into RAM to find a proper leaf for the new indexed item.</p><p><em>The funny fact: I wanted to add a billion rows to these charts, but it took too much time on my PC, like more than an hour for UUIDv4.</em></p><h4>Code</h4><p><strong>This part is optional</strong> and describes how to reproduce these results locally. All source code is located on my <a href="https://github.com/Regyl/practice-projects/tree/master/uuid-comparison">GitHub</a>, so feel free to ask any questions or report a problem!</p><p>First, let’s create a database:</p><pre>services:<br>  postgres:<br>    image: &#39;postgres:18.6&#39;<br>    container_name: postgres<br>    ports:<br>      - &#39;5432:5432&#39;<br>    environment:<br>      POSTGRES_USER: &#39;user&#39;<br>      POSTGRES_PASSWORD: &#39;pwd&#39;<br>      POSTGRES_DB: &#39;db&#39;<br>    volumes:<br>      - postgres_data:/var/lib/postgresql<br>      - ./init.sql:/docker-entrypoint-initdb.d/01-init.sql:ro<br><br>volumes:<br>  postgres_data:</pre><p>The init.sql mentioned in volumes contains only table definitions:</p><pre>CREATE TABLE test_v7(id UUID NOT NULL PRIMARY KEY);<br>CREATE TABLE test_v4(id UUID NOT NULL PRIMARY KEY);</pre><p>Second, let’s run our tests. While benchmark.py contains all the code to make it for you, if you want to make it manually:</p><p>Enable query timing by typing \timing on in the psql shell.</p><p>Then let’s generate 1 million rows for v7 and v4:</p><pre>insert into test_v7(id)<br>select uuidv7() from generate_series(1,1_000_000);<br><br>insert into test_v4(id)<br>select uuidv4() from generate_series(1,1_000_000);</pre><p>Enabled timing will produce us the amount of time needed to generate this test data.</p><p>And last, let’s check the index sizes:</p><pre>SELECT pg_size_pretty(pg_relation_size(&#39;test_v7_pkey&#39;));<br>SELECT pg_size_pretty(pg_relation_size(&#39;test_v4_pkey&#39;));</pre><p>Also, if you want to try on a different dataset size, do not forget to clear all tables first:</p><pre>truncate table test_v7;<br>truncate table test_v4;<br><br>vacuum (index_cleanup on, full) test_v7;<br>VACUUM (index_cleanup on, full) test_v4;</pre><h4>Afterwords</h4><p>It’s also important to note that these are not the only differences between v4 and v7. For example, v7 is also better in case you want to fetch multiple UUIDs that were generated at almost the same time, since PostgreSQL will store them on the same page.</p><p>Thank you a lot for reading!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/638/0*kTyKsS5NBAXzAEvC.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=90d1fb9e0a6d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Apache Kafka: Message Ordering]]></title>
            <link>https://medium.com/@regyl/apache-kafka-message-ordering-252a87b53165?source=rss-d9e8c6e0800f------2</link>
            <guid isPermaLink="false">https://medium.com/p/252a87b53165</guid>
            <category><![CDATA[interview-questions]]></category>
            <category><![CDATA[backend]]></category>
            <category><![CDATA[interview]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[apache-kafka]]></category>
            <dc:creator><![CDATA[Eugene Novikov]]></dc:creator>
            <pubDate>Tue, 23 Jun 2026 18:56:56 GMT</pubDate>
            <atom:updated>2026-06-23T18:56:56.379Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/525/1*tCcChm7kKyTVzv3TCVmEdQ.jpeg" /></figure><h4>TL;DR</h4><ul><li>Message ordering among multiple topics is not supported</li><li>Topics with one partition keep the message order by default — no additional configuration needed</li><li>Topics with 2 or more partitions can handle this by defining a message key.</li></ul><h4>LR;WI</h4><p>This year started with a raise of AI usage and its integration into our daily lives for both work and personal one. Someone can accept these changes, some cannot, but we have to be ready for it.</p><p>This is the first article, but not the last, about AI in the hiring process, where I’d like to take a deeper look at common questions asked by AI.</p><p>Before the main topic, I’d like to notice that these questions I got as a Backend Java Developer, so they can be asked mainly for backend developers.</p><p>Nowadays, Apache Kafka is a very powerful and widely used message queue, included in the tech stack of a lot of well-known companies such as Siemens, Wix, Domino’s, Netflix, Booking, etc.</p><blockquote><strong>Let’s dive deep into the question: </strong>How to preserve the order of messages in Apache Kafka?</blockquote><p>There are two options to handle this feature depending on the context. First of all, keep in mind that there is no way to handle message ordering among multiple topics. If we are talking only about message ordering within the topic, it depends on the partition count. If the topic is not a hot one and we can make it consist of only one partition, then there is no need to modify anything in the configuration or the data itself — the messages will be consumed in the same order as they were supplied by a producer.</p><p>The second, and more real-world example, is a topic with multiple partitions. Then the answer is the <strong>message key</strong>. When we produce a message into the topic, Apache Kafka decides which exact partition will store it by its key.</p><p>Let’s assume we are developing a system for a factory that has a lot of temperature measurement devices, and each have to send its measurement every 500 ms. If we send the measurements to an aggregation system without a message key, we can see a chart like below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*G2um7U6AF5o5empI9uoj_A.jpeg" /></figure><p>The spike on the chart appeared due to message ordering: the consumer first read the message about 30 degrees, then about 12, even though they’re supplied in a different order.</p><p>To handle this issue, we can modify producer logic and assign device X’s ID to a specific partition by passing it as a message key. Since Apache Kafka guarantees ordering within one partition, the chart will look better:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u8OrZo4HxtEb-LTDKWGW7w.jpeg" /></figure><blockquote><strong>Keep in mind</strong>: if a message were produced without a key, Kafka will use the round-robin mechanism, which means the message will be sent to a random partition.</blockquote><h3>Summary:</h3><ul><li>Message ordering among multiple topics is not supported</li><li>Topics with one partition keep the message order by default — no additional configurations needed</li><li>Topics with 2 or more partitions can handle this by defining a message key.</li></ul><p>If you’d like to take an interview from AI for free, here are the services I’ve used:</p><ul><li><a href="https://app.sesame.com/">sesame</a></li><li><a href="https://www.micro1.ai/interview-prep/backend-developer-interview-questions">micro1</a></li></ul><p>Thank you for reading! If you have some notes about the article’s payload or design, feel free to leave a comment.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=252a87b53165" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How we made open source projects more interesting for developers]]></title>
            <link>https://medium.com/@regyl/how-we-made-open-source-projects-more-interesting-for-developers-09376c2ccf8d?source=rss-d9e8c6e0800f------2</link>
            <guid isPermaLink="false">https://medium.com/p/09376c2ccf8d</guid>
            <category><![CDATA[github]]></category>
            <category><![CDATA[personalized-learning]]></category>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[good-first-issue]]></category>
            <dc:creator><![CDATA[Eugene Novikov]]></dc:creator>
            <pubDate>Thu, 19 Feb 2026 12:11:00 GMT</pubDate>
            <atom:updated>2026-02-19T12:11:00.922Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*snBOxQo89WAznFFuR04ChA.png" /></figure><h3>Background</h3><p>We are developing <a href="http://yagfi.com/?utm_source=medium.com">YAGFI </a>— a good-first-issue aggregator whose primary goal is to make it easier for developers to start contributing to open source.</p><h3>Personalized feed</h3><p>In a <a href="https://medium.com/@regyl/how-to-work-with-cyclonedx-as-a-multitask-application-60ec3019771a">previous article</a> we wrote about making CycloneDX multitasking. This was a part of one big update named <em>Personalized feed</em>.</p><p>Now we’re able to collect all the user own and starred repositories, fetch all their dependencies and join them to existing <em>good-first-issue</em> issues.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0BacGEJo0-KIgxhlIqKbpQ.png" /><figcaption>Example of personalized feed (repositories)</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*l3D8TnqxPjrWWDPu5-8_6w.png" /><figcaption>Example of personalized feed (issues)</figcaption></figure><p>Each feed generation takes about 10–20 minutes dependently on user’s project quantity/size. To notify the user we requested it’s email. We already noted at website and I’d like to note here:</p><blockquote><strong>Privacy:</strong> Your email will be used only to notify you when your feed is ready. No advertising or sharing with third parties.</blockquote><h4>About implementation</h4><p>CycloneDX returns a SBOM, which contain each dependency in a <a href="https://github.com/package-url/purl-spec">PURL specification</a>. To transfrom PURL to GitHub/GitLab/etc project URL we had to fetch each project configuration file (pom.xml, package.json and so on) and search for a link like https://github.com/&lt;owner_name&gt;/&lt;project_name&gt;. This is not so easy since each package manager had it’s own configuration file format. So, currently we’re only able to fetch dependencies for the next package managers:</p><ul><li>NPM</li><li>Maven</li><li>Cargo</li><li>PyPi</li><li>Go (partially)</li><li>Github Packages</li></ul><p>We have huge views on this feature, so any help is highly appreciated.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*RmHZ2FsRUoPtEUNh.png" /></figure><h3>Afterword</h3><p>You can generate your own feed <a href="http://yagfi.com/feed?utm_source=medium.com">here, on our website</a>.</p><p>The project is so young and we’re highly appreciate any <a href="https://github.com/Regyl/yagfi-back">contributions</a> or <a href="https://github.com/Regyl/yagfi-back/issues">feedback</a>. Also feel free to ask any question or leave a feedback at our project’s <a href="https://discord.gg/cggqh3Qr8d">discord server</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=09376c2ccf8d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to work with CycloneDX as a multitask application]]></title>
            <link>https://medium.com/@regyl/how-to-work-with-cyclonedx-as-a-multitask-application-60ec3019771a?source=rss-d9e8c6e0800f------2</link>
            <guid isPermaLink="false">https://medium.com/p/60ec3019771a</guid>
            <category><![CDATA[highload]]></category>
            <category><![CDATA[cyclonedx]]></category>
            <category><![CDATA[multithreading]]></category>
            <category><![CDATA[good-first-issue]]></category>
            <category><![CDATA[open-source]]></category>
            <dc:creator><![CDATA[Eugene Novikov]]></dc:creator>
            <pubDate>Wed, 18 Feb 2026 23:01:59 GMT</pubDate>
            <atom:updated>2026-02-18T23:01:59.758Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KVV96AzyooVhckAQTiVY1g.png" /></figure><h3>Beforeword</h3><p>We’re working on <a href="http://yagfi.com/?utm_source=medium.com">YAGFI</a> which is a high-throughput system. It’s main goal is to connect developers with open source projects. One of the problem the project should solve is:</p><blockquote>“I think people do better to work on a project they use and care about” © Redditor</blockquote><p>The approach we’ve chosen is: collect all user’s own and starred repositories, fetch all their dependencies and join them to existing <em>good-first-issue</em> issues. Although collecting wasn’t this difficult (just fetch data from GitHub), collecting their dependencies <em>was difficult</em>. So difficult. To solve this problem we decided to use already existing tool — CycloneDX.</p><h3>About CycloneDX</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*N0XOsC1l8Hefz5Wn" /></figure><p><a href="https://github.com/CycloneDX">CycloneDX</a> is a full-stack Bill of Materials (BOM) standard that provides advanced supply chain capabilities for cyber risk reduction. But since it supplies a SBOM, we can gather all the dependencies by simply parsing it. And it suddenly works except one this: generating a SBOM was so slow, especially for huge repositories.</p><p>We tried everything:</p><ul><li>disable babel</li><li>switch cyclone version</li><li>switch internal plugins version</li><li>max-old-space-size</li><li>etc.</li></ul><p>Writing our own cyclone looked like a huge crunch. In this case we should took responsibility for another one huge tool, fix bugs, enchance them and more and more. The only way we seen is to make CycloneDX multithread.</p><h3>About multithreading</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/599/0*Cx4obZ_jwcDkW5hz.jpg" /></figure><p>By default CycloneDX works as single-thread application (if you’re using it as web application). After trying everything above, we made a decision to start multiple CycloneDX applications and distribute the load between them.</p><p>The last problem we faced sounded like:</p><blockquote>How to detect is CycloneDX finished project scanning and is ready to accept new one?</blockquote><p>The solution was so funny. CycloneDX as a web application have two methods:</p><ul><li>/sbom?url=&lt;github_repo_url&gt; — generates a SBOM by GitHub repo url</li><li>/health — check whetever CycloneDX is alive or not</li></ul><p>It turned on that while CycloneDX is scanning a repository, it’s not even answer on /health requests. So we just decided to call /health with a small timeout (about 2 seconds), if CycloneDX could not answer during this period — it’s probably busy. And we won’t supply another task until it become free.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/557/0*TsDxzaOOybL22yah.png" /><figcaption>Calling /health every ten seconds looks like</figcaption></figure><h3>Afterword</h3><p>And here we are:</p><ul><li>A week or two of sleepless nights after, the new feature is alredy in production, still works as expected</li><li>CycloneDX has become multithread (with additional crunches for sure)</li><li>Our VDS resized upper due to higher resource requirements. From 2 CPU &amp; 4 GB RAM to 3 CPU &amp; 8 GB RAM. Even current configuration with five CycloneDX instances can utilize all the available resources</li></ul><h3>A little for self-promote</h3><p><a href="http://yagfi.com/?utm_source=medium.com">YAGFI</a> is a <em>good-first-issue</em> aggregator whose primary goal is to make it easier for developers to start contributing to open source. The project is so young and we’re highly appreciate any <a href="https://github.com/Regyl/yagfi-back">contributions</a> or <a href="https://github.com/Regyl/yagfi-back/issues">feedback</a>. Also feel free to ask any question or leave a feedback at our project’s <a href="https://discord.gg/cggqh3Qr8d">discord server</a>.</p><p>Thank you for reading!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=60ec3019771a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How we faced a GitHub’s hidden limits]]></title>
            <link>https://medium.com/@regyl/how-we-faced-a-githubs-hidden-limits-3c4ee83a7cc3?source=rss-d9e8c6e0800f------2</link>
            <guid isPermaLink="false">https://medium.com/p/3c4ee83a7cc3</guid>
            <category><![CDATA[graphql]]></category>
            <category><![CDATA[github]]></category>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[rate-limiting]]></category>
            <dc:creator><![CDATA[Eugene Novikov]]></dc:creator>
            <pubDate>Sun, 08 Feb 2026 19:20:58 GMT</pubDate>
            <atom:updated>2026-02-08T19:30:41.866Z</atom:updated>
            <content:encoded><![CDATA[<h3>How we faced a GitHub’s hidden limits (and avoided them)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lCkVaMKlRXHjYmt3uEMd_w.png" /></figure><h3>Background</h3><p>We are developing <a href="http://yagfi.com/?utm_source=medium.com">YAGFI </a>— a good-first-issue aggregator whose primary goal is to make it easier for developers to start contributing to open source.</p><p>Right now we support only GitHub as our data source (but we plan to support other platforms later). That means we fetch huge amounts of data from GitHub — things like issues, repositories, etc. At first, after reading about GitHub rate limits and more, we decided to use the GraphQL API so we wouldn’t run into problems with limits. But that wasn’t enough.</p><h3>About GitHub’s limits</h3><p>As said on <a href="https://docs.github.com/en/graphql/overview/rate-limits-and-query-limits-for-the-graphql-api">GitHub’s article</a>, they have two types of limits:</p><ol><li>Primary, which restricts:</li></ol><ul><li>Quantity of queries per hour. Allowed no more than 5 000 points (1 point = 1 read-only query)</li></ul><p>2. Secondary, which restricts:</p><ul><li>Concurrent requests. No more than 100 concurrent requests are allowed</li><li>Too many requests to a single endpoint per minute. No more than 2,000 points per minute are allowed</li><li>Too heavy requests. No more than 60 seconds of CPU time per 60 seconds of real time is allowed.</li><li>Just to heavy requests. No details.</li></ul><p>Our primary requests were just fetching large numbers of issues. We checked and tested — everything seemed correct. We launched the project and lived in a pink bubble for 2–3 weeks until one night something strange happened.</p><h3>The hidden limit</h3><p>One night our developer tested new feature and noticed one strange thing: GitHub REST API has <em>total_count </em>field for search filter query. As we noticed in the <a href="https://medium.com/@regyl/i-decided-to-write-yet-another-one-good-first-issue-aggregator-1e0e50e78458">previous article</a>, we loaded almost 22k issues for all labels. But GitHub’s search page showed more than 25k for only one label for the last 6 months.</p><p>We spend an entire night to detect the bug: code looked ok, filters wan’t wrong, no error responses or suppressed exceptions. Then we tried to search. And we <a href="https://stackoverflow.com/questions/37602893/github-search-limit-results">found</a>.</p><p>Suddenly, GitHub limits <strong>each</strong> query no more than 1,000 results. Even if you’re using a GraphQL and pagination properly, after 1,000 results GitHub will say that there is no more pages while it can be thousands more.</p><h3>Afterword</h3><p>Two or three nights after, we fixed everything by dividing each query on batches with no more than 1,000 results per batch. With additional crunches, with additional queries to collect some metadata and so on.</p><p>Follow and read more about <a href="http://yagfi.com/?utm_source=medium.com">YAGFI</a> at my profile, we move open source forward!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3c4ee83a7cc3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[I decided to write yet another one good-first-issue aggregator]]></title>
            <link>https://medium.com/@regyl/i-decided-to-write-yet-another-one-good-first-issue-aggregator-1e0e50e78458?source=rss-d9e8c6e0800f------2</link>
            <guid isPermaLink="false">https://medium.com/p/1e0e50e78458</guid>
            <category><![CDATA[good-first-issue]]></category>
            <category><![CDATA[contribution]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[typescript]]></category>
            <category><![CDATA[feedback]]></category>
            <dc:creator><![CDATA[Eugene Novikov]]></dc:creator>
            <pubDate>Sun, 01 Feb 2026 20:21:02 GMT</pubDate>
            <atom:updated>2026-02-08T12:43:18.784Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*afrrWl23U2EIW6VZJ3gi2w.png" /></figure><h3>Background</h3><p>About 5 years ago when I just started my way in IT at all and programming exactly I looked for an easy coding issues. There was multiple reasons: new connections, new experience, language practice (I’m non fluent-english) and so on.</p><p>Since GitHub was (and remains) the most famous platform for sharing OSS and offer <em>good-first-issue</em> label for issues, I thought this is the solution: just search by label and a bit more filters.</p><p>But no, it wasn’t a solution. I found multiple huge repositories which have their own custom labels for good-first-issue. And the fact that GitHub doesn’t support filter by multiple labels forced to search for a third-party solutions. And I found ‘em:</p><ul><li><a href="https://goodfirstissue.dev/">goodfirstissue.dev</a></li><li><a href="https://goodfirstissues.com/">goodfirstissues.com</a></li><li><a href="http://goodfirstissue.com/">goodfirstissue.com</a></li><li><a href="https://www.goodfirstissue.org/">goodfirstissue.org</a></li><li><a href="https://forgoodfirstissue.github.com/">forgoodfirstissue.github.com</a></li><li><a href="https://up-for-grabs.net/">up-for-grabs.net</a></li></ul><p>Unfortunately, they doesn’t met all my requirements. One supported only limited repositories, another supported limited labels, another updated dataset too rarely or just in a strange difficult-to-debug way.</p><p>After grab all this information I decided to build another one, my own. From developer for developers. And I’m ready to present first version.</p><h3>About the project</h3><p><a href="http://yagfi.com/">yagfi.com</a> is a high-throughput system built using Java + Spring Framework + GraphQL (to fetch data from GitHub) at backend and TypeScript + ReactJS at frontend.</p><p>Right now it contains actual data (about 20k issues from 5k repositories) that refreshing each 15 minutes. Supports filter by language, repository’s star quantity and dynamic sorting by a multiple fields.</p><p>The project is so young. I have a huge plans on it, so I’m looking for a:</p><ul><li>Feedback. What could implement better, what features are missed in different solutions and so on.</li><li>Contributors. These huge expectations are so time-consuming. Also since I’m primarily a backend developer I have weak knowledges in frontend tech stack and stongly looking for someone who can make it better or just suggest any advices.</li></ul><p>Feel free to join and ask any questions in project’s <a href="https://discord.gg/cggqh3Qr8d">discord server</a>.</p><h3>Afterword</h3><p>I know that many developers think it’s better to focus on projects you’re really interesting in. So I’m working right now on a custom user issue list based on it’s interests. Planning to release this feature in next one-two weeks and notify here. Subscribe to don’t miss next updates.</p><p>Thank you for reading!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1e0e50e78458" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Multi-Agent Threat Detection System]]></title>
            <link>https://medium.com/@regyl/multi-agent-threat-detection-system-691f48d1c913?source=rss-d9e8c6e0800f------2</link>
            <guid isPermaLink="false">https://medium.com/p/691f48d1c913</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[multi-agent-systems]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[langgraph]]></category>
            <category><![CDATA[threat-detection]]></category>
            <dc:creator><![CDATA[Eugene Novikov]]></dc:creator>
            <pubDate>Sun, 14 Sep 2025 01:18:12 GMT</pubDate>
            <atom:updated>2025-09-14T01:18:12.353Z</atom:updated>
            <content:encoded><![CDATA[<h4>How we built a ready-to-use multi-agent system in Python &amp; LangChain + LangGraph</h4><h4>Introduction</h4><p>Multiple weeks ago one company under the umbrella of “Training skills of writing multi-agent systems” ask me and my team, Java developers, if we wanna participate in an internal hackathon to solve multiple problems and gain experience in writing &amp; integration fully-automated multi-agent systems to solve real-world problems.</p><p>What you can find here:<br>- How to write single-agent application using <a href="https://python.langchain.com/docs/tutorials/llm_chain/">LangChain</a><br>- How to write simple multi-agent system in Python<br>- How to properly use <a href="https://langchain-ai.github.io/langgraph/examples/">LangGraph</a> for multi-agent systems</p><p>What you can NOT find here:<br>- How to integrate MCP<br>- How to use RAG<br>- How to write a perfect prompt<br>- How to write a perfect code in python<br>- Where we can rely on AI and were can’t</p><h4>Context</h4><p>Hackathon was lasted a week and consist of 5 cybersecurity problems:</p><ol><li>Password policy: find UNIX and non-UNIX accounts with weak passwords and reset them;</li><li>Network policy: find vulnerable services and close their external opened ports;</li><li>SAST: find a project in python and fix vulnerabilities found in code;</li><li>CVE-management: find CVE in project dependencies from previous task and fix by updating vulnerable dependencies;</li><li>Q/A-agent: given multiple documents, answer multiple questions using document data.</li></ol><p>In this article, I will explain how to implement a multi-agent system using the first task as an example. To get the most from this article, you will need a basic knowledges in Python and langchain. Parts about how to create template python application and etc will be omitted.</p><h4>Payload</h4><p>Since it will be a multi-agent system, first of all we need to define a basic agent to simplify addition of new agents:</p><pre>import logging<br>from abc import ABC<br>from typing import Final<br><br>from src.commons.util import utils<br>from src.commons.model.graph_state import GraphState<br><br>log: Final = logging.getLogger(__name__)<br><br>class BaseAgent(ABC):<br><br>    def __init__(self):<br>        self.llm = utils.get_threadsafe_llm()<br><br>    @utils.log_execution_time<br>    def run(self, state: GraphState) -&gt; GraphState:<br>        try:<br>            return self.private_run(state)<br>        except Exception as e:<br>            log.exception(f&quot;Exception occurred: {e}&quot;)<br>            return {&quot;exception_msg&quot;: str(e)}<br><br>    def private_run(self, state: GraphState) -&gt; GraphState: ...</pre><p>Here we define BaseAgent abstract class, which have public run method. State on input, state on output. And private_run function which each subclass should implement by itself. <br>Constructor initializes self.llm field of type ChatOpenAI. Here is trimmed implementation of get_threadsafe_llm:</p><pre>def get_threadsafe_llm():<br>    llm_type = config_loader.load_config()[&#39;llm&#39;][&#39;type&#39;]<br>    log.info(f&quot;Using {llm_type} llm&quot;)<br>    if llm_type == &#39;LOCAL&#39;:<br>        return ChatOpenAI(<br>            base_url=&quot;http://localhost:1235/v1&quot;,  # LM Studio OpenAI API endpoint<br>            api_key=config_loader.load_config()[&#39;llm&#39;][&#39;api-key&#39;][llm_type],  # Dummy key - LM Studio ignores this field, but langchain requires it<br>            model=&quot;deepseek-r1&quot;  # Matches the name of the loaded model in LM Studio<br>        )<br>    elif llm_type == &#39;TOGETHERAI&#39;:<br>        return ChatOpenAI(<br>            model=&quot;meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo&quot;,<br>            openai_api_key=config_loader.load_config()[&#39;llm&#39;][&#39;api-key&#39;][llm_type],<br>            openai_api_base=&quot;https://api.together.xyz/v1&quot;,<br>            max_retries=3,<br>            timeout=config_loader.load_config()[&#39;timeout&#39;][&#39;llm&#39;],<br>            temperature=0<br>        )<br>    else:<br>        raise Exception(&quot;Unknown language model&quot;)</pre><p>Warning: this function can be wrote in better way, but it was a hackathon, I’ve seen worse code :)</p><p>The GraphState we used in BaseAgent#run represents a container with data to transfer mid-term result between agents. In our case, it looks like this:</p><pre>import operator<br>from typing import Annotated, List, Optional<br>from typing_extensions import TypedDict<br><br>class GraphState(TypedDict, total=False):<br>    initial_state: Optional[str]  # input data<br>    agent_outputs: Annotated[List[str], operator.add]  # mid-term agents results<br>    validation_result: bool <br>    validation_msg: Optional[str] # in case of validation exception<br>    retry_count: int  # max retries<br>    track_num: int # task number<br>    mid_state: str<br><br>    # Summarizations field<br>    summary: Optional[str]<br><br>    # Exception fields<br>    exception_msg: Optional[str]<br><br>def default_graph_state() -&gt; GraphState:<br>    &quot;&quot;&quot;<br>    Returns the default state of the graph.<br>    This is convenient for initializing the graph without extra manual setup.<br>    &quot;&quot;&quot;<br>    return GraphState(<br>        initial_state=None,<br>        agent_outputs=[],<br>        retry_count=3,<br>        validation_result=False,<br>        summary=None,<br>        exception_msg=None,<br>    )</pre><p>Now we have all basics. We have an abstract basic agent class, datastructure to share data between agents and an utility method to initialize LLM that we will call in examples later.<br>Gain all this we can write multiple agents to solve a problem. I will not produce all code snippets since they are huge and can be found at sources. Will show only one of them to be in context:</p><pre>import logging<br>from typing import Final<br><br>from langchain.schema import HumanMessage<br>from langchain_core.messages import SystemMessage<br><br>from src.commons.model.base_agent import BaseAgent<br>from src.commons.model.graph_state import GraphState<br>from src.commons.util import utils, config_loader<br><br>log: Final = logging.getLogger(__name__)<br>RESPONSE_FORMAT: Final = &quot;.md&quot;<br>SYSTEM_PROMPT: Final = f&quot;&quot;&quot;<br>&lt;prompt&gt;<br>e.g.: Summarise data about found and reset accounts in UNIX and SMB. <br>Answer as Linux cybersecurity expert. Do not invent.<br>&quot;&quot;&quot;<br><br>class SummariserAgent(BaseAgent):<br><br>    def private_run(self, state: GraphState) -&gt; GraphState:<br>        smb_accounts = open(&quot;&lt;path to snb found/reset accounts&gt;&quot;, encoding=&quot;UTF-8&quot;).read()<br>        unix_accounts = open(&quot;&lt;path to unix found/reset accounts&gt;&quot;, encoding=&quot;UTF-8&quot;).read()<br>        new_password = config_loader.load_config()[&#39;ssh&#39;][&#39;new-password&#39;]<br>        messages = [<br>            SystemMessage(content=SYSTEM_PROMPT),<br>            HumanMessage(content=f&quot;&quot;&quot;<br>            Found UNIX accounts: {unix_accounts}<br>            Found SMB accounts: {smb_accounts}<br>            <br>            Default password set to: {new_password}<br>            &quot;&quot;&quot;)<br>        ]<br>        result = self.llm.invoke(messages).content<br>        utils.write_str(result, state[&quot;track_num&quot;], __name__ + RESPONSE_FORMAT)<br>        return {&quot;summary&quot;: result}<br><br>AGENT: Final = SummariserAgent()<br><br>def node(state: GraphState) -&gt; GraphState:<br>    return AGENT.run(state)</pre><p>Here is the implementation of SummariserAgent which should generate a summary in .md format about found/reset accounts. Since this agent is a subclass of BaseAgent, we only need to implement private_run function with main logic. In this function we receive all data from previous stages, combine it and supply to LLM. <br>What we can notice here:<br>- We build and array of SystemMessage contains system prompt and HumanMessage contains our dynamic question.<br>- Calling self.llm for an answer<br>- Pass LLM’s answer to a GraphState in field “summary”<br>- To initialize agent only once, we created a final field “AGENT”<br>- To pass agent to graph we created node function in root of a file</p><p>When we created all agents and wrote it’s logic we can build a graph. The graph is needed to incapsulate order of calling agents, e.g. like this:</p><pre>import logging<br>from typing import Final<br>from langgraph.graph import StateGraph<br>from src.commons.model.graph_state import GraphState<br><br>log: Final = logging.getLogger(__name__)<br><br>def build_graph():<br>    &quot;&quot;&quot; Defines a graph of agents&quot;&quot;&quot;<br>    builder = StateGraph(GraphState)<br><br>    # Add nodes<br>    builder.add_node(&quot;unix_pwd_discovery&quot;, agent1.node)<br>    builder.add_node(&quot;unix_pwd_bruteforce&quot;, agent2.node)<br>    builder.add_node(&quot;unix_pwd_change&quot;, agent3.node)<br>    builder.add_node(&quot;validation_agent&quot;, agent4_validation.node)<br>    builder.add_node(&quot;summary&quot;, agent5_summary.node)<br><br>    #Define workflow<br>    builder.set_entry_point(&quot;unix_pwd_discovery&quot;)<br>    builder.add_edge(&quot;unix_pwd_discovery&quot;, &quot;unix_pwd_bruteforce&quot;)<br>    builder.add_edge(&quot;unix_pwd_bruteforce&quot;, &quot;unix_pwd_change&quot;)<br>    builder.add_edge(&quot;unix_pwd_change&quot;, &quot;validation_agent&quot;)<br>    builder.add_conditional_edges(&quot;validation_router&quot;, validation_router)<br>    builder.set_finish_point(&quot;summary&quot;)<br><br>    graph = builder.compile()<br>    log.info(&#39;\n&#39; + graph.get_graph().draw_ascii())<br>    return graph<br><br># conditional: if validation_result == False - go to start again, else - summarise<br>def validation_router(state: GraphState):<br>    if not state.get(&quot;validation_result&quot;, False):<br>        return &quot;unix_pwd_discovery&quot;<br>    return &quot;summarise&quot;</pre><p>He we firstly define graph nodes and then describe flow the agents should be called. Line log.info(… need just to simply look by eyes what graph we built.</p><p>Now we can start our multi-agent system:</p><pre>import logging<br>from typing import Final<br><br>import graph_builder<br>from src.commons.util import utils<br>from src.commons.model import graph_state<br>from src.commons.model.file_name import FileName<br><br>TRACK_NUM: Final = 1<br><br>@utils.log_execution_time<br>def main():<br>    logging.basicConfig(level=logging.DEBUG)<br><br>    graph = graph_builder.build_graph()<br>    state = graph_state.default_graph_state()<br>    state[&quot;track_num&quot;] = TRACK_NUM<br>    result = graph.invoke(state)<br>    utils.write(result[&quot;summary&quot;], TRACK_NUM, FileName.REPORT)<br><br>if __name__ == &quot;__main__&quot;:<br>    main()</pre><h4>Conclusion</h4><p>That is it. We wrote simple abstraction for agents, wrote GraphState datastructure to share data between agents, wrote one of agents and defined a flow in what order agents should be executed. <br>LangGraph is a really powerful framework to write multi-agent systems, here were decribed only basic features we needed to solve our tasks. LangGraph is not a replacement for LangChain, it’s an extension. It allows to run agents asynchronously and merge it’s results, allows to define a conditional node and so much more.</p><h4>Post words</h4><p>This article describes my own view and experience about how to build multi-agent systems and might not match with others. Yes, our solution might be, and, I assume, is not the best. Yes, our repository contain some code snippets that should not be used in production. But it was our first time and I believe not the last. This hackathon brings our team a huge useful experience, which will be so useful in current term when almost every IT-company tries to integrate AI in it’s business processes. <br>Sources are on <a href="https://github.com/Regyl/MultiAgentThreatDetectionSystem">GitHub</a>, you can ask questions there or write me directly in <a href="http://t.me/corgidile">telegram</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=691f48d1c913" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>