This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.time.Duration; | |
import java.time.Instant; | |
import java.util.*; | |
import java.util.concurrent.ExecutionException; | |
import java.util.concurrent.Future; | |
import java.util.concurrent.TimeUnit; | |
import java.util.concurrent.TimeoutException; | |
import java.util.function.*; | |
import java.util.stream.Collector; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### BigData articles | |
https://www.bigdataschool.ru/blog/data-fabric-on-arenadata-hadoop-in-bank-globalcio-2021-adwards.html | |
https://www.bigdataschool.ru/blog/best-practices-with-neo4j-driver.html | |
https://www.bigdataschool.ru/blog/session-analytics-with-flink-case-wynk.html | |
https://www.bigdataschool.ru/blog/events-ordering-in-kafka.html | |
https://www.bigdataschool.ru/blog/blockchain-and-kafka-difference-and-usage.html | |
https://www.bigdataschool.ru/blog/what-is-upstash-kafka-and-how-to-use-it.html | |
https://www.bigdataschool.ru/blog/monitoring-of-spark-apps-on-kubernetes-with-prometheus-and-grafana.html | |
https://www.bigdataschool.ru/blog/mlops-with-airflow-mlflow-and-aws-and-reduction-costs-on-emr-with-spark-3.html | |
https://www.bigdataschool.ru/blog/what-is-greenplumr-and-how-to-use-it-in-greenplum.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public Mono<String> deleteCustomer(@PathVariable String customerId){ | |
return webClient.delete() | |
.uri("/customers/" + customerId) | |
.retrieve() | |
.bodyToMono(String.class) | |
.transform(it -> { | |
ReactiveCircuitBreaker rcb = reactiveCircuitBreakerFactory.create("customer-service"); | |
return rcb.run(it, throwable -> Mono.just(customerId)); | |
}); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@RestController | |
@Slf4j | |
@RequiredArgsConstructor | |
public class CustomerClientController { | |
private final WebClient webClient; | |
private final ReactiveCircuitBreakerFactory reactiveCircuitBreakerFactory; | |
@PostMapping("/customers") | |
public Mono<CustomerVO> createCustomer(CustomerVO customerVO){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resilience4j.circuitbreaker: | |
instances: | |
customer-service: | |
failureRateThreshold: 50 | |
minimumNumberOfCalls: 10 | |
slidingWindowType: TIME_BASED | |
slidingWindowSize: 10 | |
waitDurationInOpenState: 50s | |
permittedNumberOfCallsInHalfOpenState: 3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Bean | |
public Customizer<ReactiveResilience4JCircuitBreakerFactory> customerServiceCusomtizer() { | |
return factory -> { | |
factory.configure(builder -> builder | |
.timeLimiterConfig(TimeLimiterConfig.custom().timeoutDuration(Duration.ofSeconds(2)).build()) | |
.circuitBreakerConfig(CircuitBreakerConfig.ofDefaults()), "customer-service"); | |
}; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AmazonEventBridge client = AmazonEventBridgeClient.builder() | |
.withRegion(Regions.US_EAST_1) | |
.withCredentials(new DefaultAWSCredentialsProviderChain()) | |
.build(); | |
PutEventsRequestEntry requestEntry = new PutEventsRequestEntry(); | |
requestEntry.withSource("customer-service") //this needs to match the event pattern defined in step 4 below | |
.withDetailType("customer-created-detail-type") //this needs to match the event pattern defined in step 4 below | |
.withDetail(toJson(customerWasCreated)) //this converts the event object into JSON string | |
.withEventBusName("test-event-bus"); //this needs to match the custom event bus name created in step 4 below |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: "tagged-release" | |
on: | |
push: | |
tags: | |
- "v*" | |
jobs: | |
gh_tagged_release: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Java CI with Maven | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"Gotta be first | |
set nocompatible | |
filetype off | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
Plugin 'gmarik/Vundle.vim' |
NewerOlder