[GitHub] WillemJiang commented on a change in pull request #581: [SCB-378] add readme document for samples
WillemJiang commented on a change in pull request #581: [SCB-378] add readme document for samples URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/581#discussion_r173614748 ## File path: samples/auth-sample/README.md ## @@ -0,0 +1,82 @@ +## Auth-Sample + +To make sure the security between the interfaces of services, users can enable `RSA Authorizaiton` by simple configuration as below. + +## Consumer Service + +* Add dependence in pom.xml file: + + ```xml + +org.apache.servicecomb +handler-publickey-auth + + ``` + +* Add handler chain in microservice.yaml: + + ```yaml + cse: +# other configurations omitted +handler: + chain: +Consumer: + default: auth-consumer + ``` + +## Provider Service + +* Add dependence in pom.xml file: + + ```xml + +org.apache.servicecomb +handler-publickey-auth + + ``` + +* Add handler chain in microservice.yaml: + + ```yaml + cse: +# other configurations omitted +handler: + chain: +Consumer: + default: auth-provider + ``` + +## Sample Quick Start + +Auth sample use `RestTemplate` to present RSA communication between provider and consumer. + +1. Start the ServiceComb/Service Center + + - [how to start the service center](http://servicecomb.incubator.apache.org/users/setup-environment/#) + - make sure service center address is configured correctly in `microservice.yaml` file + + ```yaml + cse: + service: + registry: + address: http://127.0.0.1:30100 #service center address + ``` + +2. Start the auth-provider service + + - Start provider service by mvn + + ```bash + cd incubator-servicecomb-java-chassis/ + mvn clean install -Psamples -DskipTests #only need to install at first time. Review comment: when the people see this readme, he is in the sample directory, using the mvn clean install to compile to code. But if he wants to run main from maven , he need to know the main class name, we need to tell user for the auth-consumer at the same time. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] WillemJiang closed pull request #582: SCB-380 Added incubating to file name of the release kit
WillemJiang closed pull request #582: SCB-380 Added incubating to file name of the release kit URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/582 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] coveralls commented on issue #581: [SCB-378] add readme document for samples
coveralls commented on issue #581: [SCB-378] add readme document for samples URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/581#issuecomment-371753636 [![Coverage Status](https://coveralls.io/builds/15906550/badge)](https://coveralls.io/builds/15906550) Coverage increased (+0.02%) to 87.206% when pulling **965e2787d1191f90ec8d25f292dd9d43b1687f41 on lijasonvip:sample-readme** into **68c4d0e3425537eb24ab18335f43b37ae9e01ee1 on apache:master**. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] coveralls commented on issue #581: [SCB-378] add readme document for samples
coveralls commented on issue #581: [SCB-378] add readme document for samples URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/581#issuecomment-371753636 [![Coverage Status](https://coveralls.io/builds/15906539/badge)](https://coveralls.io/builds/15906539) Coverage increased (+0.02%) to 87.206% when pulling **965e2787d1191f90ec8d25f292dd9d43b1687f41 on lijasonvip:sample-readme** into **68c4d0e3425537eb24ab18335f43b37ae9e01ee1 on apache:master**. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] coveralls commented on issue #583: [SCB-381] Fix foundation-vertx UT failure
coveralls commented on issue #583: [SCB-381] Fix foundation-vertx UT failure URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/583#issuecomment-372002113 [![Coverage Status](https://coveralls.io/builds/15906123/badge)](https://coveralls.io/builds/15906123) Coverage remained the same at 87.183% when pulling **c8dc6009d46aae22acfe1b6d42ed1adff1e70759 on yangbor:master** into **68c4d0e3425537eb24ab18335f43b37ae9e01ee1 on apache:master**. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] yangbor opened a new pull request #583: [SCB-381] Fix foundation-vertx UT failure
yangbor opened a new pull request #583: [SCB-381] Fix foundation-vertx UT failure URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/583 Vertx uses some static fields which will cause problems if resued. Disabled surefire fork for foundation-vertx to avoid this issue. Follow this checklist to help us incorporate your contribution quickly and easily: - [ ] Make sure there is a [JIRA issue](https://issues.apache.org/jira/browse/SCB) filed for the change (usually before you start working on it). Trivial changes like typos do not require a JIRA issue. Your pull request should address just this issue, without pulling in other changes. - [ ] Each commit in the pull request should have a meaningful subject line and body. - [ ] Format the pull request title like `[SCB-XXX] Fixes bug in ApproximateQuantiles`, where you replace `SCB-XXX` with the appropriate JIRA issue. - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [ ] Run `mvn clean install` to make sure basic checks pass. A more thorough check will be performed on your pull request automatically. - [ ] If this contribution is large, please file an Apache [Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf). --- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
Re: A question about ACID guarantees Saga provides
Well, Saga actually provides guarantee of ACD. You can checkout Chris Richardson's latest talk of saga[1] for details. In the original saga paper[2], it mentions that > At the outer level full atomicity is not provided. That is, sagas may view > the partial results of other sagas. > According to the ACID definition[3], it shows saga does not provide isolation guarantee instead of atomicity as all sub transactions within a global transaction is either done or compensated. For each global transaction, it will have both SagaStartedEvent and SagaEndedEvent while for each sub transaction, it will have TxStartedEvent and either TxEndedEvent or TxCompensatedEvent. If the global transaction succeeds, saga guarantees that all sub transactions will have both TxStartedEvent and TxEndedEvent. If the global transaction fails, saga guarantees that all completed sub transactions are compensated and hence have all of TxStartedEvent, TxEndedEvent, TxCompensatedEvent. In this way, we can guarantee the consistency. Besides, the implementation of saga coordinator is stateless, all saga event logs are stored in persistent storage. In this way, we can guarantee the durability. BTW, we have refactored the saga lately. The architecture in the blog you saw is outdated. You can checkout its latest implementation from [4]. If you have any questions or advice for our new architecture, welcome to point them out. [1] https://www.infoq.com/presentations/saga-microservices [2] https://www.cs.cornell.edu/andru/cs711/2002fa/reading/sagas.pdf [3] https://en.wikipedia.org/wiki/ACID [4] https://github.com/apache/incubator-servicecomb-saga Best Regards! Eric Lee 2018-03-09 15:59 GMT+08:00 Daniel Qian : > Hello guys: > > I read the amazing blog "Eventual Data Consistency Solution in ServiceComb > - part 2" and I'm kind of confused about these two statements: > > > Saga does not provide ACID guarantee, because atomicity and isolation are > not satisfied > > > With durable saga log, saga guarantees consistency and durability > > I guess the first statement is talking about how so called "Transaction" > behaves in **Saga pattern**. > > And the second statement is talking about the implementation of Saga's > state store. But that's a little strange to say "Saga provides C and D > because it's state store provides C and D". > > I think Saga pattern actually does not guarantee either of A, C, I or D. Am > I right? > > > -- > > > > Daniel Qian >
License and Notice files checking
Hi Mentors, I just listed all the License and Notice files of the ServiceComb projects, please have a quick look if you have time. 1. ServiceCenter Source: LICENSE https://github.com/apache/incubator-servicecomb-service- center/blob/master/LICENSE NOTICE https://github.com/apache/incubator-servicecomb-service- center/blob/master/NOTICE Binary: LICENSE https://github.com/apache/incubator-servicecomb-service- center/blob/master/scripts/release/LICENSE NOTICE https://github.com/apache/incubator-servicecomb-service- center/blob/master/scripts/release/NOTICE 2. JavaChassis Source: LICENSE https://github.com/apache/incubator-servicecomb-java-chassis/blob/master/LICENSE NOTICE https://github.com/apache/incubator-servicecomb-java-chassis/blob/master/NOTICE Binary: LICENSE https://github.com/apache/incubator-servicecomb-java-chassis/blob/master/java-chassis-distribution/src/release/LICENSE NOTICE https://github.com/apache/incubator-servicecomb-java-chassis/blob/master/java-chassis-distribution/src/release/NOTICE 3. Saga Source: LICENSE https://github.com/apache/incubator-servicecomb-saga/blob/master/LICENSE NOTICE https://github.com/apache/incubator-servicecomb-saga/blob/master/NOTICE Binary: LICENSE https://github.com/apache/incubator-servicecomb-saga/blob/master/saga-distribution/src/release/LICENSE NOTICE https://github.com/apache/incubator-servicecomb-saga/blob/master/saga-distribution/src/release/NOTICE Willem Jiang Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem
[GitHub] WillemJiang closed pull request #148: SCB-380 Added incubating to the file name of release kit
WillemJiang closed pull request #148: SCB-380 Added incubating to the file name of release kit URL: https://github.com/apache/incubator-servicecomb-saga/pull/148 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] coveralls commented on issue #582: SCB-380 Added incubating to file name of the release kit
coveralls commented on issue #582: SCB-380 Added incubating to file name of the release kit URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/582#issuecomment-371837192 [![Coverage Status](https://coveralls.io/builds/15895068/badge)](https://coveralls.io/builds/15895068) Coverage remained the same at 87.206% when pulling **e793212e2d4e307546a7c0ba88b5007a109abdf4 on SCB-380** into **68c4d0e3425537eb24ab18335f43b37ae9e01ee1 on master**. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] lijasonvip commented on a change in pull request #581: [SCB-378] add readme document for samples
lijasonvip commented on a change in pull request #581: [SCB-378] add readme document for samples URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/581#discussion_r173472817 ## File path: samples/auth-sample/README.md ## @@ -0,0 +1,59 @@ +## Auth-Sample + +To make sure the security between the interfaces of services, users can enable `RSA Authorizaiton` by simple configuration as below. + +## Consumer Service + +* Add dependence in pom.xml file: + + ```xml + +org.apache.servicecomb +handler-publickey-auth + + ``` + +* Add handler chain in microservice.yaml: + + ```yaml + cse: +# other configurations omitted +handler: + chain: +Consumer: + default: auth-consumer + ``` + +## Provider Service + +* Add dependence in pom.xml file: + + ```xml + +org.apache.servicecomb +handler-publickey-auth + + ``` + +* Add handler chain in microservice.yaml: + + ```yaml + cse: +# other configurations omitted +handler: + chain: +Consumer: + default: auth-provider + ``` + +## Sample Quick Start + +Auth sample use `RestTemplate` to present RSA communication between provider and consumer. + +* Start ServiceComb/Service Center + + [how to start service center](http://servicecomb.incubator.apache.org/users/setup-environment/#) + +* Start auth-provider Review comment: ok, will do that ASAP. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] coveralls commented on issue #148: SCB-380 Added incubating to the file name of release kit
coveralls commented on issue #148: SCB-380 Added incubating to the file name of release kit URL: https://github.com/apache/incubator-servicecomb-saga/pull/148#issuecomment-371828997 [![Coverage Status](https://coveralls.io/builds/15894619/badge)](https://coveralls.io/builds/15894619) Coverage increased (+0.3%) to 95.504% when pulling **738bcc665f16f9fe246877ca109dd718de93338e on SCB-380** into **e5dd6df0e19cc200df30e1bfddb2fff5c47ec4b5 on master**. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] WillemJiang opened a new pull request #148: SCB-380 Added incubating to the file name of release kit
WillemJiang opened a new pull request #148: SCB-380 Added incubating to the file name of release kit URL: https://github.com/apache/incubator-servicecomb-saga/pull/148 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] WillemJiang opened a new pull request #582: SCB-380 Added incubating to file name of the release kit
WillemJiang opened a new pull request #582: SCB-380 Added incubating to file name of the release kit URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/582 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] WillemJiang closed pull request #147: SCB-330 add guides to run executable alpha server
WillemJiang closed pull request #147: SCB-330 add guides to run executable alpha server URL: https://github.com/apache/incubator-servicecomb-saga/pull/147 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/alpha/alpha-server/src/main/java/org/apache/servicecomb/saga/alpha/server/SpringTxTimeoutRepository.java b/alpha/alpha-server/src/main/java/org/apache/servicecomb/saga/alpha/server/SpringTxTimeoutRepository.java index ee754969..71951393 100644 --- a/alpha/alpha-server/src/main/java/org/apache/servicecomb/saga/alpha/server/SpringTxTimeoutRepository.java +++ b/alpha/alpha-server/src/main/java/org/apache/servicecomb/saga/alpha/server/SpringTxTimeoutRepository.java @@ -19,15 +19,19 @@ import static org.apache.servicecomb.saga.alpha.core.TaskStatus.PENDING; +import java.lang.invoke.MethodHandles; import java.util.List; import javax.transaction.Transactional; import org.apache.servicecomb.saga.alpha.core.TxTimeout; import org.apache.servicecomb.saga.alpha.core.TxTimeoutRepository; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.data.domain.PageRequest; public class SpringTxTimeoutRepository implements TxTimeoutRepository { + private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); private final TxTimeoutEntityRepository timeoutRepo; SpringTxTimeoutRepository(TxTimeoutEntityRepository timeoutRepo) { @@ -36,7 +40,11 @@ @Override public void save(TxTimeout timeout) { -timeoutRepo.save(timeout); +try { + timeoutRepo.save(timeout); +} catch (Exception ignored) { + log.warn("Failed to save some timeout {}", timeout); +} } @Override diff --git a/docs/faq/cn/how_to_use_mysql_as_alpha_backend_database.md b/docs/faq/cn/how_to_use_mysql_as_alpha_backend_database.md index 891a1244..f241b36f 100644 --- a/docs/faq/cn/how_to_use_mysql_as_alpha_backend_database.md +++ b/docs/faq/cn/how_to_use_mysql_as_alpha_backend_database.md @@ -8,5 +8,27 @@ mysql-connector-java ``` + +2. ??Saga + ```bash + mvn clean install -Pdocker -DskipTests + ``` + ??alpha-server?`alpha/alpha-server/target/saga/alpha-server-${version}-exec.jar`? + **??**: ???docker`mvn clean install -DskipTests`??? + **??**: ?alpha-server?docker? -2. ?alpha???`-Dspring.profiles.active=mysql`???mysql?? +3. ??MySQL + ```bash + docker run -d -e "MYSQL_ROOT_PASSWORD=password" "-e "MYSQL_DATABASE=saga" -e "MYSQL_USER=saga" -e "MYSQL_PASSWORD=password" -p 3306:3306 mysql/mysql-server:5.7 + ``` + +4. ??alphaMySQL?alpha??docker?? + * ??docker + ```bash + docker run -d -p 8090:8090 -e "JAVA_OPTS=-Dspring.profiles.active=mysql -Dspring.datasource.url=jdbc:mysql://${host_address}:3306/saga?useSSL=false" alpha-server:${saga_version} + ``` + * ??? + ```bash + java -Dspring.profiles.active=mysql -D"spring.datasource.url=jdbc:mysql://${host_address}:3306/saga?useSSL=false" -jar alpha-server-${saga_version}-exec.jar + ``` + **??**: `${saga_version}`?`${host_address}`??? diff --git a/docs/faq/en/how_to_use_mysql_as_alpha_backend_database.md b/docs/faq/en/how_to_use_mysql_as_alpha_backend_database.md index adb44e27..2bb2954d 100644 --- a/docs/faq/en/how_to_use_mysql_as_alpha_backend_database.md +++ b/docs/faq/en/how_to_use_mysql_as_alpha_backend_database.md @@ -8,5 +8,27 @@ mysql-connector-java ``` - -2. activate mysql profile by specifying option `-Dspring.profiles.active=mysql` when booting alpha. \ No newline at end of file + +2. install Saga + ```bash + mvn clean install -Pdocker -DskipTests + ``` + After that, you will find the generated docker image `alpha-server` and executable file `alpha/alpha-server/target/saga/alpha-server-${version}-exec.jar`. + **Notice**: If you do not want to build the docker image, run `mvn clean install -DskipTests` is enough. + **Notice**: If you have installed saga with docker before, you need to remove the alpha-server's docker image first. + +3. run MySQL + ```bash + docker run -d -e "MYSQL_ROOT_PASSWORD=password" "-e "MYSQL_DATABASE=saga" -e "MYSQL_USER=saga" -e "MYSQL_PASSWORD=password" -p 3306:3306 mysql/mysql-server:5.7 + ``` + +4. Run alpha. Please make sure MySQL is up before this step. You can run alpha through docker or executable file. + * via docker + ```bash + docker run -d -p 8090:8090 -e "JAVA_OPTS=-Dspring.profiles.active=mysql -Dspring.datasource.url=jdbc:mysql://${host_address}:3306/saga?useSSL=false" alpha-server:${saga_version} + ``` + * via executable file + ```bash + j
[GitHub] WillemJiang commented on a change in pull request #581: [SCB-378] add readme document for samples
WillemJiang commented on a change in pull request #581: [SCB-378] add readme document for samples URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/581#discussion_r173435289 ## File path: samples/auth-sample/README.md ## @@ -0,0 +1,59 @@ +## Auth-Sample + +To make sure the security between the interfaces of services, users can enable `RSA Authorizaiton` by simple configuration as below. + +## Consumer Service + +* Add dependence in pom.xml file: + + ```xml + +org.apache.servicecomb +handler-publickey-auth + + ``` + +* Add handler chain in microservice.yaml: + + ```yaml + cse: +# other configurations omitted +handler: + chain: +Consumer: + default: auth-consumer + ``` + +## Provider Service + +* Add dependence in pom.xml file: + + ```xml + +org.apache.servicecomb +handler-publickey-auth + + ``` + +* Add handler chain in microservice.yaml: + + ```yaml + cse: +# other configurations omitted +handler: + chain: +Consumer: + default: auth-provider + ``` + +## Sample Quick Start + +Auth sample use `RestTemplate` to present RSA communication between provider and consumer. + +* Start ServiceComb/Service Center + + [how to start service center](http://servicecomb.incubator.apache.org/users/setup-environment/#) + +* Start auth-provider Review comment: Please specify the command that we need to use to start the provider and consumer. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] WillemJiang closed pull request #580: [SCB-6] add metrics samples readme
WillemJiang closed pull request #580: [SCB-6] add metrics samples readme URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/580 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/samples/README.md b/samples/README.md index 1656e85fd..dc2fa0562 100644 --- a/samples/README.md +++ b/samples/README.md @@ -6,6 +6,8 @@ It's the samples of Java chassis 3. spring mvc sample 4. code first sample 5. customer handler sample +6. extend metrics health checker sample +7. write metrics data into separate text files sample ## 1. Start the ServiceComb/Service Center diff --git a/samples/metrics-extend-healthcheck/README.md b/samples/metrics-extend-healthcheck/README.md new file mode 100644 index 0..7abd17311 --- /dev/null +++ b/samples/metrics-extend-healthcheck/README.md @@ -0,0 +1,47 @@ +# Extend Metrics Health Checker Sample +## What is Health Checker +Because micro-services is desgin by SRP(Single Responsibility Principle),one micro-service always depend on many components such as middle-ware like queue,database etc and other micro-services,so if one micro-service report failure,we want fast know what is the cause and more details to help us solve the problem. + +Health check mechanism can let user write some logic to check components of micro-service dependent and return check result. + +## How to use +### Add your checker implementation +Implement *org.apache.servicecomb.foundation.metrics.health.HealthChecker* interface: +```java +public interface HealthChecker { + String getName(); + + HealthCheckResult check(); +} +``` + +Then add the implementation class into **META-INF.service.org.apache.servicecomb.foundation.metrics.health.HealthChecker** by SPI(Service Provider Interface) way + +In this demo,we had make two checkers : +1. CustomHealthChecker + always return true checker +2. MySqlHealthChecker + sim check mysql can connect checker + +### Add Dependency in POM +```xml + + org.apache.servicecomb + metrics-core + {version} + +``` + +### Do check and get result +If you had config rest transport address in microservice.yaml like: +```yaml +cse: + rest: +address: 0.0.0.0: +``` + +Then you can invoke http://{serverip}:/health get summary check result : true or false. + +**Only all registered health checker confirm isHealthy=true,the summary check result will be true,otherwise false** + +Also can invoke http://{serverip}:/health/details get details of each health checker reported. \ No newline at end of file diff --git a/samples/metrics-write-file-sample/README.md b/samples/metrics-write-file-sample/README.md new file mode 100644 index 0..b6e041636 --- /dev/null +++ b/samples/metrics-write-file-sample/README.md @@ -0,0 +1,18 @@ +# Write Metrics Data into Separate Text Files Sample +## Purpose +This sample show how direct get metrics data and write them into separate text files,then other monitor system can load this file in order to get run state of micro-service. + +## What Contains +### metrics-write-file Module +This module contains the code how poll Monitors data from MonitorManager and convert data to a special format,then write into files. + +**We had designed that will use common Logging component for write file**,and there are many logging implements like log4j,log4j2,logback etc...,so we create *MetricsFileWriter* interface for later autowire. + +### metrics-write-file-log4j2-springboot Module +This module contain log4j2 MetricsFileWriter implement if your project use it as Logging component. + +### metrics-write-file-log4j-springboot Module +This module contain log4j MetricsFileWriter implement if your project use it as Logging component. + +## How to use +Startup ServiceApplication in metrics-write-file-log4j2-springboot or metrics-write-file-log4j-springboot,you can see metric files had generated in **target/metric** folder,open your browser and make a request to http://localhost:8080/f ,wait a moment then you can see invocation metric files also be generated. \ No newline at end of file This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] WillemJiang closed pull request #579: [SCB-29] add README document for config-apollo
WillemJiang closed pull request #579: [SCB-29] add README document for config-apollo URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/579 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/samples/config-apollo-sample/README.md b/samples/config-apollo-sample/README.md new file mode 100644 index 0..398b82676 --- /dev/null +++ b/samples/config-apollo-sample/README.md @@ -0,0 +1,42 @@ +## Use Apollo as Configuration Center + +To use Apollo as configuration source in ServiceComb Java Chassis services: + +* Start Apollo service and create a project to associate with Chassis service, then generate a token + + [How to use Apollo configuration center](http://servicecomb.incubator.apache.org/cn/users/dynamic-config/) + + +* Import `config-apollo` in pom: + + ```xml + +org.apache.servicecomb +config-apollo + + ``` + +* Configurations for Apollo itself in `microservice.yaml`, for example: + + ```yaml + apollo: +config: + serverUri: http://127.0.0.1:8070 #Apollo portal server address + serviceName: apollo-test #service name + env: DEV #default valueDEV + clusters: test-cluster #default value default + namespace: application #default value application + token: #get token from Apollo web pages + ``` + +* Start Chassis service and update configurations in Apollo portal service. + + [Need to start service center first](http://servicecomb.incubator.apache.org/users/setup-environment/#) + + +## More + +[Apollo Doc](https://github.com/ctripcorp/apollo/wiki) + +[Use Apollo In ServiceComb](http://servicecomb.incubator.apache.org/cn/users/dynamic-config/) + This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] coveralls commented on issue #581: [SCB-378] add readme document for samples
coveralls commented on issue #581: [SCB-378] add readme document for samples URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/581#issuecomment-371753636 [![Coverage Status](https://coveralls.io/builds/15890582/badge)](https://coveralls.io/builds/15890582) Coverage remained the same at 87.183% when pulling **15565b68b85afa13eef926d5a7d86c420576a109 on lijasonvip:sample-readme** into **e1137b4002659d3a7e482d3ed4b7a6f226054798 on apache:master**. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] coveralls commented on issue #581: [SCB-378] add readme document for samples
coveralls commented on issue #581: [SCB-378] add readme document for samples URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/581#issuecomment-371753636 [![Coverage Status](https://coveralls.io/builds/15890393/badge)](https://coveralls.io/builds/15890393) Coverage remained the same at 87.183% when pulling **15565b68b85afa13eef926d5a7d86c420576a109 on lijasonvip:sample-readme** into **e1137b4002659d3a7e482d3ed4b7a6f226054798 on apache:master**. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] coveralls commented on issue #581: [SCB-378] add readme document for samples
coveralls commented on issue #581: [SCB-378] add readme document for samples URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/581#issuecomment-371753636 [![Coverage Status](https://coveralls.io/builds/15890358/badge)](https://coveralls.io/builds/15890358) Coverage increased (+0.02%) to 87.206% when pulling **15565b68b85afa13eef926d5a7d86c420576a109 on lijasonvip:sample-readme** into **e1137b4002659d3a7e482d3ed4b7a6f226054798 on apache:master**. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] coveralls commented on issue #581: [SCB-378] add readme document for samples
coveralls commented on issue #581: [SCB-378] add readme document for samples URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/581#issuecomment-371753636 [![Coverage Status](https://coveralls.io/builds/15890291/badge)](https://coveralls.io/builds/15890291) Coverage increased (+0.02%) to 87.206% when pulling **15565b68b85afa13eef926d5a7d86c420576a109 on lijasonvip:sample-readme** into **e1137b4002659d3a7e482d3ed4b7a6f226054798 on apache:master**. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] coveralls commented on issue #578: SCB-373 change Rest args code/encoding to HttpClientFilter/HttpServer?
coveralls commented on issue #578: SCB-373 change Rest args code/encoding to HttpClientFilter/HttpServer? URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/578#issuecomment-371492044 [![Coverage Status](https://coveralls.io/builds/15890184/badge)](https://coveralls.io/builds/15890184) Coverage increased (+0.04%) to 87.21% when pulling **4df15a05c578331118ce62618d5f92ff0b7ec3f5 on hwcse:SCB-373** into **c3010365254b64d344694277f777c43f5b02116c on apache:master**. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] lijasonvip opened a new pull request #581: [ SCB-378] add readme document for samples
lijasonvip opened a new pull request #581: [ SCB-378] add readme document for samples URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/581 Follow this checklist to help us incorporate your contribution quickly and easily: - [ ] Make sure there is a [JIRA issue](https://issues.apache.org/jira/browse/SCB) filed for the change (usually before you start working on it). Trivial changes like typos do not require a JIRA issue. Your pull request should address just this issue, without pulling in other changes. - [ ] Each commit in the pull request should have a meaningful subject line and body. - [ ] Format the pull request title like `[SCB-XXX] Fixes bug in ApproximateQuantiles`, where you replace `SCB-XXX` with the appropriate JIRA issue. - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [ ] Run `mvn clean install` to make sure basic checks pass. A more thorough check will be performed on your pull request automatically. - [ ] If this contribution is large, please file an Apache [Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf). --- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
A question about ACID guarantees Saga provides
Hello guys: I read the amazing blog "Eventual Data Consistency Solution in ServiceComb - part 2" and I'm kind of confused about these two statements: > Saga does not provide ACID guarantee, because atomicity and isolation are not satisfied > With durable saga log, saga guarantees consistency and durability I guess the first statement is talking about how so called "Transaction" behaves in **Saga pattern**. And the second statement is talking about the implementation of Saga's state store. But that's a little strange to say "Saga provides C and D because it's state store provides C and D". I think Saga pattern actually does not guarantee either of A, C, I or D. Am I right? -- Daniel Qian