Practical guide to Error Handling in Rust

Effective error handling ensures that a program can gracefully handle unexpected situations and errors, making the software more robust and reliable. Well-designed error messages help users understand what went wrong and how to correct it, and contribute to the overall user experience using the library or the API. In this article I’ll gradually go through a number of options of handling errors in Rust and try to explain the benefits of using a method vs the other.
Read more →

Builder Pattern in Go and Rust

The Builder Pattern is a design pattern that provides a way to construct a complex object step by step, focusing on breaking down the construction of the object into smaller, more manageable steps. It separates the construction of a object from its representation, allowing the same construction process to create different variations or representations of the final object. This helps improve code readability, especially when dealing with objects that have a large number of attributes or configurations.
Read more →

Fan-Out, Fan-In pipeline in Go and Rust

In this article I’m exploring the process of implementing a Fan-Out/ Fan-In pipeline in Go and Rust. Fan-Out is a term to describe the process of starting multiple workers to handle input from the pipeline, and Fan-In is a term to describe the process of combining multiple results into one channel. I’m assuming that you have some familiarity with both Go and Rust languages. I’m new to Rust also, therefore it’s fair to say that this is about concurrency in Go & Rust through the eyes of a GO developer.
Read more →

Part 2: Diagnose Go code - beginner guide

This is the continuation of the previous post. I would strongly recommend reading Part 1 first then continue here as the description of the program, the intent and the current state are relevant as we move forward. Iter 3 - Remove Contention # Iter 3 code on Github Reading line by line from the stream and sending those over to the goroutines to be processed works, but may not be the most efficient way to process a large file.
Read more →

Part 1: Diagnose Go code - beginner guide

In this blog post I’ll iterate over a simple script and refactor it each time to improve its performance. Before diving into the details I would quote a couple of well known individuals from the GO Community. “You want to write code that is optimized for correctness. Don’t make coding decisions based on what you think might perform better. You must benchmark or profile to know if code is not fast enough.
Read more →

Part 1: Exploring Tensorflow 2 - Keras API

TensorFlow is a free and open-source software library for dataflow and differentiable programming across a range of tasks and it is used for machine learning applications such as neural networks. Tensorflow has grown to become one of the widely adopted ML platforms in the world. TensorFlow offers multiple levels of abstraction so you can choose the right one for your needs. You can build and train models by using the high-level Keras API, which makes getting started with TensorFlow and machine learning easy.
Read more →

Part 3: Demystifying gRPC

gRPC describes itself as: gRPC is a modern open source high performance RPC framework that can run in any environment. It can efficiently connect services in and across data centers with pluggable support for load balancing, tracing, health checking and authentication. It is also applicable in last mile of distributed computing to connect devices, mobile applications and browsers to backend services. This is Part 3 of a series of three articles describing gRPC functionality.
Read more →

Part 2: Demystifying gRPC

Let’s assume that the dev teams have been asked to extend the services and there are multiple teams working on it. Often, the teams prefer a specific programming language for a certain job. Luckily, gRPC is supported by a broad range of languages. We are going to extend the service to communicate to a storage service, but this time the service will be written in Python. This simple service can be written in whatever language of choice but in order to showcase the gRPC functionality in Python we could say that it is a project specification.
Read more →

Part 1: Demystifying gRPC

As we are moving more towards distributed systems and micro-services, the way the services are communicating between each other becomes increasingly important. As you can imagine, the request-response delay is multiplied by the number micro-services running in the backend. Until recently, the industry standard was JSON over REST, which is a software architectural style that defines a set of recommendations for designing loosely coupled applications that use the HTTP protocol for data transmission.
Read more →

Simple Tensorflow Serving Operator

Kubernetes is a powerful and highly extensible system for managing containerized workloads and services. It has two main components, the Master Components and the Node Componenets, and extensions. The Master Components: # Kube-apiserver, the API server is the front end for the Kubernetes control plane. etcd, is a highly-available key value store used as Kubernetes’ backing store for all cluster data. kube-scheduler, is the component of the master that watches newly created pods that have no node assigned, and selects a node for them to run on.
Read more →

DialogFlow Webhook in GO

In this article, I make the assumption that you know how to setup the DialogFlow agent by using the intents and entities. I’ll just give a short description of the DialogFlow without providing too much details on how to set it up. This is the third article and last of the series, where I show another options to consume the data from a REST service. If in the first two posts, I covered the standard web pages and the mobile application using Flutter, this time I’ll do the third option which is by Voice.
Read more →

UI Flutter Rest API

