Sunday, March 24, 2024

Popular micro services patterns

Here are some popular Microservice design patterns that a programmer should know:

  1. Service Registry pattern provides a central location for services to register themselves.
  2. Circuit Breaker allows your services to fail fast and prevent cascading failures, the circuit breaker pattern is used to isolate a failing service.
  3. API Gateway provides a common entry point for all the requests and responses from the system. So, client only remember one host/port address rather than multiple IPs for each Microservice.
  4. Event-Driven Architecture allows services to communicate with each other by emitting events.
  5. In Database per Service each service has its own database, which allows services to operate independently.
  6. Command Query Responsibility Segregation (CQRS) separates read and write requests for an application, allowing better scaling and performance.
  7. Externalized Configuration allows storing configuration data outside of the application code, making it easier to manage configuration changes.
  8. Saga Pattern manages the transaction forlong-running transactions that span multiple services.
  9. Bulkhead Pattern isolates failures within a microservice, so a single failure does not bring down the entire system.
  10. Backends for Frontends (BFF) design pattern provides a specific backend for each client. It allows the front-end team to develop features and add new client-specific functionality quickly.

Saturday, April 15, 2023

Book Review: Spring Start Here: Learn what you need and learn it well

 

Spring Start Here: Learn what you need and learn it wellSpring Start Here: Learn what you need and learn it well by Laurentiu Spilca
My rating: 5 of 5 stars

This is an excellent book on getting started with Spring boot based development. Written in a lucid manner and explained the fundamentals of spring ecosystem and some of the most important frameworks very well. This includes -Spring Core, data and test. Of course there is much more to be learned after this about other spring frameworks but with the concepts understood it will be much easier to do so. Read this before reading Craig Wall’s Spring in action book.

View all my reviews

Friday, March 24, 2023

Development Environment on Windows 11

Recently i started using Windows 11 after spending a good amount of time on Ubuntu as my primary OS on my home laptop. There was no strong reason to move other than just wanted to see if i can build a better development environment on Windows than what i had on Ubuntu. To my pleasant surprise, Windows 11 with WSL Ubuntu brings the best of both worlds - a perfect functional and responsive desktop environment together with the powerful tools from the Ubuntu Linux for running docker, kubernetes cluster and anything else that one is used to on a Linux setup. 

Found this article to be pretty useful in setting up WLS2 and install Docker and minikube in WSL2 on Windows 11 - https://www.virtualizationhowto.com/2021/11/install-minikube-in-wsl-2-with-kubectl-and-helm/ As you can note that no need to install docker desktop. The docker daemon run in WSL2 Ubuntu VM.

The article has all the steps outlined so no point in repeating it here. It will get all the required tools one needs to work with k8s.


To setup a development environment for doing ML with conda, python3, Jupyter notebook, tensorflow and VS Code:

1. Install conda environment and package manager - https://docs.conda.io/projects/conda/en/latest/user-guide/install/index.html 

Used miniconda3.

conda init

conda create -n devpy python

conda activate devpy

Will create a virtual environment devpy and activates it.

2. Install Jupyter notebook

pip install notebook

3. Install TensorFlow and other ML related python libs

pip install --upgrade pip

pip install  --ignore-installed --upgrade  tensorflow matplotlib pandas sklearn scipy seaborn

jupyter notebook

4. Launch the notebook in the VS Code editor


VS Code terminal will launch Ubuntu. Also install the Python extension which will show the option to run the Jupyter notebook in the devpy virtual environment we created above.

See this article on how to use VS Code with WSL2 - Using WSL 2 with Visual Studio Code 

To go to the location where WSL2 Ubuntu files are from Windows Explorer use path \\wsl$\ubuntu.

To go to the location where Windows files are in Ubuntu terminal use path /mnt/c/.

Thursday, August 04, 2022

Book Review: Where the Crawdads Sing by Delia Owens

 

Where the Crawdads SingWhere the Crawdads Sing by Delia Owens
My rating: 5 of 5 stars

This is story of a girl who lives alone in the marsh land of North Carolina near a small town of Barkley Cove. Her parents and siblings leave home in her early childhood and she was left alone. She learns to read thanks to a friend and also becomes an author of several books related to birds and animals of marsh land. This book also has a mystery surrounding the death of a man where the marsh girl Kya becomes the suspect. The book has several poems and nice literary description of the marsh land. For those who love to read literature and are not looking for thriller or murder mystery book will enjoy this book very much.

View all my reviews

Saturday, April 09, 2022

Favorite IntelliJ IDEA Plugins

 Some of my favorite IntelliJ IDEA plugins.

 


I am still waiting to get access to GiHub Copilot at this time.

Font = Monaco with Ligature enabled and size 14.

Theme = Xcode Dark 

All of them work on IDEA Community edition.



Sunday, March 13, 2022

FIRST Lego League Explore 2021-22 Season Cargo Connect

 

Today my daughter's team completed their first season of FIRST Lego League Explore by attending the festival hosted at Meridian World school at Round Rock. Seen above is the team showcasing their poster board showing their team's journey through the season and the Cargo Delivery vehicle they built using the WeDo 2.0 kit and the Explore set parts based on the season's theme of Cargo connect. The challenge was to improve the cargo delivery and the team's solution was to make a delivery vehicle that can automatically stop when it senses (via a distance sensor) an obstacle in its path. This is how we could improve the delivery of the cargo by making the delivery vehicle safer to drive. 

Friday, February 25, 2022

Popular micro services patterns

Here are some popular Microservice design patterns that a programmer should know: Service Registry  pattern provides a  central location  fo...