Skip to main content

Posts

How I achieved CKAD

 Greetings! I finally became a Certified Kubernetes Application Developer aka CKAD offered by the Cloud Native Computing Foundation (CNCF), in collaboration with The Linux Foundation. I would like to share my experience with few tips with you. I do not use, do not have a chance to use Kubernetes in my daily work. Not only Kubernetes, I do not have real world experience in Docker as well. So it is a hard journey. Exam details I don't want to repeat it here. You can read it here  https://www.cncf.io/certification/ckad/ . This exam is not something you learn and remember things and answer the questions. You have to perform labs in live environment. You have to fight with the time and that is the most difficult part.  Even if you remember, know everything you can't pass!!! This is why everyone says practice! practice! practice! There are discount coupons. Use them to buy the voucher. Recommended materials Learning depends on your character. Some people like to read do...

Functional Programming Introduction

 Greetings! One of the biggest changes happened to Java is, addition of Functional programming in Java 8. It is great because now we can use imperative, procedural, object-oriented, and functional techniques in Java. Java added functional programming to the language using Lambda expressions, Stream, Optional, default methods in interface, static methods in interface, functional interface. Let's dive into important concepts in functional programming. First of all, What is a Function? f(x) = y That is a function which gives us 'y' for a given 'x'. Let's see an easy one. f(x) = x + 1 This will give us the next value for a given 'x'. So what is the big deal here? Immutable, ie no mutation of data. No sate. No side effects. Always gives the same output for the same input. Important concepts Pure function First class function Higher order function Referential transparency Lazy evalutation C...

Kafka: Introduction to core concepts

Apache Kafka was developed by LinkedIn and donated to Apache. Apache Kafka is a distributed streaming platform that can handle high volume of data. Pull or Push? I initially misunderstood Kafka as a push based messaging system. However Kafka has chosen traditional pull approach. In Kafka, data is pushed to the broker by producers and pulled from the broker by the consumers. IMAGE1 Why Kafka? Kafka is a reliable messaging system which is fast and durable. We can list it's benifits as; Scalable - Kafka's partion model allows data to distributed across multipel servers, making it highly scalable.  Durable - Kafka's data is written to disk making it highly durable agaisnt server failures. Multiple producers - Kafka can handle multpile producers which publish to the same topic. Multiple consumers - Kafka is designed so that multipel consumers can read messages without interfering with each other. High performance - All these features allows high performace distributed messaging ...

Getting started with Kafka

This is a quick guide to set up Kafka environment for local development and learn Kafka. I use Kafka Udemy course and documentation for this. Setup and configuring Kafka echo system may be a boring task. However with Docker and Landoop (now they are Lenses) it is as easy as running a docker command. Note: You need Docker installed to follow this post. Get landoop docker image When you have setup docker in your environment you can pull landoop docker image. $ docker pull landoop/fast-data-dev Start the Kafka broker I'm going to run the docker container in interactive mode. $ docker container run --rm --name my-kafka-broker -it \ -p 2181:2181 -p 3030:3030 -p 8081:8081 \ -p 8082:8082 -p 8083:8083 -p 9092:9092 \ -e ADV_HOST=127.0.0.1 \ landoop/fast-data-dev This will bring up all necessary tools to work with Kafka. After about 1 minute you can access landoop's UI console from http://127.0.0.1:3030/ . If you scroll down, you can see r...

Hexagonal Architecture

Invented by Alistair Cockburn, Hexagonal Architecture is one of many ways to design loosely coupled applications. This is also known as Ports and Adapters pattern. As domain is the king and every other layer should work around it, this solves the layer dependency by inverting them. Intent Allow an application to equally be driven by users, programs, automated test or batch scripts, and to be developed and tested in isolation from its eventual run-time devices and databases. (Alistair Cockburn) Principle Hexagonal architecture divided the system into manageable loosely coupled components centering application core domain. As the domain is at the center, all other layers such as web, database are directing at it. This is achieved by ports and adapters (hence the name). Each outer layers is connected through ports by implementing them as adapters. Thus core domain is fully independent of changes. This approach is an alternative to traditional layered architecture. Domain - sit center of t...