Skip to content

Conversation

weichao666
Copy link
Contributor

  1. SDK report their framework type and version when register to SC
  2. Each service with specific version has a certain framework+version
  3. Present the type/version information in console in Service+Version level
  4. In gov service, send the different command to CC according to the type/version when doing management

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.06%) to 86.713% when pulling b3f92ff on weichao666:JAV566CSE769 into aaaceec on ServiceComb:master.

private Map<String, String> framework = new HashMap<>();

@JsonProperty(value = "registerBy")
private String registeredBy;
Copy link
Contributor

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?

Copy link
Contributor Author

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

Copy link
Contributor

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.

Copy link
Contributor

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<>();
Copy link
Contributor

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, ""));
Copy link
Contributor

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) {
Copy link
Contributor

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 {
Copy link
Contributor

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?

Copy link
Contributor Author

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

@wujimin
Copy link
Contributor

wujimin commented Dec 21, 2017

we have servicecomb and cse version, which one will we report

@weichao666 weichao666 closed this Dec 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants