[jira] [Commented] (SCB-379) Support Spring AsyncRestTemplate

2018-04-03 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/SCB-379?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16425005#comment-16425005
 ] 

ASF GitHub Bot commented on SCB-379:


coveralls commented on issue #594: [SCB-379] support AsyncRestTemplate
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/594#issuecomment-372952656
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/16331850/badge)](https://coveralls.io/builds/16331850)
   
   Coverage increased (+0.05%) to 87.605% when pulling 
**9d470b19def63b19fb2bab968689edbfbaea4dc1 on lijasonvip:async** into 
**e0891a92a7d97f7b7a9a7402ac38128246729e83 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


> Support Spring AsyncRestTemplate
> 
>
> Key: SCB-379
> URL: https://issues.apache.org/jira/browse/SCB-379
> Project: Apache ServiceComb
>  Issue Type: New Feature
>Reporter: Bo Li
>Assignee: Bo Li
>Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-379) Support Spring AsyncRestTemplate

2018-04-03 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/SCB-379?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16425004#comment-16425004
 ] 

ASF GitHub Bot commented on SCB-379:


coveralls commented on issue #594: [SCB-379] support AsyncRestTemplate
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/594#issuecomment-372952656
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/16331937/badge)](https://coveralls.io/builds/16331937)
   
   Coverage increased (+0.05%) to 87.605% when pulling 
**9d470b19def63b19fb2bab968689edbfbaea4dc1 on lijasonvip:async** into 
**e0891a92a7d97f7b7a9a7402ac38128246729e83 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


> Support Spring AsyncRestTemplate
> 
>
> Key: SCB-379
> URL: https://issues.apache.org/jira/browse/SCB-379
> Project: Apache ServiceComb
>  Issue Type: New Feature
>Reporter: Bo Li
>Assignee: Bo Li
>Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-379) Support Spring AsyncRestTemplate

2018-04-03 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/SCB-379?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16424997#comment-16424997
 ] 

ASF GitHub Bot commented on SCB-379:


wujimin commented on a change in pull request #594: [SCB-379] support 
AsyncRestTemplate
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/594#discussion_r179024800
 
 

 ##
 File path: 
providers/provider-springmvc/src/main/java/org/apache/servicecomb/provider/springmvc/reference/async/CseAsyncClientHttpRequest.java
 ##
 @@ -0,0 +1,93 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.servicecomb.provider.springmvc.reference.async;
