Sunday, April 18, 2021
Format Disk in Linux
snap-9df717f4 US Census 1980
-------------------------------
lsblk
df -h
cat /etc/fstab
fdisk -l
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-using-volumes.html
--------------------------------
mount
available/in-use - Status of Volumes
If Snapshot is Encrypted, Volume is also Encrypted
If Snapshot is not-Encrypted, Volume is also unEncrypted
Shred Command
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-using-volumes.html
shred -u filename
shred overrides a File's Value and then removes it - so Restore from Recycle Bin does not happen
[ec2-user ~]$ sudo file -s /dev/xvdf
/dev/xvdf: data
Create a file system on the volume - [Conditional Step]
sudo mkfs -t xfs /dev/xvdf
Javabrains POC - Microservices - Part 2 [ Netflix OSS]
https://jsonplaceholder.typicode.com/posts/
Spring Cloud Azure
Spring Cloud for Amazon Web Services
Spring Cloud GCP
Spring Cloud Netflix [Ribbon, Feign, Eureka]
Spring Cloud Kubernetes
Spring Cloud Gateway
Spring Cloud Circuit Breaker
Spring Cloud Config
Spring Cloud OpenFeign
Spring Cloud Consul
Spring Cloud Vault
Spring Cloud Zookeeper
Feign - Declarative HTTP Client
Eureka - Service Register and Discovery
Ribbon - Client Side Load Balancing
Spring Cloud Netflix features:
Service Discovery: Eureka instances can be registered and clients can discover the instances using Spring-managed beans
Service Discovery: an embedded Eureka server can be created with declarative Java configuration
Circuit Breaker: Hystrix clients can be built with a simple annotation-driven method decorator
Circuit Breaker: embedded Hystrix dashboard with declarative Java configuration
Declarative REST Client: Feign creates a dynamic implementation of an interface decorated with JAX-RS or Spring MVC annotations
Client Side Load Balancer: Ribbon
External Configuration: a bridge from the Spring Environment to Archaius (enables native configuration of Netflix components using Spring Boot conventions)
Router and Filter: automatic registration of Zuul filters, and a simple convention over configuration approach to reverse proxy creation
Release Train | Boot Version |
---|---|
2020.0.x aka Ilford | 2.4.x |
2.2.x, 2.3.x (Starting with SR5) | |
2.1.x | |
2.0.x | |
1.5.x | |
1.5.x |
<dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-netflix-ribbon</artifactId> </dependency>
http://microservice_provider_user/
is not a legal host name.[Ribbon]
Adobe XD - UI, UX , Product- Wireframe, Mockup, Prototype
https://www.youtube.com/watch?v=68w2VwalD5w
https://www.bringyourownlaptop.com/exercise-files?utm_source=Youtube&utm_medium=Description&utm_campaign=XD_Long
https://www.bringyourownlaptop.com/exercise-files?utm_source=Youtube&utm_medium=Description&utm_campaign=XD_Long
https://www.adobe.com/products/xd/pricing/individual.html
Product Designer > UX Designer > UI Designer
UI Designer - means Designing wireframes, UI (Fonts, Icons, Color) and handing it to developers
UX Designer - UX means Designing wireframes, UI (Fonts, Icons, Color) and Navigation Pathways and Actually Testing them from End user pov
Product Designer - Highlevel View, Budgets, Timelines, Client Approval + UI/UX role
https://www.w3schools.com/tags/tag_canvas.asp
The <canvas> tag is used to draw graphics, on the fly, via scripting (usually JavaScript).
Monday, April 12, 2021
Spring Cloud, Netflix, Microservices - V V IMP
https://cloud.spring.io/spring-cloud-netflix/multi/multi_spring-cloud-ribbon.html
https://cloud.spring.io/spring-cloud-netflix/1.0.x/
https://stackoverflow.com/questions/39587317/difference-between-ribbonclient-and-loadbalanced
https://www.baeldung.com/spring-cloud-rest-client-with-netflix-ribbon
https://howtodoinjava.com/spring-cloud/spring-boot-ribbon-eureka/#ribbon
https://dzone.com/articles/using-new-spring-cloud-load-balancer-in-microservi
@EnableEurekaClient
@EnableDiscoveryClient
@RibbonClient(name="")
https://piotrminkowski.com/2020/05/13/a-deep-dive-into-spring-cloud-load-balancer/
A New Era of Spring Cloud. While almost all of Spring Cloud Netflix components will be removed in the next release, it seems that the biggest change is a replacement of Ribbon client into Spring Cloud Load Balancer.
---------------------------------------------------------------------------------------------------
https://www.baeldung.com/spring-component-scanning
@ComponentScan Without Arguments
@ComponentScan without arguments tells Spring to scan the current package and all of its sub-packages.
The trick with Spring Boot is that many things happen implicitly.
We use the @SpringBootApplication annotation, but it's just a combination of three annotations:
Using @ComponentScan in a Spring Boot Application.
@Configuration
@EnableAutoConfiguration
@ComponentScan
@ComponentScan(basePackages = "com.baeldung.componentscan.springapp.animals")
Microservices - Client Side Load Balancing
- Apache Zookeeper,
- Netflix’s Eureka,
- Hashicorp Consul
- Kubernetes
- Cloud Foundry
Microservices don't use server side load balancing. They use client side load balancing.
Client Side Load Balancing
To understand client side load balancing, let's recap microservices architecture. We generally create a service discovery like Eureka or Consul, where each service instance registers when bootstrapped. Eureka server maintains a service registry; it maintains all the instances of the service as a key/value map, where the {service id} of your microservice serves as the key and instances serve as the value. Now, if one microservice wants to communicate with another microservice, it generally looks up the service registry using DiscoveryClient and Eureka server returns all the instances of the calling microservice to the caller service. Then it was a caller service headache which instance it calls. Here, client side load balancing stepped in. Client side load balancing maintains an algorithm like round robin or zone specific, by which it can invoke instances of calling services. The advantage is s service registry always updates itself; if one instance goes down, it removes it from its registry, so when the client side load balancer talks to the Eureka server, it always updates itself, so there is no manual intervention- unlike server side load balancing- to remove an instance.
Another advantage is, as the load balancer is in the client side, you can control its load balancing algorithm programmatically. Ribbon provides this facility, so we will use Ribbon for client side load balancing.
----------------------------------------------------------------------------------------------------------
https://spring.io/blog/2020/03/25/spring-tips-spring-cloud-loadbalancer
The @LoadBalanced
Annotation
In this final example, we’ll have Spring Cloud configure the WebClient
instance for us. This approach is excellent if all requests that pass through that shared WebClient
instance require load balancing. Just define a provider method for the WebClient.Builder
and annotate it with @LoadBalanced
. You can then use that WebClient.Builder
to define a WebClient
that’ll load balance automatically for us.
@Bean
@LoadBalanced
WebClient.Builder builder() {
return WebClient.builder();
}
@Bean
WebClient webClient(WebClient.Builder builder) {
return builder.build();
}
Intellij IDEA Shortcuts – System.out.println shortcut
https://mkyong.com/intellij/intellij-idea-system-out-println-shortcut/
In IDEA, you can type sout
and press Tab to generate System.out.println
automatically.
Show Signature
Ctrl-Q (Quick Javadoc) or, within the parenthesis of the method, Ctrl-P (Show Parameters).
Azure - Pipeline - Add Approver for Stage
https://learn.microsoft.com/en-us/azure/devops/pipelines/process/approvals?view=azure-devops&tabs=check-pass
-
https://www.baeldung.com/spring-properties-file-outside-jar https://docs.spring.io/spring-boot/docs/current/reference/html/spring-boot-featu...
-
https://learn.microsoft.com/en-us/azure/devops/pipelines/process/approvals?view=azure-devops&tabs=check-pass
-
The decision was made to block such external HTTP repositories by default https://stackoverflow.com/questions/66980047/maven-build-failure-d...