Thursday, March 25, 2021

JavaBrains Microservices POC

[JavaBrains] [Microservices POC]

https://www.youtube.com/watch?v=y8IQb4ofjDo&list=PLqq-6Pq4lTTZSKAFG6aCDVDP86Qx4lNas


#### Spring Boot Microservices Level 1: Communication and Discovery

https://www.youtube.com/watch?v=y8IQb4ofjDo&list=PLqq-6Pq4lTTZSKAFG6aCDVDP86Qx4lNas  


#### Spring Boot Microservices Level 2: Fault Tolerance and Resilience  

https://www.youtube.com/watch?v=o8RO38KbWvA&list=PLqq-6Pq4lTTbXZY_elyGv7IkKrfkSrX5e


#### Spring Boot Microservices Level 3: Microservice configuration  

https://www.youtube.com/watch?v=upoIwn4rWCo&list=PLqq-6Pq4lTTaoaVoQVfRJPqvNTCjcTvJB


Why , We should not hard-code URLS of Services
  • Code Change for URL modification
  • Dynamic Cloud URL
  • Load Balancer URL - Multi Instance URL
  • Multiple Environment Server URLS

When Services Call Each other, How does a Service1 knows about Service2 URL ?

  • Service Discovery - Design Pattern 
  • Eureka - Technology used for implementing "Service Discovery"


Client Side Service Discovery vs Server Side

Client Side Service Discovery
Client  -> Service Discovery Server
               Looks Up IP address of Service1
           <- Provides IP Address to Client
Client -> Call to Service 1
Client <- Gets a response from Server1

Server-Side Service Discovery
Client Calls Service Discovery asks it to Send "Hi" on its behalf to Service1
Service1 Sends "Hello" response to Discovery Server and its forwarded to Client


Other Technologies which have come from Netflix OSS or developed by Spring Boot
  • Hysterix - Fault Tolerance Library
  • Zuul - Gateway
  • Ribbon
  • Feign


POM Management

spring-cloud-starter-netflix-eureka-server
spring-cloud-starter-netflix-eureka-server

<properties>
	<java.version>11</java.version>
	<spring-cloud.version>2020.0.2</spring-cloud.version>
</properties>
<dependencies>
	<dependency>
		<groupId>org.springframework.cloud</groupId>
		<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
	</dependency>
	<dependency>
		<groupId>org.springframework.cloud</groupId>
		<artifactId>spring-cloud-starter-netflix-eureka-server</artifactId>
		<scope>test</scope>
	</dependency>
</dependencies>
<dependencyManagement>
	<dependencies>
		<dependency>
			<groupId>org.springframework.cloud</groupId>
			<artifactId>spring-cloud-dependencies</artifactId>
			<version>${spring-cloud.version}</version>
			<type>pom</type>
			<scope>import</scope>
		</dependency>
	</dependencies>
</dependencyManagement>

  • @LoadBalanced
  • @EnableEurekaClient
  • @EnableEurekaServer


EurekaClient sends heartbeat to EurekaServer
So, If A Service Goes Down, After Maybe about 30 Seconds,
The Entry gets removed from Dashboard of Eureka Server


#### Spring Boot Microservices Level 1: Communication and Discovery
https://www.youtube.com/watch?v=y8IQb4ofjDo&list=PLqq-6Pq4lTTZSKAFG6aCDVDP86Qx4lNas  

#### Spring Boot Microservices Level 2: Fault Tolerance and Resilience  
https://www.youtube.com/watch?v=o8RO38KbWvA&list=PLqq-6Pq4lTTbXZY_elyGv7IkKrfkSrX5e

#### Spring Boot Microservices Level 3: Microservice configuration  
https://www.youtube.com/watch?v=upoIwn4rWCo&list=PLqq-6Pq4lTTaoaVoQVfRJPqvNTCjcTvJB

Adding Spring Cloud To An Existing Spring Boot Application

If you an existing Spring Boot app you want to add Spring Cloud to that app, the first step is to determine the version of Spring Cloud you should use. The version you use in your app will depend on the version of Spring Boot you are using.

The table below outlines which version of Spring Cloud maps to which version of Spring Boot.

Table 1. Release train Spring Boot compatibility
Release TrainBoot Version