+
+import java.io.OutputStream;
+import java.net.URI;
+import java.util.concurrent.CompletableFuture;
+
+import org.apache.servicecomb.common.rest.RestConst;
+import org.apache.servicecomb.core.Invocation;
+import org.apache.servicecomb.core.invocation.InvocationFactory;
+import org.apache.servicecomb.core.provider.consumer.InvokerUtils;
+import 
org.apache.servicecomb.provider.springmvc.reference.CseClientHttpRequest;
+import 
org.apache.servicecomb.provider.springmvc.reference.CseClientHttpResponse;
+import org.apache.servicecomb.swagger.invocation.Response;
+import org.springframework.http.HttpMethod;
+import org.springframework.http.client.AsyncClientHttpRequest;
+import org.springframework.http.client.ClientHttpResponse;
+import 
org.springframework.util.concurrent.CompletableToListenableFutureAdapter;
+import org.springframework.util.concurrent.ListenableFuture;
+
+import io.netty.handler.codec.http.QueryStringDecoder;
+
+public class CseAsyncClientHttpRequest extends CseClientHttpRequest implements 
AsyncClientHttpRequest {
+
+  CseAsyncClientHttpRequest() {
+  }
+
+  CseAsyncClientHttpRequest(URI uri, HttpMethod method) {
+this.setUri(uri);
+this.setMethod(method);
+  }
+
+  @Override
+  public OutputStream getBody() {
+return null;
+  }
+
+  @SuppressWarnings("unchecked")
+  private ListenableFuture invoke(Object[] args) {
+Invocation invocation =
+
InvocationFactory.forConsumer(this.getRequestMeta().getReferenceConfig(),
+this.getRequestMeta().getOperationMeta(),
+args);
+invocation.getHandlerContext().put(RestConst.REST_CLIENT_REQUEST_PATH,
+this.getPath() + "?" + this.getURI().getRawQuery());
+
+if (this.getContext() != null) {
+  invocation.addContext(this.getContext());
+}
+invocation.getHandlerContext().put(RestConst.CONSUMER_HEADER, 
this.getHeaders());
+CompletableFuture clientHttpResponseCompletableFuture 
= doAsyncInvoke(invocation);
+return new 
CompletableToListenableFutureAdapter(clientHttpResponseCompletableFuture);
 
 Review comment:
   CompletableToListenableFutureAdapter.addCallback handled this scenes, there 
is no problem.


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


> Support Spring AsyncRestTemplate
> 
>
> Key: SCB-379
> URL: https://issues.apache.org/jira/browse/SCB-379
> Project: Apache ServiceComb
>  Issue Type: New Feature
>Reporter: Bo Li
>Assignee: Bo Li
>Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Resolved] (SCB-365) when configured ssl certificates not exists, startup will hang and no error messages

2018-04-03 Thread Willem Jiang (JIRA)

 [ 
https://issues.apache.org/jira/browse/SCB-365?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Willem Jiang resolved SCB-365.
--
Resolution: Fixed

> when configured ssl certificates not exists, startup will hang and no error 
> messages
> 
>
> Key: SCB-365
> URL: https://issues.apache.org/jira/browse/SCB-365
> Project: Apache ServiceComb
>  Issue Type: Bug
>  Components: Java-Chassis
>Reporter: liubao
>Assignee: liubao
>Priority: Major
> Fix For: java-chassis-1.0.0-m1
>
>
> runnging demo of springmvc-server
>  # modify ssl.keystore to a wrong file name;
>  # start springmvc-server demo
> we will see startup is hang and no error messages is printed
>  
> Root cause anaylse:
> For HttpServer in Verticals, vert.x will create a CloseHook and execute 
> deploy callback. But HttpServer CloseHook will check if httpserver is created 
> and listen is successful. if not it will not execute deploy callback and 
> VertexUtils.blockDeploy will hang.
>  
> Solutions:
> This is not a valid scenario, so just print the exceptions and give user 
> diagnosis information is enough now. We will future to feedback to vert.x to 
> see better solution.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (SCB-365) when configured ssl certificates not exists, startup will hang and no error messages

2018-04-03 Thread Willem Jiang (JIRA)

 [ 
https://issues.apache.org/jira/browse/SCB-365?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Willem Jiang updated SCB-365:
-
Affects Version/s: (was: java-chassis-1.0.0-m1)

> when configured ssl certificates not exists, startup will hang and no error 
> messages
> 
>
> Key: SCB-365
> URL: https://issues.apache.org/jira/browse/SCB-365
> Project: Apache ServiceComb
>  Issue Type: Bug
>  Components: Java-Chassis
>Reporter: liubao
>Assignee: liubao
>Priority: Major
> Fix For: java-chassis-1.0.0-m1
>
>
> runnging demo of springmvc-server
>  # modify ssl.keystore to a wrong file name;
>  # start springmvc-server demo
> we will see startup is hang and no error messages is printed
>  
> Root cause anaylse:
> For HttpServer in Verticals, vert.x will create a CloseHook and execute 
> deploy callback. But HttpServer CloseHook will check if httpserver is created 
> and listen is successful. if not it will not execute deploy callback and 
> VertexUtils.blockDeploy will hang.
>  
> Solutions:
> This is not a valid scenario, so just print the exceptions and give user 
> diagnosis information is enough now. We will future to feedback to vert.x to 
> see better solution.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (SCB-365) when configured ssl certificates not exists, startup will hang and no error messages

2018-04-03 Thread Willem Jiang (JIRA)

 [ 
https://issues.apache.org/jira/browse/SCB-365?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Willem Jiang updated SCB-365:
-
Fix Version/s: java-chassis-1.0.0-m1

> when configured ssl certificates not exists, startup will hang and no error 
> messages
> 
>
> Key: SCB-365
> URL: https://issues.apache.org/jira/browse/SCB-365
> Project: Apache ServiceComb
>  Issue Type: Bug
>  Components: Java-Chassis
>Affects Versions: java-chassis-1.0.0-m1
>Reporter: liubao
>Assignee: liubao
>Priority: Major
> Fix For: java-chassis-1.0.0-m1
>
>
> runnging demo of springmvc-server
>  # modify ssl.keystore to a wrong file name;
>  # start springmvc-server demo
> we will see startup is hang and no error messages is printed
>  
> Root cause anaylse:
> For HttpServer in Verticals, vert.x will create a CloseHook and execute 
> deploy callback. But HttpServer CloseHook will check if httpserver is created 
> and listen is successful. if not it will not execute deploy callback and 
> VertexUtils.blockDeploy will hang.
>  
> Solutions:
> This is not a valid scenario, so just print the exceptions and give user 
> diagnosis information is enough now. We will future to feedback to vert.x to 
> see better solution.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Resolved] (SCB-304) Java chassis keep sending instance discovery log message

2018-04-03 Thread Willem Jiang (JIRA)

 [ 
https://issues.apache.org/jira/browse/SCB-304?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Willem Jiang resolved SCB-304.
--
Resolution: Fixed

> Java chassis keep sending instance discovery log message
> 
>
> Key: SCB-304
> URL: https://issues.apache.org/jira/browse/SCB-304
> Project: Apache ServiceComb
>  Issue Type: Improvement
>  Components: Java-Chassis
>Reporter: WeiChao
>Assignee: WeiChao
>Priority: Major
> Fix For: java-chassis-1.0.0-m1
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> Java chassis keep sending instance discovery log message, even the instance 
> information is not change after discovering the first instance.  
> 发现实例前sdk不打印日志,第一次发现实例后,即使实例没有变化,sdk也会不断打印发现的实例信息
>  instances revision is not changed
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (SCB-407) Company Manager integration test failure

2018-04-03 Thread Willem Jiang (JIRA)

 [ 
https://issues.apache.org/jira/browse/SCB-407?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Willem Jiang updated SCB-407:
-
Fix Version/s: java-chassis-1.0.0-m1

> Company Manager integration test failure 
> -
>
> Key: SCB-407
> URL: https://issues.apache.org/jira/browse/SCB-407
> Project: Apache ServiceComb
>  Issue Type: Bug
>  Components: Java-Chassis
>Reporter: Willem Jiang
>Assignee: Willem Jiang
>Priority: Major
> Fix For: java-chassis-1.0.0-m1
>
>
> When running the integration test of manager-tests in 
> [ServiceComb-Company-WorkShop 
> |https://github.com/ServiceComb/ServiceComb-Company-WorkShop]1.x branch , we 
> got the error here. 
> {code:java}
> 2018-03-16 08:58:21,997 [ERROR]
> Exception: org.apache.servicecomb.core.exception.CseException; No available 
> address found. microserviceName=doorman, version=latest, 
> discoveryGroupName=latest/
> ServiceDefinitionException Code:cse.lb.no.available.address, Message:No 
> available address found. microserviceName=doorman, version=latest, 
> discoveryGroupName=latest/
> at 
> org.apache.servicecomb.core.exception.ExceptionUtils.createCseException(ExceptionUtils.java:57)
> at 
> org.apache.servicecomb.core.exception.ExceptionUtils.lbAddressNotFound(ExceptionUtils.java:88)
> at 
> org.apache.servicecomb.core.handler.impl.SimpleLoadBalanceHandler.handle(SimpleLoadBalanceHandler.java:64)
> at org.apache.servicecomb.core.Invocation.next(Invocation.java:155)
> at 
> org.apache.servicecomb.core.handler.ShutdownHookHandler.handle(ShutdownHookHandler.java:68)
> at org.apache.servicecomb.core.Invocation.next(Invocation.java:155)
> at 
> org.apache.servicecomb.core.provider.consumer.InvokerUtils.innerSyncInvoke(InvokerUtils.java:65)
> at 
> org.apache.servicecomb.provider.springmvc.reference.CseClientHttpRequest.doInvoke(CseClientHttpRequest.java:168)
> at 
> org.apache.servicecomb.provider.springmvc.reference.CseClientHttpRequest.invoke(CseClientHttpRequest.java:158)
> at 
> org.apache.servicecomb.provider.springmvc.reference.CseClientHttpRequest.execute(CseClientHttpRequest.java:119)
> at 
> org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:652)
> at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:613)
> at 
> org.springframework.web.client.RestTemplate.postForEntity(RestTemplate.java:407)
> at 
> org.apache.servicecomb.provider.springmvc.reference.RestTemplateWrapper.postForEntity(RestTemplateWrapper.java:130)
> at 
> org.apache.servicecomb.company.manager.AuthenticationService.validate(AuthenticationService.java:65)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at 
> com.netflix.hystrix.contrib.javanica.command.MethodExecutionAction.execute(MethodExecutionAction.java:116)
> at 
> com.netflix.hystrix.contrib.javanica.command.MethodExecutionAction.executeWithArgs(MethodExecutionAction.java:93)
> at 
> com.netflix.hystrix.contrib.javanica.command.MethodExecutionAction.execute(MethodExecutionAction.java:78)
> at 
> com.netflix.hystrix.contrib.javanica.command.GenericCommand$1.execute(GenericCommand.java:47)
> at 
> com.netflix.hystrix.contrib.javanica.command.AbstractHystrixCommand.process(AbstractHystrixCommand.java:145)
> at 
> com.netflix.hystrix.contrib.javanica.command.GenericCommand.run(GenericCommand.java:44)
> {code}
> Here are the log information before the exception is thrown
> {code}
> 2018-03-16 08:58:21,704 [INFO] Flipping property: 
> doorman.ribbon.ActiveConnectionsLimit to use NEXT property: 
> niws.loadbalancer.availabilityFilteringRule.activeConnectionsLimit = 
> 2147483647 
> com.netflix.config.ChainedDynamicProperty$ChainLink.checkAndFlip(ChainedDynamicProperty.java:115)
> 2018-03-16 08:58:21,730 [INFO] Mapped URL path [/manager/**] onto handler of 
> type [class org.springframework.cloud.netflix.zuul.web.ZuulController] 
> org.springframework.web.servlet.handler.AbstractUrlHandlerMapping.registerHandler(AbstractUrlHandlerMapping.java:354)
> 2018-03-16 08:58:21,738 [INFO] Received request with query path: 
> /doorman/rest/path/not/exist 
> org.apache.servicecomb.company.manager.filters.AuthenticationAwareFilter.shouldFilter(AuthenticationAwareFilter.java:68)
> 2018-03-16 08:58:21,797 [INFO] Validating token 
> eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJqb3JkYW4iLCJleHAiOjE1MjEyNDgzMDJ9.Y27L6MuVjF04nI40uGYbD7q4fliibh3ZM8wD40KC9hhLfdLG4sWjgCULAsDMedElooM_YnIKxWaHKXGxVyk3UQ
>  
> org.apache.servicecomb.company.manager.AuthenticationService.validate(AuthenticationService.java:64)
> 2018-03-16 08:58:21,799 [INFO] create MicroserviceVersionRule, 

[jira] [Updated] (SCB-351) Upgrade Jackson to 2.9.4

2018-04-03 Thread Willem Jiang (JIRA)

 [ 
https://issues.apache.org/jira/browse/SCB-351?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Willem Jiang updated SCB-351:
-
Fix Version/s: java-chassis-1.0.0-m1

> Upgrade Jackson to 2.9.4
> 
>
> Key: SCB-351
> URL: https://issues.apache.org/jira/browse/SCB-351
> Project: Apache ServiceComb
>  Issue Type: Task
>  Components: Java-Chassis
>Reporter: YaoHaishi
>Assignee: YaoHaishi
>Priority: Major
> Fix For: java-chassis-1.0.0-m1
>
>
> Upgrade Jackson to 2.9.4 to avoid security risk 
> [https://nvd.nist.gov/vuln/detail/CVE-2017-17485].



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Reopened] (SCB-314) As a SDK user, i want to set the vertx compressd mode on rest transport so that I can use ServiceComb to compresse server date

2018-04-03 Thread Willem Jiang (JIRA)

 [ 
https://issues.apache.org/jira/browse/SCB-314?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Willem Jiang reopened SCB-314:
--

> As a SDK user, i want to set the vertx compressd mode on rest transport so 
> that I can use ServiceComb to compresse server date
> --
>
> Key: SCB-314
> URL: https://issues.apache.org/jira/browse/SCB-314
> Project: Apache ServiceComb
>  Issue Type: New Feature
>  Components: Java-Chassis
>Reporter: jeho0815
>Assignee: jeho0815
>Priority: Major
>  Labels: consumer
> Fix For: java-chassis-1.0.0-m1
>
>
> vertx can set server compressed mode, some one want to use this feature and 
> set the max header size 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (SCB-314) As a SDK user, i want to set the vertx compressd mode on rest transport so that I can use ServiceComb to compresse server date

2018-04-03 Thread Willem Jiang (JIRA)

 [ 
https://issues.apache.org/jira/browse/SCB-314?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Willem Jiang updated SCB-314:
-
Fix Version/s: java-chassis-1.0.0-m1

> As a SDK user, i want to set the vertx compressd mode on rest transport so 
> that I can use ServiceComb to compresse server date
> --
>
> Key: SCB-314
> URL: https://issues.apache.org/jira/browse/SCB-314
> Project: Apache ServiceComb
>  Issue Type: New Feature
>  Components: Java-Chassis
>Reporter: jeho0815
>Assignee: jeho0815
>Priority: Major
>  Labels: consumer
> Fix For: java-chassis-1.0.0-m1
>
>
> vertx can set server compressed mode, some one want to use this feature and 
> set the max header size 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (SCB-304) Java chassis keep sending instance discovery log message

2018-04-03 Thread Willem Jiang (JIRA)

 [ 
https://issues.apache.org/jira/browse/SCB-304?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Willem Jiang updated SCB-304:
-
Fix Version/s: java-chassis-1.0.0-m1

> Java chassis keep sending instance discovery log message
> 
>
> Key: SCB-304
> URL: https://issues.apache.org/jira/browse/SCB-304
> Project: Apache ServiceComb
>  Issue Type: Improvement
>  Components: Java-Chassis
>Reporter: WeiChao
>Assignee: WeiChao
>Priority: Major
> Fix For: java-chassis-1.0.0-m1
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> Java chassis keep sending instance discovery log message, even the instance 
> information is not change after discovering the first instance.  
> 发现实例前sdk不打印日志,第一次发现实例后,即使实例没有变化,sdk也会不断打印发现的实例信息
>  instances revision is not changed
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (SCB-304) Java chassis keep sending instance discovery log message

2018-04-03 Thread Willem Jiang (JIRA)

 [ 
https://issues.apache.org/jira/browse/SCB-304?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Willem Jiang updated SCB-304:
-
Fix Version/s: (was: java-chassis-1.0.0-m2)

> Java chassis keep sending instance discovery log message
> 
>
> Key: SCB-304
> URL: https://issues.apache.org/jira/browse/SCB-304
> Project: Apache ServiceComb
>  Issue Type: Improvement
>  Components: Java-Chassis
>Reporter: WeiChao
>Assignee: WeiChao
>Priority: Major
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> Java chassis keep sending instance discovery log message, even the instance 
> information is not change after discovering the first instance.  
> 发现实例前sdk不打印日志,第一次发现实例后,即使实例没有变化,sdk也会不断打印发现的实例信息
>  instances revision is not changed
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Reopened] (SCB-304) Java chassis keep sending instance discovery log message

2018-04-03 Thread Willem Jiang (JIRA)

 [ 
https://issues.apache.org/jira/browse/SCB-304?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Willem Jiang reopened SCB-304:
--

> Java chassis keep sending instance discovery log message
> 
>
> Key: SCB-304
> URL: https://issues.apache.org/jira/browse/SCB-304
> Project: Apache ServiceComb
>  Issue Type: Improvement
>  Components: Java-Chassis
>Reporter: WeiChao
>Assignee: WeiChao
>Priority: Major
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> Java chassis keep sending instance discovery log message, even the instance 
> information is not change after discovering the first instance.  
> 发现实例前sdk不打印日志,第一次发现实例后,即使实例没有变化,sdk也会不断打印发现的实例信息
>  instances revision is not changed
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Closed] (SCB-177) Support traceId in accesslog

2018-04-03 Thread Willem Jiang (JIRA)

 [ 
https://issues.apache.org/jira/browse/SCB-177?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Willem Jiang closed SCB-177.

Resolution: Fixed

> Support traceId in accesslog
> 
>
> Key: SCB-177
> URL: https://issues.apache.org/jira/browse/SCB-177
> Project: Apache ServiceComb
>  Issue Type: Sub-task
>  Components: Java-Chassis
>Reporter: YaoHaishi
>Assignee: YaoHaishi
>Priority: Minor
> Fix For: java-chassis-1.0.0-m1
>
>
> Let access log can print traceId



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (SCB-177) Support traceId in accesslog

2018-04-03 Thread Willem Jiang (JIRA)

 [ 
https://issues.apache.org/jira/browse/SCB-177?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Willem Jiang updated SCB-177:
-
Fix Version/s: java-chassis-1.0.0-m1

> Support traceId in accesslog
> 
>
> Key: SCB-177
> URL: https://issues.apache.org/jira/browse/SCB-177
> Project: Apache ServiceComb
>  Issue Type: Sub-task
>  Components: Java-Chassis
>Reporter: YaoHaishi
>Assignee: YaoHaishi
>Priority: Minor
> Fix For: java-chassis-1.0.0-m1
>
>
> Let access log can print traceId



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Reopened] (SCB-177) Support traceId in accesslog

2018-04-03 Thread Willem Jiang (JIRA)

 [ 
https://issues.apache.org/jira/browse/SCB-177?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Willem Jiang reopened SCB-177:
--

> Support traceId in accesslog
> 
>
> Key: SCB-177
> URL: https://issues.apache.org/jira/browse/SCB-177
> Project: Apache ServiceComb
>  Issue Type: Sub-task
>  Components: Java-Chassis
>Reporter: YaoHaishi
>Assignee: YaoHaishi
>Priority: Minor
>
> Let access log can print traceId



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (SCB-147) Delete 0.5.0 metrics in foundation-metrics

2018-04-03 Thread Willem Jiang (JIRA)

 [ 
https://issues.apache.org/jira/browse/SCB-147?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Willem Jiang updated SCB-147:
-
Fix Version/s: (was: java-chassis-1.0.0-m2)
   java-chassis-1.0.0-m1

> Delete 0.5.0 metrics in foundation-metrics
> --
>
> Key: SCB-147
> URL: https://issues.apache.org/jira/browse/SCB-147
> Project: Apache ServiceComb
>  Issue Type: Sub-task
>  Components: Java-Chassis
>Reporter: yangyongzheng
>Assignee: yangyongzheng
>Priority: Major
> Fix For: java-chassis-1.0.0-m1
>
> Attachments: 20180127-113436(eSpace).png
>
>
> New Metrics applied in 1.0.0-m1 ,so 1.0.0-m2 old version of metrics can be 
> removed



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (SCB-308) Vertx transport server timeout will cause VertxServerRequestToHttpServletRequest getRemoteAddress NullPointException

2018-04-03 Thread Willem Jiang (JIRA)

 [ 
https://issues.apache.org/jira/browse/SCB-308?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Willem Jiang updated SCB-308:
-
Affects Version/s: (was: java-chassis-1.0.0-m1)

> Vertx transport server timeout will cause 
> VertxServerRequestToHttpServletRequest getRemoteAddress NullPointException
> 
>
> Key: SCB-308
> URL: https://issues.apache.org/jira/browse/SCB-308
> Project: Apache ServiceComb
>  Issue Type: Bug
>  Components: Java-Chassis
>Reporter: jeho0815
>Assignee: jeho0815
>Priority: Major
>
> VertxServerRequestToHttpServletRequest use the the vertx HttpServerRequest  
> socketAddress, this will call the netty channel to get remote addtess, but 
> server has timeout, so the remote address has been released and return null. 
> so we have to bind the socketaddress to the ServletRequest



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (SCB-297) the local cache is not updated when the server reboots at the situation of accross application

2018-04-03 Thread Willem Jiang (JIRA)

 [ 
https://issues.apache.org/jira/browse/SCB-297?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Willem Jiang updated SCB-297:
-
Fix Version/s: java-chassis-1.0.0-m1

> the local cache is not updated when the  server reboots at the situation of  
> accross application
> 
>
> Key: SCB-297
> URL: https://issues.apache.org/jira/browse/SCB-297
> Project: Apache ServiceComb
>  Issue Type: Bug
>  Components: Java-Chassis
>Reporter: laijianbin
>Assignee: laijianbin
>Priority: Major
> Fix For: java-chassis-1.0.0-m1
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (SCB-214) AbstractServiceRegistry findServiceInstance do not process null return value

2018-04-03 Thread Willem Jiang (JIRA)

 [ 
https://issues.apache.org/jira/browse/SCB-214?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Willem Jiang updated SCB-214:
-
Fix Version/s: (was: java-chassis-1.0.0-m2)
   java-chassis-1.0.0-m1

> AbstractServiceRegistry findServiceInstance do not process null return value
> 
>
> Key: SCB-214
> URL: https://issues.apache.org/jira/browse/SCB-214
> Project: Apache ServiceComb
>  Issue Type: Bug
>  Components: Java-Chassis
>Reporter: WeiChao
>Assignee: WeiChao
>Priority: Major
> Fix For: java-chassis-1.0.0-m1
>
>
> 问题1:
> [2018-01-09 20:31:16,387/GMT+08:00][main][INFO]instance registry succeeds for 
> the first time, will send AFTER_REGISTRY event. 
> io.servicecomb.core.CseApplicationListener$1.afterRegistryInstance(CseApplicationListener.java:173)
> java.lang.NullPointerException
> at 
> io.servicecomb.serviceregistry.registry.AbstractServiceRegistry.findServiceInstance(AbstractServiceRegistry.java:207)
> at 
> io.servicecomb.serviceregistry.RegistryUtils.findServiceInstance(RegistryUtils.java:208)
> at 
> com.huawei.paas.monitor.MonitorBootListener.onBootEvent(MonitorBootListener.java:26)
> at 
> io.servicecomb.core.CseApplicationListener.triggerEvent(CseApplicationListener.java:100)
> at 
> io.servicecomb.core.CseApplicationListener$1.afterRegistryInstance(CseApplicationListener.java:175)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at 
> com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
> at 
> com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
> at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
> at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
> at com.google.common.eventbus.EventBus.post(EventBus.java:275)
> at io.servicecomb.serviceregistry.task.AbstractTask.run(AbstractTask.java:54)
> at 
> io.servicecomb.serviceregistry.task.CompositeTask.run(CompositeTask.java:35)
> at 
> io.servicecomb.serviceregistry.task.ServiceCenterTask.init(ServiceCenterTask.java:83)
> at 
> io.servicecomb.serviceregistry.registry.AbstractServiceRegistry.run(AbstractServiceRegistry.java:168)
> at 
> io.servicecomb.serviceregistry.registry.RemoteServiceRegistry.run(RemoteServiceRegistry.java:79)
> at io.servicecomb.serviceregistry.RegistryUtils.run(RegistryUtils.java:68)
> at 
> io.servicecomb.core.CseApplicationListener.onApplicationEvent(CseApplicationListener.java:136)
> at 
> org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:166)
> at 
> org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:138)
> at 
> org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:383)
> at 
> org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:337)
> at 
> org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:882)
> at 
> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:545)
> at 
> org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:139)
> at 
> org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:93)
> at io.servicecomb.foundation.common.utils.BeanUtils.init(BeanUtils.java:37)
> at io.servicecomb.foundation.common.utils.BeanUtils.init(BeanUtils.java:33)
> at 
> com.huawei.paas.cse.demo.springmvc.server.SpringmvcServer.main(SpringmvcServer.java:39)
> [2018-01-09 
> 20:31:16,399/GMT+08:00][registry-vert.x-eventloop-thread-0][WARN]{"errorCode":"400012","errorMessage":"Micro-service
>  does not exist","detail":"No provider matched."}
> io.servicecomb.serviceregistry.client.http.ServiceRegistryClientImpl.lambda$null$4(ServiceRegistryClientImpl.java:178)
> com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: 
> Unrecognized field "errorCode" (class 
> io.servicecomb.serviceregistry.api.response.FindInstancesResponse), not 
> marked as ignorable (one known property: "instances"])
> at [Source: [B@3cb976a1; line: 1, column: 15] (through reference chain: 
> io.servicecomb.serviceregistry.api.response.FindInstancesResponse["errorCode"])
> at 
> 

[jira] [Updated] (SCB-209) pullTask,use rev to ensure data consistency and reduce service center work load

2018-04-03 Thread Willem Jiang (JIRA)

 [ 
https://issues.apache.org/jira/browse/SCB-209?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Willem Jiang updated SCB-209:
-
Fix Version/s: (was: java-chassis-1.0.0-m2)
   java-chassis-1.0.0-m1

> pullTask,use rev to ensure data consistency and reduce service center work 
> load
> ---
>
> Key: SCB-209
> URL: https://issues.apache.org/jira/browse/SCB-209
> Project: Apache ServiceComb
>  Issue Type: Improvement
>  Components: Java-Chassis
>Reporter: WeiChao
>Assignee: WeiChao
>Priority: Major
> Fix For: java-chassis-1.0.0-m1
>
>
> When pull task,SC will return to the result with the version number 
> X-Resource-Revision in the HEADER,SDK recodes this rev and sends it to SC at 
> the next request.
> If the rev of SDK is greater than or equal to the rev of SC, it means that 
> SDK no need to refresh, SC doesn't need to be processed, and returns 304 to 
> indicate that SDK's cache is not refreshed.
> If the rev of SDK is less than SC's rev, SC returns the updated result set to 
> SDK, SDK refreshes the cache and updates the Rev.
> The effect is that SDK requests different SC and does not have data 
> inconsistencies, at the same time reducing the amount of data transmission in 
> the channel



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (SCB-208) create a root module for third party config center support including foundation-config-cc

2018-04-03 Thread Willem Jiang (JIRA)

 [ 
https://issues.apache.org/jira/browse/SCB-208?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Willem Jiang updated SCB-208:
-
Fix Version/s: java-chassis-1.0.0-m1

> create a root module for third party config center support including 
> foundation-config-cc
> -
>
> Key: SCB-208
> URL: https://issues.apache.org/jira/browse/SCB-208
> Project: Apache ServiceComb
>  Issue Type: Sub-task
>  Components: Java-Chassis
>Reporter: Bo Li
>Assignee: Bo Li
>Priority: Minor
> Fix For: java-chassis-1.0.0-m1
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Reopened] (SCB-315) As a SDK user, i want to custom netty dns resovl properties so that the ServiceComb has to add config support

2018-04-03 Thread Willem Jiang (JIRA)

 [ 
https://issues.apache.org/jira/browse/SCB-315?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Willem Jiang reopened SCB-315:
--

> As a SDK user, i want to custom netty dns resovl properties so that the 
> ServiceComb has to add config support
> -
>
> Key: SCB-315
> URL: https://issues.apache.org/jira/browse/SCB-315
> Project: Apache ServiceComb
>  Issue Type: New Feature
>  Components: Java-Chassis
>Reporter: jeho0815
>Assignee: jeho0815
>Priority: Major
> Fix For: java-chassis-1.0.0-m1
>
>
> Default DNS resovl use the machine config, but sometimes the application want 
> to set by themselves to adapt to diffrent local or cloud enviroments



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (SCB-315) As a SDK user, i want to custom netty dns resovl properties so that the ServiceComb has to add config support

2018-04-03 Thread Willem Jiang (JIRA)

 [ 
https://issues.apache.org/jira/browse/SCB-315?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Willem Jiang updated SCB-315:
-
Affects Version/s: (was: java-chassis-1.0.0-m1)

> As a SDK user, i want to custom netty dns resovl properties so that the 
> ServiceComb has to add config support
> -
>
> Key: SCB-315
> URL: https://issues.apache.org/jira/browse/SCB-315
> Project: Apache ServiceComb
>  Issue Type: New Feature
>  Components: Java-Chassis
>Reporter: jeho0815
>Assignee: jeho0815
>Priority: Major
> Fix For: java-chassis-1.0.0-m1
>
>
> Default DNS resovl use the machine config, but sometimes the application want 
> to set by themselves to adapt to diffrent local or cloud enviroments



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (SCB-315) As a SDK user, i want to custom netty dns resovl properties so that the ServiceComb has to add config support

2018-04-03 Thread Willem Jiang (JIRA)

 [ 
https://issues.apache.org/jira/browse/SCB-315?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Willem Jiang updated SCB-315:
-
Fix Version/s: java-chassis-1.0.0-m1

> As a SDK user, i want to custom netty dns resovl properties so that the 
> ServiceComb has to add config support
> -
>
> Key: SCB-315
> URL: https://issues.apache.org/jira/browse/SCB-315
> Project: Apache ServiceComb
>  Issue Type: New Feature
>  Components: Java-Chassis
>Reporter: jeho0815
>Assignee: jeho0815
>Priority: Major
> Fix For: java-chassis-1.0.0-m1
>
>
> Default DNS resovl use the machine config, but sometimes the application want 
> to set by themselves to adapt to diffrent local or cloud enviroments



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Resolved] (SCB-315) As a SDK user, i want to custom netty dns resovl properties so that the ServiceComb has to add config support

2018-04-03 Thread Willem Jiang (JIRA)

 [ 
https://issues.apache.org/jira/browse/SCB-315?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Willem Jiang resolved SCB-315.
--
Resolution: Fixed

> As a SDK user, i want to custom netty dns resovl properties so that the 
> ServiceComb has to add config support
> -
>
> Key: SCB-315
> URL: https://issues.apache.org/jira/browse/SCB-315
> Project: Apache ServiceComb
>  Issue Type: New Feature
>  Components: Java-Chassis
>Reporter: jeho0815
>Assignee: jeho0815
>Priority: Major
> Fix For: java-chassis-1.0.0-m1
>
>
> Default DNS resovl use the machine config, but sometimes the application want 
> to set by themselves to adapt to diffrent local or cloud enviroments



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (SCB-322) Merge config center modification

2018-04-03 Thread Willem Jiang (JIRA)

 [ 
https://issues.apache.org/jira/browse/SCB-322?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Willem Jiang updated SCB-322:
-
Fix Version/s: java-chassis-1.0.0-m1

> Merge config center modification
> 
>
> Key: SCB-322
> URL: https://issues.apache.org/jira/browse/SCB-322
> Project: Apache ServiceComb
>  Issue Type: Task
>  Components: Java-Chassis
>Reporter: YaoHaishi
>Assignee: YaoHaishi
>Priority: Major
> Fix For: java-chassis-1.0.0-m1
>
>
> merge modification of config center client from commercial edition to open 
> source edition



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-459) Update netty's version to 4.1.19 and vertx's version to 3.5.1

2018-04-03 Thread Willem Jiang (JIRA)

[ 
https://issues.apache.org/jira/browse/SCB-459?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16424953#comment-16424953
 ] 

Willem Jiang commented on SCB-459:
--

We need to update the License[1] file to reflect the version change.

[1]https://github.com/apache/incubator-servicecomb-java-chassis/blob/master/java-chassis-distribution/src/release/LICENSE

> Update netty's version to 4.1.19 and vertx's version to 3.5.1
> -
>
> Key: SCB-459
> URL: https://issues.apache.org/jira/browse/SCB-459
> Project: Apache ServiceComb
>  Issue Type: Task
>  Components: Java-Chassis
>Affects Versions: service-center-1.0.0-m2
>Reporter: xuyiyun
>Assignee: xuyiyun
>Priority: Major
> Fix For: service-center-1.0.0-m2
>
>
> h3. {color:#33}{{1.Vertx fix thread-safety of 
> RouteImpl:[https://github.com/vert-x3/vertx-web/pull/739]}}{color}
> h3. {color:#33}{{2.Vertx 3.5.1 supporting netty 4.1.19, solved the 
> problem of domain name resolution,do not need to configure ndots.}}{color}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Resolved] (SCB-460) Add blogs to introduce config-center integration in ServiceComb

2018-04-03 Thread Bo Li (JIRA)

 [ 
https://issues.apache.org/jira/browse/SCB-460?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Bo Li resolved SCB-460.
---
Resolution: Resolved

> Add blogs to introduce config-center integration in ServiceComb
> ---
>
> Key: SCB-460
> URL: https://issues.apache.org/jira/browse/SCB-460
> Project: Apache ServiceComb
>  Issue Type: New Feature
>  Components: website
>Reporter: Bo Li
>Assignee: Bo Li
>Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Resolved] (SCB-461) Add blog to introduce how to join the community

2018-04-03 Thread Bo Li (JIRA)

 [ 
https://issues.apache.org/jira/browse/SCB-461?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Bo Li resolved SCB-461.
---
Resolution: Resolved

> Add blog to introduce how to join the community
> ---
>
> Key: SCB-461
> URL: https://issues.apache.org/jira/browse/SCB-461
> Project: Apache ServiceComb
>  Issue Type: Task
>  Components: website
>Reporter: Bo Li
>Assignee: Bo Li
>Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-459) Update netty's version to 4.1.19 and vertx's version to 3.5.1

2018-04-03 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/SCB-459?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16424914#comment-16424914
 ] 

ASF GitHub Bot commented on SCB-459:


xuyiyun0929 closed pull request #634: [SCB-459] Update netty's version to 
4.1.19 and vertx's version to 3.5.1
URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/634
 
 
   

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/java-chassis-dependencies/pom.xml 
b/java-chassis-dependencies/pom.xml
index b7b622785..b9ab059a5 100644
--- a/java-chassis-dependencies/pom.xml
+++ b/java-chassis-dependencies/pom.xml
@@ -32,7 +32,7 @@
 
   
 2.9.4
-3.5.0
+3.5.1
 0.8
 4.3.5.RELEASE
 1.7.7
@@ -45,7 +45,7 @@
 4.5.2
 1.5.2
 1.5.12
-4.1.17.Final
+4.1.19.Final
 2.0.7.Final
 ${basedir}/../..
 5.3.2.Final


 


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


> Update netty's version to 4.1.19 and vertx's version to 3.5.1
> -
>
> Key: SCB-459
> URL: https://issues.apache.org/jira/browse/SCB-459
> Project: Apache ServiceComb
>  Issue Type: Task
>  Components: Java-Chassis
>Affects Versions: service-center-1.0.0-m2
>Reporter: xuyiyun
>Assignee: xuyiyun
>Priority: Major
> Fix For: service-center-1.0.0-m2
>
>
> h3. {color:#33}{{1.Vertx fix thread-safety of 
> RouteImpl:[https://github.com/vert-x3/vertx-web/pull/739]}}{color}
> h3. {color:#33}{{2.Vertx 3.5.1 supporting netty 4.1.19, solved the 
> problem of domain name resolution,do not need to configure ndots.}}{color}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Resolved] (SCB-458) add blogs to introduce saga's evolution

2018-04-03 Thread Eric Lee (JIRA)

 [ 
https://issues.apache.org/jira/browse/SCB-458?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eric Lee resolved SCB-458.
--
Resolution: Fixed

> add blogs to introduce saga's evolution
> ---
>
> Key: SCB-458
> URL: https://issues.apache.org/jira/browse/SCB-458
> Project: Apache ServiceComb
>  Issue Type: Task
>  Components: website
>Reporter: Eric Lee
>Assignee: Eric Lee
>Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-458) add blogs to introduce saga's evolution

2018-04-03 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/SCB-458?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16424911#comment-16424911
 ] 

ASF GitHub Bot commented on SCB-458:


WillemJiang closed pull request #54: SCB-458 add blog to introduce saga's 
evolution
URL: https://github.com/apache/incubator-servicecomb-website/pull/54
 
 
   

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/_posts/cn/2018-04-04-saga-pack-design.md 
b/_posts/cn/2018-04-04-saga-pack-design.md
new file mode 100644
index 000..11e2918
--- /dev/null
+++ b/_posts/cn/2018-04-04-saga-pack-design.md
@@ -0,0 +1,167 @@
+---
+title: "ServiceComb数据一致性解决方案Saga演进介绍"
+lang: cn
+ref: saga_pack_design
+permalink: /cn/docs/saga_pack_design/
+excerpt: "Saga演进介绍"
+last_modified_at: 2018-04-04T09:18:43+08:00
+author: Eric Lee
+tags: [saga]
+redirect_from:
+  - /theme-setup/
+---
+
+传统的单体应用的微服务化改造过程中大多会面临数据库拆分,故而原来由数据库保证的数据一致性也一定面临重新设计和实现,此时需要引入分布式数据一致性方案来解决。常见的解决方案主要有2PC,TCC,事件驱动等,而在微服务开源项目
 
ServiceComb中提出并实现了使用Saga[[1]](https://www.cs.cornell.edu/andru/cs711/2002fa/reading/sagas.pdf)来解决微服务的数据一致性难题,不同方案的对比可参考《ServiceComb中的数据最终一致性方案》[[2]](http://blog.csdn.net/fl63zv9zou86950w/article/details/78393439)一文。Saga是一个数据最终一致性的解决方案,它允许我们成功地执行所有事务,或在任何事务失败的情况下,补偿已成功的事务,并提供了ACID[[3]](https://en.wikipedia.org/wiki/ACID)中ACD的保证(由于事务是交错执行的,可能会看到其他事务的部分结果,因此不能满足隔离性要求)。因此,Saga适用于以下跨服务的事务场景:
+
+- 
**嵌套调用**。如网上购物时,会依次经过下单、支付服务和第三方支付这几个子事务,其中,下单依赖于支付服务的返回状态,而支付服务也包含了多种可选的支付方式,并依赖于具体支付方式返回的结果。通过Saga,可以清晰地看到一个完整事务中各个服务之间的关系,在异常时也能快速定位出现问题的子事务。
+- 
**高并发**。如秒杀场景下,在成功扣除库存和完成支付后方可认为秒杀成功,若成功扣除库存但支付失败则自动进行补偿(即恢复库存)。鉴于Saga只有提交和补偿两种状态,成功场景下只需对每个子事务进行一次调用即可,因此可以在高并发下保持高性能。
+- 
**调用时间长**。如线上购买电影票,选好座位后一般会有15分钟的支付时间。Saga仅在子事务的提交阶段对资源进行短暂的锁定,且通过超时机制确保事务超时后能自动补偿,即在规定时间内没有支付成功的话就自动释放锁定的座位,极大地简化了业务出现异常时的处理逻辑。
+
+## Saga新版本演进
+
+新年新气象,Apache ServiceComb(incubating) 
Saga[[4]](https://github.com/apache/incubator-servicecomb-saga)(以下简称Saga)进行了演进。相对于上一版[[2]](http://blog.csdn.net/fl63zv9zou86950w/article/details/78393439),新演进的设计主要有以下优势:
+
+- 
**极大提升易用性**。开发者只需使用2-3个注解(即启用事务服务:EnableOmega、全局事务标记:SagaStart和子事务标记:Compensable)。
+- **更方便扩展**。对微服务框架的支持更友好。
+- 
**数据一致性与业务逻辑解耦**。在演进后的设计中,通过服务侧omega的引入,saga协调器的职责更为单一(只需负责协调事务的完整性),与具体业务无关,因此,开发人员可以聚焦在具体业务的开发。
+
+Saga演进后的架构,如下图所示,主要包含两个组件,即alpha和omega,其中:
+
+- 
alpha充当协调者的角色,主要负责对事务的事件进行持久化存储以及协调子事务的状态,使其最终得以与全局事务的状态保持一致,即保证事务中的子事务要么全执行,要么全不执行。
+- 
omega是微服务中内嵌的一个agent,负责对网络请求进行拦截并向alpha上报事务事件,并在异常情况下根据alpha下发的指令执行相应的补偿或重试操作。
+
+![](/assets/images/pack/pack.png)
+
+
+## omega内部运行机制
+
+omega是微服务中内嵌的一个agent,负责向alpha上报事务状态并与其它omega直接传递事务上下文信息。其中,每个服务的事务上下文包括:
+
+- 全局事务id(Global Tx Id):用于唯一标识全局事务,一般在全局事务入口生成,并在整个事务过程中传递。
+- 本地事务id(Local Tx Id):用于唯一标识本地事务,一般由本地事务生成。
+- 父事务id(Parent Tx Id):用于构建子事务间的关系,可由请求上下文中构建。
+
+如下图所示,分布式事务与用于分布式调用链追踪的zipkin[[5]](https://github.com/openzipkin/zipkin)的处理流程很类似,在服务提供方,omega会将请求拦截并从中提取请求信息中的全局事务id作为其自身的全局事务id(即Saga事件id),并将请求中的本地事务id作为其父事务id,且使用新生成的id作为本地事务id;在服务消费方,omega会将请求拦截并往其中添加当前的全局事务id和本地事务id。通过服务提供方和服务消费方的这种协作处理,子事务能连接起来形成一个完整的全局事务。
+
+![](/assets/images/pack/id_flow.png)
+
+omega在预处理阶段会先向alpha发送事务开始的事件,在后处理阶段会再向alpha发送事务结束的事件。alpha在收到事件后会进行持久化的存储。因此,每个成功的子事务都有一一对应的开始及结束事件。
+
+![](/assets/images/pack/omega_internal.png)
+
+在omega启动时会向alpha注册,使得异常或者超时场景下,alpha能通过回调向omega发送重试或补偿的命令和相应的调用参数,从而确保全局事务的一致性。
+
+## 具体处理流程
+
+### 成功场景
+
+全局事务开始前omega会先向alpha发送全局事务开始的事件,并在所有子事务完成时向alpha发送全局事务结束的事件。而每个子事务在执行前也会向alpha发送事务开始的事件,在成功执行后,会向alpha发送事务结束的事件。子事务间通过全局事务id连接在一起,但也因本地事务id而有所区分。因此,在成功场景下,每个开始的事件都会有对应的结束事件。
+
+![](/assets/images/pack/successful_scenario.png)
+
+### 异常场景
+
+在子事务执行期间抛出异常时,omega会向alpha上报aborted事件,然后alpha会向该全局事务的其它已完成的子事务发送补偿指令,确保最终同一全局事务下的所有子事务要么都成功,要么都回滚。由于事务中没有明确指定全局事务中的参与者,因此,alpha的扫描器会定期查询事件表并找出已完成所有补偿子事务的全局事务,然后对这些全局事务添加全局事务结束事件以保证事务的完整性。
+
+![](/assets/images/pack/exception_scenario.png)
+
+### 超时场景
+
+alpha的扫描器会定期扫描正在处理的事件状态,若发现事件超时,则会记录相应的aborted事件,然后alpha会向该全局事务的其它已完成的子事务发送补偿指令来恢复至事务开始前的状态。
+
+![](/assets/images/pack/timeout_scenario.png)
+
+## 如何使用?
+
+Saga的使用主要涵盖两方面,alpha的启动及omega的使用。
+
+### alpha的启动
+
+alpha启动前需要先运行数据库PostgreSQL:
+
+```bash
+docker run -d -e "POSTGRES_DB=saga" -e "POSTGRES_USER=saga" -e 
"POSTGRES_PASSWORD=password" -p 5432:5432 postgres
+```
+   
+在确保数据库正常启动后,即可运行alpha:
+
+```bash
+docker run -d -p 8090:8090 \
+  -e "JAVA_OPTS=-Dspring.profiles.active=prd" \
+  -e 
"spring.datasource.url=jdbc:postgresql://{docker.host.address}:5432/saga?useSSL=false"
 \
+  alpha-server:0.1.0
+```
+
+### omega的使用
+
+omega的使用很简单,以一个简化的转账业务为例,同一笔转账要么转入和转出都成功,要么都失败。在这样一个业务中引入Saga,只需简单几步即可:
+
+1. 引入依赖
+   ```xml
+   
+ org.apache.servicecomb.saga
+ omega-spring-starter
+ 0.1.0
+   
+   
+ org.apache.servicecomb.saga
+ omega-transport-resttemplate
+ 0.1.0
+   
+   ```
+
+2. 添加Saga的注解及相应的补偿方法
+  

[jira] [Commented] (SCB-460) Add blogs to introduce config-center integration in ServiceComb

2018-04-03 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/SCB-460?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16424909#comment-16424909
 ] 

ASF GitHub Bot commented on SCB-460:


WillemJiang closed pull request #55: SCB-460 add blog to introduce 
config-center integration in servicecomb
URL: https://github.com/apache/incubator-servicecomb-website/pull/55
 
 
   

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/_posts/cn/2018-04-04-config-center-integration.md 
b/_posts/cn/2018-04-04-config-center-integration.md
new file mode 100644
index 000..ea32733
--- /dev/null
+++ b/_posts/cn/2018-04-04-config-center-integration.md
@@ -0,0 +1,182 @@
+---
+title: "ServiceComb示例讲解微服务配置中心选型与对接"
+lang: cn
+ref: config_center_integration
+permalink: /cn/docs/config_center_integration/
+excerpt: "ServiceComb对接配置中心"
+last_modified_at: 2018-04-04T19:05:00+08:00
+author: Li Bo
+tags: [配置中心]
+redirect_from:
+  - /theme-setup/
+---
+
+### 配置中心
+
+项目代码中经常会用到各种配置项,比如下面的代码中是从系统环境变量中获取`prop` :
+
+```java
+String prop = System.getProperty(myProperty);
+int x = DEFAULT_VALUE;
+try {
+x = Integer.parseInt(prop);
+} catch (NumberFormatException e) {
+// handle format issues
+}
+myMethod(x);
+```
+
+类似使用环境变量或者`properties`和`xml`等文件方式传入配置进而控制应用表现的方法广泛应用于开发过程中,这样做可以将外部配置与业务代码解耦,若有变动只需修改配置参数而不需要重新编译构建项目。但是这种将配置和代码放在一起的方式可能会泄露隐私信息(比如密码),因为代码可能会公开,出于安全的考虑,配置和代码分离管理的方式开始广泛使用,常见的方法比如将配置放在CI服务器上通过打包脚本打入应用包中,或者直接放到运行应用的服务器的特定目录下,或者存储到数据库中。这种方式在传统的单体应用中简单有效,但也带来一些新的挑战:
+
+* 配置变化频繁时,需要频繁的打包部署应用
+* 不同的环境下配置项不同需要分开管理(比如测试环境和生产环境)
+* 配置项中的隐私信息虽然避免了随代码公开而泄露,但是还是会打包到应用包中
+
+此外,面对微服务爆发式增长的应用数量和服务器数量带来新的困难
+
+* 复杂的业务对应大量的配置项
+
+
+* 配置项在不同服务中可能出现冲突
+* 对集群部署的应用配置进行修改时需要一次修改每个机器上的应用配置
+
+这种背景下,中心化的配置服务即配置中心应运而生,简单来说,配置中心就是一种统一管理各种应用配置的基础服务组件,一个合格的配置中心需要满足:
+
+* 配置项容易读取和修改
+* 添加新配置要简单直接
+* 支持对配置的修改的检视以把控风险
+* 可以查看配置修改的历史记录
+* 不同部署环境支持隔离
+
+
+开源社区目前主流的配置中心有spring-cloud-config, ctrip apollo, disconf 
等,下表是对其功能特性、技术路线、可用性和易用性等发面的比较[1]供参考。
+
+|  | spring-cloud-config   | ctrip apollo | 
disconf  |
+|  | : | :--- | 
:--- |
+| 静态配置管理 | 基于file  | 支持 | 支持   
  |
+| 动态配置管理 | 支持  | 支持 | 支持   
  |
+| 统一管理 | 无,需要github| 支持 | 支持   
  |
+| 多维度管理   | 无,需要github| 支持 | 支持
 |
+| 本地配置缓存 | 无| 支持 | 支持  
   |
+| 配置生效时间 | 重启或手动refresh生效 | 实时 | 实时
 |
+| 配置更新推送 | 手动触发  | 支持 | 支持 
|
+| 配置定时拉取 | 无| 支持 | 依赖时事件驱动 
  |
+| 授权、审核、审计 | 无,需要github| 支持 | 无
   |
+| 配置版本管理 | git做版本管理 | 界面上提供发布历史和回滚按钮 | 操作记录存数据库,无查询接口 |
+| 实例配置监控 | 需要结合springadmin   | 支持 | 支持 
|
+| 灰度发布 | 不支持| 支持 | 不支持部分更新 
  |
+| 告警通知 | 不支持| 支持,邮件方式告警   | 支持,邮件方式告警  
 |
+| 多数据中心部署   | 支持  | 支持 | 支持
 |
+| 配置界面 | 无,通过git操作   | 统一界面 | 统一界面 
|
+
+综合比较后,ServiceComb选择了Apollo[2]作为配置中心进行对接。Apollo是携程框架部门研发并贡献到开源社区的分布式配置中心,活跃贡献者近百人。最新版本的ServiceComb
 Java 
Chassis已实现支持Apollo[1],用户可以使用该配置中心结合Chassis中集成的Archaius实现在不需要重新启动或重新部署应用的前提下进行配置项的集中管理和动态修改。基于ServiceComb优秀的插件化设计,用户可以非常简单的对接到其他开源或自研的配置中心。
+
+### 使用简介
+
+# 启动Apollo服务
+
+* 启动Apollo服务
+
+Apollo服务可以通过docker或二进制启动,方法参考官网文档[3],推荐使用docker启动。
+
+```bash
+git clone https://github.com/lijasonvip/apollo-image-for-servicecomb.git
+cd apollo-image-for-servicecomb && docker-compose up
+```
+
+出现`apollo-quick-start | Portal started. You can visit http://localhost:8070 
now!`后表示Apollo已经启动成功,浏览器访问`http://localhost:8070`即可访问`portal`服务,默认登录账号为`apollo/admin`。
+
+- 创建应用
+
+登录后点击创建项目,填入应用名称,其他选默认即可,创建应用后需要进入应用点击发布才能生效。
+
+![](/assets/images/config/create-project.png)
+
+* 生成TOKEN
+
+应用发布后我们需要获取一个TOKEN,在`http://localhost:8070/open/manage.html`页面填入刚才创建的应用ID和应用名称并选择项目和部门信息后点击创建即可生成一个TOKEN,保存此TOKEN并配置到Chassis应用的配置文件中。
+
+![](/assets/images/config/token.png)
+
+# 引入依赖
+
+在Chassis应用的pom文件中引入依赖`config-apollo`:
+
+```xml 
+ 
+   org.apache.servicecomb
+   config-apollo
+ 
+```
+
+# 添加配置
+
+在Chassis应用的配置文件`microservice.yaml`中增加以下配置:
+
+```yaml
+   apollo:
+ 

[jira] [Commented] (SCB-461) Add blog to introduce how to join the community

2018-04-03 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/SCB-461?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16424908#comment-16424908
 ] 

ASF GitHub Bot commented on SCB-461:


WillemJiang closed pull request #56: SCB-461 add blog to introduce how to join 
the community
URL: https://github.com/apache/incubator-servicecomb-website/pull/56
 
 
   

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/_data/authors.yml b/_data/authors.yml
index badee2f..40a1370 100644
--- a/_data/authors.yml
+++ b/_data/authors.yml
@@ -39,4 +39,7 @@ Yang Bo:
   name: "Yang Bo"
   email: "yangb...@huawei.com"
   bio: "Simplicity is beauty"
-  
+Li Bo:
+  name: "Li Bo"
+  email: "lib...@huawei.com"
+  bio: "It works, but it hasn’t been tested."
diff --git a/_posts/cn/2018-04-04-join_the_community.md 
b/_posts/cn/2018-04-04-join_the_community.md
new file mode 100644
index 000..627cfa7
--- /dev/null
+++ b/_posts/cn/2018-04-04-join_the_community.md
@@ -0,0 +1,112 @@
+---
+title: "如何加入ServiceComb社区"
+lang: cn
+ref: join_the_community
+permalink: /cn/docs/join_the_community/
+excerpt: "如何加入ServiceComb社区"
+last_modified_at: 2017-09-16T19:05:00+08:00
+author: Li Bo
+tags: [加入社区]
+redirect_from:
+  - /theme-setup/
+---
+
+近期,热衷开源和微服务的伙伴们非常关注如何加入到ServiceComb社区。ServiceComb作为开源的Apache 
孵化项目,加入方式和常规的加入开源社区的方式大体一致,一般为三个阶段:1. 订阅并关注社区动态;2. 开始在开源社区提交第一份代码;3. 
深度加入社区讨论并贡献,以下将详细向大家讲述如何一步步加入ServiceComb社区。
+
+### Step 1 订阅并关注ServiceComb社区动态
+
+订阅和关注社区动态的途径有:即时通讯工具(社区微信群、gitter)、社区公众号、开发者邮件列表、门户网站。
+
+**即时通讯工具** 
+
+扫描下方二维码或搜索`ServiceComb小助手`加入微信群,加入后可以在微信群中咨询和求助,会有热心的伙伴和committer 及时的响应回复。
+
+![](/assets/images/jira/assist.png){: .align-center}
+
+
+
+也可使用Github账号登录gitter(地址 
https://gitter.im/ServiceCombUsers/Lobby)进行在线讨论,国内的伙伴们更习惯于使用微信群进行在线交流,但为了更方便后来加入的人可以检索并查阅前期的讨论内容存档,所以ServiceComb社区推荐使用gitter。
+
+**社区公众号**
+
+扫描下方二维码关注公众号或微信公众号中搜索`ServiceComb`进行关注,公众号会定期的发布和推送ServiceComb近期相应资讯(干货资料、学习资源、线上活动、线下活动等)。
+
+![](/assets/images/jira/public.png){: .align-center}
+
+**邮件列表**
+
+通过订阅开发者邮件可以及时获取到社区开发者的邮件讨论内容,可发起讨论,也可通过回复感兴趣的讨论题目参与到讨论中(邮件内容均使用英文),另外邮件的存档功能可以方便开发者查阅历史问题的讨论过程。
+
+订阅邮件方式:
+
+- 发送任意内容到`dev-subscr...@servicecomb.incubator.apache.org`
+- 收到来自dev-help的邮件后,再回复任意内容来确认订阅邮件列表即可。
+
+邮件存档内容可通过https://www.mail-archive.com/搜索`ServiceComb`获取。
+
+**门户网站**
+
+ServiceComb门户网站是社区的官方入口,包括快速入门指南、用户手册、开发者手册、常见问题和开发博文等。
+
+网站地址: http://servicecomb.incubator.apache.org/cn/
+
+### Step 2 在 ServiceComb 社区提交第一份代码(PR)
+
+当关注社区并尝试调试使用后,会发现一些简单的bug(如文档或代码格式问题等),可以通过fix简单的bug来熟悉ServiceComb社区的开发流程。
+
+**发现问题并提交Issue:**
+
+由于ServiceComb的任务管理是在Apache 
JIRA上进行的,所以需要先注册并登录到JIRA。关于JIRA详细使用方法请参考JIRA使用帮助:http://servicecomb.incubator.apache.org/cn/developers/use-jira/
+
+* 注册并登陆到 
https://issues.apache.org/jira/projects/SCB,点击左侧Kanban可以看到当前待处理、处理中和已经完成的任务列表。
+
+  ![kanabn](/assets/images/jira/jira-kanban.png){: .align-center}
+
+* 点击**新建**创建新的issue或者task进行问题或任务跟踪,选择相应的模块并添加描述信息。
+
+  ![create](/assets/images/jira/create-issue.png){: .align-center}
+
+任务提交到JIRA后,需要在本地进行代码开发,进行第一份代码的提交。
+
+**提交第一份代码(PR)**
+
+开发者在GitHub上fork仓库后clone到本地进行代码修改,修改完成并测试通过后可以创建PR提交代码,提交PR后系统会自动运行CI进行代码测试。测试通过后会有其他开发者或者maintainer进行review,没有问题后会被approve并merge到主干分支。具体可参考门户网站上开发者手册中的代码提交指南:
+
+http://servicecomb.incubator.apache.org/cn/developers/submit-codes/
+
+需要**注意**的是,创建PR的时候,PR的title要以JIRA中对应的问题编号开头,如下图中 
[SCB-327],这样系统就会自动关联本次提交到相应JIRA任务下,方便进度跟踪。
+
+![](/assets/images/jira/pr.png){: .align-center}
+
+刚才提交的代码经过committer的review后,如果有问题committer会进行comment,继续修改后push最新代码即可。如果没有问题会approve并merge。
+
+至此,您已经熟悉了ServiceComb社区的初级的开发流程,也是常规的社区开发方法(不同的社区承载体会有细微差异,如kubernetes的问题跟踪是直接承载github的issue上)。下一步就可以深度参与到ServiceComb的讨论并进行贡献。
+
+### Step 3 深度参与到ServiceComb讨论并贡献
+
+由于开源社区强调开放性,当开发者想在社区里做一些较大或中长期的特性时,则需在ServiceComb社区发起特性的讨论。
+
+ 如何发起特性讨论
+
+通过邮件发Proposal到社区进行讨论,Proposal中有贴图或附加文档时可先创建好文件链接,将链接贴到邮件里即可,创建文件可以有一下两种方式:
+
+* 在JIRA上创建一个对应的特性任务,并将Proposal文档添加到该任务的附件中,拷贝链接。
+
+* 通过github向servicecomb.io网站以blog的形式提交文件,将该blog地址拷贝到邮件中。
+
+  文档附件可参考:
+
+  
http://servicecomb.incubator.apache.org/docs/service-registry-refactor-proposal/
+
+  Proposal邮件参考:
+
+  ![proposal-pack](/assets/images/jira/proposal-pack.png){: .align-center}
+
+当在邮件中讨论清楚特性设计后,就可以开始对应的代码开发,或对于部分小的任务(如代码bug修复、文档完善、网站优化等),其本身不需要过多讨论,则可参考上一步骤 
Step 2 中的开发流程进行代码贡献。
+
+遇到其他本文章未解决的问题(如用户业务准备进行微服务技术选型或ServiceComb的概念性问题等)时,建议直接到微信群或者gitter里进行咨询并寻求帮助。
+
+
+
+社区鼓励多劳多得和技术沉淀,坚持贡献社区可以收获来自社区的礼品激励惊喜,坚持长期使用和参与社区项目的伙伴,将可能被选举成 Apache committer 
或者取得更高的荣誉,希望本文能对热衷开源及ServiceComb社区的伙伴们有所帮助,也欢迎积极参加ServiceComb的线上及线下活动。
+
diff --git a/assets/images/jira/assist.png b/assets/images/jira/assist.png
new file mode 100644
index 000..3084dcb
Binary files /dev/null and b/assets/images/jira/assist.png differ
diff --git a/assets/images/jira/create-issue.png 
b/assets/images/jira/create-issue.png

[jira] [Commented] (SCB-460) Add blogs to introduce config-center integration in ServiceComb

2018-04-03 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/SCB-460?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16424900#comment-16424900
 ] 

ASF GitHub Bot commented on SCB-460:


lijasonvip commented on a change in pull request #55: SCB-460 add blog to 
introduce config-center integration in servicecomb
URL: 
https://github.com/apache/incubator-servicecomb-website/pull/55#discussion_r179013114
 
 

 ##
 File path: _posts/cn/2018-04-04-config-center-integration.md
 ##
 @@ -0,0 +1,182 @@
+---
+title: "ServiceComb示例讲解微服务配置中心选型与对接"
+lang: cn
+ref: config_center_integration
+permalink: /cn/docs/config_center_integration/
+excerpt: "ServiceComb对接配置中心"
+last_modified_at: 2018-04-04T19:05:00+08:00
+author: Li Bo
+tags: [配置中心]
+redirect_from:
+  - /theme-setup/
+---
+
+### 配置中心
+
+项目代码中经常会用到各种配置项,比如下面的代码中是从系统环境变量中获取`prop` :
+
+```java
+String prop = System.getProperty(myProperty);
+int x = DEFAULT_VALUE;
+try {
+x = Integer.parseInt(prop);
+} catch (NumberFormatException e) {
+// handle format issues
+}
+myMethod(x);
+```
+
+类似使用环境变量或者`properties`和`xml`等文件方式传入配置进而控制应用表现的方法广泛应用于开发过程中,这样做可以将外部配置与业务代码解耦,若有变动只需修改配置参数而不需要重新编译构建项目。但是这种将配置和代码放在一起的方式可能会泄露隐私信息(比如密码),因为代码可能会公开,出于安全的考虑,配置和代码分离管理的方式开始广泛使用,常见的方法比如将配置放在CI服务器上通过打包脚本打入应用包中,或者直接放到运行应用的服务器的特定目录下,或者存储到数据库中。这种方式在传统的单体应用中简单有效,但也带来一些新的挑战:
+
+* 配置变化频繁时,需要频繁的打包部署应用
+* 不同的环境下配置项不同需要分开管理(比如测试环境和生产环境)
+* 配置项中的隐私信息虽然避免了随代码公开而泄露,但是还是会打包到应用包中
+
+此外,面对微服务爆发式增长的应用数量和服务器数量带来新的困难
+
+* 复杂的业务对应大量的配置项
+
+
+* 配置项在不同服务中可能出现冲突
+* 对集群部署的应用配置进行修改时需要一次修改每个机器上的应用配置
+
+这种背景下,中心化的配置服务即配置中心应运而生,简单来说,配置中心就是一种统一管理各种应用配置的基础服务组件,一个合格的配置中心需要满足:
+
+* 配置项容易读取和修改
+* 添加新配置要简单直接
+* 支持对配置的修改的检视以把控风险
+* 可以查看配置修改的历史记录
+* 不同部署环境支持隔离
+
+
+开源社区目前主流的配置中心有spring-cloud-config, ctrip apollo, disconf 
等,下表是对其功能特性、技术路线、可用性和易用性等发面的比较[1]供参考。
+
+|  | spring-cloud-config   | ctrip apollo | 
disconf  |
+|  | : | :--- | 
:--- |
+| 静态配置管理 | 基于file  | 支持 | 支持   
  |
+| 动态配置管理 | 支持  | 支持 | 支持   
  |
+| 统一管理 | 无,需要github| 支持 | 支持   
  |
+| 多维度管理   | 无,需要github| 支持 | 支持
 |
+| 本地配置缓存 | 无| 支持 | 支持  
   |
+| 配置生效时间 | 重启或手动refresh生效 | 实时 | 实时
 |
+| 配置更新推送 | 手动触发  | 支持 | 支持 
|
+| 配置定时拉取 | 无| 支持 | 依赖时事件驱动 
  |
+| 授权、审核、审计 | 无,需要github| 支持 | 无
   |
+| 配置版本管理 | git做版本管理 | 界面上提供发布历史和回滚按钮 | 操作记录存数据库,无查询接口 |
+| 实例配置监控 | 需要结合springadmin   | 支持 | 支持 
|
+| 灰度发布 | 不支持| 支持 | 不支持部分更新 
  |
+| 告警通知 | 不支持| 支持,邮件方式告警   | 支持,邮件方式告警  
 |
+| 多数据中心部署   | 支持  | 支持 | 支持
 |
+| 配置界面 | 无,通过git操作   | 统一界面 | 统一界面 
|
+
+综合比较后,ServiceComb选择了Apollo[2]作为配置中心进行对接。Apollo是携程框架部门研发并贡献到开源社区的分布式配置中心,活跃贡献者近百人。最新版本的ServiceComb
 Java 
Chassis已实现支持Apollo[1],用户可以使用该配置中心结合Chassis中集成的Archaius实现在不需要重新启动或重新部署应用的前提下进行配置项的集中管理和动态修改。基于ServiceComb优秀的插件化设计,用户可以非常简单的对接到其他开源或自研的配置中心。
+
+### 使用简介
+
+# 启动Apollo服务
+
+* 启动Apollo服务
+
+Apollo服务可以通过docker或二进制启动,方法参考官网文档[3],推荐使用docker启动。
+
+```bash
+git clone https://github.com/lijasonvip/apollo-image-for-servicecomb.git
+cd apollo-image-for-servicecomb && docker-compose up
+```
+
+出现`apollo-quick-start | Portal started. You can visit http://localhost:8070 
now!`后表示Apollo已经启动成功,浏览器访问`http://localhost:8070`即可访问`portal`服务,默认登录账号为`apollo/admin`。
+
+- 创建应用
+
+登录后点击创建项目,填入应用名称,其他选默认即可,创建应用后需要进入应用点击发布才能生效。
+
+![](/assets/images/config/create-project.png)
+
+* 生成TOKEN
+
+应用发布后我们需要获取一个TOKEN,在`http://localhost:8070/open/manage.html`页面填入刚才创建的应用ID和应用名称并选择项目和部门信息后点击创建即可生成一个TOKEN,保存此TOKEN并配置到Chassis应用的配置文件中。
+
+![](/assets/images/config/token.png)
+
+# 引入依赖
+
+在Chassis应用的pom文件中引入依赖`config-apollo`:
+
+```xml 
+ 
+   org.apache.servicecomb
+   config-apollo
+ 
+```
+
+# 添加配置
+
+在Chassis应用的配置文件`microservice.yaml`中增加以下配置:
+
+```yaml
+   apollo:
+ config:
+   serverUri: http://127.0.0.1:8070#Apollo portal服务地址
+   serviceName: SampleApp  #创建应用时的AppID
+   env: DEV
#env默认是DEV
+   clusters: default   
#cluster默认default
+   namespace: application   

[jira] [Commented] (SCB-461) Add blog to introduce how to join the community

2018-04-03 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/SCB-461?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16424892#comment-16424892
 ] 

ASF GitHub Bot commented on SCB-461:


lijasonvip opened a new pull request #56: SCB-461 add blog to introduce how to 
join the community
URL: https://github.com/apache/incubator-servicecomb-website/pull/56
 
 
   Signed-off-by: lijasonvip 


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


> Add blog to introduce how to join the community
> ---
>
> Key: SCB-461
> URL: https://issues.apache.org/jira/browse/SCB-461
> Project: Apache ServiceComb
>  Issue Type: Task
>  Components: website
>Reporter: Bo Li
>Assignee: Bo Li
>Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-460) Add blogs to introduce config-center integration in ServiceComb

2018-04-03 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/SCB-460?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16424891#comment-16424891
 ] 

ASF GitHub Bot commented on SCB-460:


lijasonvip opened a new pull request #55: SCB-460 add blog to introduce 
config-center integration in servicecomb
URL: https://github.com/apache/incubator-servicecomb-website/pull/55
 
 
   Signed-off-by: lijasonvip 


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


> Add blogs to introduce config-center integration in ServiceComb
> ---
>
> Key: SCB-460
> URL: https://issues.apache.org/jira/browse/SCB-460
> Project: Apache ServiceComb
>  Issue Type: New Feature
>  Components: website
>Reporter: Bo Li
>Assignee: Bo Li
>Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (SCB-461) Add blog to introduce how to join the community

2018-04-03 Thread Bo Li (JIRA)
Bo Li created SCB-461:
-

 Summary: Add blog to introduce how to join the community
 Key: SCB-461
 URL: https://issues.apache.org/jira/browse/SCB-461
 Project: Apache ServiceComb
  Issue Type: Task
  Components: website
Reporter: Bo Li
Assignee: Bo Li






--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-459) Update netty's version to 4.1.19 and vertx's version to 3.5.1

2018-04-03 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/SCB-459?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16424874#comment-16424874
 ] 

ASF GitHub Bot commented on SCB-459:


xuyiyun0929 opened a new pull request #634: [SCB-459] Update netty's version to 
4.1.19 and vertx's version to 3.5.1
URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/634
 
 
   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


> Update netty's version to 4.1.19 and vertx's version to 3.5.1
> -
>
> Key: SCB-459
> URL: https://issues.apache.org/jira/browse/SCB-459
> Project: Apache ServiceComb
>  Issue Type: Task
>  Components: Java-Chassis
>Affects Versions: service-center-1.0.0-m2
>Reporter: xuyiyun
>Assignee: xuyiyun
>Priority: Major
> Fix For: service-center-1.0.0-m2
>
>
> h3. {color:#33}{{1.Vertx fix thread-safety of 
> RouteImpl:[https://github.com/vert-x3/vertx-web/pull/739]}}{color}
> h3. {color:#33}{{2.Vertx 3.5.1 supporting netty 4.1.19, solved the 
> problem of domain name resolution,do not need to configure ndots.}}{color}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-458) add blogs to introduce saga's evolution

2018-04-03 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/SCB-458?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16424873#comment-16424873
 ] 

ASF GitHub Bot commented on SCB-458:


WillemJiang commented on a change in pull request #54: SCB-458 add blog to 
introduce saga's evolution
URL: 
https://github.com/apache/incubator-servicecomb-website/pull/54#discussion_r179010088
 
 

 ##
 File path: _posts/cn/2018-04-04-saga-pack-design.md
 ##
 @@ -0,0 +1,167 @@
+---
+title: "ServiceComb数据一致性解决方案Saga演进介绍"
+lang: cn
+ref: saga_pack_design
+permalink: /cn/docs/saga_pack_design/
+excerpt: "Saga演进介绍"
+last_modified_at: 2018-04-04T09:18:43+08:00
+author: Eric Lee
+tags: [saga]
+redirect_from:
+  - /theme-setup/
+---
+
+传统的单体应用的微服务化改造过程中大多会面临数据库拆分,故而原来由数据库保证的数据一致性也一定面临重新设计和实现,此时需要引入分布式数据一致性方案来解决。常见的解决方案主要有2PC,TCC,事件驱动等,而在微服务开源项目
 
ServiceComb中提出并实现了使用Saga[[1]](https://www.cs.cornell.edu/andru/cs711/2002fa/reading/sagas.pdf)来解决微服务的数据一致性难题,不同方案的对比可参考《ServiceComb中的数据最终一致性方案》[[2]](http://blog.csdn.net/fl63zv9zou86950w/article/details/78393439)一文。Saga是一个数据最终一致性的解决方案,它允许我们成功地执行所有事务,或在任何事务失败的情况下,补偿已成功的事务,并提供了ACID[[3]](https://en.wikipedia.org/wiki/ACID)中ACD的保证(由于事务是交错执行的,可能会看到其他事务的部分结果,因此不能满足隔离性要求)。因此,Saga适用于以下跨服务的事务场景:
+
+- 
**嵌套调用**。如网上购物时,会依次经过下单、支付服务和第三方支付这几个子事务,其中,下单依赖于支付服务的返回状态,而支付服务也包含了多种可选的支付方式,并依赖于具体支付方式返回的结果。通过Saga,可以清晰地看到一个完整事务中各个服务之间的关系,在异常时也能快速定位出现问题的子事务。
+- 
**高并发**。如秒杀场景下,在成功扣除库存和完成支付后方可认为秒杀成功,若成功扣除库存但支付失败则自动进行补偿(即恢复库存)。鉴于Saga只有提交和补偿两种状态,成功场景下只需对每个子事务进行一次调用即可,因此可以在高并发下保持高性能。
+- 
**调用时间长**。如线上购买电影票,选好座位后一般会有15分钟的支付时间。Saga仅在子事务的提交阶段对资源进行短暂的锁定,且通过超时机制确保事务超时后能自动补偿,即在规定时间内没有支付成功的话就自动释放锁定的座位,极大地简化了业务出现异常时的处理逻辑。
+
+## Saga新版本演进
+
+新年新气象,Apache ServiceComb(incubating) 
Saga[[4]](https://github.com/apache/incubator-servicecomb-saga)(以下简称Saga)进行了演进。相对于上一版[[2]](http://blog.csdn.net/fl63zv9zou86950w/article/details/78393439),新演进的设计主要有以下优势:
+
+- 
**极大提升易用性**。开发者只需使用2-3个注解(即启用事务服务:EnableOmega、全局事务标记:SagaStart和子事务标记:Compensable)。
+- **更方便扩展**。对微服务框架的支持更友好。
+- 
**数据一致性与业务逻辑解耦**。在演进后的设计中,通过服务侧omega的引入,saga协调器的职责更为单一(只需负责协调事务的完整性),与具体业务无关,因此,开发人员可以聚焦在具体业务的开发。
+
+Saga演进后的架构,如下图所示,主要包含两个组件,即alpha和omega,其中:
+
+- 
alpha充当协调者的角色,主要负责对事务的事件进行持久化存储以及协调子事务的状态,使其最终得以与全局事务的状态保持一致,即保证事务中的子事务要么全执行,要么全不执行。
+- 
omega是微服务中内嵌的一个agent,负责对网络请求进行拦截并向alpha上报事务事件,并在异常情况下根据alpha下发的指令执行相应的补偿或重试操作。
+
+![](/assets/images/pack/pack.png)
+
+
+## omega内部运行机制
+
+omega是微服务中内嵌的一个agent,负责向alpha上报事务状态并与其它omega直接传递事务上下文信息。其中,每个服务的事务上下文包括:
+
+- 全局事务id(Global Tx Id):用于唯一标识全局事务,一般在全局事务入口生成,并在整个事务过程中传递。
+- 本地事务id(Local Tx Id):用于唯一标识本地事务,一般由本地事务生成。
+- 父事务id(Parent Tx Id):用于构建子事务间的关系,可由请求上下文中构建。
+
+如下图所示,分布式事务与用于分布式调用链追踪的zipkin[[5]](https://github.com/openzipkin/zipkin)的处理流程很类似,在服务提供方,omega会将请求拦截并从中提取请求信息中的全局事务id作为其自身的全局事务id(即Saga事件id),并将请求中的本地事务id作为其父事务id,且使用新生成的id作为本地事务id;在服务消费方,omega会将请求拦截并往其中添加当前的全局事务id和本地事务id。通过服务提供方和服务消费方的这种协作处理,子事务能连接起来形成一个完整的全局事务。
+
+![](/assets/images/pack/id_flow.png)
+
+omega在预处理阶段会先向alpha发送事务开始的事件,在后处理阶段会再向alpha发送事务结束的事件。alpha在收到事件后会进行持久化的存储。因此,每个成功的子事务都有一一对应的开始及结束事件。
+
+![](/assets/images/pack/omega_internal.png)
+
+在omega启动时会向alpha注册,使得异常或者超时场景下,alpha能通过回调向omega发送重试或补偿的命令和相应的调用参数,从而确保全局事务的一致性。
+
+## 具体处理流程
+
+### 成功场景
+
+全局事务开始前omega会先向alpha发送全局事务开始的事件,并在所有子事务完成时向alpha发送全局事务结束的事件。而每个子事务在执行前也会向alpha发送事务开始的事件,在成功执行后,会向alpha发送事务结束的事件。子事务间通过全局事务id连接在一起,但也因本地事务id而有所区分。因此,在成功场景下,每个开始的事件都会有对应的结束事件。
+
+![](/assets/images/pack/successful_scenario.png)
+
+### 异常场景
+
+在子事务执行期间抛出异常时,omega会向alpha上报aborted事件,然后alpha会向该全局事务的其它已完成的子事务发送补偿指令,确保最终同一全局事务下的所有子事务要么都成功,要么都回滚。由于事务中没有明确指定全局事务中的参与者,因此,alpha的扫描器会定期查询事件表并找出已完成所有补偿子事务的全局事务,然后对这些全局事务添加全局事务结束事件以保证事务的完整性。
+
+![](/assets/images/pack/exception_scenario.png)
+
+### 超时场景
+
+alpha的扫描器会定期扫描正在处理的事件状态,若发现事件超时,则会记录相应的aborted事件,然后alpha会向该全局事务的其它已完成的子事务发送补偿指令来恢复至事务开始前的状态。
+
+![](/assets/images/pack/timeout_scenario.png)
+
+## 如何使用?
+
+Saga的使用主要涵盖两方面,alpha的启动及omega的使用。
+
+### alpha的启动
+
+alpha启动前需要先运行数据库PostgreSQL:
+
+```bash
+docker run -d -e "POSTGRES_DB=saga" -e "POSTGRES_USER=saga" -e 
"POSTGRES_PASSWORD=password" -p 5432:5432 postgres
+```
+   
+在确保数据库正常启动后,即可运行alpha:
+
+```bash
+docker run -d -p 8090:8090 \
+  -e "JAVA_OPTS=-Dspring.profiles.active=prd" \
+  -e 
"spring.datasource.url=jdbc:postgresql://{docker.host.address}:5432/saga?useSSL=false"
 \
+  alpha-server:0.0.3-SNAPSHOT
+```
+
+### omega的使用
+
+omega的使用很简单,以一个简化的转账业务为例,同一笔转账要么转入和转出都成功,要么都失败。在这样一个业务中引入Saga,只需简单几步即可:
+
+1. 引入依赖
+   ```xml
+   
+ org.apache.servicecomb.saga
+ omega-spring-starter
+ 0.0.3-SNAPSHOT
 
 Review comment:
   You can use the release version here.


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


> add blogs to introduce saga's evolution
> ---
>
>

[jira] [Commented] (SCB-422) add executor metrics, not just queue size

2018-04-03 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/SCB-422?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16424866#comment-16424866
 ] 

ASF GitHub Bot commented on SCB-422:


coveralls commented on issue #633: [SCB-422] Threadpool metrics
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/633#issuecomment-378193360
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/16330757/badge)](https://coveralls.io/builds/16330757)
   
   Coverage increased (+0.07%) to 87.63% when pulling 
**e363450fc19701885bd260757d30bafa8a833668 on wujimin:threadpool-metrics** into 
**e0891a92a7d97f7b7a9a7402ac38128246729e83 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


> add executor metrics, not just queue size
> -
>
> Key: SCB-422
> URL: https://issues.apache.org/jira/browse/SCB-422
> Project: Apache ServiceComb
>  Issue Type: Sub-task
>  Components: Java-Chassis
>Reporter: wujimin
>Assignee: wujimin
>Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-458) add blogs to introduce saga's evolution

2018-04-03 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/SCB-458?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16424858#comment-16424858
 ] 

ASF GitHub Bot commented on SCB-458:


eric-lee-ltk opened a new pull request #54: SCB-458 add blog to introduce 
saga's evolution
URL: https://github.com/apache/incubator-servicecomb-website/pull/54
 
 
   Signed-off-by: Eric Lee 


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


> add blogs to introduce saga's evolution
> ---
>
> Key: SCB-458
> URL: https://issues.apache.org/jira/browse/SCB-458
> Project: Apache ServiceComb
>  Issue Type: Task
>  Components: website
>Reporter: Eric Lee
>Assignee: Eric Lee
>Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (SCB-460) Add blogs to introduce config-center integration in ServiceComb

2018-04-03 Thread Bo Li (JIRA)
Bo Li created SCB-460:
-

 Summary: Add blogs to introduce config-center integration in 
ServiceComb
 Key: SCB-460
 URL: https://issues.apache.org/jira/browse/SCB-460
 Project: Apache ServiceComb
  Issue Type: New Feature
  Components: website
Reporter: Bo Li
Assignee: Bo Li






--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (SCB-459) Update netty's version to 4.1.19 and vertx's version to 3.5.1

2018-04-03 Thread xuyiyun (JIRA)
xuyiyun created SCB-459:
---

 Summary: Update netty's version to 4.1.19 and vertx's version to 
3.5.1
 Key: SCB-459
 URL: https://issues.apache.org/jira/browse/SCB-459
 Project: Apache ServiceComb
  Issue Type: Task
  Components: Java-Chassis
Affects Versions: service-center-1.0.0-m2
Reporter: xuyiyun
Assignee: xuyiyun
 Fix For: service-center-1.0.0-m2


h3. {color:#33}{{1.Vertx fix thread-safety of 
RouteImpl:[https://github.com/vert-x3/vertx-web/pull/739]}}{color}
h3. {color:#33}{{2.Vertx 3.5.1 supporting netty 4.1.19, solved the problem 
of domain name resolution,do not need to configure ndots.}}{color}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (SCB-458) add blogs to introduce saga's evolution

2018-04-03 Thread Eric Lee (JIRA)
Eric Lee created SCB-458:


 Summary: add blogs to introduce saga's evolution
 Key: SCB-458
 URL: https://issues.apache.org/jira/browse/SCB-458
 Project: Apache ServiceComb
  Issue Type: Task
  Components: website
Reporter: Eric Lee
Assignee: Eric Lee






--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-456) Provider a way to input configuration from a Map, instead of micreservice.yaml

2018-04-03 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/SCB-456?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16424820#comment-16424820
 ] 

ASF GitHub Bot commented on SCB-456:


wujimin commented on issue #632: [SCB-456]Provider a way to input configuration 
from a Map
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/632#issuecomment-378444929
 
 
   what's requirements of this PR?
   just provide a chance for developers to init some configuration before 
servicecomb init?
   
   if we want to do this, just let developers invoke 
System.setProperties(Properties props), it's enough?


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


> Provider a way to input configuration from a Map, instead of  
> micreservice.yaml
> ---
>
> Key: SCB-456
> URL: https://issues.apache.org/jira/browse/SCB-456
> Project: Apache ServiceComb
>  Issue Type: Task
>Reporter: Minzhi Yan
>Assignee: Minzhi Yan
>Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (SCB-6) ServiceComb Java Chassis Metrics

2018-04-03 Thread Willem Jiang (JIRA)

 [ 
https://issues.apache.org/jira/browse/SCB-6?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Willem Jiang updated SCB-6:
---
Fix Version/s: (was: java-chassis-1.0.0-m1)
   java-chassis-1.0.0-m2

> ServiceComb Java Chassis Metrics
> 
>
> Key: SCB-6
> URL: https://issues.apache.org/jira/browse/SCB-6
> Project: Apache ServiceComb
>  Issue Type: New Feature
>  Components: Java-Chassis
>Reporter: yangyongzheng
>Assignee: yangyongzheng
>Priority: Major
> Fix For: java-chassis-1.0.0-m2
>
>
> As a microservice framework,servicecomb java chassis need support user 
> collect metrics such as tps,latency and system resource usage etc,then use 
> this collected data making some policy like scaling strategy further.
> The relation between Java Chassis and Java Chassis Metrics is similar to 
> Spring boot and Spring boot actuator.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-379) Support Spring AsyncRestTemplate

2018-04-03 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/SCB-379?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16424043#comment-16424043
 ] 

ASF GitHub Bot commented on SCB-379:


WillemJiang commented on a change in pull request #594: [SCB-379] support 
AsyncRestTemplate
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/594#discussion_r178828367
 
 

 ##
 File path: 
samples/springmvc-sample/springmvc-consumer/src/main/java/org/apache/servicecomb/samples/springmvc/consumer/SpringmvcConsumerMain.java
 ##
 @@ -64,10 +65,25 @@ public static void main(String[] args) throws Exception {
 System.out.println("AsyncRestTemplate Consumer sayHi services: " + 
responseEntity.getBody());
 
 HttpEntity entity = new HttpEntity<>(person);
-ListenableFuture exchange = cseAsyncRestTemplate
+ListenableFuture listenableFuture = 
cseAsyncRestTemplate
 .exchange("cse://springmvc/springmvchello/sayhello", HttpMethod.POST, 
entity, String.class);
-ResponseEntity responseEntity1 = exchange.get();
-System.out.println("AsyncRestTemplate Consumer sayHello services: " + 
responseEntity1.getBody());
+//ResponseEntity responseEntity1 = listenableFuture.get();
+//System.out.println("AsyncRestTemplate Consumer sayHello services: " + 
responseEntity1.getBody());
+
+listenableFuture.addCallback(
+new ListenableFutureCallback() {
+  @Override
+  public void onFailure(Throwable ex) {
+ex.printStackTrace();
 
 Review comment:
   Please printout the exception before printing the stack trace.


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


> Support Spring AsyncRestTemplate
> 
>
> Key: SCB-379
> URL: https://issues.apache.org/jira/browse/SCB-379
> Project: Apache ServiceComb
>  Issue Type: New Feature
>Reporter: Bo Li
>Assignee: Bo Li
>Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-456) Provider a way to input configuration from a Map, instead of micreservice.yaml

2018-04-03 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/SCB-456?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16424036#comment-16424036
 ] 

ASF GitHub Bot commented on SCB-456:


WillemJiang commented on a change in pull request #632: [SCB-456]Provider a way 
to input configuration from a Map
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/632#discussion_r178827369
 
 

 ##
 File path: 
foundations/foundation-config/src/main/java/org/apache/servicecomb/config/ConfigUtil.java
 ##
 @@ -52,9 +52,15 @@
 
   private static final String MICROSERVICE_CONFIG_LOADER_KEY = 
"cse-microservice-config-loader";
 
+  private static ConfigModel model = new ConfigModel();
+
   private ConfigUtil() {
   }
 
+  public static void addConfigs(Map config) {
 
 Review comment:
   As this method is just set the internal cofigModel,  it's better to use 
setConfigs instead of addConfigs.
   


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


> Provider a way to input configuration from a Map, instead of  
> micreservice.yaml
> ---
>
> Key: SCB-456
> URL: https://issues.apache.org/jira/browse/SCB-456
> Project: Apache ServiceComb
>  Issue Type: Task
>Reporter: Minzhi Yan
>Assignee: Minzhi Yan
>Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-456) Provider a way to input configuration from a Map, instead of micreservice.yaml

2018-04-03 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/SCB-456?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16423796#comment-16423796
 ] 

ASF GitHub Bot commented on SCB-456:


coveralls commented on issue #632: [SCB-456]Provider a way to input 
configuration from a Map
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/632#issuecomment-378196411
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/16311971/badge)](https://coveralls.io/builds/16311971)
   
   Coverage increased (+0.05%) to 87.601% when pulling 
**c0bc6264199d03d1dcda2bc08b86d137e0fd49a1 on jasononion:master** into 
**538bebfd242fa0633f19aabfb7a71e6d847d577c 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


> Provider a way to input configuration from a Map, instead of  
> micreservice.yaml
> ---
>
> Key: SCB-456
> URL: https://issues.apache.org/jira/browse/SCB-456
> Project: Apache ServiceComb
>  Issue Type: Task
>Reporter: Minzhi Yan
>Assignee: Minzhi Yan
>Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-422) add executor metrics, not just queue size

2018-04-03 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/SCB-422?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16423773#comment-16423773
 ] 

ASF GitHub Bot commented on SCB-422:


coveralls commented on issue #633: [SCB-422] Threadpool metrics
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/633#issuecomment-378193360
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/16311837/badge)](https://coveralls.io/builds/16311837)
   
   Coverage increased (+0.04%) to 87.601% when pulling 
**c26e9adc2af0a6607513c4c4e6712c45bbe6a618 on wujimin:threadpool-metrics** into 
**e0891a92a7d97f7b7a9a7402ac38128246729e83 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


> add executor metrics, not just queue size
> -
>
> Key: SCB-422
> URL: https://issues.apache.org/jira/browse/SCB-422
> Project: Apache ServiceComb
>  Issue Type: Sub-task
>  Components: Java-Chassis
>Reporter: wujimin
>Assignee: wujimin
>Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (SCB-446) metrics-prometheus switch to new mechanism

2018-04-03 Thread wujimin (JIRA)

 [ 
https://issues.apache.org/jira/browse/SCB-446?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

wujimin updated SCB-446:

Fix Version/s: java-chassis-1.0.0-m2

> metrics-prometheus switch to new mechanism
> --
>
> Key: SCB-446
> URL: https://issues.apache.org/jira/browse/SCB-446
> Project: Apache ServiceComb
>  Issue Type: Sub-task
>  Components: Java-Chassis
>Reporter: wujimin
>Assignee: wujimin
>Priority: Major
> Fix For: java-chassis-1.0.0-m2
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-422) add executor metrics, not just queue size

2018-04-03 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/SCB-422?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16423765#comment-16423765
 ] 

ASF GitHub Bot commented on SCB-422:


coveralls commented on issue #633: [SCB-422] Threadpool metrics
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/633#issuecomment-378193360
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/16311777/badge)](https://coveralls.io/builds/16311777)
   
   Coverage increased (+0.04%) to 87.601% when pulling 
**c26e9adc2af0a6607513c4c4e6712c45bbe6a618 on wujimin:threadpool-metrics** into 
**e0891a92a7d97f7b7a9a7402ac38128246729e83 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


> add executor metrics, not just queue size
> -
>
> Key: SCB-422
> URL: https://issues.apache.org/jira/browse/SCB-422
> Project: Apache ServiceComb
>  Issue Type: Sub-task
>  Components: Java-Chassis
>Reporter: wujimin
>Assignee: wujimin
>Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-456) Provider a way to input configuration from a Map, instead of micreservice.yaml

2018-04-03 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/SCB-456?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16423725#comment-16423725
 ] 

ASF GitHub Bot commented on SCB-456:


liubao68 closed pull request #632: [SCB-456]Provider a way to input 
configuration from a Map
URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/632
 
 
   

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/foundations/foundation-config/src/main/java/org/apache/servicecomb/config/ConfigUtil.java
 
b/foundations/foundation-config/src/main/java/org/apache/servicecomb/config/ConfigUtil.java
index fbef8a9a1..7e9917624 100644
--- 
a/foundations/foundation-config/src/main/java/org/apache/servicecomb/config/ConfigUtil.java
+++ 
b/foundations/foundation-config/src/main/java/org/apache/servicecomb/config/ConfigUtil.java
@@ -52,9 +52,15 @@
 
   private static final String MICROSERVICE_CONFIG_LOADER_KEY = 
"cse-microservice-config-loader";
 
+  private static ConfigModel model = new ConfigModel();
+
   private ConfigUtil() {
   }
 
+  public static void addConfigs(Map config) {
+model.setConfig(config);
+  }
+
   public static Object getProperty(String key) {
 Object config = DynamicPropertyFactory.getBackingConfigurationSource();
 return getProperty(config, key);
@@ -83,6 +89,9 @@ public static MicroserviceConfigLoader 
getMicroserviceConfigLoader(Configuration
   public static ConcurrentCompositeConfiguration createLocalConfig() {
 MicroserviceConfigLoader loader = new MicroserviceConfigLoader();
 loader.loadAndSort();
+if(model.getConfig() != null) {
+  loader.getConfigModels().add(model);
+}
 
 LOGGER.info("create local config:");
 for (ConfigModel configModel : loader.getConfigModels()) {
@@ -94,6 +103,8 @@ public static ConcurrentCompositeConfiguration 
createLocalConfig() {
 return config;
   }
 
+
+
   public static ConcurrentCompositeConfiguration 
createLocalConfig(List configModelList) {
 ConcurrentCompositeConfiguration config = new 
ConcurrentCompositeConfiguration();
 
diff --git 
a/foundations/foundation-config/src/test/java/org/apache/servicecomb/config/TestConfigUtil.java
 
b/foundations/foundation-config/src/test/java/org/apache/servicecomb/config/TestConfigUtil.java
index 27fe3586d..08846e1a5 100644
--- 
a/foundations/foundation-config/src/test/java/org/apache/servicecomb/config/TestConfigUtil.java
+++ 
b/foundations/foundation-config/src/test/java/org/apache/servicecomb/config/TestConfigUtil.java
@@ -27,6 +27,7 @@
 import java.util.Collections;
 import java.util.List;
 import java.util.Map;
+import java.util.HashMap;
 
 import org.apache.commons.configuration.AbstractConfiguration;
 import org.apache.commons.configuration.Configuration;
@@ -80,6 +81,16 @@ public static void tearDown() throws Exception {
 ArchaiusUtils.resetConfig();
   }
 
+  @Test
+  public void testAddConfig() {
+Map config = new HashMap();
+config.put("APPLICATION_ID", "app");
+ConfigUtil.addConfigs(config);
+ConcurrentCompositeConfiguration configuration = 
ConfigUtil.createLocalConfig();
+Assert.assertEquals(configuration.getString("APPLICATION_ID"), "app");
+
+  }
+
   @Test
   public void testCreateConfigFromConfigCenterNoUrl(@Mocked Configuration 
localConfiguration) {
 AbstractConfiguration configFromConfigCenter = 
ConfigUtil.createConfigFromConfigCenter(localConfiguration);


 


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


> Provider a way to input configuration from a Map, instead of  
> micreservice.yaml
> ---
>
> Key: SCB-456
> URL: https://issues.apache.org/jira/browse/SCB-456
> Project: Apache ServiceComb
>  Issue Type: Task
>Reporter: Minzhi Yan
>Assignee: Minzhi Yan
>Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-456) Provider a way to input configuration from a Map, instead of micreservice.yaml

2018-04-03 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/SCB-456?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16423726#comment-16423726
 ] 

ASF GitHub Bot commented on SCB-456:


jasononion opened a new pull request #632: [SCB-456]Provider a way to input 
configuration from a Map
URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/632
 
 
   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


> Provider a way to input configuration from a Map, instead of  
> micreservice.yaml
> ---
>
> Key: SCB-456
> URL: https://issues.apache.org/jira/browse/SCB-456
> Project: Apache ServiceComb
>  Issue Type: Task
>Reporter: Minzhi Yan
>Assignee: Minzhi Yan
>Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-422) add executor metrics, not just queue size

2018-04-03 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/SCB-422?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16423656#comment-16423656
 ] 

ASF GitHub Bot commented on SCB-422:


wujimin opened a new pull request #633: [SCB-422] Threadpool metrics
URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/633
 
 
   metrics for operation related threadpool
   
![image](https://user-images.githubusercontent.com/16874843/38238630-0963200e-375d-11e8-95c6-2d65272102dd.png)
   
   
   
![image](https://user-images.githubusercontent.com/16874843/38238615-fad45242-375c-11e8-8b67-063b3b54456f.png)
   


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


> add executor metrics, not just queue size
> -
>
> Key: SCB-422
> URL: https://issues.apache.org/jira/browse/SCB-422
> Project: Apache ServiceComb
>  Issue Type: Sub-task
>  Components: Java-Chassis
>Reporter: wujimin
>Assignee: wujimin
>Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Resolved] (SCB-385) metrics publisher switch to new mechanism

2018-04-03 Thread wujimin (JIRA)

 [ 
https://issues.apache.org/jira/browse/SCB-385?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

wujimin resolved SCB-385.
-
   Resolution: Done
Fix Version/s: java-chassis-1.0.0-m2

> metrics publisher switch to new mechanism
> -
>
> Key: SCB-385
> URL: https://issues.apache.org/jira/browse/SCB-385
> Project: Apache ServiceComb
>  Issue Type: Sub-task
>  Components: Java-Chassis
>Reporter: wujimin
>Assignee: wujimin
>Priority: Major
> Fix For: java-chassis-1.0.0-m2
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-385) metrics publisher switch to new mechanism

2018-04-03 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/SCB-385?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16423652#comment-16423652
 ] 

ASF GitHub Bot commented on SCB-385:


wujimin closed pull request #628: [SCB-385] Metrics publisher switch to new 
mechanism
URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/628
 
 
   

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/demo/demo-springmvc/springmvc-client/src/main/java/org/apache/servicecomb/demo/springmvc/client/SpringmvcClient.java
 
b/demo/demo-springmvc/springmvc-client/src/main/java/org/apache/servicecomb/demo/springmvc/client/SpringmvcClient.java
index 42d543752..fa53abc16 100644
--- 
a/demo/demo-springmvc/springmvc-client/src/main/java/org/apache/servicecomb/demo/springmvc/client/SpringmvcClient.java
+++ 
b/demo/demo-springmvc/springmvc-client/src/main/java/org/apache/servicecomb/demo/springmvc/client/SpringmvcClient.java
@@ -96,20 +96,14 @@ public static void run() {
 }
 
 //0.5.0 later version metrics integration test
-try {
-  Thread.sleep(1000);
-  @SuppressWarnings("unchecked")
-  Map metrics = restTemplate.getForObject(prefix + 
"/metrics", Map.class);
-
-  TestMgr
-  .check(true, metrics.get("jvm(name=heapUsed,statistic=gauge)") != 0);
-  TestMgr.check(true, metrics.size() > 0);
-  TestMgr.check(true,
-  metrics.get(
-  
"servicecomb.invocation(operation=springmvc.codeFirst.saySomething,role=producer,stage=total,statistic=count,status=200)")
 >= 0);
-} catch (Exception e) {
-  TestMgr.check("true", "false");
-}
+@SuppressWarnings("unchecked")
+Map metrics = restTemplate.getForObject(prefix + 
"/metrics", Map.class);
+
+//TestMgr.check(true, metrics.get("jvm(name=heapUsed,statistic=gauge)") != 
0);
+TestMgr.check(true, metrics.size() > 0);
+TestMgr.check(true,
+metrics.get(
+
"servicecomb.invocation(operation=springmvc.codeFirst.saySomething,role=PRODUCER,stage=total,statistic=count,status=200,transport=highway)")
 >= 0);
 
 //prometheus integration test
 try {
diff --git 
a/demo/demo-springmvc/springmvc-server/src/main/resources/microservice.yaml 
b/demo/demo-springmvc/springmvc-server/src/main/resources/microservice.yaml
index be64c9e6c..fbe42c314 100644
--- a/demo/demo-springmvc/springmvc-server/src/main/resources/microservice.yaml
+++ b/demo/demo-springmvc/springmvc-server/src/main/resources/microservice.yaml
@@ -82,6 +82,3 @@ ssl.keyStoreValue: Changeme_123
 ssl.crl: revoke.crl
 ssl.sslCustomClass: org.apache.servicecomb.demo.DemoSSLCustom
 
-servicecomb:
-  metrics:
-window_time: 1000
diff --git a/metrics/metrics-core/pom.xml b/metrics/metrics-core/pom.xml
index f4d1e761b..360c0b6d7 100644
--- a/metrics/metrics-core/pom.xml
+++ b/metrics/metrics-core/pom.xml
@@ -30,16 +30,16 @@
 
   
 
-  com.netflix.servo
-  servo-core
+  org.apache.servicecomb
+  foundation-metrics
 
 
   org.apache.servicecomb
-  foundation-metrics
+  java-chassis-core
 
 
   org.apache.servicecomb
-  provider-springmvc
+  swagger-generator-jaxrs
 
 
 
diff --git 
a/metrics/metrics-core/src/main/java/org/apache/servicecomb/metrics/core/MetricsBootListener.java
 
b/metrics/metrics-core/src/main/java/org/apache/servicecomb/metrics/core/MetricsBootListener.java
index 48c2837b3..289c8796f 100644
--- 
a/metrics/metrics-core/src/main/java/org/apache/servicecomb/metrics/core/MetricsBootListener.java
+++ 
b/metrics/metrics-core/src/main/java/org/apache/servicecomb/metrics/core/MetricsBootListener.java
@@ -16,9 +16,18 @@
  */
 package org.apache.servicecomb.metrics.core;
 
+import javax.inject.Inject;
+
 import org.apache.servicecomb.core.BootListener;
+import org.apache.servicecomb.core.definition.schema.ProducerSchemaFactory;
 import org.apache.servicecomb.foundation.common.event.EventManager;
+import org.apache.servicecomb.foundation.common.utils.SPIServiceUtils;
 import org.apache.servicecomb.foundation.metrics.MetricsBootstrap;
+import org.apache.servicecomb.foundation.metrics.MetricsInitializer;
+import org.apache.servicecomb.metrics.core.publish.HealthCheckerRestPublisher;
+import org.apache.servicecomb.metrics.core.publish.MetricsRestPublisher;
+import org.apache.servicecomb.serviceregistry.RegistryUtils;
+import org.apache.servicecomb.serviceregistry.api.registry.Microservice;
 import org.springframework.stereotype.Component;
 
 import com.netflix.spectator.api.Spectator;
@@ -27,12 +36,36 @@
 public class MetricsBootListener implements BootListener {
   private MetricsBootstrap metricsBootstrap = new MetricsBootstrap();
 
+  @Inject
+  

[jira] [Commented] (SCB-441) Provide Maven Archetype of business-service-jaxrs

2018-04-03 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/SCB-441?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16423542#comment-16423542
 ] 

ASF GitHub Bot commented on SCB-441:


liubao68 closed pull request #622: [SCB-441] Provide Maven Archetype of 
business-service-jaxrs
URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/622
 
 
   

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/archetypes/README.md b/archetypes/README.md
new file mode 100644
index 0..e71f2d0e1
--- /dev/null
+++ b/archetypes/README.md
@@ -0,0 +1,39 @@
+## ServiceComb Java Chassis Archetypes
+### What's maven archetypes
+From 
http://maven.apache.org/guides/introduction/introduction-to-archetypes.html :
+
+>In short, Archetype is a Maven project templating toolkit. An archetype is 
defined as an original pattern or model from which all other things of the same 
kind are made. The name fits as we are trying to provide a system that provides 
a consistent means of generating Maven projects. Archetype will help authors 
create Maven project templates for users, and provides users with the means to 
generate parameterized versions of those project templates.
+
+### What we provide
+1. business-service-jaxrs  
+  Archetype for create a common microservice using jaxrs provider.
+
+more coming soon.. 
+
+### How to build these archetypes
+We use **business-service-jaxrs** as an example :
+```bash
+cd archetypes/business-service-jaxrs
+mvn archetype:create-from-project
+#Wait until successed, archetype will be generated at 
target/generated-sources/archetype
+cd target/generated-sources/archetype
+#Install archetype to your local maven repository
+mvn install
+```
+*Notice: The archetype ArtifactId of business-service-jaxrs is 
business-service-jaxrs-**archetype.***
+
+We will publish these archetypes to maven center repository since 1.0.0-m2.
+
+### How to use these archetypes to generate a project
+We use **business-service-jaxrs** as an example :
+ Generate via IntelliJ IDEA  
+New Project(Module) -> Maven -> Check "Create from archetype" -> Add 
Archetype... -> fill *GroupId* with value "org.apache.servicecomb.archetypes", 
fill *ArtifactId* with value "business-service-jaxrs-archetype", fill *Version* 
with current archetype version -> select this archetype that had listed, do 
next steps.
+
+ Generate via Eclipse  
+New Project(Module) -> Maven -> Next -> Add Archetype... -> fill *GroupId* 
with value "org.apache.servicecomb.archetypes", fill *ArtifactId* with value 
"business-service-jaxrs-archetype", fill *Version* with current archetype 
version -> select this archetype that had listed, do next steps.
+
+ Generate via command
+```bash
+mvn archetype:generate -DarchetypeGroupId=org.apache.servicecomb.archetypes 
-DarchetypeArtifactId=business-service-jaxrs-archetype 
-DarchetypeVersion=${archetype-version}
+```
+In console Interactive mode, input your GroupId, ArtifactId and Version of new 
project(module), after a while the new project will be generated.
\ No newline at end of file
diff --git a/archetypes/business-service-jaxrs/README.md 
b/archetypes/business-service-jaxrs/README.md
new file mode 100644
index 0..43c1dac3f
--- /dev/null
+++ b/archetypes/business-service-jaxrs/README.md
@@ -0,0 +1,20 @@
+## Welcome to use ServiceComb Java Chassis
+This project(module) is generate by 
*org.apache.servicecomb.archetypes:business-service-jaxrs-archetype*, it use 
**jaxrs provider** to develop service endpoint.  
+
+### More works can be done further:
+1. Modify "HelloEndpoint", add your business service logic, or create some new 
endpoints to provide your services. More details can be found : 
http://servicecomb.incubator.apache.org/users/develop-with-jax-rs/
+2. Modify "microservice.yaml", change APPLICATION_ID, 
service_description.name, version, and service center address, endpoints 
publish address etc. More details can be found : 
http://servicecomb.incubator.apache.org/users/service-definition/
+3. Modify setting value of "mainClass" in pom.xml for package.
+
+### Package your service
+Under project(module) root folder, run 
+```bash
+mvn package
+```
+Then you can get outputs in target folder:   
+- lib : contains all dependencies jars   
+- xx-{version}.jar   
+```bash
+java -jar xx-{version}.jar
+```
+*Notice: If you need to modify config setting in "microservice.yaml" like 
service center address but don't want repackage the executable jar, **you can 
direct place a new "microservice.yaml" file in same folder, then settings will 
be overridden.***
\ No newline at end of file
diff --git a/archetypes/business-service-jaxrs/pom.xml 
b/archetypes/business-service-jaxrs/pom.xml
new file mode 100644