You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicecomb.apache.org by bismy <bi...@qq.com> on 2018/04/10 09:43:05 UTC
[java-chassis and other]About naming conventions for Microservice Name, Schema Id and Operation Id
Hi All,
Background:
As many features depend on these name and frequently used in yamls, environment keys, and in program parsing, like in PR: https://github.com/apache/incubator-servicecomb-java-chassis/pull/577
If name conventions is not defined, this will cause a lot of compatible issue.
e.g. when PR #577 has merged, following code will not work
1. RPC define
@RpcSchema()
class xxx
2. RPC Referent
@RpcReference(microserviceName="xx')
Service s
Suggestions:
1. require Microservice Name, Schema Id and Operation Id to follow the naming convention: ^[a-zA-Z]+[a-zA-Z]*
2. validate names when startup. Do not support default schemaId features, users must specify it implicitly.
3. Given errors and suggestions(e.g. operation id not valid, use @ApiOpertion to give explicit id.
Any suggestions and regards.
回复: [java-chassis and other]About naming conventions for MicroserviceName, Schema Id and Operation Id
Posted by bismy <bi...@qq.com>.
This is a proposal and not implement yet. I am thinking a better way to solve this problem.
Maybe we first print some convention check warning messages and make this change in the near future.
I am going to submit a PR to demonstrate that.
------------------ 原始邮件 ------------------
发件人: "willem.jiang"<wi...@gmail.com>;
发送时间: 2018年4月11日(星期三) 晚上6:02
收件人: "dev"<de...@servicecomb.apache.org>;
主题: Re: [java-chassis and other]About naming conventions for MicroserviceName, Schema Id and Operation Id
Hi Liubo,
I think it's import to document this kind compatible change in our release
note.
Please update the release note file[1], with a new section of break change
to highlight this issue and provide suggestion for the user.
[1]
https://github.com/apache/incubator-servicecomb-java-chassis/blob/master/etc/releaseNotes.md
Willem Jiang
Blog: http://willemjiang.blogspot.com (English)
http://jnn.iteye.com (Chinese)
Twitter: willemjiang
Weibo: 姜宁willem
On Tue, Apr 10, 2018 at 5:43 PM, bismy <bi...@qq.com> wrote:
> Hi All,
>
>
> Background:
> As many features depend on these name and frequently used in yamls,
> environment keys, and in program parsing, like in PR:
> https://github.com/apache/incubator-servicecomb-java-chassis/pull/577
>
>
> If name conventions is not defined, this will cause a lot of compatible
> issue.
>
>
> e.g. when PR #577 has merged, following code will not work
>
>
> 1. RPC define
> @RpcSchema()
> class xxx
>
>
> 2. RPC Referent
> @RpcReference(microserviceName="xx')
> Service s
>
>
> Suggestions:
> 1. require Microservice Name, Schema Id and Operation Id to follow the
> naming convention: ^[a-zA-Z]+[a-zA-Z]*
> 2. validate names when startup. Do not support default schemaId features,
> users must specify it implicitly.
> 3. Given errors and suggestions(e.g. operation id not valid, use
> @ApiOpertion to give explicit id.
>
>
>
>
> Any suggestions and regards.
Re: [java-chassis and other]About naming conventions for Microservice
Name, Schema Id and Operation Id
Posted by Willem Jiang <wi...@gmail.com>.
Hi Liubo,
I think it's import to document this kind compatible change in our release
note.
Please update the release note file[1], with a new section of break change
to highlight this issue and provide suggestion for the user.
[1]
https://github.com/apache/incubator-servicecomb-java-chassis/blob/master/etc/releaseNotes.md
Willem Jiang
Blog: http://willemjiang.blogspot.com (English)
http://jnn.iteye.com (Chinese)
Twitter: willemjiang
Weibo: 姜宁willem
On Tue, Apr 10, 2018 at 5:43 PM, bismy <bi...@qq.com> wrote:
> Hi All,
>
>
> Background:
> As many features depend on these name and frequently used in yamls,
> environment keys, and in program parsing, like in PR:
> https://github.com/apache/incubator-servicecomb-java-chassis/pull/577
>
>
> If name conventions is not defined, this will cause a lot of compatible
> issue.
>
>
> e.g. when PR #577 has merged, following code will not work
>
>
> 1. RPC define
> @RpcSchema()
> class xxx
>
>
> 2. RPC Referent
> @RpcReference(microserviceName="xx')
> Service s
>
>
> Suggestions:
> 1. require Microservice Name, Schema Id and Operation Id to follow the
> naming convention: ^[a-zA-Z]+[a-zA-Z]*
> 2. validate names when startup. Do not support default schemaId features,
> users must specify it implicitly.
> 3. Given errors and suggestions(e.g. operation id not valid, use
> @ApiOpertion to give explicit id.
>
>
>
>
> Any suggestions and regards.