You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2018/07/10 08:27:25 UTC
[GitHub] wujimin commented on a change in pull request #791: [SCB-716]
Implementation of Local Service Registry Demo
wujimin commented on a change in pull request #791: [SCB-716] Implementation of Local Service Registry Demo
URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/791#discussion_r201256164
##########
File path: samples/local-service-registry/README.md
##########
@@ -0,0 +1,49 @@
+## Local registry
+
+User can use local registry mechanisam and can connect server endpoints without using service center.
+For local registry mechanism user should provide the local registry file at consumer side.
+User can start provider service and get the provider schema file and put at the consumer side.
+Consumer will use local registry function and it will connect the server end points.
+
+Please find the details as follows.
+
+## Provider Side
+
+* run the provider with/without service center and get the schema file.
+
+## Consumer Side changes
+
+* Add local registry file registry.yaml :
+
+ ```yaml
+ localserv:
+ - id: "100"
+ version: "0.0.1"
+ appid: localservreg
+ schemaIds:
+ - localservregistry
+ instances:
+ - endpoints:
+ - rest://localhost:8080
+ - highway://localhost:7070
+ ```
+
+* Add the following code at the beginning and end of the service consumer Main function
+
+```java
+ public class xxxClient {
+ public static void main(String[] args) {
+ System.setProperty("local.registry.file", "/yourpath/registry.yaml");
+ //your code
+ System.clearProperty("local.registry.file");
Review comment:
why we need a clear action?
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services