2020.0.x aka Ilford

2.4.x

Hoxton

2.2.x, 2.3.x (Starting with SR5)

Greenwich

2.1.x

Finchley

2.0.x

Edgware

1.5.x

Dalston

1.5.x


who - Who is logged on Right now on LINUX

Change Timezone Linux




https://www.hivelocity.net/kb/how-to-change-date-time-zone-on-linux-server/

https://linuxize.com/post/how-to-set-or-change-timezone-in-linux/


https://askubuntu.com/questions/3375/how-to-change-time-zone-settings-from-the-command-line

Thu Aug 13 08:33:22 IST 2020
$
$timedatectl set-timezone Asia/Calcutta
$date
Thu Aug 13 08:34:22 IST 2020
$timedatectl set-timezone America/New_York
$date
Wed Aug 12 23:04:49 EDT 2020
$timedatectl set-timezone Asia/Calcutta
$date
Thu Aug 13 08:35:21 IST 2020
$ls -l etc/localtime
ls: cannot access etc/localtime: No such file or directory
$ls -l /etc/localtime
lrwxrwxrwx 1 root root 35 Aug 13 08:35 /etc/localtime -> ../usr/share/zoneinfo/Asia/Calcutta
$date
Thu Aug 13 08:36:59 IST 2020
$date
Thu Aug 13 08:37:04 IST 2020

Tuesday, March 23, 2021

Jetbrains IntelliJ Idea Java IDE - Shortcuts /Tips

Try Ctrl+Mouse Wheel which can be enabled under File > Settings... > Editor > General : Change font size (Zoom) with Ctrl+Mouse Wheel



Auto-Save Feature in Jetbrains IDE
JetBrains-branded IDEs automatically save everything the moment you look away

https://stackoverflow.com/questions/28949290/turning-off-intellij-auto-save/28950477#28950477

http://thehunk.blogspot.com/2015/07/disable-auto-save-in-jetbrains-ide.html


How to merge Multiple Maven Projects Back into 1 Single Workspace/Window

https://stackoverflow.com/questions/8774024/intellij-working-on-multiple-projects/14637761#14637761


Whitelabel Error Page 

It means Error about not being able to find Error Page.  ðŸ˜‹ 





Monday, March 22, 2021

In GitHub, is there a way to see all (recent) commits on all branches?

https://stackoverflow.com/questions/33926874/in-github-is-there-a-way-to-see-all-recent-commits-on-all-branches/63925422#63925422


Click "Code" (left-most tab) on the main page for the repository. Under those 4 buttons ("master", "Go to file", "Add file", "Code") there is a blue rectangle. At the right end of that is a clock icon and a number. If the viewport of your browser is wide enough it even includes (hurrah) the word "commits". This is a link. Click and ENJOY!!!

Thanks for finding this! This is definitely the right answer. The Commits link feels so hidden in plain sight and really should be up with the other primary buttons (master, Go to File, etc). If you're having trouble finding it, ctrl+f for "commits" on the "Code" tab. 

ReadMe.md - Markdown

https://www.makeareadme.com/

https://blog.bitsrc.io/how-to-write-beautiful-and-meaningful-readme-md-for-your-next-project-897045e3f991

Sunday, March 21, 2021

Agile Story Point Estimation

https://www.c-sharpcorner.com/article/agile-story-point-estimation-techniques-t-shirt-sizing/

https://www.c-sharpcorner.com/article/agile-story-point-estimation-techniques-planning-poker/


T-Shirt Sizing

T-shirt Sizing is one of the Story points sizing technique to estimate user story usually used in agile projects. It's a relative Estimation Technique.

Rather than using a number of planning pokers, here, Items are classified into t-shirt sizes: XS, S, M, L, XL.

The term originates from the way T-shirt sizes are indicated in the US. Rather than having T-shirts in sizes 4, 5, 6 etc, there are just a few sizes: Small (S), Medium (M), Large (L) and Extra Large (XL) and so on.

Planning Poker

  1. Each team member comes up with the size of the story related to the reference user story.

  2. Team members show the card to everyone.

Azure - Pipeline - Add Approver for Stage

https://learn.microsoft.com/en-us/azure/devops/pipelines/process/approvals?view=azure-devops&tabs=check-pass