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

Monday, December 27, 2021

Book Review: Speed Reading: Learn to Read a 200+ Page Book in 1 Hour by Kam Knight

Speed Reading: Learn to Read a 200+ Page Book in 1 HourSpeed Reading: Learn to Read a 200+ Page Book in 1 Hour by Kam Knight
My rating: 4 of 5 stars

Good tips on speed reading. Short and to the point book and we can practice what we learn right while reading the book. The habit of vocalization, visualization, spaced reading, peripheral vision and chunking will need to be practiced to be internalized. The last chapter on exercises for the eyes was great. Overall a great read.

View all my reviews

Tuesday, November 09, 2021

Book Review: Airframe by Michael Crichton

 

AirframeAirframe by Michael Crichton
My rating: 3 of 5 stars

An American aircraft manufacturing company Norton, lands into trouble when one of its commercial airline customers Transpacific from China had a serious accident during flight which led to 4 deaths and several injuries. The company has a pending sales deal with China which they stand to loose if the bad reputation of their N-22 aircraft becomes a common knowledge. So they put their staff Cassey Singleton to figure out the actual reason why the accident happened. The company believed their aircraft was very well tested and finds it hard to believe that it could be a problem in the aircraft as the root cause for the accident. Finally Cassey gets to the bottom of the issue and saves the company from bad press. The story is simple and the writing is as expected great. A good read.

View all my reviews

Thursday, August 05, 2021

FIRST Programs - FLL Explore and FTC 2021-22 are on!

My family has been involved with FIRST related STEM programs from FLL to FTC for past couple years. It was for my son Rushil. And this year we have my younger one Aarini join in starting her first FIRST Lego League Explore season. It will be fun and i will be mentoring both their teams. 

Here are the season teasers for 2021-22 season for,

FLL Explore:



FTC:


