Re: Removing the kamon code from ServiceComb-Pack Alpha Server

2019-08-07 Thread zhang_lei
+1I agree with you 
 原始信息 由: Willem Jiang  日期: 2019/8/8  
11:27  (GMT+08:00) 收件人: dev  主题: Removing the kamon 
code from ServiceComb-Pack Alpha Server Hi,Last year we add the Kamon[1] for 
the measure the performance of AlphaServer, but unfortunately we barely use it 
because we cannot get afull latency picture of it.As we are introduce fsm which 
is base on Akka into ServiceComb-Pack,it's time to think about removing the 
Kamon code to avoid theconflicts of Akka library.Any 
thoughts?[1]https://kamon.io/Willem JiangTwitter: willemjiangWeibo: 姜宁willem

Re: [VOTE] Drop the support of Spring Boot 1.x for ServiceComb-Pack

2019-07-31 Thread zhang_lei
The vote is over. Can we start this work?Lei Zhang 
 原始信息 由: Willem Jiang  日期: 2019/7/29  
17:41  (GMT+08:00) 收件人: dev  主题: [VOTE] Drop the 
support of Spring Boot 1.x for ServiceComb-Pack Hi Team,As we discussed in the 
this thread[1].  I propose that we drop theSpring Boot 1.x support both Alpha 
and Omega side to save somedevelopment resources.This voting ends 72 hours from 
today.[1]https://lists.apache.org/thread.html/545f554a6ebd3ff195c9038c65418f02b5b7b439b179cd10d390e7ba@%3Cdev.servicecomb.apache.org%3EWillem
 JiangTwitter: willemjiangWeibo: 姜宁willem

Re: [VOTE]Service mesh proposal

2019-06-21 Thread zhang_lei
+1
 原始信息 由: Xiaoliang Tian  日期: 
2019/6/21  16:40  (GMT+08:00) 收件人: dev@servicecomb.apache.org 主题: [VOTE]Service 
mesh proposal Hi All,   this is a call for vote to bring service mesh called 
"mesher" intoApache Software Foundation (ASF) as ServiceComb's 
sub-project.Voting will start now ( Wednesday, 5th June, 2019) and willremain 
open for at-least 72 hours, Request all PMC members togive their vote.[ ] +1 
Accept[ ] +0 No Opinion[ ] -1 Reject because...

Re: [Saga] About Omega's timeout process

2019-04-26 Thread zhang_lei
Oh, I haven’t been able to simulate my guess.发送自我的三星盖乐世智能手机。
 原始信息 由: Zheng Feng  日期: 2019/4/26  18:52  
(GMT+08:00) 收件人: dev@servicecomb.apache.org 主题: Re: [Saga] About Omega's 
timeout process Why does this happen I mean that Thread.interrupt causes the 
ThreadLocalvariables lost the value ? It should be running in the same thread. 
Also itdoes not mention in the Java API docs [1].I do agree that the compensate 
method could have this issue since it hasbeen invoking in the different thread. 
But for the Zhang Lei's proposal forthe timeout solution, I don't think this 
could happen or maybe Imisunderstand something else.Regards,Zheng 
Feng[1]https://docs.oracle.com/javase/7/docs/api/java/lang/Thread.html#interrupt()Willem
 Jiang  于2019年4月26日周五 下午6:41写道:> Yeah, that's exactly 
what want to say.>> Willem Jiang>> Twitter: willemjiang> Weibo: 姜宁willem>> On 
Fri, Apr 26, 2019 at 4:14 PM Zhang Lei  wrote:> >> > Hi, 
Willem Jiang> >> > You mean that Thread.interrupt will cause the variables in 
the thread to> be lost, so we need to provide a way for the user to restore the 
thread> variables?> >> > Lei Zhang> >> > > 在 2019年4月26日,上午8:36,Willem Jiang 
 写道:> > >> > > We could introduce a Context object to 
let the user copy the thread> > > local variable across the thread.> > > The 
context can be inject into the method which is annotated with> > > Compasiable. 
 We may need to inject the Context object into the remote> > > service caller.> 
>>

Re: [VOTE] Release Apache ServiceComb Pack version 0.4.0 (RC-02)

2019-04-01 Thread zhang_lei
+1 (no-binding)

alpha cluster PASS
alpha random port PASS
alpha register to consul PASS


Zhang Lei.



