<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Majd Tarbin</title>
    <description>The latest articles on Forem by Majd Tarbin (@majicmaj).</description>
    <link>https://forem.com/majicmaj</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F463151%2F21ab87ae-0ab2-4750-ba5f-3b662b89c9ce.png</url>
      <title>Forem: Majd Tarbin</title>
      <link>https://forem.com/majicmaj</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/majicmaj"/>
    <language>en</language>
    <item>
      <title>Kafka in a Nutshell 🌰: Events, Topics, and APIs made simple</title>
      <dc:creator>Majd Tarbin</dc:creator>
      <pubDate>Fri, 08 Sep 2023 22:50:16 +0000</pubDate>
      <link>https://forem.com/majicmaj/kafka-get-started-with-the-mvp-of-understanding-276g</link>
      <guid>https://forem.com/majicmaj/kafka-get-started-with-the-mvp-of-understanding-276g</guid>
      <description>&lt;h1&gt;
  
  
  Intro
&lt;/h1&gt;

&lt;p&gt;For many years, our default method for data storage has been databases, which have effectively served us for decades.&lt;/p&gt;

&lt;p&gt;However, in certain cases, it might be more beneficial to focus on events rather than static data.&lt;/p&gt;

&lt;h2&gt;
  
  
  Events
&lt;/h2&gt;

&lt;p&gt;So, what exactly is an event? An event is a timestamped indication that a specific action has occurred.&lt;/p&gt;

&lt;p&gt;Traditionally, storing events in databases can be a tad inefficient. Instead, we use a structure known as a log — an ordered sequence of events, each accompanied by some state and a description of the event.&lt;/p&gt;

&lt;p&gt;This structure is intuitive and scalable.&lt;/p&gt;

&lt;h2&gt;
  
  
  Topics
&lt;/h2&gt;

&lt;p&gt;Enter Kafka — a robust system designed to manage these logs. In the Kafka ecosystem, these logs are grouped under categories called "topics".&lt;/p&gt;

&lt;p&gt;Kafka ensures durability by writing topics across multiple disks or servers, eliminating the risks associated with a single point of failure.&lt;/p&gt;

&lt;p&gt;The retention of topics can range from brief periods to years, or even indefinitely, and their sizes can vary from minuscule to massive.&lt;/p&gt;

&lt;p&gt;Each event captures a specific business occurrence.&lt;/p&gt;

&lt;h2&gt;
  
  
  Thinking in Kafka
&lt;/h2&gt;

&lt;p&gt;Kafka prompts developers to prioritize events over static entities.&lt;/p&gt;

&lt;p&gt;Gone are the days when the norm was building a monolithic application with a singular, expansive database.&lt;/p&gt;

&lt;p&gt;Now, whether you're working with a single service or multiple ones, they can both consume from and produce to a Kafka topic.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Possibilities
&lt;/h2&gt;

&lt;p&gt;With data residing in these topics, it becomes feasible to establish services that execute real-time analysis by consuming messages directly from topics, as opposed to relying on overnight batch processes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Kafka Connect
&lt;/h2&gt;

&lt;p&gt;Kafka offers tools, like Kafka Connect, which facilitates the capturing of database changes as events and populates them into a topic — ready for any use case you envision.&lt;/p&gt;

&lt;p&gt;Furthermore, Kafka Connect can export events from a topic into a database or any external system.&lt;/p&gt;

&lt;h2&gt;
  
  
  Kafka Streams
&lt;/h2&gt;

&lt;p&gt;While manipulating topics, events can be grouped based on their key, allowing for subsequent aggregation or counting before directing them to another topic.&lt;/p&gt;

&lt;p&gt;Kafka simplifies this process through its Kafka Streams API. It's a Java-based API that encompasses all the foundational elements and infrastructure, ensuring scalability and reliability without the developer needing to build these from scratch.&lt;/p&gt;

&lt;h2&gt;
  
  
  Outro
&lt;/h2&gt;

&lt;p&gt;Hopefully, this provides an MVP-level foundational understanding of Kafka. Your next step? Dive into the code and experiment firsthand with the Kafka quick start guide.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://kafka.apache.org/quickstart"&gt;https://kafka.apache.org/quickstart&lt;/a&gt;&lt;/p&gt;

</description>
      <category>java</category>
      <category>beginners</category>
      <category>database</category>
      <category>kafka</category>
    </item>
    <item>
      <title>The Art of Doing Nothing: The Key to Doing Everything</title>
      <dc:creator>Majd Tarbin</dc:creator>
      <pubDate>Wed, 22 Feb 2023 13:45:58 +0000</pubDate>
      <link>https://forem.com/majicmaj/the-art-of-doing-nothing-the-key-to-doing-everything-19fi</link>
      <guid>https://forem.com/majicmaj/the-art-of-doing-nothing-the-key-to-doing-everything-19fi</guid>
      <description>&lt;p&gt;All around us in nature, nothing is being done, but everything gets done&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw00q37h4i1u9c995gc3i.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw00q37h4i1u9c995gc3i.jpeg" alt=" " width="290" height="174"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Consider the lion. This magnificent beast spends a staggering 18-20 hours of its day resting, often basking under the sun's rays. And yet, despite such long hours of inactivity, it remains the undisputed king of its domain. With an entire pride to oversee, how does the lion manage to get everything done while appearing to do so little?&lt;/p&gt;

&lt;p&gt;How can we, too, embrace this lion-like efficiency – resting more while still managing our responsibilities?&lt;/p&gt;

&lt;p&gt;Our challenge lies in our understanding of productivity. We create extensive to-do lists, categorizing tasks based on priorities, desires, and long-term goals. And even as we start our day full of vigor and enthusiasm, we often end it feeling drained, with unchecked items lingering on our lists.&lt;/p&gt;

&lt;p&gt;Contrary to popular belief, motivation and energy aren't magically replenished each morning like a wizard's spell slots in D&amp;amp;D. They are resources you expend and regenerate. Even seemingly restful activities like playing video games or endlessly scrolling through social media can deplete them, akin to how work can.&lt;/p&gt;

&lt;p&gt;The Power of Embracing Stillness&lt;/p&gt;

&lt;p&gt;To tap into our true potential, we must learn the art of true rest. Sit still, gaze upon the serene greenery outside, and truly disengage.&lt;/p&gt;

&lt;p&gt;Welcome boredom. Relish it. Dive deep into its stillness.&lt;/p&gt;

&lt;p&gt;For it's in this stillness that we find renewed energy and drive to tackle our tasks. We mustn't mistake leisure activities like memes and gaming as genuine rest. At times, these can be even more taxing than our regular work.&lt;/p&gt;

&lt;p&gt;Structure your day strategically. Begin with the most mundane tasks and resist the urge to jump to another before completing the first. This method not only ensures efficiency but also cultivates an authentic interest in each task. Intersperse your schedule with moments of true rest, where you do absolutely nothing, or perhaps just take a gentle stroll. The key is to refrain from any activity that demands even a fraction more thought than your natural, relaxed state.&lt;/p&gt;

&lt;p&gt;I've come across numerous studies advocating the benefits of genuine rest, and while I'm no scientist, I am an advocate of balanced productivity. This balance between activity and inactivity is what propelled me to write this piece, something I'd longed to do but lacked the energy for, until I learned to rest like a lion.&lt;/p&gt;

&lt;p&gt;I hope you do nothing, and that you complete everything. &lt;/p&gt;

</description>
      <category>jokes</category>
      <category>watercooler</category>
    </item>
  </channel>
</rss>
