<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Go on nyadgar.com</title>
		<link>https://nyadgar.com/tags/go/</link>
		<description>Recent content in Go on nyadgar.com</description>
		<generator>Hugo</generator>
		<language>en-us</language>
		
		
		
		
			<lastBuildDate>Mon, 20 Jan 2025 15:50:12 +0200</lastBuildDate>
		
			<atom:link href="https://nyadgar.com/tags/go/index.xml" rel="self" type="application/rss+xml" />
			<item>
				<title>Scaling gRPC With Kubernetes (Using Go)</title>
				<link>https://nyadgar.com/posts/scaling-grpc-with-kubernetes-using-go/</link>
				<pubDate>Mon, 20 Jan 2025 15:50:12 +0200</pubDate>
				<guid>https://nyadgar.com/posts/scaling-grpc-with-kubernetes-using-go/</guid>
				<description>&lt;h2 id=&#34;the-tech&#34;&gt;The Tech&lt;/h2&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://grpc.io/&#34;&gt;&lt;code&gt;gRPC&lt;/code&gt;&lt;/a&gt; is a strong player in microservices-based systems.&#xA;Leveraging &lt;a href=&#34;https://protobuf.dev/&#34;&gt;Protocol Buffers&lt;/a&gt; for well-defined API contracts,&#xA;fast serialization (about &lt;code&gt;X5&lt;/code&gt; faster than &lt;code&gt;JSON&lt;/code&gt;), smaller payloads, and the use&#xA;of streams (thanks to &lt;code&gt;HTTP/2&lt;/code&gt;). It&amp;rsquo;s easy to see why this technology for&#xA;real-time microservice communication is a good choice.&lt;/p&gt;&#xA;&lt;h3 id=&#34;http2&#34;&gt;HTTP/2&lt;/h3&gt;&#xA;&lt;p&gt;Unlike a typical REST API that&amp;rsquo;s built on top of &lt;code&gt;HTTP/1.1&lt;/code&gt;, &lt;code&gt;gRPC&lt;/code&gt; is built on top of&#xA;&lt;code&gt;HTTP/2&lt;/code&gt;. The most noticeable feature of &lt;code&gt;HTTP/2&lt;/code&gt; is the ability to perform &lt;em&gt;server push&lt;/em&gt;.&#xA;This feature allows servers to asynchronously &lt;em&gt;push&lt;/em&gt; data to the client before the client&#xA;asks for it. &lt;code&gt;gRPC&lt;/code&gt; leverages &lt;em&gt;server push&lt;/em&gt; to support &lt;em&gt;streams&lt;/em&gt;, a key feature that separates &lt;code&gt;gRPC&lt;/code&gt;&#xA;from any other &lt;code&gt;HTTP/1.1&lt;/code&gt;-based API. Because of that, &lt;code&gt;HTTP/2&lt;/code&gt;&#xA;requires a long-lasting &lt;code&gt;TCP&lt;/code&gt; connection between the client and the server.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Go Interfaces: Why, How and When</title>
				<link>https://nyadgar.com/posts/go-interfaces-why-how-and-when/</link>
				<pubDate>Sun, 12 Jan 2025 00:00:00 +0000</pubDate>
				<guid>https://nyadgar.com/posts/go-interfaces-why-how-and-when/</guid>
				<description>&lt;p&gt;In programming, interfaces are a powerful concept that lets us express&#xA;our code more abstractly. Interfaces allow us to reason about the&#xA;higher-level logic of our processes without getting down to the small details.&#xA;Go has arguably one of the best interface implementations. With great features&#xA;like implicit implementations, assertion, and more.&lt;/p&gt;&#xA;&lt;p&gt;Interfaces must be used cautiously since they introduce more abstraction to our code,&#xA;making it susceptible to unnecessary wrappers, misuse of definitions, and sometimes,&#xA;even memory issues. In this article, I will discuss cases where interfaces can positively impact your code.&#xA;But first, let&amp;rsquo;s talk about what an interface is not.&lt;/p&gt;</description>
			</item>
			<item>
				<title>What Would it Be Like to Do Functional Programming in Go?</title>
				<link>https://nyadgar.com/posts/what-would-it-be-like-to-do-functional-programming-in-go/</link>
				<pubDate>Wed, 24 Jul 2024 15:50:12 +0200</pubDate>
				<guid>https://nyadgar.com/posts/what-would-it-be-like-to-do-functional-programming-in-go/</guid>
				<description>&lt;div class=&#34;box box-warning&#34;&gt;&#xA;    &lt;span class=&#34;box-icon&#34; aria-hidden=&#34;true&#34;&gt;&#xA;        &lt;svg viewBox=&#34;0 0 24 24&#34; fill=&#34;none&#34; stroke=&#34;currentColor&#34; stroke-width=&#34;2&#34; stroke-linecap=&#34;round&#34; stroke-linejoin=&#34;round&#34; width=&#34;20&#34; height=&#34;20&#34;&gt;&lt;path d=&#34;M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z&#34;&gt;&lt;/path&gt;&lt;line x1=&#34;12&#34; y1=&#34;9&#34; x2=&#34;12&#34; y2=&#34;13&#34;&gt;&lt;/line&gt;&lt;line x1=&#34;12&#34; y1=&#34;17&#34; x2=&#34;12.01&#34; y2=&#34;17&#34;&gt;&lt;/line&gt;&lt;/svg&gt;&#xA;    &lt;/span&gt;&#xA;    &lt;span class=&#34;box-label sr-only&#34;&gt;Warning&lt;/span&gt;&#xA;    &lt;div class=&#34;box-body&#34;&gt;&#xA;        &lt;strong&gt;Disclaimer&lt;/strong&gt;:&#xA;Go is not a pure functional programming language. This article does not try to teach you functional programming in Go since imposing functional programming concepts, may result in unnecessarily awkward code. Go has its style, and it&amp;rsquo;s proven to be highly successful. Therefore, there&amp;rsquo;s no point in forcing a foreign dialect on Go code. Haskell would be a great choice if you want to express yourself functionally.&#xA;    &lt;/div&gt;&#xA;&lt;/div&gt;&#xA;&#xA;&lt;p&gt;This article aims to provide imperative programmers a bridge to the functional world. Crossing that bridge and seeing the other side can help us reimagine problem-solving and add new skills to our set. We will encounter Go translations to some original Haskell code, hoping this will allow us to understand the original dialect.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Profiling in Go: A Practical Guide</title>
				<link>https://nyadgar.com/posts/go-profiling-like-a-pro/</link>
				<pubDate>Tue, 09 Apr 2024 15:50:12 +0200</pubDate>
				<guid>https://nyadgar.com/posts/go-profiling-like-a-pro/</guid>
				<description>&lt;p&gt;Profiling is an underrated skill among software-engineers and it&amp;rsquo;s often overlooked by even very skilled developers. Profiling a program, is essentially measuring CPU and memory usage to spot bottlenecks, memory leaks, and other performance issues. Knowing how profile a program and interpret the result can direct us to where exactly our program is suffering from poor performance, and focus our efforts on optimizing those specific parts. In this article, we&amp;rsquo;ll be profiling a real-world Go program. We&amp;rsquo;ll learn how to interpret the results, draw conclusions, and optimize the program accordingly.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Synchronization Patterns in Go</title>
				<link>https://nyadgar.com/posts/synchronization-patterns-in-go/</link>
				<pubDate>Sun, 01 Oct 2023 09:15:20 +0200</pubDate>
				<guid>https://nyadgar.com/posts/synchronization-patterns-in-go/</guid>
				<description>&lt;div class=&#34;box box-info&#34;&gt;&#xA;    &lt;span class=&#34;box-icon&#34; aria-hidden=&#34;true&#34;&gt;&#xA;        &lt;svg viewBox=&#34;0 0 24 24&#34; fill=&#34;none&#34; stroke=&#34;currentColor&#34; stroke-width=&#34;2&#34; stroke-linecap=&#34;round&#34; stroke-linejoin=&#34;round&#34; width=&#34;20&#34; height=&#34;20&#34;&gt;&lt;circle cx=&#34;12&#34; cy=&#34;12&#34; r=&#34;10&#34;&gt;&lt;/circle&gt;&lt;line x1=&#34;12&#34; y1=&#34;11&#34; x2=&#34;12&#34; y2=&#34;16&#34;&gt;&lt;/line&gt;&lt;line x1=&#34;12&#34; y1=&#34;8&#34; x2=&#34;12.01&#34; y2=&#34;8&#34;&gt;&lt;/line&gt;&lt;/svg&gt;&#xA;    &lt;/span&gt;&#xA;    &lt;span class=&#34;box-label sr-only&#34;&gt;Info&lt;/span&gt;&#xA;    &lt;div class=&#34;box-body&#34;&gt;&#xA;        This article is a followup for a more basic guide.&#xA;If you would like to read the previous article, &lt;a href=&#34;https://nyadgar.com/posts/asynchronous-go-for-beginners&#34;&gt;click here&lt;/a&gt;&#xA;    &lt;/div&gt;&#xA;&lt;/div&gt;&#xA;&#xA;&lt;p&gt;The &lt;em&gt;Go&lt;/em&gt; programming language is all about concurrency. Spawning multiple &lt;em&gt;goroutines&lt;/em&gt; truly reveals the power of &lt;em&gt;Go&lt;/em&gt; programs. As it lets us divide our program into concurrent processes. But you may have guessed, opening this door comes with a whole set of new issues we software engineers, have to consider. Most of them are related to shared memory and synchronization. From identifying the issue and applying the pattern, here are some things we can do in &lt;em&gt;Go&lt;/em&gt;, to write better programs.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Asynchronous Go for Beginners</title>
				<link>https://nyadgar.com/posts/asynchronous-go-for-beginners/</link>
				<pubDate>Tue, 26 Sep 2023 16:59:52 +0200</pubDate>
				<guid>https://nyadgar.com/posts/asynchronous-go-for-beginners/</guid>
				<description>&lt;div class=&#34;box box-info&#34;&gt;&#xA;    &lt;span class=&#34;box-icon&#34; aria-hidden=&#34;true&#34;&gt;&#xA;        &lt;svg viewBox=&#34;0 0 24 24&#34; fill=&#34;none&#34; stroke=&#34;currentColor&#34; stroke-width=&#34;2&#34; stroke-linecap=&#34;round&#34; stroke-linejoin=&#34;round&#34; width=&#34;20&#34; height=&#34;20&#34;&gt;&lt;circle cx=&#34;12&#34; cy=&#34;12&#34; r=&#34;10&#34;&gt;&lt;/circle&gt;&lt;line x1=&#34;12&#34; y1=&#34;11&#34; x2=&#34;12&#34; y2=&#34;16&#34;&gt;&lt;/line&gt;&lt;line x1=&#34;12&#34; y1=&#34;8&#34; x2=&#34;12.01&#34; y2=&#34;8&#34;&gt;&lt;/line&gt;&lt;/svg&gt;&#xA;    &lt;/span&gt;&#xA;    &lt;span class=&#34;box-label sr-only&#34;&gt;Info&lt;/span&gt;&#xA;    &lt;div class=&#34;box-body&#34;&gt;&#xA;        If you would like to skip to a more advanced article, check out &lt;a href=&#34;https://nyadgar.com/posts/synchronization-patterns-in-go&#34;&gt;Synchronization Patterns in Go&lt;/a&gt;&#xA;    &lt;/div&gt;&#xA;&lt;/div&gt;&#xA;&#xA;&lt;p&gt;When it comes to asynchronous programming, Go is one of the best languages in the market. The design of the language is so &lt;em&gt;multi-thread&lt;/em&gt; oriented, that the &lt;code&gt;go&lt;/code&gt; keyword in the language is used to start a new &lt;em&gt;goroutine&lt;/em&gt;.&lt;/p&gt;</description>
			</item>
			<item>
				<title>How to Cache</title>
				<link>https://nyadgar.com/posts/how-to-cache/</link>
				<pubDate>Mon, 15 Aug 2022 15:50:12 +0200</pubDate>
				<guid>https://nyadgar.com/posts/how-to-cache/</guid>
				<description>&lt;p&gt;Caching is one of those things that almost every digital service uses in some way or another, it can improve user experience, and reduce costs by preventing redundant computation. When incorrectly applied, it can be the root cause of many nasty issues such as serving stale data, creating security breaches, and eating up the memory. In this article, we will see what cache exactly is, what types of cache we can implement, and how to implement them correctly.&lt;/p&gt;</description>
			</item>
	</channel>
</rss>
