├── .nojekyll
├── 01~微服务架构
├── 02~服务基础
│ ├── README.md
│ ├── 服务间通信.md
│ └── 中间件.md
├── 99~参考资料
│ └── README.md
├── 01~架构变迁
│ ├── 云原生.md
│ ├── README.md
│ └── 微服务
│ │ └── 微服务.md
├── 04~云原生
│ ├── 99~参考资料
│ │ └── 容器、K8s、微服务、云原生.md
│ └── Serverless
│ │ ├── BaaS.md
│ │ └── FaaS.md
└── 03~微服务治理
│ ├── 微服务拆分
│ └── 组件化与服务化.md
│ ├── 微服务设计模式.md
│ ├── OpenSergo 规范
│ └── README.md
│ └── README.md
├── INTRODUCTION.md
├── 03~微服务模式
├── 分布式事务
│ ├── 99~参考资料
│ │ └── README.md
│ ├── 事务框架
│ │ ├── Seata
│ │ │ ├── 09~Seata 架构原理
│ │ │ │ └── README.md
│ │ │ ├── 00~Seata 概述
│ │ │ │ └── 99~参考资料
│ │ │ │ │ └── README.md
│ │ │ ├── README.md
│ │ │ ├── 02~多事务模式
│ │ │ │ └── TCC
│ │ │ │ │ ├── 88~examples
│ │ │ │ │ └── 2019~seata-tcc-demo
│ │ │ │ │ │ ├── .idea
│ │ │ │ │ │ ├── vcs.xml
│ │ │ │ │ │ ├── .gitignore
│ │ │ │ │ │ ├── encodings.xml
│ │ │ │ │ │ ├── libraries
│ │ │ │ │ │ │ ├── Maven__cglib_cglib_3_1.xml
│ │ │ │ │ │ │ ├── Maven__junit_junit_4_13.xml
│ │ │ │ │ │ │ ├── Maven__org_ow2_asm_asm_4_2.xml
│ │ │ │ │ │ │ ├── Maven__antlr_antlr_2_7_7.xml
│ │ │ │ │ │ │ ├── Maven__org_ow2_asm_asm_5_0_4.xml
│ │ │ │ │ │ │ ├── Maven__stax_stax_api_1_0_1.xml
│ │ │ │ │ │ │ ├── Maven__xpp3_xpp3_min_1_1_4c.xml
│ │ │ │ │ │ │ ├── Maven__com_alibaba_druid_1_1_23.xml
│ │ │ │ │ │ │ ├── Maven__joda_time_joda_time_2_3.xml
│ │ │ │ │ │ │ ├── Maven__org_yaml_snakeyaml_1_26.xml
│ │ │ │ │ │ │ ├── Maven__com_typesafe_config_1_2_1.xml
│ │ │ │ │ │ │ ├── Maven__io_reactivex_rxjava_1_3_8.xml
│ │ │ │ │ │ │ ├── Maven__org_hamcrest_hamcrest_2_2.xml
│ │ │ │ │ │ │ ├── Maven__xmlpull_xmlpull_1_1_3_1.xml
│ │ │ │ │ │ │ ├── Maven__com_google_guava_guava_16_0.xml
│ │ │ │ │ │ │ ├── Maven__com_stoyanr_evictor_1_0_0.xml
│ │ │ │ │ │ │ ├── Maven__com_zaxxer_HikariCP_3_4_5.xml
│ │ │ │ │ │ │ ├── Maven__commons_io_commons_io_2_2.xml
│ │ │ │ │ │ │ ├── Maven__io_seata_seata_all_1_4_0.xml
│ │ │ │ │ │ │ ├── Maven__org_mybatis_mybatis_3_4_6.xml
│ │ │ │ │ │ │ ├── Maven__io_reactivex_rxnetty_0_4_9.xml
│ │ │ │ │ │ │ ├── Maven__joda_time_joda_time_2_8_1.xml
│ │ │ │ │ │ │ ├── Maven__net_minidev_json_smart_2_3.xml
│ │ │ │ │ │ │ ├── Maven__javax_inject_javax_inject_1.xml
│ │ │ │ │ │ │ ├── Maven__org_glassfish_jaxb_txw2_2_3_3.xml
│ │ │ │ │ │ │ ├── Maven__org_objenesis_objenesis_2_6.xml
│ │ │ │ │ │ │ ├── Maven__aopalliance_aopalliance_1_0.xml
│ │ │ │ │ │ │ ├── Maven__com_alibaba_fastjson_1_2_73.xml
│ │ │ │ │ │ │ ├── Maven__com_google_inject_guice_4_1_0.xml
│ │ │ │ │ │ │ ├── Maven__org_slf4j_slf4j_api_1_7_30.xml
│ │ │ │ │ │ │ ├── Maven__com_google_code_gson_gson_2_8_6.xml
│ │ │ │ │ │ │ ├── Maven__org_antlr_antlr_runtime_3_4.xml
│ │ │ │ │ │ │ ├── Maven__com_fasterxml_classmate_1_5_1.xml
│ │ │ │ │ │ │ ├── Maven__com_netflix_ribbon_ribbon_2_3_0.xml
│ │ │ │ │ │ │ ├── Maven__javax_servlet_servlet_api_2_5.xml
│ │ │ │ │ │ │ ├── Maven__javax_ws_rs_jsr311_api_1_1_1.xml
│ │ │ │ │ │ │ ├── Maven__commons_lang_commons_lang_2_6.xml
│ │ │ │ │ │ │ ├── Maven__commons_pool_commons_pool_1_6.xml
│ │ │ │ │ │ │ ├── Maven__org_glassfish_jakarta_el_3_0_3.xml
│ │ │ │ │ │ │ ├── Maven__org_projectlombok_lombok_1_18_12.xml
│ │ │ │ │ │ │ ├── Maven__org_slf4j_jul_to_slf4j_1_7_30.xml
│ │ │ │ │ │ │ ├── Maven__org_mockito_mockito_core_3_3_3.xml
│ │ │ │ │ │ │ ├── Maven__org_opentest4j_opentest4j_1_2_0.xml
│ │ │ │ │ │ │ ├── Maven__org_xmlunit_xmlunit_core_2_7_0.xml
│ │ │ │ │ │ │ ├── Maven__net_minidev_accessors_smart_1_2.xml
│ │ │ │ │ │ │ ├── Maven__org_antlr_stringtemplate_3_2_1.xml
│ │ │ │ │ │ │ ├── Maven__org_aspectj_aspectjweaver_1_9_6.xml
│ │ │ │ │ │ │ ├── Maven__org_assertj_assertj_core_3_16_1.xml
│ │ │ │ │ │ │ ├── Maven__org_freemarker_freemarker_2_3_30.xml
│ │ │ │ │ │ │ ├── Maven__org_skyscreamer_jsonassert_1_5_0.xml
│ │ │ │ │ │ │ ├── Maven__software_amazon_ion_ion_java_1_0_2.xml
│ │ │ │ │ │ │ ├── Maven__com_google_guava_guava_27_0_1_jre.xml
│ │ │ │ │ │ │ ├── Maven__commons_codec_commons_codec_1_14.xml
│ │ │ │ │ │ │ ├── Maven__io_reactivex_rxnetty_servo_0_4_9.xml
│ │ │ │ │ │ │ ├── Maven__net_bytebuddy_byte_buddy_1_10_13.xml
│ │ │ │ │ │ │ ├── Maven__ch_qos_logback_logback_core_1_2_3.xml
│ │ │ │ │ │ │ ├── Maven__com_google_code_findbugs_jsr305_3_0_1.xml
│ │ │ │ │ │ │ ├── Maven__com_google_code_findbugs_jsr305_3_0_2.xml
│ │ │ │ │ │ │ ├── Maven__com_jayway_jsonpath_json_path_2_4_0.xml
│ │ │ │ │ │ │ ├── Maven__com_sun_jersey_jersey_core_1_19_1.xml
│ │ │ │ │ │ │ ├── Maven__commons_jxpath_commons_jxpath_1_3.xml
│ │ │ │ │ │ │ ├── Maven__io_netty_netty_all_4_1_51_Final.xml
│ │ │ │ │ │ │ ├── Maven__org_codehaus_jettison_jettison_1_3_7.xml
│ │ │ │ │ │ │ ├── Maven__org_mybatis_mybatis_spring_1_3_2.xml
│ │ │ │ │ │ │ ├── Maven__org_apache_commons_commons_math_2_2.xml
│ │ │ │ │ │ │ ├── Maven__com_netflix_ribbon_ribbon_core_2_3_0.xml
│ │ │ │ │ │ │ ├── Maven__org_codehaus_woodstox_stax2_api_4_2_1.xml
│ │ │ │ │ │ │ ├── Maven__org_hdrhistogram_HdrHistogram_2_1_9.xml
│ │ │ │ │ │ │ ├── Maven__org_latencyutils_LatencyUtils_2_0_3.xml
│ │ │ │ │ │ │ ├── Maven__com_google_guava_failureaccess_1_0_1.xml
│ │ │ │ │ │ │ ├── Maven__com_netflix_servo_servo_core_0_12_21.xml
│ │ │ │ │ │ │ ├── Maven__com_sun_jersey_jersey_client_1_19_1.xml
│ │ │ │ │ │ │ ├── Maven__com_sun_jersey_jersey_server_1_19_1.xml
│ │ │ │ │ │ │ ├── Maven__org_bouncycastle_bcpkix_jdk15on_1_64.xml
│ │ │ │ │ │ │ ├── Maven__org_bouncycastle_bcprov_jdk15on_1_64.xml
│ │ │ │ │ │ │ ├── Maven__org_hdrhistogram_HdrHistogram_2_1_12.xml
│ │ │ │ │ │ │ ├── Maven__com_netflix_eureka_eureka_core_1_9_21.xml
│ │ │ │ │ │ │ ├── Maven__io_micrometer_micrometer_core_1_5_3.xml
│ │ │ │ │ │ │ ├── Maven__io_reactivex_rxnetty_contexts_0_4_9.xml
│ │ │ │ │ │ │ ├── Maven__org_glassfish_jaxb_jaxb_runtime_2_3_3.xml
│ │ │ │ │ │ │ ├── Maven__org_junit_jupiter_junit_jupiter_5_6_2.xml
│ │ │ │ │ │ │ ├── Maven__ch_qos_logback_logback_classic_1_2_3.xml
│ │ │ │ │ │ │ ├── Maven__com_amazonaws_jmespath_java_1_11_277.xml
│ │ │ │ │ │ │ ├── Maven__com_netflix_hystrix_hystrix_core_1_4_3.xml
│ │ │ │ │ │ │ ├── Maven__com_netflix_ribbon_ribbon_eureka_2_3_0.xml
│ │ │ │ │ │ │ ├── Maven__com_sun_jersey_jersey_servlet_1_19_1.xml
│ │ │ │ │ │ │ ├── Maven__io_github_openfeign_feign_core_10_10_1.xml
│ │ │ │ │ │ │ ├── Maven__mysql_mysql_connector_java_8_0_21.xml
│ │ │ │ │ │ │ ├── Maven__org_apache_commons_commons_pool2_2_8_0.xml
│ │ │ │ │ │ │ ├── Maven__com_google_protobuf_protobuf_java_3_7_1.xml
│ │ │ │ │ │ │ ├── Maven__com_netflix_hystrix_hystrix_core_1_5_18.xml
│ │ │ │ │ │ │ ├── Maven__commons_logging_commons_logging_1_1_3.xml
│ │ │ │ │ │ │ ├── Maven__io_github_openfeign_feign_slf4j_10_10_1.xml
│ │ │ │ │ │ │ ├── Maven__org_apache_httpcomponents_httpcore_4_4_13.xml
│ │ │ │ │ │ │ ├── Maven__org_apiguardian_apiguardian_api_1_1_0.xml
│ │ │ │ │ │ │ ├── Maven__org_checkerframework_checker_qual_2_5_2.xml
│ │ │ │ │ │ │ ├── Maven__com_netflix_archaius_archaius_core_0_7_6.xml
│ │ │ │ │ │ │ ├── Maven__com_netflix_eureka_eureka_client_1_9_21.xml
│ │ │ │ │ │ │ ├── Maven__com_thoughtworks_xstream_xstream_1_4_11_1.xml
│ │ │ │ │ │ │ ├── Maven__io_github_openfeign_form_feign_form_3_8_0.xml
│ │ │ │ │ │ │ ├── Maven__org_apache_logging_log4j_log4j_api_2_13_3.xml
│ │ │ │ │ │ │ ├── Maven__com_github_ben_manes_caffeine_caffeine_2_8_5.xml
│ │ │ │ │ │ │ ├── Maven__net_bytebuddy_byte_buddy_agent_1_10_13.xml
│ │ │ │ │ │ │ ├── Maven__com_fasterxml_woodstox_woodstox_core_5_3_0.xml
│ │ │ │ │ │ │ ├── Maven__com_google_j2objc_j2objc_annotations_1_1.xml
│ │ │ │ │ │ │ ├── Maven__org_apache_httpcomponents_httpclient_4_5_12.xml
│ │ │ │ │ │ │ ├── Maven__com_amazonaws_aws_java_sdk_ec2_1_11_277.xml
│ │ │ │ │ │ │ ├── Maven__com_amazonaws_aws_java_sdk_sts_1_11_277.xml
│ │ │ │ │ │ │ ├── Maven__com_netflix_ribbon_ribbon_transport_2_3_0.xml
│ │ │ │ │ │ │ ├── Maven__commons_fileupload_commons_fileupload_1_4.xml
│ │ │ │ │ │ │ ├── Maven__io_github_openfeign_feign_hystrix_10_10_1.xml
│ │ │ │ │ │ │ ├── Maven__org_junit_jupiter_junit_jupiter_api_5_6_2.xml
│ │ │ │ │ │ │ ├── Maven__org_mockito_mockito_junit_jupiter_3_3_3.xml
│ │ │ │ │ │ │ ├── Maven__org_reactivestreams_reactive_streams_1_0_3.xml
│ │ │ │ │ │ │ ├── Maven__com_amazonaws_aws_java_sdk_core_1_11_277.xml
│ │ │ │ │ │ │ ├── Maven__com_netflix_ribbon_ribbon_httpclient_2_3_0.xml
│ │ │ │ │ │ │ ├── Maven__com_fasterxml_jackson_core_jackson_core_2_11_1.xml
│ │ │ │ │ │ │ ├── Maven__com_sun_activation_jakarta_activation_1_2_2.xml
│ │ │ │ │ │ │ ├── Maven__org_springframework_spring_tx_5_2_8_RELEASE.xml
│ │ │ │ │ │ │ ├── Maven__com_netflix_netflix_commons_netflix_infix_0_3_0.xml
│ │ │ │ │ │ │ ├── Maven__org_jboss_logging_jboss_logging_3_4_1_Final.xml
│ │ │ │ │ │ │ ├── Maven__org_springframework_spring_aop_5_2_8_RELEASE.xml
│ │ │ │ │ │ │ ├── Maven__org_springframework_spring_jcl_5_2_8_RELEASE.xml
│ │ │ │ │ │ │ ├── Maven__org_springframework_spring_web_5_2_8_RELEASE.xml
│ │ │ │ │ │ │ ├── Maven__com_netflix_ribbon_ribbon_loadbalancer_2_3_0.xml
│ │ │ │ │ │ │ ├── Maven__jakarta_xml_bind_jakarta_xml_bind_api_2_3_3.xml
│ │ │ │ │ │ │ ├── Maven__org_apache_logging_log4j_log4j_to_slf4j_2_13_3.xml
│ │ │ │ │ │ │ ├── Maven__com_amazonaws_aws_java_sdk_route53_1_11_277.xml
│ │ │ │ │ │ │ ├── Maven__commons_collections_commons_collections_3_2_2.xml
│ │ │ │ │ │ │ ├── Maven__io_projectreactor_reactor_core_3_3_8_RELEASE.xml
│ │ │ │ │ │ │ ├── Maven__org_junit_jupiter_junit_jupiter_engine_5_6_2.xml
│ │ │ │ │ │ │ ├── Maven__org_junit_jupiter_junit_jupiter_params_5_6_2.xml
│ │ │ │ │ │ │ ├── Maven__org_junit_vintage_junit_vintage_engine_5_6_2.xml
│ │ │ │ │ │ │ ├── Maven__org_springframework_spring_core_5_2_8_RELEASE.xml
│ │ │ │ │ │ │ ├── Maven__org_springframework_spring_jdbc_5_2_8_RELEASE.xml
│ │ │ │ │ │ │ ├── Maven__org_springframework_spring_test_5_2_8_RELEASE.xml
│ │ │ │ │ │ │ ├── Maven__com_sun_istack_istack_commons_runtime_3_0_11.xml
│ │ │ │ │ │ │ ├── Maven__commons_configuration_commons_configuration_1_8.xml
│ │ │ │ │ │ │ ├── Maven__io_github_openfeign_form_feign_form_spring_3_8_0.xml
│ │ │ │ │ │ │ ├── Maven__org_apache_tomcat_embed_tomcat_embed_core_9_0_37.xml
│ │ │ │ │ │ │ ├── Maven__org_junit_platform_junit_platform_engine_1_6_2.xml
│ │ │ │ │ │ │ ├── Maven__org_springframework_spring_beans_5_2_8_RELEASE.xml
│ │ │ │ │ │ │ ├── Maven__com_netflix_netflix_commons_netflix_eventbus_0_3_0.xml
│ │ │ │ │ │ │ ├── Maven__org_springframework_spring_webmvc_5_2_8_RELEASE.xml
│ │ │ │ │ │ │ ├── Maven__com_fasterxml_jackson_core_jackson_databind_2_11_1.xml
│ │ │ │ │ │ │ ├── Maven__commons_configuration_commons_configuration_1_10.xml
│ │ │ │ │ │ │ ├── Maven__jakarta_activation_jakarta_activation_api_1_2_2.xml
│ │ │ │ │ │ │ ├── Maven__jakarta_annotation_jakarta_annotation_api_1_3_5.xml
│ │ │ │ │ │ │ ├── Maven__jakarta_validation_jakarta_validation_api_2_0_2.xml
│ │ │ │ │ │ │ ├── Maven__org_junit_platform_junit_platform_commons_1_6_2.xml
│ │ │ │ │ │ │ ├── Maven__org_springframework_boot_spring_boot_2_3_2_RELEASE.xml
│ │ │ │ │ │ │ ├── Maven__org_springframework_spring_context_5_2_8_RELEASE.xml
│ │ │ │ │ │ │ ├── Maven__com_netflix_netflix_commons_netflix_statistics_0_1_1.xml
│ │ │ │ │ │ │ ├── Maven__com_amazonaws_aws_java_sdk_autoscaling_1_11_277.xml
│ │ │ │ │ │ │ ├── Maven__com_google_errorprone_error_prone_annotations_2_2_0.xml
│ │ │ │ │ │ │ ├── Maven__io_projectreactor_addons_reactor_extra_3_3_3_RELEASE.xml
│ │ │ │ │ │ │ ├── Maven__org_codehaus_mojo_animal_sniffer_annotations_1_17.xml
│ │ │ │ │ │ │ ├── Maven__com_fasterxml_jackson_core_jackson_annotations_2_11_1.xml
│ │ │ │ │ │ │ ├── Maven__com_sun_jersey_contribs_jersey_apache_client4_1_19_1.xml
│ │ │ │ │ │ │ ├── Maven__com_netflix_netflix_commons_netflix_commons_util_0_1_1.xml
│ │ │ │ │ │ │ ├── Maven__org_apache_tomcat_embed_tomcat_embed_websocket_9_0_37.xml
│ │ │ │ │ │ │ ├── Maven__org_springframework_spring_expression_5_2_8_RELEASE.xml
│ │ │ │ │ │ │ ├── Maven__org_springframework_boot_spring_boot_test_2_3_2_RELEASE.xml
│ │ │ │ │ │ │ ├── Maven__org_hibernate_validator_hibernate_validator_6_1_5_Final.xml
│ │ │ │ │ │ │ ├── Maven__com_fasterxml_jackson_datatype_jackson_datatype_jdk8_2_11_1.xml
│ │ │ │ │ │ │ ├── Maven__org_mybatis_spring_boot_mybatis_spring_boot_starter_1_3_2.xml
│ │ │ │ │ │ │ ├── Maven__org_springframework_boot_spring_boot_starter_2_3_2_RELEASE.xml
│ │ │ │ │ │ │ ├── Maven__org_springframework_spring_context_support_5_2_8_RELEASE.xml
│ │ │ │ │ │ │ ├── Maven__com_fasterxml_jackson_dataformat_jackson_dataformat_xml_2_11_1.xml
│ │ │ │ │ │ │ ├── Maven__com_fasterxml_jackson_datatype_jackson_datatype_jsr310_2_11_1.xml
│ │ │ │ │ │ │ ├── Maven__org_springframework_boot_spring_boot_actuator_2_3_2_RELEASE.xml
│ │ │ │ │ │ │ ├── Maven__com_vaadin_external_google_android_json_0_0_20131108_vaadin1.xml
│ │ │ │ │ │ │ ├── Maven__org_springframework_cloud_spring_cloud_commons_2_2_3_RELEASE.xml
│ │ │ │ │ │ │ ├── Maven__org_springframework_cloud_spring_cloud_context_2_2_3_RELEASE.xml
│ │ │ │ │ │ │ ├── Maven__org_springframework_cloud_spring_cloud_starter_2_2_3_RELEASE.xml
│ │ │ │ │ │ │ ├── Maven__com_fasterxml_jackson_dataformat_jackson_dataformat_cbor_2_11_1.xml
│ │ │ │ │ │ │ ├── Maven__com_alibaba_cloud_spring_cloud_alibaba_seata_2_0_0_RELEASE.xml
│ │ │ │ │ │ │ ├── Maven__org_springframework_security_spring_security_rsa_1_0_9_RELEASE.xml
│ │ │ │ │ │ │ ├── Maven__org_springframework_boot_spring_boot_starter_aop_2_3_2_RELEASE.xml
│ │ │ │ │ │ │ ├── Maven__org_springframework_boot_spring_boot_starter_web_2_3_2_RELEASE.xml
│ │ │ │ │ │ │ ├── Maven__org_mybatis_spring_boot_mybatis_spring_boot_autoconfigure_1_3_2.xml
│ │ │ │ │ │ │ ├── Maven__org_springframework_boot_spring_boot_starter_jdbc_2_3_2_RELEASE.xml
│ │ │ │ │ │ │ └── Maven__org_springframework_boot_spring_boot_starter_json_2_3_2_RELEASE.xml
│ │ │ │ │ │ ├── misc.xml
│ │ │ │ │ │ └── modules.xml
│ │ │ │ │ │ ├── account-service
│ │ │ │ │ │ ├── .mvn
│ │ │ │ │ │ │ └── wrapper
│ │ │ │ │ │ │ │ ├── maven-wrapper.jar
│ │ │ │ │ │ │ │ └── maven-wrapper.properties
│ │ │ │ │ │ ├── src
│ │ │ │ │ │ │ ├── main
│ │ │ │ │ │ │ │ ├── resources
│ │ │ │ │ │ │ │ │ ├── registry.conf
│ │ │ │ │ │ │ │ │ └── application.yml
│ │ │ │ │ │ │ │ └── java
│ │ │ │ │ │ │ │ │ └── pers
│ │ │ │ │ │ │ │ │ └── kerry
│ │ │ │ │ │ │ │ │ └── seata
│ │ │ │ │ │ │ │ │ └── demo
│ │ │ │ │ │ │ │ │ └── accountservice
│ │ │ │ │ │ │ │ │ ├── AccountServiceApplication.java
│ │ │ │ │ │ │ │ │ ├── service
│ │ │ │ │ │ │ │ │ └── AccountService.java
│ │ │ │ │ │ │ │ │ └── pojo
│ │ │ │ │ │ │ │ │ └── AccountDO.java
│ │ │ │ │ │ │ └── test
│ │ │ │ │ │ │ │ └── java
│ │ │ │ │ │ │ │ └── pers
│ │ │ │ │ │ │ │ └── kerry
│ │ │ │ │ │ │ │ └── seata
│ │ │ │ │ │ │ │ └── demo
│ │ │ │ │ │ │ │ └── accountservice
│ │ │ │ │ │ │ │ └── AccountDOServiceApplicationTests.java
│ │ │ │ │ │ ├── .gitignore
│ │ │ │ │ │ └── pom.xml
│ │ │ │ │ │ ├── eureka-server
│ │ │ │ │ │ ├── .mvn
│ │ │ │ │ │ │ └── wrapper
│ │ │ │ │ │ │ │ ├── maven-wrapper.jar
│ │ │ │ │ │ │ │ └── maven-wrapper.properties
│ │ │ │ │ │ ├── src
│ │ │ │ │ │ │ ├── main
│ │ │ │ │ │ │ │ ├── resources
│ │ │ │ │ │ │ │ │ └── application.yml
│ │ │ │ │ │ │ │ └── java
│ │ │ │ │ │ │ │ │ └── pers
│ │ │ │ │ │ │ │ │ └── kerry
│ │ │ │ │ │ │ │ │ └── seata
│ │ │ │ │ │ │ │ │ └── demo
│ │ │ │ │ │ │ │ │ └── eurekaserver
│ │ │ │ │ │ │ │ │ └── EurekaServerApplication.java
│ │ │ │ │ │ │ └── test
│ │ │ │ │ │ │ │ └── java
│ │ │ │ │ │ │ │ └── pers
│ │ │ │ │ │ │ │ └── kerry
│ │ │ │ │ │ │ │ └── seata
│ │ │ │ │ │ │ │ └── demo
│ │ │ │ │ │ │ │ └── eurekaserver
│ │ │ │ │ │ │ │ └── EurekaServerApplicationTests.java
│ │ │ │ │ │ └── .gitignore
│ │ │ │ │ │ ├── order-service
│ │ │ │ │ │ ├── .mvn
│ │ │ │ │ │ │ └── wrapper
│ │ │ │ │ │ │ │ ├── maven-wrapper.jar
│ │ │ │ │ │ │ │ └── maven-wrapper.properties
│ │ │ │ │ │ ├── src
│ │ │ │ │ │ │ ├── main
│ │ │ │ │ │ │ │ ├── resources
│ │ │ │ │ │ │ │ │ ├── registry.conf
│ │ │ │ │ │ │ │ │ ├── mapper
│ │ │ │ │ │ │ │ │ │ └── OrderMapper.xml
│ │ │ │ │ │ │ │ │ └── application.yml
│ │ │ │ │ │ │ │ └── java
│ │ │ │ │ │ │ │ │ └── pers
│ │ │ │ │ │ │ │ │ └── kerry
│ │ │ │ │ │ │ │ │ └── seata
│ │ │ │ │ │ │ │ │ └── demo
│ │ │ │ │ │ │ │ │ └── orderservice
│ │ │ │ │ │ │ │ │ ├── service
│ │ │ │ │ │ │ │ │ └── OrderService.java
│ │ │ │ │ │ │ │ │ ├── OrderServiceApplication.java
│ │ │ │ │ │ │ │ │ └── feign
│ │ │ │ │ │ │ │ │ ├── StorageFeign.java
│ │ │ │ │ │ │ │ │ └── AccountFeign.java
│ │ │ │ │ │ │ └── test
│ │ │ │ │ │ │ │ └── java
│ │ │ │ │ │ │ │ └── pers
│ │ │ │ │ │ │ │ └── kerry
│ │ │ │ │ │ │ │ └── seata
│ │ │ │ │ │ │ │ └── demo
│ │ │ │ │ │ │ │ └── orderservice
│ │ │ │ │ │ │ │ └── OrderServiceApplicationTests.java
│ │ │ │ │ │ └── .gitignore
│ │ │ │ │ │ ├── storage-service
│ │ │ │ │ │ ├── .mvn
│ │ │ │ │ │ │ └── wrapper
│ │ │ │ │ │ │ │ ├── maven-wrapper.jar
│ │ │ │ │ │ │ │ └── maven-wrapper.properties
│ │ │ │ │ │ ├── src
│ │ │ │ │ │ │ ├── main
│ │ │ │ │ │ │ │ ├── resources
│ │ │ │ │ │ │ │ │ ├── registry.conf
│ │ │ │ │ │ │ │ │ └── application.yml
│ │ │ │ │ │ │ │ └── java
│ │ │ │ │ │ │ │ │ └── pers
│ │ │ │ │ │ │ │ │ └── kerry
│ │ │ │ │ │ │ │ │ └── seata
│ │ │ │ │ │ │ │ │ └── demo
│ │ │ │ │ │ │ │ │ └── storageservice
│ │ │ │ │ │ │ │ │ ├── service
│ │ │ │ │ │ │ │ │ └── StorageService.java
│ │ │ │ │ │ │ │ │ ├── StorageServiceApplication.java
│ │ │ │ │ │ │ │ │ └── pojo
│ │ │ │ │ │ │ │ │ └── StorageDO.java
│ │ │ │ │ │ │ └── test
│ │ │ │ │ │ │ │ └── java
│ │ │ │ │ │ │ │ └── pers
│ │ │ │ │ │ │ │ └── kerry
│ │ │ │ │ │ │ │ └── seata
│ │ │ │ │ │ │ │ └── demo
│ │ │ │ │ │ │ │ └── storageservice
│ │ │ │ │ │ │ │ └── StorageServiceApplicationTests.java
│ │ │ │ │ │ ├── .gitignore
│ │ │ │ │ │ └── pom.xml
│ │ │ │ │ │ └── resources
│ │ │ │ │ │ └── seata-server
│ │ │ │ │ │ ├── registry.conf
│ │ │ │ │ │ └── file.conf
│ │ │ │ │ └── 99~参考资料
│ │ │ │ │ └── 2022~张乘辉~深度剖析 Seata TCC 模式.md
│ │ │ └── 01~部署与使用
│ │ │ │ └── 99~参考资料
│ │ │ │ └── 2020~芋道 Spring Boot 分布式事务 Seata 入门.md
│ │ └── dtm
│ │ │ └── README.md
│ ├── 事务消息
│ │ ├── README.md
│ │ ├── 实践案例
│ │ │ └── 事务消息保障抢购业务的分布式一致性.md
│ │ └── 流处理方案.md
│ ├── 事务方案
│ │ ├── 事务分类
│ │ │ └── README.md
│ │ └── 分布式事务案例
│ │ │ └── README.md
│ ├── 柔性事务
│ │ └── TCC
│ │ │ └── README.md
│ └── 多阶段提交
│ │ └── README.md
└── 分布式追踪
│ ├── OpenTracing
│ └── README.md
│ ├── OpenTelemetry
│ └── README.md
│ └── 系统设计
│ └── 系统设计.md
├── 05~服务网格
├── Envoy
│ ├── README.md
│ └── Kuma
│ │ └── README.md
├── Linkerd
│ └── README.md
├── Serverless
│ └── 阿里云.md
└── 可视化
│ └── Kiali
│ └── README.md
├── 02~微服务 RPC
├── 03~RPC 框架
│ ├── ServiceComb
│ │ └── README.md
│ ├── Dapr
│ │ ├── Components
│ │ │ └── README.md
│ │ ├── 生产配置
│ │ │ └── README.md
│ │ ├── 应用开发
│ │ │ ├── 服务调用.md
│ │ │ └── 状态管理.md
│ │ ├── .DS_Store
│ │ └── 部署案例
│ │ │ └── K8s.md
│ ├── Rpcx
│ │ ├── REAMDE.md
│ │ └── Go RPC 框架.md
│ ├── Dubbo
│ │ ├── 架构机制
│ │ │ └── README.md
│ │ ├── .DS_Store
│ │ ├── 踩坑汇总.md
│ │ ├── K8s
│ │ │ └── README.md
│ │ └── README.md
│ ├── .DS_Store
│ └── gRPC
│ │ ├── 开发环境.md
│ │ └── .DS_Store
├── .DS_Store
├── 99~参考资料
│ ├── 2024~手撕 RPC 框架
│ │ └── README.md
│ ├── 2020~RPC 从零开始
│ │ └── README.md
│ ├── .DS_Store
│ └── 2019~RPC 服务治理框架实战
│ │ └── Java RPC 框架.md
├── 01~RPC 基础
│ ├── .DS_Store
│ ├── 服务调用
│ │ └── README.md
│ ├── 服务发现
│ │ └── README.md
│ ├── RPC 安全性.md
│ └── 性能对比.md
└── RPC 协议编码
│ └── Protobuf
│ └── 快速开始.md
├── .DS_Store
├── 10~系统案例
└── 其他案例
│ ├── README.md
│ ├── .DS_Store
│ └── 刚果商城
│ └── README.md
├── 99~参考资料
└── 2019~《微服务:从设计到部署》
│ └── README.md
└── .gitattributes
/.nojekyll:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/01~微服务架构/02~服务基础/README.md:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/01~微服务架构/99~参考资料/README.md:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/INTRODUCTION.md:
--------------------------------------------------------------------------------
1 | # 本篇导读
2 |
--------------------------------------------------------------------------------
/01~微服务架构/01~架构变迁/云原生.md:
--------------------------------------------------------------------------------
1 | # 云原生
2 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/99~参考资料/README.md:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/05~服务网格/Envoy/README.md:
--------------------------------------------------------------------------------
1 | # Envoy
2 |
--------------------------------------------------------------------------------
/02~微服务 RPC/03~RPC 框架/ServiceComb/README.md:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/05~服务网格/Linkerd/README.md:
--------------------------------------------------------------------------------
1 | # Linkerd
2 |
--------------------------------------------------------------------------------
/02~微服务 RPC/03~RPC 框架/Dapr/Components/README.md:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/02~微服务 RPC/03~RPC 框架/Rpcx/REAMDE.md:
--------------------------------------------------------------------------------
1 | # Rpcx
2 |
--------------------------------------------------------------------------------
/02~微服务 RPC/03~RPC 框架/Dapr/生产配置/README.md:
--------------------------------------------------------------------------------
1 | # 生产配置
2 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/09~Seata 架构原理/README.md:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/02~微服务 RPC/03~RPC 框架/Dapr/应用开发/服务调用.md:
--------------------------------------------------------------------------------
1 | # Dapr 服务调用
2 |
--------------------------------------------------------------------------------
/02~微服务 RPC/03~RPC 框架/Dapr/应用开发/状态管理.md:
--------------------------------------------------------------------------------
1 | # Dapr 状态管理
2 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/00~Seata 概述/99~参考资料/README.md:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/02~微服务 RPC/03~RPC 框架/Dubbo/架构机制/README.md:
--------------------------------------------------------------------------------
1 | # HSF
2 |
3 | # Links
4 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务消息/README.md:
--------------------------------------------------------------------------------
1 | # 事务消息
2 |
3 | # 本地消息表
4 |
5 | # MQ 消息
6 |
--------------------------------------------------------------------------------
/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wx-chevalier/MicroCN-Notes/master/.DS_Store
--------------------------------------------------------------------------------
/10~系统案例/其他案例/README.md:
--------------------------------------------------------------------------------
1 | # Links
2 |
3 | - https://cubox.pro/c/aJDXFk 8 张图带你了解大型应用架构演进历程
4 |
--------------------------------------------------------------------------------
/01~微服务架构/01~架构变迁/README.md:
--------------------------------------------------------------------------------
1 | # 系统架构变迁
2 |
3 | 
4 |
--------------------------------------------------------------------------------
/02~微服务 RPC/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wx-chevalier/MicroCN-Notes/master/02~微服务 RPC/.DS_Store
--------------------------------------------------------------------------------
/02~微服务 RPC/99~参考资料/2024~手撕 RPC 框架/README.md:
--------------------------------------------------------------------------------
1 | # [手撕 RPC 框架](https://github.com/youngyangyang04/RPC-Java)
2 |
--------------------------------------------------------------------------------
/10~系统案例/其他案例/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wx-chevalier/MicroCN-Notes/master/10~系统案例/其他案例/.DS_Store
--------------------------------------------------------------------------------
/99~参考资料/2019~《微服务:从设计到部署》/README.md:
--------------------------------------------------------------------------------
1 | > [原文地址](https://github.com/DocsHome/microservices)
2 |
3 | # 微服务:从设计到部署
4 |
--------------------------------------------------------------------------------
/02~微服务 RPC/99~参考资料/2020~RPC 从零开始/README.md:
--------------------------------------------------------------------------------
1 | > [原文地址](https://www.bantanger.fun/pages/ab73e2/)
2 |
3 | # RPC 从零开始
4 |
--------------------------------------------------------------------------------
/01~微服务架构/02~服务基础/服务间通信.md:
--------------------------------------------------------------------------------
1 | # 服务间通信
2 |
3 | # Links
4 |
5 | - http://www.linkedkeeper.com/1772.html?hmsr=toutiao.io
6 |
--------------------------------------------------------------------------------
/02~微服务 RPC/99~参考资料/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wx-chevalier/MicroCN-Notes/master/02~微服务 RPC/99~参考资料/.DS_Store
--------------------------------------------------------------------------------
/02~微服务 RPC/01~RPC 基础/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wx-chevalier/MicroCN-Notes/master/02~微服务 RPC/01~RPC 基础/.DS_Store
--------------------------------------------------------------------------------
/02~微服务 RPC/03~RPC 框架/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wx-chevalier/MicroCN-Notes/master/02~微服务 RPC/03~RPC 框架/.DS_Store
--------------------------------------------------------------------------------
/02~微服务 RPC/03~RPC 框架/gRPC/开发环境.md:
--------------------------------------------------------------------------------
1 | # 开发环境
2 |
3 | 当我们开发 gRPC 接口时,首先要定义一个 .proto 文件,然后我们可以利用 protoc 工具从该接口文件中生成服务端与客户端代码。
4 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务方案/事务分类/README.md:
--------------------------------------------------------------------------------
1 | # 分布式事务分类
2 |
3 | 分布式事务可以分为两类:
4 |
5 | - 第一类为:NewSQL 的内部分布式事务;
6 | - 第一类为:跨数据库、跨服务的分布式事务;
7 |
--------------------------------------------------------------------------------
/02~微服务 RPC/03~RPC 框架/Dapr/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wx-chevalier/MicroCN-Notes/master/02~微服务 RPC/03~RPC 框架/Dapr/.DS_Store
--------------------------------------------------------------------------------
/02~微服务 RPC/03~RPC 框架/Dubbo/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wx-chevalier/MicroCN-Notes/master/02~微服务 RPC/03~RPC 框架/Dubbo/.DS_Store
--------------------------------------------------------------------------------
/02~微服务 RPC/03~RPC 框架/gRPC/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wx-chevalier/MicroCN-Notes/master/02~微服务 RPC/03~RPC 框架/gRPC/.DS_Store
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/dtm/README.md:
--------------------------------------------------------------------------------
1 | # dtm
2 |
3 | # Links
4 |
5 | - https://mp.weixin.qq.com/s/lCOfgGp19NdoQz1-aaAmHg 分布式事务实战,用Go轻松完成一个TCC
--------------------------------------------------------------------------------
/01~微服务架构/04~云原生/99~参考资料/容器、K8s、微服务、云原生.md:
--------------------------------------------------------------------------------
1 | # 容器、K8s、微服务、云原生
2 |
3 | # Links
4 |
5 | - https://xie.infoq.cn/article/4c4edd0f6ed7b9454a638fa70 解读云原生技术
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | *.xmind filter=lfs diff=lfs merge=lfs -text
2 | *.zip filter=lfs diff=lfs merge=lfs -text
3 | *.pdf filter=lfs diff=lfs merge=lfs -text
4 |
--------------------------------------------------------------------------------
/02~微服务 RPC/03~RPC 框架/Rpcx/Go RPC 框架.md:
--------------------------------------------------------------------------------
1 | # Go RPC 框架
2 |
3 | # Links
4 |
5 | - rpcx 框架 https://github.com/ffhelicopter/Go42/blob/master/content/42_43_rpcx.md
6 |
--------------------------------------------------------------------------------
/02~微服务 RPC/99~参考资料/2019~RPC 服务治理框架实战/Java RPC 框架.md:
--------------------------------------------------------------------------------
1 | # Java RPC 框架
2 |
3 | # Links
4 |
5 | - https://mp.weixin.qq.com/s/nLSjDVluMSQCUOaFkkhjsw RPC 服务治理框架实战
6 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/README.md:
--------------------------------------------------------------------------------
1 | # Seata
2 |
3 | Seata 原名 Fescar(Fast & Easy Commit And Rollback),是一个用于微服务架构的分布式事务解决方案,它的特点是高性能且易于使用,旨在实现简单并快速的事务提交与回滚。
4 |
--------------------------------------------------------------------------------
/02~微服务 RPC/01~RPC 基础/服务调用/README.md:
--------------------------------------------------------------------------------
1 | # 数据流
2 |
3 | # Links
4 |
5 | - https://github.com/Vonng/ddia/blob/master/ch4.md#%E6%95%B0%E6%8D%AE%E6%B5%81%E7%9A%84%E7%B1%BB%E5%9E%8B
6 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式追踪/OpenTracing/README.md:
--------------------------------------------------------------------------------
1 | # OpenTracing
2 |
3 | # Links
4 |
5 | - https://yq.aliyun.com/articles/514488
6 | - https://github.com/jaegertracing/jaeger/tree/master/examples
7 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务方案/分布式事务案例/README.md:
--------------------------------------------------------------------------------
1 | # 分布式事务案例
2 |
3 | 有很多用例会跨多个子系统才能完成,比较典型的是电子商务网站的下单支付流程,至少会涉及交易系统和支付系统;在用户下单之后,需要在库存子系统减少库存,然后在订单子系统添加订单。如果多个数据库之间的数据更新没有保证事务,将会导致出现子系统数据不一致,业务出现问题。
4 |
--------------------------------------------------------------------------------
/01~微服务架构/04~云原生/Serverless/BaaS.md:
--------------------------------------------------------------------------------
1 | # BaaS
2 |
3 | 无服务器应用程序的另一个定义是使用 BaaS 或后端作为服务范式的应用程序。BaaS 的想法是,开发人员只编写其应用程序的客户端代码,然后依赖于托管在云中的多个软件预构建服务(可通过 API 访问)。BaaS 在移动应用程序编程中很受欢迎,开发人员可以依赖大量的后端服务来驱动应用程序的大部分功能。BaaS 服务的例子有:Firebase 和 Parse。
4 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/02~微服务 RPC/03~RPC 框架/Dubbo/踩坑汇总.md:
--------------------------------------------------------------------------------
1 | # 踩坑汇总
2 |
3 | # Links
4 |
5 | - https://mp.weixin.qq.com/s?__biz=MzA4NjgxMjQ5Mg==&mid=2665761563&idx=1&sn=f7909f1c55850579dbe010aa86955c15&chksm=84d21938b3a5902e49e9f4f3e9660788fb23ccbdc56ab66268c92c7b37d33bde66b04adbb990&scene=21#wechat_redirect
6 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/.gitignore:
--------------------------------------------------------------------------------
1 | # Default ignored files
2 | /shelf/
3 | /workspace.xml
4 | # Datasource local storage ignored files
5 | /dataSources/
6 | /dataSources.local.xml
7 | # Editor-based HTTP Client requests
8 | /httpRequests/
9 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/account-service/.mvn/wrapper/maven-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wx-chevalier/MicroCN-Notes/master/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/account-service/.mvn/wrapper/maven-wrapper.jar
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/eureka-server/.mvn/wrapper/maven-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wx-chevalier/MicroCN-Notes/master/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/eureka-server/.mvn/wrapper/maven-wrapper.jar
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/order-service/.mvn/wrapper/maven-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wx-chevalier/MicroCN-Notes/master/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/order-service/.mvn/wrapper/maven-wrapper.jar
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/storage-service/.mvn/wrapper/maven-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wx-chevalier/MicroCN-Notes/master/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/storage-service/.mvn/wrapper/maven-wrapper.jar
--------------------------------------------------------------------------------
/05~服务网格/Serverless/阿里云.md:
--------------------------------------------------------------------------------
1 | # 阿里云 Serverless
2 |
3 | 阿里云的 Serverless 服务为我们提供了函数式计算服务,函数计算是一个事件驱动的服务,通过函数计算,用户无需管理服务器等运行情况,只需编写代码并上传。函数计算准备计算资源,并以弹性伸缩的方式运行用户代码,而用户只需根据实际代码运行所消耗的资源进行付费。
4 |
5 | Fun 是一个用于支持 Serverless 应用部署的工具,能帮助您便捷地管理函数计算、API 网关、日志服务等资源。它通过一个资源配置文件(template.yml),协助您进行开发、构建、部署操作。
6 |
--------------------------------------------------------------------------------
/01~微服务架构/03~微服务治理/微服务拆分/组件化与服务化.md:
--------------------------------------------------------------------------------
1 | # 组件化与服务化
2 |
3 | # Links
4 |
5 | - https://mp.weixin.qq.com/s?__biz=MzI4NjY4MTU5Nw==&mid=2247490586&idx=1&sn=9c0c2df6ef6a9bb0ab050e75d1174df5&chksm=ebd86c88dcafe59eb145fec66f1fb376fd55268b08672b51d11c801b25c85cb8de9bf36e1f28&token=1703912642&lang=zh_CN#rd 微服务时代组件化和服务化的抉择
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/eureka-server/.mvn/wrapper/maven-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip
2 | wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar
3 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/order-service/.mvn/wrapper/maven-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip
2 | wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar
3 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/account-service/.mvn/wrapper/maven-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip
2 | wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar
3 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/storage-service/.mvn/wrapper/maven-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip
2 | wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar
3 |
--------------------------------------------------------------------------------
/05~服务网格/可视化/Kiali/README.md:
--------------------------------------------------------------------------------
1 | # Kiali
2 |
3 | 考虑到服务网格越来越多被用来部署大量的容器化微服务,我们期待看到能自动化并简化此类架构风格相关的管理工具的出现。Kiali 就是这样的工具。Kiali 提供了一个图形化用户界面,用于观察和控制使用 Istio 部署的服务网络。我们发现 Kiali 对可视化网络中的服务拓扑结构,并理解它们彼此之间的路由流量,尤其有帮助。比如,当和 Flagger 结合使用时,Kiali 可以显示出那些路由到某个金丝雀服务发布的请求。我们特别喜欢 Kiali 的一个能力,它能让我们向某个服务网格人工注入网络错误,以测试面临网络中断时的弹力。因为配置以及在复杂的微服务网格中运行错误测试带来的复杂度,这个实践经常会被忽略掉。
4 |
--------------------------------------------------------------------------------
/01~微服务架构/02~服务基础/中间件.md:
--------------------------------------------------------------------------------
1 | # 中间件
2 |
3 | 介于操作系统和应用程序之间的产品,中间件简单解释,你可以理解为面向信息系统交互,集成过程中的通用部分的集合,屏蔽了底层的通讯,交互,连接等复杂又通用化的功能,以产品的形式提供出来,系统在交互时,直接采用中间件进行连接和交互即可,避免了大量的代码开发和人工成本。其实,理论上来讲,中间件所提供的功能通过代码编写都可以实现,只不过开发的周期和需要考虑的问题太多,逐渐的,这些部分,以中间件产品的形式进行了替代。比如常见的消息中间件,即系统之间的通讯与交互的专用通道,类似于邮局,系统只需要把传输的消息交给中间件,由中间件负责传递,并保证传输过程中的各类问题,如网络问题,协议问题,两端的开发接口问题等均由消息中间件屏蔽了,出现了网络故障时,消息中间件会负责缓存消息,以避免信息丢失。
4 |
--------------------------------------------------------------------------------
/02~微服务 RPC/03~RPC 框架/Dapr/部署案例/K8s.md:
--------------------------------------------------------------------------------
1 | # Dapr 在 K8s 中部署案例
2 |
3 | 本教程将让你在 Kubernetes 集群中启动并运行 Dapr。您将从 Hello World 部署相同的应用程序。概括地说,Python 应用生成消息,Node 应用消费和持久化它们。下面的架构图说明了组成这个快速入门的组件。
4 |
5 | 
6 |
7 | # Links
8 |
9 | - [dapr/quickstart/hello-kubernetes](https://github.com/dapr/quickstarts/tree/v1.0.0/hello-kubernetes)
10 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式追踪/OpenTelemetry/README.md:
--------------------------------------------------------------------------------
1 | # OpenTelemetry
2 |
3 | OpenTelemetry 是一个开源可观测性项目,它合并了 OpenTracing 和 OpenCensus。OpenTelemetry 项目包含规范、库、代理和
4 | 其他组件,以便从服务中捕获遥测信息,更好地观察、管理和调试服务。它涵盖了可观测性的三大支柱⸺分布式跟踪、指标和日志记录(目前处于 beta 测试版),且其规范通过 correlations 连接这三大支柱。这样就可以使用指标来查明问题,找到相应的跟踪
5 | 信息,以定位问题,并最终研究相应的日志,以查找确切的根本原因。OpenTelemetry 组件可以连接到后端可观察性系统,例如 Prometheus、Jaeger 及其他系统。OpenTracing 的形成,是朝着融合标准化与工具简化而迈出的积极一步。
6 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/eureka-server/src/main/resources/application.yml:
--------------------------------------------------------------------------------
1 | spring:
2 | application:
3 | name: eureka-server
4 | server:
5 | port: 8761
6 |
7 | eureka:
8 | instance:
9 | hostname: eureka-server1
10 | server:
11 | enable-self-preservation: false
12 | client:
13 | register-with-eureka: false
14 | fetch-registry: false
--------------------------------------------------------------------------------
/05~服务网格/Envoy/Kuma/README.md:
--------------------------------------------------------------------------------
1 | # Kuma
2 |
3 | Kuma 是一个面向服务网格和微服务的通用开源控制平面。它天生就可以在 Kubernetes 和 VM 环境中运行和操作,组织中的每个团队都可以轻松地采用它。Kuma 以 Envoy 为基础构建,可以用于管理任何 L4/L7 流量,保护、观察、路由及增强任何服务或数据库之间的连接。它可以通过 CRD 在 Kubernetes 本地使用,也可以通过 RESTful API 在其他环境中使用,而且不需要更改应用程序的代码。
4 |
5 | Kuma 在大多数情况中使用起来都很容易,同时,它还提供了以更细粒度的方式配置底层 Envoy 数据平面的策略。这既满足了初次使用服务网格的用户,也满足了经验最丰富的用户。
6 |
7 | 
8 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/柔性事务/TCC/README.md:
--------------------------------------------------------------------------------
1 | # TCC
2 |
3 | TCC(Try-Confirm-Cancel)的概念,最早是由 Pat Helland 于 2007 年发表的一篇名为《Life beyond Distributed Transactions:an Apostate’s Opinion》的论文提出。
4 |
5 | TCC 是服务化的二阶段编程模型,其 Try、Confirm、Cancel 3 个方法均由业务编码实现:
6 |
7 | - Try 操作作为一阶段,负责资源的检查和预留。
8 | - Confirm 操作作为二阶段提交操作,执行真正的业务。
9 | - Cancel 是预留资源的取消。
10 |
11 | TCC 事务的 Try、Confirm、Cancel 可以理解为 SQL 事务中的 Lock、Commit、Rollback。
12 |
13 | # Links
14 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/account-service/src/main/resources/registry.conf:
--------------------------------------------------------------------------------
1 | registry {
2 | # file 、nacos 、eureka、redis、zk、consul、etcd3、sofa
3 | type = "eureka"
4 |
5 | eureka {
6 | serviceUrl = "http://localhost:8761/eureka"
7 | }
8 |
9 | }
10 |
11 | config {
12 | # file、nacos 、apollo、zk、consul、etcd3、springCloudConfig
13 | type = "file"
14 |
15 | file {
16 | name = "file.conf"
17 | }
18 | }
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/order-service/src/main/resources/registry.conf:
--------------------------------------------------------------------------------
1 | registry {
2 | # file 、nacos 、eureka、redis、zk、consul、etcd3、sofa
3 | type = "eureka"
4 |
5 | eureka {
6 | serviceUrl = "http://localhost:8761/eureka"
7 | }
8 |
9 | }
10 |
11 | config {
12 | # file、nacos 、apollo、zk、consul、etcd3、springCloudConfig
13 | type = "file"
14 |
15 | file {
16 | name = "file.conf"
17 | }
18 | }
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/storage-service/src/main/resources/registry.conf:
--------------------------------------------------------------------------------
1 | registry {
2 | # file 、nacos 、eureka、redis、zk、consul、etcd3、sofa
3 | type = "eureka"
4 |
5 | eureka {
6 | serviceUrl = "http://localhost:8761/eureka"
7 | }
8 |
9 | }
10 |
11 | config {
12 | # file、nacos 、apollo、zk、consul、etcd3、springCloudConfig
13 | type = "file"
14 |
15 | file {
16 | name = "file.conf"
17 | }
18 | }
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/eureka-server/src/test/java/pers/kerry/seata/demo/eurekaserver/EurekaServerApplicationTests.java:
--------------------------------------------------------------------------------
1 | package pers.kerry.seata.demo.eurekaserver;
2 |
3 | import org.junit.jupiter.api.Test;
4 | import org.springframework.boot.test.context.SpringBootTest;
5 |
6 | @SpringBootTest
7 | class EurekaServerApplicationTests {
8 |
9 | @Test
10 | void contextLoads() {
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/order-service/src/test/java/pers/kerry/seata/demo/orderservice/OrderServiceApplicationTests.java:
--------------------------------------------------------------------------------
1 | package pers.kerry.seata.demo.orderservice;
2 |
3 | import org.junit.jupiter.api.Test;
4 | import org.springframework.boot.test.context.SpringBootTest;
5 |
6 | @SpringBootTest
7 | class OrderServiceApplicationTests {
8 |
9 | @Test
10 | void contextLoads() {
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/02~微服务 RPC/03~RPC 框架/Dubbo/K8s/README.md:
--------------------------------------------------------------------------------
1 | # Kubernetes
2 |
3 | Dubbo 的 provider 不在关心服务注册的事宜,只需要把其 Dubbo 服务端口打开,由 kubernetes 来进行服务的声明和发布;Dubbo 的 consumer 在服务发现时直接发现 kubernetes 的对应服务 endpoints,从而复用 Dubbo 已有的微服务通道能力。好处是无需依赖三方的软负载注册中心;同时无缝融入 kubernetes 的多租户安全体系。
4 |
5 | # Links
6 |
7 | - https://github.com/apache/dubbo-kubernetes
8 | - http://bucket.k8smeetup.com/%E6%9C%B1%E6%98%BE%E6%9D%B0-Kubernetes%E4%B8%8EDubbo%E7%BB%93%E5%90%88%E7%9A%84%E5%AE%9E%E8%B7%B5%E4%B9%8B%E8%B7%AF.pdf
9 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/account-service/src/test/java/pers/kerry/seata/demo/accountservice/AccountDOServiceApplicationTests.java:
--------------------------------------------------------------------------------
1 | package pers.kerry.seata.demo.accountservice;
2 |
3 | import org.junit.jupiter.api.Test;
4 | import org.springframework.boot.test.context.SpringBootTest;
5 |
6 | @SpringBootTest
7 | class AccountDOServiceApplicationTests {
8 |
9 | @Test
10 | void contextLoads() {
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/storage-service/src/test/java/pers/kerry/seata/demo/storageservice/StorageServiceApplicationTests.java:
--------------------------------------------------------------------------------
1 | package pers.kerry.seata.demo.storageservice;
2 |
3 | import org.junit.jupiter.api.Test;
4 | import org.springframework.boot.test.context.SpringBootTest;
5 |
6 | @SpringBootTest
7 | class StorageServiceApplicationTests {
8 |
9 | @Test
10 | void contextLoads() {
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/storage-service/src/main/java/pers/kerry/seata/demo/storageservice/service/StorageService.java:
--------------------------------------------------------------------------------
1 | package pers.kerry.seata.demo.storageservice.service;
2 |
3 |
4 | /**
5 | * @description:
6 | * @date: 2021/2/14 11:14 上午
7 | * @author: kerry
8 | */
9 | public interface StorageService {
10 | /**
11 | * 扣库存
12 | * @param productId
13 | * @param count
14 | * @return
15 | */
16 | void decreaseStorage(Long productId, Integer count);
17 | }
18 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务消息/实践案例/事务消息保障抢购业务的分布式一致性.md:
--------------------------------------------------------------------------------
1 | > https://mp.weixin.qq.com/s/guJ5ZfyIZpfHrNM2xOL3zA
2 |
3 | # 事务消息保障抢购业务的分布式一致性
4 |
5 | 在电商领域,抢购和秒杀是非常普遍业务模式,抢购类业务在快速拉升用户流量并为消息者带来实惠的同时,也给电商系统带来了巨大考验。在高并发、大流量的冲击下,系统的性能和稳定性至关重要,任何一个环节出现故障,都会影响整体的购物体验,甚至造成电商系统的大面积崩溃。和电商领域抢购场景极为类似的业务模式还有很多,比如大型赛事和在线教育的报名系统,以及各类购票系统等。
6 |
7 | 针对抢购类业务在技术上带来的挑战,业界有一系列解决方案,通过不同维度来提升系统的性能与稳定性,包括动静分离、定时上架、异步处理、令牌队列、多级缓存、作弊行为侦测、流量防护、全链路压测等。
8 |
9 | 本文重点聚焦在如何确保抢购类业务的一致性上,分布式事务一直是 IT 界老大难的问题,而抢购业务所具备的高并发、大流量特征,更是成倍增加了分布式一致性的实现难度。以下将介绍如何通过事务消息构建满足抢购类业务要求的高性能高可用分布式一致性机制。
10 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/encodings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/多阶段提交/README.md:
--------------------------------------------------------------------------------
1 | # 分布式系统事务处理
2 |
3 | 在分布式系统中,各个节点之间在物理上相互独立,通过网络进行沟通和协调。由于存在事务机制,可以保证每个独立节点上的数据操作可以满足 ACID。但是,相互独立的节点之间无法准确的知道其他节点中的事务执行情况。所以从理论上讲,两台机器理论上无法达到一致的状态。如果想让分布式部署的多台机器中的数据 保持一致性,那么就要保证在所有节点的数据写操作,要不全部都执行,要么全部的都不执行。但是,一台机器在执行本地事务的时候无法知道其他机器中的本地事 务的执行结果。所以他也就不知道本次事务到底应该 commit 还是 roolback。所以,常规的解决办法就是引入一个“协调者”的组件来统一调度所有分布式节点的执行。
4 |
5 | 二阶段提交的算法思路可以概括为:参与者将操作成败通知协调者,再由协调者根据所有参与者的反馈情报决定各参与者是否要提交操作还是中止操作。核心思想就是对每一个事务都采用先尝试后提交的处理方式,处理后所有的读操作都要能获得最新的数据,因此也可以将二阶段提交看作是一个强一致性算法。
6 |
7 | 
8 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/resources/seata-server/registry.conf:
--------------------------------------------------------------------------------
1 | registry {
2 | # file 、nacos 、eureka、redis、zk、consul、etcd3、sofa
3 | type = "eureka"
4 | loadBalance = "RandomLoadBalance"
5 | loadBalanceVirtualNodes = 10
6 |
7 | eureka {
8 | serviceUrl = "http://localhost:8761/eureka"
9 | application = "seata-server"
10 | weight = "1"
11 | }
12 |
13 | }
14 |
15 | config {
16 | # file、nacos 、apollo、zk、consul、etcd3
17 | type = "file"
18 |
19 | file {
20 | name = "file.conf"
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/storage-service/src/main/java/pers/kerry/seata/demo/storageservice/StorageServiceApplication.java:
--------------------------------------------------------------------------------
1 | package pers.kerry.seata.demo.storageservice;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class StorageServiceApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(StorageServiceApplication.class, args);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/01~微服务架构/03~微服务治理/微服务设计模式.md:
--------------------------------------------------------------------------------
1 | # 微服务设计
2 |
3 | - API 网关:应用程序接口(APIs),版本(Versioning),契约(Contracts),负载均衡(Load Balancing),路由/适应性路由(Routing/Adaptive Routing)
4 | - 部署与扩展:部署(Deployment),交付(Delivery),数据库的横向扩展,缓存
5 | - 服务拆分与服务发现:服务发现(Service Discovery),健康检查(Health Checking),存活控制(TTL/Deadlining)
6 | - 服务编排与弹性伸缩:伸缩/自动伸缩(Scaling,AutoScaling)
7 | - 统一配置中心:配置(Configuration)
8 | - 统一的日志中心:DaemonSet 部署日志 Agent
9 | - 熔断,限流,降级:断路器(Circuit Breaking),隔水舱(Bulk-heads)
10 | - 全方位的监控:时延追踪(Latency Tracing),分布式服务追踪(Service Causal Tracing),分布式日志(Distributed Logging),运行指标暴露与搜集(Metrics Exposure,Collection)
11 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/order-service/src/main/java/pers/kerry/seata/demo/orderservice/service/OrderService.java:
--------------------------------------------------------------------------------
1 | package pers.kerry.seata.demo.orderservice.service;
2 |
3 | import org.springframework.stereotype.Service;
4 | import pers.kerry.seata.demo.orderservice.pojo.OrderDO;
5 |
6 | /**
7 | * @description:
8 | * @date: 2021/2/13 11:23 下午
9 | * @author: kerry
10 | */
11 |
12 | public interface OrderService {
13 | /**
14 | * 创建订单
15 | * @param orderDO
16 | */
17 | void createOrder(OrderDO orderDO);
18 | }
19 |
--------------------------------------------------------------------------------
/02~微服务 RPC/01~RPC 基础/服务发现/README.md:
--------------------------------------------------------------------------------
1 | # 服务发现
2 |
3 | 任何可通过网络访问的软件,特别是如果它的目标是高可用性(在多台机器上运行冗余配置),都存在服务发现(Service Discovery)的问题。许多公司已经编写了自己的内部服务发现工具,其中许多已经作为开源发布。概括来说,这个问题有几种不同的方案:
4 |
5 | - 允许客户联系任何节点(例如,通过**循环策略的负载均衡(Round-Robin Load Balancer)**)。如果该节点恰巧拥有请求的分区,则它可以直接处理该请求;否则,它将请求转发到适当的节点,接收回复并传递给客户端。
6 |
7 | - 首先将所有来自客户端的请求发送到路由层,它决定了应该处理请求的节点,并相应地转发。此路由层本身不处理任何请求;它仅负责分区的负载均衡。
8 |
9 | - 要求客户端知道分区和节点的分配。在这种情况下,客户端可以直接连接到适当的节点,而不需要任何中介。
10 |
11 | 以上所有情况中的关键问题是:作出路由决策的组件(可能是节点之一,还是路由层或客户端)如何了解分区-节点之间的分配关系变化?
12 |
13 | 
14 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/account-service/src/main/java/pers/kerry/seata/demo/accountservice/AccountServiceApplication.java:
--------------------------------------------------------------------------------
1 | package pers.kerry.seata.demo.accountservice;
2 |
3 | import org.mybatis.spring.annotation.MapperScan;
4 | import org.springframework.boot.SpringApplication;
5 | import org.springframework.boot.autoconfigure.SpringBootApplication;
6 |
7 |
8 | @SpringBootApplication
9 | public class AccountServiceApplication {
10 |
11 | public static void main(String[] args) {
12 | SpringApplication.run(AccountServiceApplication.class, args);
13 | }
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__cglib_cglib_3_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/account-service/.gitignore:
--------------------------------------------------------------------------------
1 | HELP.md
2 | target/
3 | !.mvn/wrapper/maven-wrapper.jar
4 | !**/src/main/**/target/
5 | !**/src/test/**/target/
6 |
7 | ### STS ###
8 | .apt_generated
9 | .classpath
10 | .factorypath
11 | .project
12 | .settings
13 | .springBeans
14 | .sts4-cache
15 |
16 | ### IntelliJ IDEA ###
17 | .idea
18 | *.iws
19 | *.iml
20 | *.ipr
21 |
22 | ### NetBeans ###
23 | /nbproject/private/
24 | /nbbuild/
25 | /dist/
26 | /nbdist/
27 | /.nb-gradle/
28 | build/
29 | !**/src/main/**/build/
30 | !**/src/test/**/build/
31 |
32 | ### VS Code ###
33 | .vscode/
34 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/account-service/src/main/java/pers/kerry/seata/demo/accountservice/service/AccountService.java:
--------------------------------------------------------------------------------
1 | package pers.kerry.seata.demo.accountservice.service;
2 |
3 | import org.springframework.stereotype.Service;
4 |
5 | import java.math.BigDecimal;
6 |
7 | /**
8 | * @description:
9 | * @date: 2021/2/11 9:43 上午
10 | * @author: kerry
11 | */
12 | public interface AccountService {
13 | /**
14 | * 账户扣钱
15 | * @param userId 用户id
16 | * @param money 扣钱金额
17 | * @return
18 | */
19 | void decreaseMoney(Long userId, BigDecimal money);
20 | }
21 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/eureka-server/.gitignore:
--------------------------------------------------------------------------------
1 | HELP.md
2 | target/
3 | !.mvn/wrapper/maven-wrapper.jar
4 | !**/src/main/**/target/
5 | !**/src/test/**/target/
6 |
7 | ### STS ###
8 | .apt_generated
9 | .classpath
10 | .factorypath
11 | .project
12 | .settings
13 | .springBeans
14 | .sts4-cache
15 |
16 | ### IntelliJ IDEA ###
17 | .idea
18 | *.iws
19 | *.iml
20 | *.ipr
21 |
22 | ### NetBeans ###
23 | /nbproject/private/
24 | /nbbuild/
25 | /dist/
26 | /nbdist/
27 | /.nb-gradle/
28 | build/
29 | !**/src/main/**/build/
30 | !**/src/test/**/build/
31 |
32 | ### VS Code ###
33 | .vscode/
34 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/order-service/.gitignore:
--------------------------------------------------------------------------------
1 | HELP.md
2 | target/
3 | !.mvn/wrapper/maven-wrapper.jar
4 | !**/src/main/**/target/
5 | !**/src/test/**/target/
6 |
7 | ### STS ###
8 | .apt_generated
9 | .classpath
10 | .factorypath
11 | .project
12 | .settings
13 | .springBeans
14 | .sts4-cache
15 |
16 | ### IntelliJ IDEA ###
17 | .idea
18 | *.iws
19 | *.iml
20 | *.ipr
21 |
22 | ### NetBeans ###
23 | /nbproject/private/
24 | /nbbuild/
25 | /dist/
26 | /nbdist/
27 | /.nb-gradle/
28 | build/
29 | !**/src/main/**/build/
30 | !**/src/test/**/build/
31 |
32 | ### VS Code ###
33 | .vscode/
34 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/storage-service/.gitignore:
--------------------------------------------------------------------------------
1 | HELP.md
2 | target/
3 | !.mvn/wrapper/maven-wrapper.jar
4 | !**/src/main/**/target/
5 | !**/src/test/**/target/
6 |
7 | ### STS ###
8 | .apt_generated
9 | .classpath
10 | .factorypath
11 | .project
12 | .settings
13 | .springBeans
14 | .sts4-cache
15 |
16 | ### IntelliJ IDEA ###
17 | .idea
18 | *.iws
19 | *.iml
20 | *.ipr
21 |
22 | ### NetBeans ###
23 | /nbproject/private/
24 | /nbbuild/
25 | /dist/
26 | /nbdist/
27 | /.nb-gradle/
28 | build/
29 | !**/src/main/**/build/
30 | !**/src/test/**/build/
31 |
32 | ### VS Code ###
33 | .vscode/
34 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/storage-service/src/main/java/pers/kerry/seata/demo/storageservice/pojo/StorageDO.java:
--------------------------------------------------------------------------------
1 | package pers.kerry.seata.demo.storageservice.pojo;
2 |
3 | import lombok.Data;
4 |
5 | /**
6 | * @description:
7 | * @date: 2021/2/14 11:17 上午
8 | * @author: kerry
9 | */
10 | @Data
11 | public class StorageDO {
12 | private Long id;
13 | /**
14 | * 产品id
15 | */
16 | private Long productId;
17 | /**
18 | * 剩余库存
19 | */
20 | private Integer residue;
21 | /**
22 | * TCC事务锁定的库存
23 | */
24 | private Integer frozen;
25 | }
26 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__junit_junit_4_13.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__org_ow2_asm_asm_4_2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/order-service/src/main/java/pers/kerry/seata/demo/orderservice/OrderServiceApplication.java:
--------------------------------------------------------------------------------
1 | package pers.kerry.seata.demo.orderservice;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 | import org.springframework.cloud.openfeign.EnableFeignClients;
6 |
7 | @EnableFeignClients
8 | @SpringBootApplication
9 | public class OrderServiceApplication {
10 |
11 | public static void main(String[] args) {
12 | SpringApplication.run(OrderServiceApplication.class, args);
13 | }
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__antlr_antlr_2_7_7.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/02~微服务 RPC/RPC 协议编码/Protobuf/快速开始.md:
--------------------------------------------------------------------------------
1 | # 快速开始
2 |
3 | ## protoc 安装
4 |
5 | 1. Download the appropriate release here: https://github.com/google/protobuf/releases
6 | 2. Unzip the folder
7 | 3. Enter the folder and run `./autogen.sh && ./configure && make`
8 | 4. If you run into this error: _autoreconf: failed to run aclocal: No such file or directory,_ run `brew install autoconf && brew install automake.` And run the command from step 3 again.
9 | 5. Then run these other commands. They should run without issues
10 |
11 | ```sh
12 | $ make check
13 |
14 | $ sudo make install
15 |
16 | $ which protoc
17 |
18 | $ protoc --version
19 | ```
20 |
21 | ## 代码编译
22 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__org_ow2_asm_asm_5_0_4.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/eureka-server/src/main/java/pers/kerry/seata/demo/eurekaserver/EurekaServerApplication.java:
--------------------------------------------------------------------------------
1 | package pers.kerry.seata.demo.eurekaserver;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 | import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer;
6 |
7 | @EnableEurekaServer
8 | @SpringBootApplication
9 | public class EurekaServerApplication {
10 |
11 | public static void main(String[] args) {
12 | SpringApplication.run(EurekaServerApplication.class, args);
13 | }
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__stax_stax_api_1_0_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__xpp3_xpp3_min_1_1_4c.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/account-service/src/main/java/pers/kerry/seata/demo/accountservice/pojo/AccountDO.java:
--------------------------------------------------------------------------------
1 | package pers.kerry.seata.demo.accountservice.pojo;
2 |
3 | import lombok.Data;
4 |
5 | import java.math.BigDecimal;
6 |
7 | /**
8 | * @description:
9 | * @date: 2021/2/13 10:25 下午
10 | * @author: kerry
11 | */
12 | @Data
13 | public class AccountDO {
14 | private Long id;
15 | /**
16 | * 用户id
17 | */
18 | private Long userId;
19 | /**
20 | * 剩余可用额度
21 | */
22 | private BigDecimal residue;
23 | /**
24 | * TCC事务锁定的金额
25 | */
26 | private BigDecimal frozen;
27 | }
28 |
--------------------------------------------------------------------------------
/02~微服务 RPC/03~RPC 框架/Dubbo/README.md:
--------------------------------------------------------------------------------
1 | # Dubbo
2 |
3 | 
4 |
5 | 图中的 6 个步骤的含义解释如下:
6 |
7 | 0、服务容器负责启动,加载,运行服务提供者。
8 |
9 | 1、服务提供者在启动时,向注册中心注册自己提供的服务。
10 |
11 | 2、服务消费者在启动时,向注册中心订阅自己所需的服务。
12 |
13 | 3、注册中心返回服务提供者地址列表给消费者,如果有变更,注册中心将基于长连接推送变更数据给消费者。
14 |
15 | 4、服务消费者,从提供者地址列表中,基于软负载均衡算法,选一台提供者进行调用,如果调用失败,再选另一台调用。
16 |
17 | 5、服务消费者和提供者,在内存中累计调用次数和调用时间,定时每分钟发送一次统计数据到监控中心。
18 |
19 | # Links
20 |
21 | - [Dubbo 原理解析](http://blog.csdn.net/column/details/learningdubbo.html)
22 |
23 | - https://www.funtl.com/zh/apache-dubbo-rpc/Dubbo-%E7%9A%84%E6%9C%8D%E5%8A%A1%E6%B2%BB%E7%90%86.html#%E6%9C%AC%E8%8A%82%E8%A7%86%E9%A2%91
24 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__com_alibaba_druid_1_1_23.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__joda_time_joda_time_2_3.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__org_yaml_snakeyaml_1_26.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__com_typesafe_config_1_2_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__io_reactivex_rxjava_1_3_8.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__org_hamcrest_hamcrest_2_2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__xmlpull_xmlpull_1_1_3_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__com_google_guava_guava_16_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__com_stoyanr_evictor_1_0_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__com_zaxxer_HikariCP_3_4_5.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__commons_io_commons_io_2_2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__io_seata_seata_all_1_4_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__org_mybatis_mybatis_3_4_6.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__io_reactivex_rxnetty_0_4_9.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__joda_time_joda_time_2_8_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__net_minidev_json_smart_2_3.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__javax_inject_javax_inject_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__org_glassfish_jaxb_txw2_2_3_3.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__org_objenesis_objenesis_2_6.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__aopalliance_aopalliance_1_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__com_alibaba_fastjson_1_2_73.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__com_google_inject_guice_4_1_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__org_slf4j_slf4j_api_1_7_30.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__com_google_code_gson_gson_2_8_6.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__org_antlr_antlr_runtime_3_4.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__com_fasterxml_classmate_1_5_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__com_netflix_ribbon_ribbon_2_3_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__javax_servlet_servlet_api_2_5.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__javax_ws_rs_jsr311_api_1_1_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__commons_lang_commons_lang_2_6.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__commons_pool_commons_pool_1_6.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__org_glassfish_jakarta_el_3_0_3.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__org_projectlombok_lombok_1_18_12.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__org_slf4j_jul_to_slf4j_1_7_30.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__org_mockito_mockito_core_3_3_3.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__org_opentest4j_opentest4j_1_2_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__org_xmlunit_xmlunit_core_2_7_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__net_minidev_accessors_smart_1_2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__org_antlr_stringtemplate_3_2_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__org_aspectj_aspectjweaver_1_9_6.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__org_assertj_assertj_core_3_16_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__org_freemarker_freemarker_2_3_30.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__org_skyscreamer_jsonassert_1_5_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__software_amazon_ion_ion_java_1_0_2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__com_google_guava_guava_27_0_1_jre.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__commons_codec_commons_codec_1_14.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__io_reactivex_rxnetty_servo_0_4_9.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__net_bytebuddy_byte_buddy_1_10_13.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__ch_qos_logback_logback_core_1_2_3.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__com_google_code_findbugs_jsr305_3_0_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__com_google_code_findbugs_jsr305_3_0_2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__com_jayway_jsonpath_json_path_2_4_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__com_sun_jersey_jersey_core_1_19_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__commons_jxpath_commons_jxpath_1_3.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__io_netty_netty_all_4_1_51_Final.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__org_codehaus_jettison_jettison_1_3_7.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__org_mybatis_mybatis_spring_1_3_2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__org_apache_commons_commons_math_2_2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务消息/流处理方案.md:
--------------------------------------------------------------------------------
1 | # 流处理方案
2 |
3 | 当系统变得越来越复杂,数据库会被拆分为多个更小的库,如果借助这些衍生库实现像全文搜索这样的功能,那么如何保证所有的数据保持同步就是一项很有挑战性的任务了。使用多个数据库时,最大的问题在于它们并不是互相独立的。相同的数据会以不同的形式进行存储,所以当数据更新的时候,具有对应数据的所有数据库都需要进行更新。保证数据同步的最常用方案就是将其视为应用程序逻辑的责任,通常会对每个数据库进行独立的写操作。这是一个脆弱的方案,如果发生像网络故障或服务器宕机这样的失败场景,那么对一些数据库的更新可能会失败,从而导致这些数据库之间出现不一致性。Kleppmann 认为这并不是能够进行自我纠正的最终一致性,至少相同的数据再次进行写操作之前,无法实现一致性。
4 |
5 | 在 leader(主)数据库中,同时会将所有的写入操作按照处理的顺序存储为流,然后一个或多个 follower 数据库就能读取这个流并按照完全相同的顺序执行写入。这样的话,这些数据库就能更新自己的数据并成为 leader 数据库的一致性备份。对于 Kleppmann 来说,这是一个非常具有容错性的方案。每个 follower 都遵循它在流中的顺序,在出现网络故障或宕机时,follower 数据库能够从上一次的保存点开始继续进行处理。Kleppmann 还提到在实现上述场景时,使用 Kafka 作为工具之一。目前,他正在编写一个实现,Bottled Water,在这个实现中,他使用了 PostgreSQL 来抽取数据变化,然后将其中继到 Kafka 中,代码可以在[GitHub](https://github.com/confluentinc/bottledwater-pg) 上获取到。
6 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__com_netflix_ribbon_ribbon_core_2_3_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__org_codehaus_woodstox_stax2_api_4_2_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__org_hdrhistogram_HdrHistogram_2_1_9.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__org_latencyutils_LatencyUtils_2_0_3.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__com_google_guava_failureaccess_1_0_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__com_netflix_servo_servo_core_0_12_21.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__com_sun_jersey_jersey_client_1_19_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__com_sun_jersey_jersey_server_1_19_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__org_bouncycastle_bcpkix_jdk15on_1_64.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__org_bouncycastle_bcprov_jdk15on_1_64.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__org_hdrhistogram_HdrHistogram_2_1_12.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__com_netflix_eureka_eureka_core_1_9_21.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__io_micrometer_micrometer_core_1_5_3.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__io_reactivex_rxnetty_contexts_0_4_9.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__org_glassfish_jaxb_jaxb_runtime_2_3_3.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__org_junit_jupiter_junit_jupiter_5_6_2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__ch_qos_logback_logback_classic_1_2_3.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__com_amazonaws_jmespath_java_1_11_277.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__com_netflix_hystrix_hystrix_core_1_4_3.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__com_netflix_ribbon_ribbon_eureka_2_3_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__com_sun_jersey_jersey_servlet_1_19_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__io_github_openfeign_feign_core_10_10_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__mysql_mysql_connector_java_8_0_21.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__org_apache_commons_commons_pool2_2_8_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__com_google_protobuf_protobuf_java_3_7_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__com_netflix_hystrix_hystrix_core_1_5_18.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__commons_logging_commons_logging_1_1_3.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__io_github_openfeign_feign_slf4j_10_10_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__org_apache_httpcomponents_httpcore_4_4_13.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__org_apiguardian_apiguardian_api_1_1_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__org_checkerframework_checker_qual_2_5_2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/01~微服务架构/03~微服务治理/OpenSergo 规范/README.md:
--------------------------------------------------------------------------------
1 | # OpenSergo 微服务治理标准
2 |
3 | OpenSergo 是开放通用的,覆盖微服务及上下游关联组件的微服务治理项目。OpenSergo 从微服务的角度出发,涵盖流量治理、服务容错、服务元信息治理、安全治理等关键治理领域,提供一系列的治理能力与标准、生态适配与最佳实践,支持 Java, Go, Rust 等多语言生态。OpenSergo 项目由阿里巴巴、bilibili、中国移动、SphereEx 等企业,以及 Kratos、CloudWeGo、ShardingSphere、Database Mesh、Spring Cloud Alibaba、Apache Dubbo 等社区联合发起,共同主导治理标准建设与能力演进。
4 |
5 | OpenSergo 的最大特点就是以统一的一套配置/DSL/协议定义服务治理规则,面向多语言异构化架构,做到全链路生态覆盖。无论微服务的语言是 Java, Go, Node.js 还是其它语言,无论是标准微服务还是 Mesh 接入,从网关到微服务,从数据库到缓存,从服务注册发现到配置,开发者都可以通过同一套 OpenSergo CRD 标准配置针对每一层进行统一的治理管控,而无需关注各框架、语言的差异点,降低异构化、全链路服务治理管控的复杂度。
6 |
7 | 
8 |
9 | 
10 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__com_netflix_archaius_archaius_core_0_7_6.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__com_netflix_eureka_eureka_client_1_9_21.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__com_thoughtworks_xstream_xstream_1_4_11_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__io_github_openfeign_form_feign_form_3_8_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__org_apache_logging_log4j_log4j_api_2_13_3.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__com_github_ben_manes_caffeine_caffeine_2_8_5.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__net_bytebuddy_byte_buddy_agent_1_10_13.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/01~部署与使用/99~参考资料/2020~芋道 Spring Boot 分布式事务 Seata 入门.md:
--------------------------------------------------------------------------------
1 | > [原文地址](https://www.iocoder.cn/Spring-Boot/Seata/?self),这篇文章详细介绍了如何在 Spring Boot 应用中集成 Seata 来实现分布式事务管理。Seata 是一个开源的分布式事务解决方案,由阿里巴巴开发,旨在提供高性能和简单易用的分布式事务服务。
2 | >
3 | > 文章内容主要包括以下几个部分:
4 | >
5 | > 1. **概述**:简单介绍了 Seata 并提供了一个简单的入门指南。
6 | > 2. **AT 模式 + 多数据源**:讲解了在 Spring Boot 单体项目中使用 Seata 的 AT 模式来解决多数据源的一致性问题。
7 | > 3. **初始化数据库**:提供了 SQL 脚本用于创建和管理所需的数据库和表。
8 | > 4. **引入依赖**:列出了项目所需的 Maven 依赖。
9 | > 5. **配置文件**:展示了如何配置 `application.yaml` 文件来集成 Seata。
10 | > 6. **订单模块、商品模块、账户模块**:分别介绍了如何创建和实现这些模块的服务,并使用 Seata 的注解来管理事务。
11 | > 7. **启动类和测试**:提供了启动 Spring Boot 应用的代码,并介绍了如何进行事务提交和异常回滚的测试。
12 | >
13 | > 此外,文章还提供了完整的代码示例,可以在 https://github.com/YunaiV/SpringBoot-Labs 的 lab-52 目录中找到。
14 |
15 | # 芋道 Spring Boot 分布式事务 Seata 入门
16 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__com_fasterxml_woodstox_woodstox_core_5_3_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__com_google_j2objc_j2objc_annotations_1_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__org_apache_httpcomponents_httpclient_4_5_12.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__com_amazonaws_aws_java_sdk_ec2_1_11_277.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__com_amazonaws_aws_java_sdk_sts_1_11_277.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__com_netflix_ribbon_ribbon_transport_2_3_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__commons_fileupload_commons_fileupload_1_4.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__io_github_openfeign_feign_hystrix_10_10_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/10~系统案例/其他案例/刚果商城/README.md:
--------------------------------------------------------------------------------
1 | # 刚果商城
2 |
3 | 
4 |
5 | 星球推出的 CongoMall(刚果商城) 系统,参照商城系统原型,相继推出 用户、消息、商品、订单、优惠券、支付、网关、购物车 等业务模块,通过商城系统中复杂场景,给出对应解决方案。
6 | 根据业务场景复杂度,会在商城业务中使用到这些技术:分布式锁、分布式事务、分布式搜索、分布式缓存、分布式限流、分库分表以及微服务流量监控等。
7 |
8 | 当业务系统持续开发过程中,会遇到 各式各样的场景问题,马哥根据工作中遇到或者帮助他人已解决的,总结了以下场景,并把解决方案和代码实战放在刚果商城这个系统里。
9 |
10 | - 百万数据量导出,如何保障内存安全和导出性能?
11 | - 线上应用运行触发 OOM(内存溢出或泄漏),如何第一时间通知到开发者?
12 | - 如何解决雪花算法在集群环境下,生成 ID 重复问题?
13 | - 按照时间字段分库分表,如何支持业务 ID 高效查询记录?(自定义复合分片算法)
14 | - 订单业务根据买家 ID 进行分库分表,如何支持订单 ID 高效查询记录?(基因法&自定义复合分片算法)
15 | - 如何通过 MyBatis 查询千万数据,并保证内存不溢出?
16 | - MySQL 单表千万级数据,如何避免深分页引起的线上故障?
17 | - 如何将千万数据通过并发的形式高性能导入三方数据库?比如 ElasticSearch。
18 | - 面试高频考点:如何结合复杂业务场景解决缓存穿透、缓存雪崩、缓存击穿?
19 | - 抽象多种策略幂等组件,防止类似于用户重复下单行为。
20 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__org_junit_jupiter_junit_jupiter_api_5_6_2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__org_mockito_mockito_junit_jupiter_3_3_3.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__org_reactivestreams_reactive_streams_1_0_3.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式追踪/系统设计/系统设计.md:
--------------------------------------------------------------------------------
1 | # 分布式追踪系统设计
2 |
3 | - 低侵入性,应用透明:作为非业务组件,应当尽可能少侵入或者无侵入其他业务系统,对于使用方透明,减少开发人员的负担。
4 |
5 | - 低损耗:服务调用埋点本身会带来性能损耗,这就需要调用跟踪的低损耗,实际中还会通过配置采样率的方式,选择一部分请求去分析请求路径。
6 |
7 | - 大范围部署,扩展性:作为分布式系统的组件之一,一个优秀的调用跟踪系统必须支持分布式部署,具备良好的可扩展性。
8 |
9 | # 关键技术点
10 |
11 | ## 埋点和生成日志
12 |
13 | 埋点即系统在当前节点的上下文信息,可以分为客户端埋点、服务端埋点,以及客户端和服务端双向型埋点。埋点日志通常要包含以下内容:TraceId、RPCId、调用的开始时间,调用类型,协议类型,调用方 ip 和端口,请求的服务名等信息;调用耗时,调用结果,异常信息,消息报文等;预留可扩展字段,为下一步扩展做准备;
14 |
15 | ## 抓取和存储日志
16 |
17 | 日志的采集和存储有许多开源的工具可以选择,一般来说,会使用离线 + 实时的方式去存储日志,主要是分布式日志采集的方式。典型的解决方案如 Flume 结合 Kafka 等 MQ。
18 |
19 | ## 分析和统计调用链数据
20 |
21 | 一条调用链的日志散落在调用经过的各个服务器上,首先需要按 TraceId 汇总日志,然后按照 RpcId 对调用链进行顺序整理。调用链数据不要求百分之百准确,可以允许中间的部分日志丢失。
22 |
23 | ## 计算和展示
24 |
25 | 汇总得到各个应用节点的调用链日志后,可以针对性的对各个业务线进行分析。需要对具体日志进行整理,进一步储存在 HBase 或者关系型数据库中,可以进行可视化的查询。
26 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__com_amazonaws_aws_java_sdk_core_1_11_277.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__com_netflix_ribbon_ribbon_httpclient_2_3_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_core_2_11_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__com_sun_activation_jakarta_activation_1_2_2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__org_springframework_spring_tx_5_2_8_RELEASE.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/99~参考资料/2022~张乘辉~深度剖析 Seata TCC 模式.md:
--------------------------------------------------------------------------------
1 | > [原文地址](https://seata.apache.org/zh-cn/blog/seata-tcc/),Seata 是一个开源的分布式事务解决方案,它支持多种分布式事务处理模式,包括 AT、XA、TCC 和 SAGA 模式。TCC 模式,即 Try-Confirm-Cancel 模式,是一种二阶段提交协议,它要求业务系统实现 Try、Confirm 和 > Cancel 三个阶段的操作。
2 | >
3 | > 在 TCC 模式中:
4 | >
5 | > - **Try 阶段**:对业务资源进行检查并预留。
6 | > - **Confirm 阶段**:对业务处理进行提交,即 commit 操作。如果 Try 成功,Confirm 阶段应该也会成功。
7 | > - **Cancel 阶段**:对业务处理进行取消,即回滚操作,释放 Try 阶段预留的资源。
8 | >
9 | > Seata 的 TCC 模式遵循 TC(事务协调者)、TM(事务管理器)和 RM(资源管理器)三种角色模型。Seata 在启动时会扫描并解析 TCC 接口,如果是发布方,则会向 TC 注册 TCC Resource;如果是调用方,Seata 会代理调> 用方,拦截 TCC 接口的调用,并在 Try 方法执行前向 TC 注册分支事务。
10 | >
11 | > 当全局事务需要提交或回滚时,TC 会通过资源 ID 回调到对应的参与者服务中,执行相应的 Confirm 或 Cancel 方法。
12 | >
13 | > 文章还详细介绍了 Seata 如何实现 TCC 模式,包括资源解析、资源管理和事务处理等关键步骤。此外,还讨论了如何处理 TCC 模式中可能出现的空回滚、幂等和悬挂等异常情况。
14 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__com_netflix_netflix_commons_netflix_infix_0_3_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__org_jboss_logging_jboss_logging_3_4_1_Final.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__org_springframework_spring_aop_5_2_8_RELEASE.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__org_springframework_spring_jcl_5_2_8_RELEASE.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__org_springframework_spring_web_5_2_8_RELEASE.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__com_netflix_ribbon_ribbon_loadbalancer_2_3_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__jakarta_xml_bind_jakarta_xml_bind_api_2_3_3.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__org_apache_logging_log4j_log4j_to_slf4j_2_13_3.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__com_amazonaws_aws_java_sdk_route53_1_11_277.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__commons_collections_commons_collections_3_2_2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__io_projectreactor_reactor_core_3_3_8_RELEASE.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__org_junit_jupiter_junit_jupiter_engine_5_6_2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__org_junit_jupiter_junit_jupiter_params_5_6_2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__org_junit_vintage_junit_vintage_engine_5_6_2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__org_springframework_spring_core_5_2_8_RELEASE.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__org_springframework_spring_jdbc_5_2_8_RELEASE.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__org_springframework_spring_test_5_2_8_RELEASE.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__com_sun_istack_istack_commons_runtime_3_0_11.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__commons_configuration_commons_configuration_1_8.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__io_github_openfeign_form_feign_form_spring_3_8_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_core_9_0_37.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__org_junit_platform_junit_platform_engine_1_6_2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__org_springframework_spring_beans_5_2_8_RELEASE.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__com_netflix_netflix_commons_netflix_eventbus_0_3_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__org_springframework_spring_webmvc_5_2_8_RELEASE.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/resources/seata-server/file.conf:
--------------------------------------------------------------------------------
1 | ## transaction log store, only used in seata-server
2 | store {
3 | ## store mode: file、db、redis
4 | mode = "db"
5 |
6 | db {
7 | ## the implement of javax.sql.DataSource, such as DruidDataSource(druid)/BasicDataSource(dbcp)/HikariDataSource(hikari) etc.
8 | datasource = "druid"
9 | ## mysql/oracle/postgresql/h2/oceanbase etc.
10 | dbType = "mysql"
11 | driverClassName = "com.mysql.jdbc.Driver"
12 | url = "jdbc:mysql://127.0.0.1:3306/seata"
13 | user = "seata"
14 | password = "seata"
15 | minConn = 5
16 | maxConn = 100
17 | globalTable = "global_table"
18 | branchTable = "branch_table"
19 | lockTable = "lock_table"
20 | queryLimit = 100
21 | maxWait = 5000
22 | }
23 |
24 | }
25 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_databind_2_11_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__commons_configuration_commons_configuration_1_10.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__jakarta_activation_jakarta_activation_api_1_2_2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__jakarta_annotation_jakarta_annotation_api_1_3_5.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__jakarta_validation_jakarta_validation_api_2_0_2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__org_junit_platform_junit_platform_commons_1_6_2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__org_springframework_boot_spring_boot_2_3_2_RELEASE.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__org_springframework_spring_context_5_2_8_RELEASE.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/01~微服务架构/04~云原生/Serverless/FaaS.md:
--------------------------------------------------------------------------------
1 | # FaaS
2 |
3 | FaaS 的理念是,诸如亚马逊之类的云提供商甚至是诸如 Fission.io 或 funktion 之类的本地软件都可以提供服务,其中用户可以请求远程运行的功能以执行非常特定的任务。功能结束后,这些结果将返回给用户。不维护任何服务或有状态数据,并且用户将功能代码提供给运行该功能的服务。
4 |
5 | 无服务器架构的优势在于,不需要配置虚拟机和/或容器来构建利用 FaaS 的应用程序部分。一旦它们的功能结束,运行这些功能的计算实例从用户的角度来看就不再存在。此外,需要由用户监控和维护的微服务和/或容器的数量减少,节省了成本、时间和精力。
6 |
7 | 无服务器架构为软件工程师和架构师提供了另一种功能强大的软件构建工具,可用于设计灵活且可扩展的软件。已知的 FaaS 有 Amazon 的 AWS Lambda、Microsoft 的 Azure Functions、Google 的 Cloud Functions 等。
8 |
9 | ## 缺陷
10 |
11 | 与微服务和云原生应用程序类似,无服务器架构并不适用于所有场景。FaaS 提供的功能本身并不保持状态,这意味着在编写功能代码时需要特别注意。这与全微服务不同——开发人员可以完全控制状态。尽管有这种限制,但在 FaaS 的情况下保持状态的一种方法是将状态传播到数据库或像 Redis 这样的内存缓存。
12 |
13 | 这些功能的启动时间并不总是很快,因为要有时间分配给 FaaS 服务提供商发送请求,然后在某些情况下启动运行该功能的计算实例也需要时间。在设计无服务器应用程序时必须考虑这些延迟。FaaS 不像微服务那样持续运行,这使得它们不适合任何需要持续运行软件的任务。
14 |
15 | 无服务器应用程序具有与其他云原生应用程序相同的限制,其中应用程序从一个云提供商到另一个云提供商,或从云到本地环境的可移植性因供应商锁定而变得具有挑战性。
16 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__com_netflix_netflix_commons_netflix_statistics_0_1_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/storage-service/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 | 4.0.0
5 |
6 | pers.kerry.seata.demo
7 | seata-tcc-demo
8 | 0.0.1-SNAPSHOT
9 |
10 |
11 |
12 | pers.kerry.seata.demo
13 | storage-service
14 | 0.0.1-SNAPSHOT
15 | storage-service
16 | 库存服务
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__com_amazonaws_aws_java_sdk_autoscaling_1_11_277.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/account-service/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 | 4.0.0
5 |
6 | pers.kerry.seata.demo
7 | seata-tcc-demo
8 | 0.0.1-SNAPSHOT
9 |
10 |
11 |
12 | pers.kerry.seata.demo
13 | account-service
14 | 0.0.1-SNAPSHOT
15 | account-service
16 | 账户服务
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/order-service/src/main/java/pers/kerry/seata/demo/orderservice/feign/StorageFeign.java:
--------------------------------------------------------------------------------
1 | package pers.kerry.seata.demo.orderservice.feign;
2 |
3 | import org.springframework.cloud.openfeign.FeignClient;
4 | import org.springframework.web.bind.annotation.GetMapping;
5 | import org.springframework.web.bind.annotation.RequestParam;
6 |
7 | /**
8 | * @description:
9 | * @date: 2021/2/14 10:50 上午
10 | * @author: kerry
11 | */
12 | @FeignClient(name = "storage")
13 | public interface StorageFeign {
14 |
15 | /**
16 | * 扣库存
17 | * @param productId 产品id
18 | * @param count 产品数量
19 | * @return
20 | */
21 | @GetMapping("/storage/decrease-storage")
22 | String decreaseStorage(@RequestParam("productId")Long productId, @RequestParam("count")Integer count);
23 | }
24 |
25 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__com_google_errorprone_error_prone_annotations_2_2_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__io_projectreactor_addons_reactor_extra_3_3_3_RELEASE.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__org_codehaus_mojo_animal_sniffer_annotations_1_17.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/01~微服务架构/01~架构变迁/微服务/微服务.md:
--------------------------------------------------------------------------------
1 | # 微服务
2 |
3 | 微服务(Microservices Architecture Pattern)由 Martin Fowler 在 2014 年提出的,是希望将某个单一的单体应用,转化为多个可以独立运行、独立开发、独立部署、独立维护的服务或者应用的聚合,从而满足业务快速变化及分布式多团队并行开发的需求。微服务的核心特征可以归纳为:围绕业务能力构建,分散治理,通过服务来实现独立自治的组件,产品化思维,数据去中心化,强终端弱管道,容错性设计,演进式设计,基础设施自动化。
4 |
5 | 
6 |
7 | 微服务与微前端原理和软件工程,面向对象设计中的原理同样相通,都是遵循单一职责(Single Responsibility)、关注分离(Separation of Concerns)、模块化(Modularity)与分而治之(Divide & Conquer)等基本的原则。同样如康威定律(Conway’s Law)所言,任何组织在设计一套系统(广义概念)时,所交付的设计方案在结构上都与该组织的通信结构保持一致,微服务与微前端不仅仅是技术架构的变化,还包含了组织方式、沟通方式的变化。
8 |
9 | # 单体架构到微服务
10 |
11 | 在单体架构中,也有一些方式来隔离代码和数据。例如,我们可以将模块隔离成单独的包、构建模块和源码仓库,这些模块可以由不同的团队所拥有。通过将表按照命名规则、模式、数据库实例,甚至数据库服务器的方式进行分组,我们可以实现数据的部分隔离。下图来源于 Axel Fontaine 关于伟大的模块化单体的演讲,它阐述了应用中不同的代码和数据隔离级别。
12 |
13 | 
14 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_annotations_2_11_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__com_sun_jersey_contribs_jersey_apache_client4_1_19_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/order-service/src/main/resources/mapper/OrderMapper.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | insert into `order`(order_no,user_id,product_id,amount,money,status)
7 | values (#{order.orderNo},#{order.userId},#{order.productId},#{order.amount},#{order.money},#{order.status})
8 |
9 |
10 |
11 | update `order` set status=#{status} WHERE order_no=#{orderNo}
12 |
13 |
14 |
15 | delete from `order` where order_no=#{orderNo}
16 |
17 |
18 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__com_netflix_netflix_commons_netflix_commons_util_0_1_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_websocket_9_0_37.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__org_springframework_spring_expression_5_2_8_RELEASE.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/storage-service/src/main/resources/application.yml:
--------------------------------------------------------------------------------
1 | spring:
2 | application:
3 | name: storage
4 | datasource:
5 | driver-class-name: com.mysql.cj.jdbc.Driver
6 | url: jdbc:mysql://localhost/seata_storage?useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2B8
7 | username: seata
8 | password: seata
9 | cloud:
10 | alibaba:
11 | seata:
12 | tx-service-group: order_tx_group
13 | server:
14 | port: 8082
15 | eureka:
16 | client:
17 | service-url:
18 | defaultZone: http://localhost:8761/eureka
19 | instance:
20 | prefer-ip-address: true
21 | mybatis:
22 | configuration:
23 | map-underscore-to-camel-case: true
24 | mapper-locations: classpath:mapper/*Mapper.xml
25 | logging:
26 | level:
27 | pers.kerry.seata.demo.storageservice.mapper: debug
--------------------------------------------------------------------------------
/02~微服务 RPC/01~RPC 基础/RPC 安全性.md:
--------------------------------------------------------------------------------
1 | # RPC 的安全性
2 |
3 | 最初的 RPC 实施是为隔离的 LAN 网络开发的,并不十分注重安全性。从恶意注册表到恶意服务器,再到针对拒绝服务的客户端到客户端与服务器之间的中间人攻击,该模型中存在着许多能够被攻击、渗透的安全薄弱点。随着时间的推移和互联网的发展,出现了新的标准,并且 RPC 实施变得更加安全。在 RPC 中,安全性通常作为模块或软件包添加。这些模块具有用于认证和授权通信服务(主叫方和被叫方)的库。这些模块并非始终没有错误,并且可能会获得未经授权的系统访问权限。总体而言,安全性正在努力纠正这种情况,使用代码检查和漏洞赏金程序来预先捕获这些错误。但是,随着时间的流逝,会出现新的错误,并且此循环继续进行。这是攻击者和安全专家之间的恶性循环,他们两者都试图超越对手。
4 |
5 | 例如,Oracle 网络文件系统使用安全 RPC(Oracle,n.d。)在 NFS 中执行身份验证。该安全 RPC 使用具有 DES 加密功能的 Diffie-Hellman 身份验证机制,仅允许授权用户访问 NFS。同样,Cap’n Proto(Kenton,n.d.)声称它可以抵抗内存泄漏,段错误和恶意输入,并且可以在互不信任的各方之间使用。但是,在 Cap’n Proto 中,“ RPC 层无法抵抗资源耗尽攻击,可能允许拒绝服务”,也没有经过任何正式的验证(Kenton,n.d.)。
6 |
7 | 尽管有可能提出一个使 RPC 实现不安全使用的威胁模型,但必须理解使用任何分布式系统都会增加攻击面,并声称一种范例比另一种范例更安全。,因为范式通常是一个主意,并且依赖于不同的系统设计人员来使用这些范式来构建其系统并照顾特定于实际系统的功能,例如安全性和负载平衡。总是有可能将请求重新路由到恶意服务器(如果注册表被黑客入侵),或者调用者和被调用者之间不信任。但是,我们坚持认为 RPC 范式既不安全也不安全,并且最安全的系统是处于隔离环境中的系统,这些系统通过自毁机制与公共互联网断开连接(Sarma,Weis,(&Engels,2002)。
8 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__org_springframework_boot_spring_boot_test_2_3_2_RELEASE.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/order-service/src/main/java/pers/kerry/seata/demo/orderservice/feign/AccountFeign.java:
--------------------------------------------------------------------------------
1 | package pers.kerry.seata.demo.orderservice.feign;
2 |
3 | import org.springframework.cloud.openfeign.FeignClient;
4 | import org.springframework.web.bind.annotation.GetMapping;
5 | import org.springframework.web.bind.annotation.RequestParam;
6 |
7 | import java.math.BigDecimal;
8 |
9 | /**
10 | * @description:
11 | * @date: 2021/2/14 10:49 上午
12 | * @author: kerry
13 | */
14 | @FeignClient(name = "account")
15 | public interface AccountFeign {
16 |
17 | /**
18 | * 扣余额
19 | * @param userId 用户id
20 | * @param money 金额
21 | * @return
22 | */
23 | @GetMapping("/account/decrease-money")
24 | String decreaseMoney(@RequestParam("userId") Long userId, @RequestParam("money") BigDecimal money);
25 | }
26 |
27 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__org_hibernate_validator_hibernate_validator_6_1_5_Final.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/account-service/src/main/resources/application.yml:
--------------------------------------------------------------------------------
1 | spring:
2 | application:
3 | name: account
4 | datasource:
5 | driver-class-name: com.mysql.cj.jdbc.Driver
6 | url: jdbc:mysql://localhost/seata_account?useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2B8
7 | username: seata
8 | password: seata
9 | cloud:
10 | alibaba:
11 | seata:
12 | tx-service-group: order_tx_group
13 | server:
14 | port: 8081
15 | eureka:
16 | client:
17 | service-url:
18 | defaultZone: http://localhost:8761/eureka
19 | instance:
20 | prefer-ip-address: true
21 | mybatis:
22 | configuration:
23 | map-underscore-to-camel-case: true
24 | mapper-locations: classpath:mapper/*Mapper.xml
25 | logging:
26 | level:
27 | pers.kerry.seata.demo.accountservice.mapper: debug
28 |
29 |
30 |
--------------------------------------------------------------------------------
/01~微服务架构/03~微服务治理/README.md:
--------------------------------------------------------------------------------
1 | # 微服务治理
2 |
3 | 不管是什么事物需要”治理“,那一定是该事物存在一定问题。比如环境治理。对于服务来说,如果它承担的业务职责简单,那其实治理的必要性不大,因为服务运行过程是相对透明的,即使出现问题也能较快发现、定位、回滚。当服务承担的业务职责变多变大,那随着更多问题的到来,服务治理开始变得必要。服务治理也与技术架构本身息息相关。
4 |
5 | 如果服务属于单体结构,服务治理的挑战更多是当单体架构由于承载的业务庞大,服务内部逻辑变得复杂,扩展性也变差。这时候往往不需要特别的服务治理手段,而是将单体服务拆分为微服务,即完成”微服务化“,将原有单体服务架构向微服务架构演进。业务服务演进到微服务架构后,服务治理问题是否就此终结?远远没有。在微服务架构下,出现了新的服务问题,从而需要对微服务进行服务治理。那微服务又有哪些问题需要治理?
6 |
7 | 1、服务注册与发现。单体服务拆分为微服务后,如果微服务之间存在调用依赖,就需要得到目标服务的服务地址,也就是微服务治理的”服务发现“。要完成服务发现,就需要将服务信息存储到某个载体,载体本身即是微服务治理的”服务注册中心“,而存储到载体的动作即是”服务注册“。
8 |
9 | 2、可观测性。微服务由于较单体应用有了更多的部署载体,需要对众多服务间的调用关系、状态有清晰的掌控。可观测性就包括了调用拓扑关系、监控(Metrics)、日志(Logging)、调用追踪(Trace)等。
10 |
11 | 3、流量管理。由于微服务本身存在不同版本,在版本更迭过程中,需要对微服务间调用进行控制,以完成微服务版本更迭的平滑。这一过程中需要根据流量的特征(访问参数等)、百分比向不同版本服务分发,这也孵化出灰度发布、蓝绿发布、A/B 测试等服务治理的细分主题。
12 |
13 | 4、安全。不同微服务承载自身独有的业务职责,对于业务敏感的微服务,需要对其他服务的访问进行认证与鉴权,也就是安全问题。
14 |
15 | 5、控制。对服务治理能力充分建设后,就需要有足够的控制能力,能实时进行服务治理策略向微服务分发。
16 |
--------------------------------------------------------------------------------
/02~微服务 RPC/01~RPC 基础/性能对比.md:
--------------------------------------------------------------------------------
1 | # 性能对比
2 |
3 | 既然有 HTTP 请求可以解决系统间调用的问题了,为什么还会有人使用 RPC 调用?题主明显是只看到现状,而忽略了两种远程请求调用的历史进程。RPC 在 1984 年就被人用来做分布式系统的通信,Java 在 1.1 版本提供了 Java 版本的 RPC 框架(RMI),而 HTTP 协议在 1990 年才开始作为主流协议出现,而且 HTTP 发明的场景是用于 web 架构,而不是分布式系统间通信,这导致了在很长一段时间内,HTTP 都是浏览器程序和后端 web 系统通信用的东西,上面的文档格式都是 HTML(非常啰嗦),没有人会把 HTTP 作为分布式系统通信的协议。在很长一段时间内,RPC 才是正统。随着前端技术的发展,AJAX 技术和 JSON 文档在前端界逐渐成为主流,HTTP 调用才摆脱 HTML,开始使用 JSON 这一相对简洁的文档格式,为后面用于系统间调用定下基础。最后随着 RESTFUL 思潮的兴起,越来越多系统考虑用 HTTP 来提供服务,但这时候,RPC 已经是各种大型分布式调用的标配了。所以题主的问题真正应该要反过来问,既然有 RPC 了,为什么还要有 HTTP 请求?这个问题不难回答,因为现在大部分的系统都是给浏览器使用的,因此 HTTP 协议必不可少,而这大部分系统中的绝大部分,对于后端系统间调用的性能都是要求不高的,毕竟走的都是内网,它们关心的是前端和后端的性能,因此后端系统间调用如果能够采用和前端一样的技术栈,那无疑是维护成本最低的,而这时 HTTP 的技术生态也刚好满足这个条件,所以就星星之火可以燎原了。那么对于少数的部分系统,他们需要使用 RPC,一可能是老架构,也不敢动这块,二是性能要求可能只有 RPC 可以满足。就我个人而言,我所任职的公司的云平台也早就统一要求走 HTTP 了,性能,有别的路可以想办法,而且 HTTP2 也有了很大改进了。
4 |
5 | # Links
6 |
7 | - https://www.perimeterx.com/tech-blog/2020/rpc-olympics/
8 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__com_fasterxml_jackson_datatype_jackson_datatype_jdk8_2_11_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__org_mybatis_spring_boot_mybatis_spring_boot_starter_1_3_2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/order-service/src/main/resources/application.yml:
--------------------------------------------------------------------------------
1 | spring:
2 | application:
3 | name: order
4 | datasource:
5 | driver-class-name: com.mysql.cj.jdbc.Driver
6 | url: jdbc:mysql://localhost/seata_order?useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2B8
7 | username: seata
8 | password: seata
9 | cloud:
10 | alibaba:
11 | seata:
12 | tx-service-group: order_tx_group
13 | server:
14 | port: 8083
15 | eureka:
16 | client:
17 | service-url:
18 | defaultZone: http://localhost:8761/eureka
19 | instance:
20 | prefer-ip-address: true
21 | mybatis:
22 | configuration:
23 | map-underscore-to-camel-case: true
24 | mapper-locations: classpath:mapper/*Mapper.xml
25 | logging:
26 | level:
27 | pers.kerry.seata.demo.orderservice.mapper: debug
28 | #ribbon:
29 | # ReadTimeout: 10000
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_2_3_2_RELEASE.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__org_springframework_spring_context_support_5_2_8_RELEASE.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__com_fasterxml_jackson_dataformat_jackson_dataformat_xml_2_11_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__com_fasterxml_jackson_datatype_jackson_datatype_jsr310_2_11_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__org_springframework_boot_spring_boot_actuator_2_3_2_RELEASE.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__com_vaadin_external_google_android_json_0_0_20131108_vaadin1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_commons_2_2_3_RELEASE.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_context_2_2_3_RELEASE.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_starter_2_2_3_RELEASE.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__com_fasterxml_jackson_dataformat_jackson_dataformat_cbor_2_11_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__com_alibaba_cloud_spring_cloud_alibaba_seata_2_0_0_RELEASE.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__org_springframework_security_spring_security_rsa_1_0_9_RELEASE.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_aop_2_3_2_RELEASE.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_web_2_3_2_RELEASE.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__org_mybatis_spring_boot_mybatis_spring_boot_autoconfigure_1_3_2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_jdbc_2_3_2_RELEASE.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/03~微服务模式/分布式事务/事务框架/Seata/02~多事务模式/TCC/88~examples/2019~seata-tcc-demo/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_json_2_3_2_RELEASE.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------