{"id":1952,"date":"2022-01-20T08:06:56","date_gmt":"2022-01-20T08:06:56","guid":{"rendered":"https:\/\/blog.samarthya.me\/wps\/?p=1952"},"modified":"2022-01-20T08:06:57","modified_gmt":"2022-01-20T08:06:57","slug":"event-streaming","status":"publish","type":"post","link":"https:\/\/blog.samarthya.me\/wps\/2022\/01\/20\/event-streaming\/","title":{"rendered":"Event Streaming"},"content":{"rendered":"\n<p>While reading Apache <code>Kafka<\/code> it was interesting analogy that they described<\/p>\n\n\n\n<figure class=\"wp-block-pullquote\"><blockquote><p>Event streaming is the digital equivalent of the human body&#8217;s central nervous system.<\/p><cite>Apache Kafka<\/cite><\/blockquote><\/figure>\n\n\n\n<p>It draws a great parallel between how the central nervous system allows for real time event generations and consumption in terms of reflex actions. The examples are well explained and captured <a href=\"https:\/\/kafka.apache.org\/powered-by\" target=\"_blank\" rel=\"noreferrer noopener\">here<\/a>.<\/p>\n\n\n\n<p>The biggest advantage of using such a platform is that besides the obvious<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Distributed<\/li><li>Secure<\/li><li>Highly scalable &amp; fault-tolerant<\/li><\/ul>\n\n\n\n<p>It can be deployed on bare-metal hardware and containers. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Terminologies<\/h2>\n\n\n\n<p>The basic terms that you might often hear when talking about Kafka are as under. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Server and Clients<\/h2>\n\n\n\n<p>Since it is distributed system it interacts over TCP via server and client system. It uses a binary protocol over TCP.\u00a0(More details <a rel=\"noreferrer noopener\" href=\"https:\/\/kafka.apache.org\/protocol.html#protocol_details\" target=\"_blank\">here<\/a>)<\/p>\n\n\n\n<p>Kafka cluster storage layer is termed as Broker.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Events<\/h2>\n\n\n\n<p>These are essentially the information (a record) that is produced and read in the Kafka universe. They generally have a Key, Value and Timestamp. Events are organized and stored in <code>Topics<\/code>.<\/p>\n\n\n\n<p>In <code>kafka<\/code> one can define for how long should the events should be retained through a per-topic configuration setting, after which old events will be discarded.\u00a0<\/p>\n\n\n\n<p>Topics are\u00a0<strong>partitioned<\/strong>, meaning a topic is spread over a number of &#8220;buckets&#8221; located on different Kafka brokers.\u00a0<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Producers<\/h2>\n\n\n\n<p>Applications that generates and publishes the information.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Consumers<\/h2>\n\n\n\n<p>Applications that consume the information available in <code>Kafka<\/code> universe<\/p>\n","protected":false},"excerpt":{"rendered":"<p>While reading Apache Kafka it was interesting analogy that they described Event streaming is the digital equivalent of the human body&#8217;s central nervous system. Apache Kafka It draws a great parallel between how the central nervous system allows for real time event generations and consumption in terms of reflex actions. The examples are well explained [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":1953,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"image","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":""},"categories":[224,1,34],"tags":[225],"class_list":["post-1952","post","type-post","status-publish","format-image","has-post-thumbnail","hentry","category-learn","category-others","category-technical","tag-kafka","post_format-post-format-image"],"_links":{"self":[{"href":"https:\/\/blog.samarthya.me\/wps\/wp-json\/wp\/v2\/posts\/1952","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.samarthya.me\/wps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.samarthya.me\/wps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.samarthya.me\/wps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.samarthya.me\/wps\/wp-json\/wp\/v2\/comments?post=1952"}],"version-history":[{"count":0,"href":"https:\/\/blog.samarthya.me\/wps\/wp-json\/wp\/v2\/posts\/1952\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.samarthya.me\/wps\/wp-json\/wp\/v2\/media\/1953"}],"wp:attachment":[{"href":"https:\/\/blog.samarthya.me\/wps\/wp-json\/wp\/v2\/media?parent=1952"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.samarthya.me\/wps\/wp-json\/wp\/v2\/categories?post=1952"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.samarthya.me\/wps\/wp-json\/wp\/v2\/tags?post=1952"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}