> 在 2019年4月2日,上午6:23,Mohammad Asif Siddiqui  写道:
> 
> Hi All,  
> 
> This is a call for Vote to release Apache ServiceComb Pack version 0.4.0 
> (RC-02)  
> 
> Release Candidate : 
> https://dist.apache.org/repos/dist/dev/servicecomb/servicecomb-pack/0.4.0/rc-02/
>  
> 
> Staging Repository : 
> https://repository.apache.org/content/repositories/orgapacheservicecomb-1380 
> 
> Release Tag : https://github.com/apache/servicecomb-pack/releases/tag/0.4.0  
> 
> Release CommitID : c2b1a6d603b0fb3d658a495da29d6f864995b538  
> 
> Release Notes : 
> https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12321626&version=12344102
>   
> 
> Keys to verify the Release Candidate : 
> https://dist.apache.org/repos/dist/dev/servicecomb/KEYS  
> 
> Voting will start now ( Tuesday, 2nd April, 2019) and will remain open for 
> at-least 72 hours, Request all PMC members to give their vote.  
> 
> [ ] +1 Release this package as 0.4.0  
> [ ] +0 No Opinion  
> [ ] -1 Do not release this package because  
> 
> On the behalf of ServiceComb Team  
> Mohammad Asif Siddiqui



Re: Release of ServiceComb

2019-03-25 Thread zhang_lei
I used the release version locally to complete the following tests

# Cluster
1. alpha cluster master node switch - Pass
2. random gRPC port - Pass
3. alpha cluster with random gRPC port - Failure

# Eureka
4. alpha register to Eureka - Pass
5. alpha cluster register to Eureka - Pass
6. alpha cluster register to Eureka with random gRPC port - Pass

# Consul
7. alpha register to Consul - Pass
8. alpha cluster register to Consul - Pass 
9. alpha cluster register to Consul with random gRPC port - Failure

The two failed tests are related to random ports, I have submitted PR to solve
3. alpha cluster with random gRPC port - Fixed SCB-1216
9. alpha cluster register to Consul with random gRPC port - Fixed SCB-1217


coolbeevip

BOCO



> 在 2019年3月6日,下午2:29,Willem Jiang  写道:
> 
> It's time for us to think about ServiceComb release now.
> 
> As usual, we will release ServiceComb Java-Chassis 1.2.0,  ServiceComb
> ServiceCenter  1.2.0 at the end of this month, then we will release
> ServiceComb Pack 0.4.0.
> 
> Please reply the mail if you have any questions about the release plan.
> 
> Willem Jiang
> 
> Twitter: willemjiang
> Weibo: 姜宁willem



Re: [Saga] Ask questions about the Saga transaction process

2019-03-22 Thread zhang_lei
Thank you for your reply, I agree, if we want to use the state machine, we need 
to analyze the state combination and switch first发送自我的三星盖乐世智能手机。
 原始信息 由: Zheng Feng  日期: 2019/3/22  17:45  
(GMT+08:00) 收件人: dev@servicecomb.apache.org 主题: Re: [Saga] Ask questions about 
the Saga transaction process It looks like you try to mix the success scenario, 
failure and compensatescenario, timeout scenario in the one picture ? I think 
it could be betterto separate into the different scenarios.As Willem mentioned, 
the timeout scenario is much more complicated. Anyway,this is a good idea to 
find out how we handle the saga events.Btw, I think this could be very helpful 
for us to define the state machineof the alpha server. Thanks for your 
contributions !Regards,Zheng fengzhang_...@boco.com.cn  
于2019年3月21日周四 下午3:25写道:> This is a light version>>> 
https://raw.githubusercontent.com/coolbeevip/servicecomb-pack-notes/master/ServiceComb%20Alpha%20Saga/assets/sequence-booking-request-hotel-timeout.png>>
 张 磊> > 部门: 亿阳信通IT运维支撑产品线> 地址: 
北京市海淀区杏石口路99号西山赢府商务中心2410> 邮编: 100093> 手机: 18610099300> 
移邮:zhang_...@boco.com.cn>> > 在 2019年3月21日,上午11:47,zhang_...@boco.com.cn 写道:> >> 
> The following link is a sequence diagram, step 4 cannot be compensated.> Will 
this happen?> >> >> 
https://github.com/coolbeevip/servicecomb-pack-notes/blob/master/ServiceComb%20Alpha%20EventScanner/assets/sequence-booking-request-hotel-timeout.png?raw=true>
 >> > coolbeevip> > > > BOCO> >> >> >>>

Spring boot version compatibility issue when using actuator in Alpha

2019-01-30 Thread zhang_lei
1. I want to extend management based on Actuator in Alpha,But the custom  of 
Actuator is not compatible in spring boot 1.x and spring boot 2.x
I think it can be solved by adding  alpha-spring-boot-compatibility module, 
alpha-spring-boot-compatibility contains alpha-spring-boot-1-starter and 
alpha-spring-boot-2-starter. 