Book Review: The Sentence is Death (Hawthorne and Horowitz Mystery, #2) by Anthony Horowitz

 

The Sentence is Death (Hawthorne and Horowitz Mystery, #2)The Sentence is Death by Anthony Horowitz
My rating: 5 of 5 stars

This is second book in the Hawthorne and Horowitz series. The story is as exciting as the first one and very well told. Its written in the same vein as Sherlock holmes and Dr Watson where Ex-DI Hawthorne plays Sherlock and the author plays his biographer Dr Watson. The story starts with the murder of a divorce lawyer Richard Pryce. Hawthorne solves it in the end after having interviewed all persons involved with the dead lawyer in his last days. Waiting for the next one in the series - A Line to kill.

View all my reviews

Monday, July 19, 2021

FIRST Tech Challenge Season 2021 - Ultimate Goal

 We (the team Skyrise robotics) participated in the FIRST tech challenge 2020-21 season last year. 

Following are some of the videos of the robot we made.






Thursday, July 15, 2021

Travel: Road trip to Rocky Mountain National Park, Colorado

This year we did a road trip to the Rocky Mountain National Park during the July 4th weekend. 

Day 1 - We started from Austin on 2nd late afternoon and stopped over at Amarillo for the night. 




Day 2 - At Amarillo, we saw the Cadillac ranch and kids did some spray painting. After that on the way in Trinidad Colorado we saw the Art cartopia





Later that evening we reached Denver. We stayed at a hotel in the downtown which was walking distance from malls at 16th Street





We walked to Union Amtrak Railway Station and took a free mall ride bus on our way back to the hotel. At the Union station we saw some ads for the upcoming MLB All stars baseball game. A huge baseball was at display right at the entrance of the Union station where we took some pictures.






Day 3 - We started on our way to Estes Park but first we went to see the Denver Botanic Gardens which was also located near downtown. On our way we saw the city capitol building as well. Denver Botatnic garden was pretty nice and took us some 2 hours to explore. We reached late afternoon at Estes Park where we stayed at walking distance from Lake Estes. Estes park is a small city and is very scenic with Rocky mountain views from wherever you stay.  After dinner we walked in the city by the lake. 



It was July 4th so shops closed early and we were back to the lake Estes and sat down near it for fireworks show at 9.30pm. It was a fun evening and a great fireworks show will lasted for 30 mins.

Day 4 - We went to the Rocky mountain national park at 8am. We parked at the Park and Ride stop and took the free shuttle to the Bear Lake corridor. There we hiked to the bear lake, nymph lake, dream and emerald lakes





Then we decided to do a harder hike to the Bierstadt lake which was 2 miles up and then 2 miles down. The path was bit hard on the way up the hill but coming down was easy and very scenic. Kids had fun doing the hike. All the while i was worried about seeing some animal on the way as we were the only ones on the hike for the most part and will only get to meet few others at times. But fortunately we did not see any animals other than the marmots, squirrels and some mountain birds.









Day 5 - We saw the Stanley hotel where The Shinning movie was shot (and the book by author Stephen King is based on). Then we entered the park to take the Trailridge Road to Grand Lake. Trailridge road is very scenic and we used the Gypsy app to get a guided tour while we drove. We stopped at the Fall River trailhead and did some hiking then reached Grand Lake later afternoon. We had enough time to get a small fishing boat rental (from the Grand Lake Marina) for an hour and went boating on the Grand Lake. Grand Lake is much smaller than Estes park and shops close pretty early. 








Day 6 - We started from Grand Lake to Colorado Springs. On the way we took the Georgetown Loop Railroad ride and their mine tour. It was educational and fun for kids. You do need to book the ticket in advance during peek season so do it before you make the trip there. Later that afternoon we arrived at Colorado Springs and went to see the Garden of the Gods.




Day 7 - Next day in Colorado Springs we visited Pikes Peak early morning. Driving up and down this high mountain was pretty scary but the views from the peak make it worthwhile. After pikes peak we went to see the Seven Falls. It took more time than we had expected. There is a long wait from parking to take the free shuttle and go to the seven falls and then a wait to come back to parking. But it was very scenic and worth all that waiting.





Day 8 - We visited the Royal Gorge Park and took the zipline ride there. Then at 3.30pm we took the lunch train ride at the Royal Gorge Railroad which was close by. The Royal Gorge has Arkansas River where we saw folks doing river rafting which seemed fun but we did not plan for it this time. Again you need to do the reservation in advance for it. We started on our way back to home the same day and made a stop at Lubbock city that night.

Day 9 - We arrived back home by evening.

We needed more time to do more hikes in the RMNP. There are so many trails suitable for all ages. Weather in summer time is great to visit the place. We packed winter clothes but never needed those. A light jacket and a poncho are needed for the hikes. It rained when we hiked and thankfully we did pack a poncho with us. They sell it there in the park too. Overall the road trip was very enjoyable, roads are in great condition and driving was safe and comfortable.
Please note: The pictures above were taken with Nikon D7100 with the default lens that comes with the camera and mostly in auto mode (as i have not yet tried learning the different non-auto options that the camera has). Some of the pictures can make a very good wallpaper (feel free to use it) and it is not because of my good photography but because the place is so beautiful that you just cannot go wrong. :)

Wednesday, May 26, 2021

Book Review: Graphic Classics: Journey to the Center of the Earth (Barron's Graphic Classics) by Fiona MacDonald, Penko Gelev, Jules Verne

Graphic Classics: Journey to the Center of the EarthGraphic Classics: Journey to the Center of the Earth by Fiona MacDonald
My rating: 4 of 5 stars

Got this from our local library. It is a nicely done graphic novel that summarizes the story and also presents a short biography on the author Jules Vernes' life at the end of the book.

About the story - An archaeologist Prof. Lindenbrock and his nephew Alex together with a friend Hans embark on a journey to the center of the earth through the mouth of a dormant Volcano in Iceland. Professor believed that the earth is hollow and has a different world inside - they find an inland ocean, with monsters that were extinct on the earth's surface. They find long extinct giant trees and prehistoric men who are 13 feet tall. They kept going deeper and were eventually thrown out with a volcanic eruption on the surface of the earth. Jules Verne was one of the early science fiction writers and this story is one of his famous works together with Around the world in 80 days and 20 thousand leagues under the sea.

View all my reviews

Wednesday, April 28, 2021

Book Review: The Mysterious Affair at Styles (Hercule Poirot #1) by Agatha Christie


The Mysterious Affair at Styles (Hercule Poirot #1)The Mysterious Affair at Styles by Agatha Christie
My rating: 4 of 5 stars

My first Agatha Christie’s book.. the plot is thick and suspense is kept until the very end of the book. Now on to my next one of Monsieur Hercule Poirot’s mystery.

View all my reviews


Popular micro services patterns

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