-
Notifications
You must be signed in to change notification settings - Fork 826
[JAV-566] report type/version when register to SC #440
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
weichao666
commented
Dec 15, 2017
- SDK report their framework type and version when register to SC
- Each service with specific version has a certain framework+version
- Present the type/version information in console in Service+Version level
- In gov service, send the different command to CC according to the type/version when doing management
private Map<String, String> framework = new HashMap<>(); | ||
|
||
@JsonProperty(value = "registerBy") | ||
private String registeredBy; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why the key of the property differs from the variable name?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ServiceCenter provider "registerBy" to us, sdk use the "registeredBy" to fit the semantics more
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That makes sense. Thanks for the explanation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can not understand.
Microservice class can express self and others
so when your said "registerBy" or "registeredBy", there are all correct and all wrong.
public class Microservice { | ||
private String serviceId; | ||
|
||
private Map<String, String> framework = new HashMap<>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why a map, why not a model?
|
||
Map<String, String> framework = new HashMap<>(); | ||
framework.put("name", configuration.getString(CONFIG_MICROSERVICE_DEVELOPMENT_FRAMEWORK_KEY, DEFAULT_MICROSERVICE_DEVELOPMENT_FRAMEWORK)); | ||
framework.put("version", configuration.getString(CONFIG_MICROSERVICE_DEVELOPMENT_FRAMEWORK_VERSION_KEY, "")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
default to version in pom?
framework.put("version", configuration.getString(CONFIG_MICROSERVICE_DEVELOPMENT_FRAMEWORK_VERSION_KEY, "")); | ||
microservice.setFramework(framework); | ||
String str = ""; | ||
if (configuration.getString(CONFIG_MICROSERVICE_REGISTER_WAY_KEY, "") != null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can get a null value in this place?
/** | ||
* Created by on 2017/12/15. | ||
*/ | ||
public enum MicroserviceRegisterWay { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just a string, why we need a enum?
some day, add a type, all sdk must update, otherwise will got a unknown?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SC's data dictionary shows it's a enum type
we have servicecomb and cse version, which one will we report |