Customize Alpha Endpoint in spring boot 1.x
package org.apache.servicecomb.pack.alpha.server.actuate.endpoint;

import org.apache.servicecomb.pack.alpha.core.NodeStatus;
import org.apache.servicecomb.pack.alpha.core.actuate.endpoint.AlphaStatus;
import org.springframework.boot.actuate.endpoint.Endpoint;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

@ConfigurationProperties(prefix = "endpoints.alpha")
@Component
public class AlphaEndpoint implements Endpoint {

  public static final String END_POINT_ID = "alpha";

  private AlphaStatus alphaStatus = new AlphaStatus();

  @Override
  public String getId() {
return END_POINT_ID;
  }

  @Override
  public boolean isEnabled() {
return true;
  }

  @Override
  public boolean isSensitive() {
return false;
  }

  @Override
  public AlphaStatus invoke() {
alphaStatus.setNodeType(NodeStatus.TypeEnum.MASTER);
return alphaStatus;
  }

}


Customize Alpha Endpoint in spring boot 2.x
package org.apache.servicecomb.pack.alpha.server.actuate.endpoint;

import org.apache.servicecomb.pack.alpha.core.NodeStatus;
import org.apache.servicecomb.pack.alpha.core.actuate.endpoint.AlphaStatus;
import org.springframework.boot.actuate.endpoint.annotation.Endpoint;
import org.springframework.boot.actuate.endpoint.annotation.ReadOperation;
import org.springframework.context.annotation.Configuration;


@Configuration
@Endpoint(id = "alpha")
public class AlphaEndPoint {

  private AlphaStatus alphaStatus = new AlphaStatus();

  @ReadOperation
  public AlphaStatus endpoint() {
alphaStatus.setNodeType(NodeStatus.TypeEnum.MASTER);
return alphaStatus;
  }
}


Add dependencies in Alpha server,it version same ${spring.boot.version}

  org.apache.servicecomb.pack
  alpha-spring-boot-starter
  ${spring.boot.version}


2. Additional features
Same Actuator Endpoint access path with spring boot 1.x and spring boot 2.x
Customized ActuatorEndpoint compatible spring boot 2.x actuator in spring boot 
1.x, You can access it via http://127.0.0 .1/actuator/xxx when 
using spring boot 1.x

Define ActuatorEndpoint class
package org.apache.servicecomb.pack.alpha.server.actuate.endpoint;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.actuate.endpoint.Endpoint;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class ActuatorEndpoint implements Endpoint> {

  @Autowired
  private List endpoints;

  @Override
  public String getId() {
return "actuator";
  }

  @Override
  public boolean isEnabled() {
return true;
  }

  @Override
  public boolean isSensitive() {
return false;
  }

  @Override
  public List invoke() {
return endpoints;
  }
}
Define ActuatorMvcEndpoint class
package org.apache.servicecomb.pack.alpha.server.actuate.endpoint.mvc;

import 
org.apache.servicecomb.pack.alpha.server.actuate.endpoint.ActuatorEndpoint;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.actuate.endpoint.Endpoint;
import org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.*;

import java.util.Optional;
import java.util.function.Predicate;
import java.util.function.Supplier;

import static java.util.Optional.ofNullable;

@Component
public class ActuatorMvcEndpoint extends EndpointMvcAdapter {

  private final ActuatorEndpoint delegate;

  @Autowired
  public ActuatorMvcEndpoint(ActuatorEndpoint delegate) {
super(delegate);
this.delegate = delegate;
  }

  @RequestMapping(value = "/{endpoint}", method = RequestMethod.GET)
  @ResponseBody
  public Object endpoint(@PathVariable("endpoint") String id, 
@RequestParam(required = false) Boolean enabled,
 @RequestParam(required = false) Boolean sensitive) {
Predicate isEnabled =
endpoint -> matches(endpoint::isEnabled, ofNullable(enabled));

Predicate isSensitive =
endpoint -> matches(endpoint::isSensitive, ofNullable(sensitive));

Predicate matchEndPoint =
endpoint -> matches(endpoint::getId, ofNullable(id));

return this.delegate.invoke().stream()
.filter(matchEndPoint.and(isEnabled.and(isSensitive)))
.findAny().get().invoke();
  }

  private  boolean matches(Supplier supplier, Optional value) {
return !value.isPresent() || supplier.get().equals(value.get());
  }
}


张 磊

部门: 亿阳信通IT运维支撑产品线
地址: 北京市海淀区杏石口路99号西山赢府商务中心2410 
邮编: