Composition via embedding in Go

Unlock simpler design via a lesser known feature

I was introduced to type embedding (or embedding, in short) by Filippo Valsorda in one of his talks. Apparently this is a lesser known (and lesser used) feature of the Go language, although it’s been around since the beginning. I hope I can spread with this post how it works and how it can be pragmatically helpful to create more expressive and reusable code. What is embedding? Embedding is a powerful feature of the Go language that allows to compose types together, “bundling” new types that inherit the properties or behavior of the embedded types. [Read More]

Sustainable Performance

Craft software while looking after our planet

I mentioned sustainable performance in a previous post, telling that it “could be a blog post on its own”, and after noting interest on the matter from people I highly respect, I decided to write this post. What is sustainable performance? If you worked as a software engineer for some time, you must have faced at least once the question: “is my code running at its full potential?”. So many intricacies can arise from such a simple question, especially in a highly dynamic industry such as Information Technology. [Read More]

Improving 4pr.es Links

Revamping a toy project and making it a product

In the past few days I have been doing maintenance on a pet project of mine: a URL shortener. I initially built “4pres” in 2013 as a way of experimenting with the Go programming language. It is a URL shortener, it does one simple thing: it generates a random short URL (prefixed with the domain 4pr.es) for a longer one. Despite its “dumbness”, it served the greater purpose of exposing me to some software engineering problems I had never faced before. [Read More]

gRPC Traffic Mirroring With Ingress-Nginx on K8s

How to test gRPC service with production data in testing environments, cloning (or "shadowing") traffic via NGINX

gRPC NGINX gRPC k8s In a previous post we saw an NGINX configuration to allow gRPC traffic mirroring. Is the same technique applicable on Kubernetes? Yes! Using the ingress-nginx ingress controller! Traffic mirroring Use the following configurations snippets in the ingress-nginx configMap and in the Ingress manifest to mirror all traffic to a separate gRPC server. ConfigMap Replace grpc-backend.company.net and grpc-mirror.company.net with the original and mirror endpoint, respectively. http-snippet: | server { listen 127. [Read More]

gRPC Traffic Mirroring Using NGINX

An NGINX configuration trick to mirror traffic to gRPC backends

gRPC NGINX gRPC Recently at work with the Optimyze team we faced the necessity of copying traffic from our current customer-facing environment to a new environment. We have assumptions and ideas about architectural changes that cannot be validated only with synthetic tests and require cloning traffic to a separate, internal testing environment. There is no better test than the one performed with real-world data: when you hear speaking about testing in production, a deployment of a new feature to “see what happens” is not what I have in mind. [Read More]

Micro-committing with Git

I have been using micro-committing for some time now, during which I have adapted the usage of this technique to my needs, bringing it to a level that makes me more productive than ever in software development. Combining micro-committing with Git, while doing TDD is now my favorite development experience: I like how this workflow helps to deliver changes with speed and confidence. This is not a one-size-fits-all approach, I’m sharing what works great for me; I hope some parts of what follows will help you and your team as well. [Read More]

CKA exam experience and preparation

Yes! Yesterday I received an awesome email stating that I cleared the Certified Kubernetes Administrator exam! 😎 Here I want to report my experience in preparing and taking the exam, hopefully this info can help others Kubernetes practitioners get the certification too. Preparation I consider myself lucky because for the past two years I had the chance to use Kubernetes working at lastminute.com; on top this on-the-job training I went through a lot of studying and practicing because the exam itself has a lot of content. [Read More]

Progressive Delivery with Kubernetes

I’m more and more fond of finding the perfect solution to manage application delivery: dev teams want to be fast but their ops counterpart is not happy to loose control over the growing number of deployments that could cause an outage. We as an industry need to find the right balance to have features delivered in time and keep the service up and running for our users! And that’s where progressive delivery can help! [Read More]

GoLab 2018: Wrap Up

I’m in the train back from GoLab 2018 and I am so happy that I attended this conference! It’s been definitely one of most beautiful con I have attended in Italy, with tremendous speakers from all over the globe like Filippo Valsorda, Eleanor McHugh, Ron Evans and Bill Kennedy among many others; I have to say the organizers were just perfect in everything from the venue setup to the workshop organization, as if the quality of the talks ware not enough. [Read More]

Cloud-native applications: Operator-Framework

Cloud-native: sounds attractive right? What does it even mean? Wikipedia has no page on it already so anyone can give its own definition… Here’s mine: A Cloud-native application has only concern on the functionalities that it has to deliver as it is completely decoupled from the infrastructure it runs on So how can software delivery be cloud-native? Isn’t software delivery supposed to “install” software onto some infrastructure? Well if your infrastructure provider is cloud-native, you can transitively deliver software on it in a cloud-native way (counts of cloud-native is over 9000, so stopping here)! [Read More]