In my previous posts I wrote the backend for Items Inventory application and display the items with a simple Web interface using HTML and JavaScript. In this article I’ll show how to create a Mobile UI using the Flutter toolkit. This is the second post in a series and maybe the most exciting one for me as this is my first Flutter application. The app retrieve the Items by invoking the backend REST API.
Read more →

Items Rest API & Web Page

In the HTTP Web Services I talked about the best practices on creating HTTP Web Services. My blog post was inspired by a number of articles about structuring GO code, written by a number of well-known individuals of GO community. I would recommend to read that first and then come back here. This is a continuation of that blog post, as I’ll implement persistent storage using Firestore, instead of keeping all the data in Memory.
Read more →

Continuous Delivery with Cloud Build & Cloud Run

The intent of this blog post is to try out the serverless container platform, Cloud Run and to document the steps to perform continuous deployment using Cloud Build. I’ll also talk about the new kid in town, Cloud Build Button, which allow you to deploy your application to GCP using Cloud Run directly from your source repository. The source code I’m using for this demo is a simple Inventory app written in GO, which expose a set of endpoints for CRUD operations.
Read more →

HTTP Web Services

In this blog post I describe the process to create a simple Inventory app, following some best practices and guidelines of writing web services in GO. Building a web service in Go is quite simple, in fact Go has a fast and powerful built in HTTP server. It takes just a couple of lines of code to get a basic HTTP server started. ListenAndServe starts an HTTP server with a given address and handler.
Read more →

Part 4: Microservices - Deploy on GKE + Istio

This the last blog post from a series of 5, where I dived into the process of creating and deploying a microservice project, named League App. It is a toy project but my intention was to showcase the technologies I used along the path from creation to deployment. In the previous blog post I deployed the League App locally, which is fine for fast development. But you’ll get into a point where you want to make the App available for the rest of the world.
Read more →

Part 3: Microservices - Deploy on Minikube

In my previous blog posts I described the architecture I used to create the League App microservice and the communication between the services. Meantime, I have extended the League App by adding new services, which play specific roles. PlayerOps service perform CRUD operation over the player database, I have implemeneted just Create and Delete player functions but this can be extended easily to Read and Update . Transfer service is used to move a player from one team to another, affecting receiving/outgoing team’s capital.
Read more →

Part 2 - cont: Microservices - Create the App with Go-kit

This is the continuation of the previous blog post, where I explained the microservices architecture using GO Kit framework. I strongly recommend you to read the previous post as it gives you the insights into what I’ll cover this post. I talked already about the two layers of the onion architecture: Service and Endpoints. In this post I’ll cover the Transport layer and put everything together in the main function.
Read more →

Part 2: Microservices - Create the App with Go-kit

This is the second blog post of the series, where I dive into the process details and the framework I used to create the toy project. It is made up of several distinct microservices. There are a number of microservice frameworks in the wild but the most notable ones for GO are Go Micro, Go-Kit, Gizmo. Go-Kit is the one which has prompted my interest, I’m explaining below why. Asa starting point I’m creating a small application, formed by two microservices.
Read more →

Part 1: Microservices - Ingesting data

I’m starting a series of 5 blog posts where I document the path I followed to create a small project which is made up of several components (microservices) deployed over a managed kubernetes infrastructure. In this first blog post I create a simple serverless data ingest pipeline, the next 2 blog posts are in depth description of the microservices architecture and the last 2 blog posts are about deploying the application in a Kubernetes environment and the mechanism to manage and monitor the services.
Read more →

Part 3: Blog Site with Buffalo

This is the third and last post from a series of three where I present an option to build a blog site. In the first 2 posts I showed you how to create a simple static site with Hugo and how to build your own blog site using mainly standard library. In this post I’ll build the blog site using one of the best GO web frameworks out there, Buffalo.
Read more →

Part 2: Blog Site written in GO

This is the second post from a series of three where I present an option to build a blog site. This time I created a simple blog site in GO, mostly using standard library and a couple of external packages. Althouth it is simple it can serve specific needs. If you don’t need a fully featured site but fast and reliable this may work for you. It was designed with the minimal amount of features required for the blog site and can be developed further on.
Read more →

Part 1: Blog Site with Hugo

This is the first post from a series of three where I present an option to build a blog site. Hopefully, this series will give you some hints on what it takes to build a simple site/blog. Although my goal is to code the blog site in GO, I want to give a try to this wonderfull tool, Hugo. If you don’t have time to code and need a full featured static site this is one of the best solution out there in the market.
Read more →