Posts

Configuration Ownership

Image
  Building software at scale is tricky, and when you have lots of software, you have more problems to solve. Several times engineers look for ways to make their lives easier: make it simple, transparent, and easy to use. That sounds like a good idea, right? What can go wrong with that? Typing is never the bottleneck and will never be. We are all obsessed with reuse; several times, the reuse is marginal and brings way more problems than benefits. Working with an Object-Oriented Language such as Java makes a lot of sense to leverage Dependency. Injection and Ioc(Inversion of Control). Because it's easier to test the Application and also easier to change the Code. In the past, Spring Framework was all about XML; today, all configuration is pretty much done via Code. It's possible to use property files to configure some aspects of backend services written in Java with Spring, yes, but in reality, most of the Code is in the Code in the form of Java Spring Beans.  Spring Framework a

2 Cents on Github Co-Pilot

Image
Github Co-Pilot is in high hype right now. Co-pilot is an IA/ML tool that allows engineers, coders, in general, to get more productivity from their IDEs and Editors. Right now co-pilot is on early access, I had to subscribe and wait for +3 months to get my access. There are things that need to be improved for sure but overall I can tell it's a pretty cool and yet useful piece of technology. Of course, it raises ethical and IP concerns. Like would private secret source code be used from one company to another? In the land of the AI/ML we never know what will happen so I did not actually use for Real code, to be safe I did not even use it on my main IDEA (IntelliJ for Java)  - I did it in VSCODE where I used it much less and that sense I could isolate from the rest of my personal projects. I have a SlideCast with some thoughts and later there is a live demo with some cool co-pilot in action.

Scala TestContainers

Image
TestContainers is a great project for integration tests, mocking, and even for Chaos Engineering. Scala TestContainers is the library in the form of idiomatic-scala with some sugar to make it even easier to use it. I want to show you guys how we can use Scala Test Containers in an SBT 1.5.0 Project using Scala Spec in order to test as MySQL docker container. So let's get started!

Chaos Engineering with ToxiProxy

Image
Chaos Engineering is an important discipline of modern cloud-based services. Failure will happen no matter what and it's improved to prove your infrastructure, code, and configurations are reliable and can resist failure and proper recovery. The only way to know is to either by the worst way possible i.e error 3AM on Sunday night or you can test it and sleep better at night :-).  ToxiProxy from Shopify is a pretty useful and interesting solution. It's a proxy that allows us to introduce all sorts of network chaos in our applications such as latency, hang, timeout, and much more. ToxiProxy is written in Go and you can run the server in a self-contained executable like all Go good stuff. ToxiProxy has multiple clients in multiple languages. I will demonstrate some chaos with Redis using the Lettuce driver in Java and ToxiProxy java client library.

Go-Zero

Image
Go lang is a cool language to build services. Several DevOps and Infrastructure solutions are built-in go such as Vault, Terraform, Kubernetes, ToxiProxy, Chaos Monkey(CHAP), and many others. Go-Zero is a framework built-in Go that helps us to code microservices in Go. Go-Zero is endorsed by the CNCF foundation. Today I want to share with you a video and POC demonstrating how easy to get started with Go-Zero based microservices written in Go. 

Java Process Builder

Image
Sometimes applications need to interact with the underlying OS, even with Bash and Process. JVM has a native implementation for Process, in Linux, there are system calls that are invoked. Today I want to show how easy to make Java and bash to talk to each other. This kind of technique can be used for all sorts of DevOps Engineering solutions or automation. So Let's get started!

Factory Kit Pattern

Image
Factory and Builder and super popular design patterns and still relevant and useful. However what happens if you need to allow others to create objects? That's like a reverse factory where the user needs to define the creational rules. So how can we do that and also have some guardrails and fences to drive some control and even some abstractions, is that possible? yes - that's the factory-kit pattern. Hold one a second why the heck I would need that? Let's say you are creating a game or a modular solution and you need to allow you consider defining customizations within some constraints.