<?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>Tutorial on Tux-Sudo</title><link>https://blog.tux-sudo.com/tags/tutorial/</link><description>Recent content in Tutorial on Tux-Sudo</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Sun, 16 Aug 2020 15:02:39 +0530</lastBuildDate><atom:link href="https://blog.tux-sudo.com/tags/tutorial/index.xml" rel="self" type="application/rss+xml"/><item><title>Production Grade Web Services with Go - Tying it Together</title><link>https://blog.tux-sudo.com/posts/production-grade-svc-4/</link><pubDate>Sun, 16 Aug 2020 15:02:39 +0530</pubDate><guid>https://blog.tux-sudo.com/posts/production-grade-svc-4/</guid><description>&lt;p&gt;Note : This is part four of a series of posts describing how to write &amp;ldquo;Production Grade Webservices in Go&amp;rdquo;. Here&amp;rsquo;s &lt;a href="https://blog.tux-sudo.com/posts/production-grade-svc-1/"&gt;Part - 1, The Service &lt;/a&gt;, &lt;a href="https://blog.tux-sudo.com/posts/production-grade-svc-2/"&gt;Part - 2, The Store &lt;/a&gt;, &lt;a href="https://blog.tux-sudo.com/posts/production-grade-svc-3"&gt;Part - 3, Transports&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;In part-3, we built a working HTTP service that passed the tests. But we&amp;rsquo;re still lacking the option to actually &amp;ldquo;run&amp;rdquo; it. While, this may appear like a trivial task, it&amp;rsquo;s actually quite important to get this right.
Something I feel rather strongly about is the need to avoid package level variables and global state in Go programs. Like plenty of other things, Peter Bourgon says it perfectly in &lt;a href="https://peter.bourgon.org/blog/2017/06/09/theory-of-modern-go.html"&gt;this post&lt;/a&gt;:&lt;/p&gt;</description></item><item><title>Production Grade Web Services with Go - Transports</title><link>https://blog.tux-sudo.com/posts/production-grade-svc-3/</link><pubDate>Sat, 04 Jul 2020 15:30:44 +0530</pubDate><guid>https://blog.tux-sudo.com/posts/production-grade-svc-3/</guid><description>&lt;p&gt;Note : This is part three of a series of posts describing how to write &amp;ldquo;Production Grade Webservices in Go&amp;rdquo;. Here&amp;rsquo;s &lt;a href="https://blog.tux-sudo.com/posts/production-grade-svc-1/"&gt;Part - 1, The Service &lt;/a&gt; and &lt;a href="https://blog.tux-sudo.com/posts/production-grade-svc-2"&gt;Part - 2 The Store &lt;/a&gt; if you haven&amp;rsquo;t read those.&lt;/p&gt;
&lt;p&gt;We&amp;rsquo;ve reached a point where we have properly laid out the business logic and the storage implementation for our service. Now, we&amp;rsquo;re going to move on and talk about &lt;strong&gt;transports&lt;/strong&gt;. As the name suggests, a transport is essentially transporting data over the network in a pre-defined format. JSON over HTTP is one such transport. gRPC is another. We&amp;rsquo;re going to start with JSON over HTTP simply because of how popular it is. I may write a separate post that adds a gRPC transport to this very service later, but for now, HTTP-JSON.&lt;/p&gt;</description></item><item><title>Production Grade Web Services with Go - The Store</title><link>https://blog.tux-sudo.com/posts/production-grade-svc-2/</link><pubDate>Mon, 08 Jun 2020 12:16:15 +0530</pubDate><guid>https://blog.tux-sudo.com/posts/production-grade-svc-2/</guid><description>&lt;p&gt;Note : This is part two of a series of posts describing how to write &amp;ldquo;Production Grade Webservice in Go&amp;rdquo;. Here&amp;rsquo;s &lt;a href="https://blog.tux-sudo.com/posts/production-grade-svc-1/"&gt;Part - 1, The Service &lt;/a&gt; if you haven&amp;rsquo;t read it.&lt;/p&gt;
&lt;p&gt;The previous post ended with a defined structured for our service and some basic testing. It was, however, lacking what is a very important component for most webservices, a &lt;strong&gt;datastore&lt;/strong&gt;. If you&amp;rsquo;ve used frameworks to write services in the past, you&amp;rsquo;re probably familiar with abstractions like Hibernate/DjangoORM etc. While Go has the option of working with similar alternatives (&lt;a href="https://gorm.io/"&gt;GORM&lt;/a&gt;, &lt;a href="https://github.com/gobuffalo/pop"&gt;Pop&lt;/a&gt;), I generally find building a simple custom abstraction over the database to be better. Unless you have a lot CRUD like APIs with plenty of models, direct is, in my opinion, better. See this &lt;a href="https://eli.thegreenplace.net/2019/to-orm-or-not-to-orm/"&gt;post&lt;/a&gt; for more information.&lt;/p&gt;</description></item><item><title>Production Grade Web Services with Go - The Service</title><link>https://blog.tux-sudo.com/posts/production-grade-svc-1/</link><pubDate>Sun, 07 Jun 2020 09:33:15 +0000</pubDate><guid>https://blog.tux-sudo.com/posts/production-grade-svc-1/</guid><description>&lt;p&gt;Production Grade is a term thrown around a lot these days. Every organization seems to have it&amp;rsquo;s own definition for what qualifies as &amp;ldquo;Production Grade&amp;rdquo; or &amp;ldquo;Production Ready&amp;rdquo;. In these series of posts, I&amp;rsquo;m going to present my take on the topic and the bare minimum of what I think qualifies under this definition. These posts assume a working knowledge of Go and are not meant for total beginners to the language.&lt;/p&gt;</description></item></channel></rss>