<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Posts on Nikita Ryanov</title><link>https://nryanov.com/posts/</link><description>Recent content in Posts on Nikita Ryanov</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Wed, 31 Dec 2025 04:30:00 +0300</lastBuildDate><atom:link href="https://nryanov.com/posts/index.xml" rel="self" type="application/rss+xml"/><item><title>Different ways to setup CDC</title><link>https://nryanov.com/postgresql/cdc/</link><pubDate>Wed, 31 Dec 2025 04:30:00 +0300</pubDate><guid>https://nryanov.com/postgresql/cdc/</guid><description>&lt;p&gt;CDC is an important part of data processing. Using CDC you can achieve many goals from simple data replication to audit and complex ETL jobs.
But implementing CDC is still a tough task (especially when considering not only happy-path).
In this article I want to show different ways of implementing CDC. Also, I&amp;rsquo;ll try to not only show how to setup each variant, but also compare them with each other and highlight pros and cons of each option.&lt;/p&gt;</description></item><item><title>PostgreSQL: Log-based CDC using debezium</title><link>https://nryanov.com/postgresql/debezium-postgres/</link><pubDate>Fri, 10 May 2024 04:30:00 +0300</pubDate><guid>https://nryanov.com/postgresql/debezium-postgres/</guid><description>&lt;p&gt;In this little article I&amp;rsquo;ll show different ways to set up debezium for log-based CDC.
Before diving into details about debezium, I&amp;rsquo;ll shortly describe CDC and why it may be helpful in some tasks.&lt;/p&gt;
&lt;h1 id="cdc-change-data-capture"&gt;CDC: Change Data Capture &lt;!-- raw HTML omitted --&gt;&lt;!-- raw HTML omitted --&gt;&lt;/h1&gt;
&lt;p&gt;In the Internet the &lt;code&gt;CDC&lt;/code&gt; is described as a design pattern which allows to track data changes (deltas).
Let&amp;rsquo;s consider this approach on table &lt;code&gt;user_balances&lt;/code&gt;. Initial state of table is:&lt;/p&gt;</description></item><item><title>Delivery and processing semantics: overview</title><link>https://nryanov.com/overview/delivery-and-processing-semantics/</link><pubDate>Wed, 01 May 2024 04:30:00 +0300</pubDate><guid>https://nryanov.com/overview/delivery-and-processing-semantics/</guid><description>&lt;p&gt;In this article I want to make an overview of a delivery semantics in messaging systems, describe delivery guarantee and
add my own thoughts about all of this.&lt;/p&gt;
&lt;h1 id="delivery-semantics-overview"&gt;Delivery semantics: overview &lt;!-- raw HTML omitted --&gt;&lt;!-- raw HTML omitted --&gt;&lt;/h1&gt;
&lt;p&gt;So, what exactly is &lt;code&gt;delivery semantics&lt;/code&gt; and why this is important? &lt;code&gt;Delivery semantics&lt;/code&gt; is about guarantees provided by messaging system or delivery protocol.
These guarantees are about message order (delivery and processing), delivery reliability, duplication allowance and so on. In other words &lt;code&gt;delivery semantic&lt;/code&gt; determines how exactly message will be handled in terms of delivery.&lt;/p&gt;</description></item><item><title>Kafka-connect: overview</title><link>https://nryanov.com/kafka/kafka-connect-overview/</link><pubDate>Tue, 11 Jul 2023 04:30:00 +0300</pubDate><guid>https://nryanov.com/kafka/kafka-connect-overview/</guid><description>&lt;h1 id="kafka-connect-overview"&gt;Kafka-connect: overview &lt;!-- raw HTML omitted --&gt;&lt;!-- raw HTML omitted --&gt;&lt;/h1&gt;
&lt;p&gt;Imagine you have a task where you need to fetch some data from a database and incrementally store it in kafka or read the consumed data from kafka and store it in the database.
You can solve both tasks using plain kafka consumer/producer API or even use kafka streams library,
but if you don&amp;rsquo;t need comprehensive data transformations (e.g. enrichment, stream joining) then you can use Kafka connect for it.&lt;/p&gt;</description></item><item><title>PostgreSQL: Log shipping Replication</title><link>https://nryanov.com/postgresql/postgresql-log-shipping-replication/</link><pubDate>Wed, 04 Jan 2023 22:50:00 +0300</pubDate><guid>https://nryanov.com/postgresql/postgresql-log-shipping-replication/</guid><description>&lt;h1 id="prerequisite"&gt;Prerequisite &lt;!-- raw HTML omitted --&gt;&lt;!-- raw HTML omitted --&gt;&lt;/h1&gt;
&lt;p&gt;All examples assume that postgresql is already installed on your machine.
Also, all examples are created using &lt;code&gt;PostgreSQL 14.1 on aarch64-apple-darwin20.6.0, compiled by Apple clang version 13.0.0 (clang-1300.0.29.3), 64-bit&lt;/code&gt;.&lt;/p&gt;
&lt;h1 id="log-shipping-replication"&gt;Log shipping replication &lt;!-- raw HTML omitted --&gt;&lt;!-- raw HTML omitted --&gt;&lt;/h1&gt;
&lt;p&gt;Log shipping replication (i will use a short name for it &lt;code&gt;LSR&lt;/code&gt;) is another one method to physically replicate data between multiple database clusters. As name says this method is about to replicate data through WAL-files (segment) which is transferred between instances. This is probably the most simple and straightforward method for data replication, but this simplicity comes with price and compromises which also should be accounted.&lt;/p&gt;</description></item><item><title>PostgreSQL: Streaming Replication</title><link>https://nryanov.com/postgresql/postgresql-streaming-replication/</link><pubDate>Thu, 10 Feb 2022 22:50:00 +0300</pubDate><guid>https://nryanov.com/postgresql/postgresql-streaming-replication/</guid><description>&lt;h1 id="prerequisite"&gt;Prerequisite &lt;!-- raw HTML omitted --&gt;&lt;!-- raw HTML omitted --&gt;&lt;/h1&gt;
&lt;p&gt;All examples assume that postgresql is already installed on your machine.
Also, all examples are created using &lt;code&gt;PostgreSQL 14.1 on aarch64-apple-darwin20.6.0, compiled by Apple clang version 13.0.0 (clang-1300.0.29.3), 64-bit&lt;/code&gt;.&lt;/p&gt;
&lt;h1 id="streaming-replication"&gt;Streaming replication &lt;!-- raw HTML omitted --&gt;&lt;!-- raw HTML omitted --&gt;&lt;/h1&gt;
&lt;p&gt;Streaming replication is a built-in mechanism in PostgreSQL to replicate data between multiple servers.
It is a low-level replication mechanism as it streams WAL data from primary server to the replica through the physical replication slot,
so it is highly recommended to replicate data between servers using similar PostgreSQL major version (minor versions could be different).
Also, it is a good idea to have equal servers in terms of server configuration such as CPU, RAM and Disks, especially if you consider to promote replica to master if primary server goes down.&lt;/p&gt;</description></item><item><title>PostgreSQL: Logical Replication</title><link>https://nryanov.com/postgresql/postgresql-logical-replication/</link><pubDate>Fri, 04 Feb 2022 22:50:00 +0300</pubDate><guid>https://nryanov.com/postgresql/postgresql-logical-replication/</guid><description>&lt;h1 id="prerequisite"&gt;Prerequisite &lt;!-- raw HTML omitted --&gt;&lt;!-- raw HTML omitted --&gt;&lt;/h1&gt;
&lt;p&gt;All examples assume that postgresql is already installed on your machine.
Also, all examples are created using &lt;code&gt;PostgreSQL 14.1 on aarch64-apple-darwin20.6.0, compiled by Apple clang version 13.0.0 (clang-1300.0.29.3), 64-bit&lt;/code&gt;.&lt;/p&gt;
&lt;h1 id="logical-replication"&gt;Logical replication &lt;!-- raw HTML omitted --&gt;&lt;!-- raw HTML omitted --&gt;&lt;/h1&gt;
&lt;p&gt;Logical replication is another method to replicate data between multiple nodes. This replication uses publish-subscribe model.
Each publisher may have multiple subscribers and each subscriber can subscribe to multiple publisher. Also, each subscriber may
be a publisher for another node which make it possible to create a cascading replication.&lt;/p&gt;</description></item><item><title>How to create a small json lib using antlr and shapeless</title><link>https://nryanov.com/scala/json-lib-shapeless-antlr4/</link><pubDate>Sat, 08 May 2021 22:17:26 +0300</pubDate><guid>https://nryanov.com/scala/json-lib-shapeless-antlr4/</guid><description>&lt;p&gt;In this article i will show how antlr4 and shapeless can be used to create a small json library (not for production, of course ^_^)
with ability to decode arbitrary json strings into case classes and encode them back with some scala magic.&lt;/p&gt;
&lt;h2 id="project-setup"&gt;Project setup&lt;/h2&gt;
&lt;p&gt;Let&amp;rsquo;s begin with a project setup.&lt;/p&gt;
&lt;p&gt;Generally speaking, it doesn&amp;rsquo;t really matter which IDE you will use, but i&amp;rsquo;ll use a Intellij Idea. Community edition is more than enough for it. Also, i recommend to instal &lt;a href="https://plugins.jetbrains.com/plugin/7358-antlr-v4"&gt;antlr4 plugin&lt;/a&gt; for intellij – it&amp;rsquo;s not necessary, but it really helps to create and debug antlr grammar.&lt;/p&gt;</description></item></channel></rss>