popozy commented on a change in pull request #697:
URL: 
https://github.com/apache/servicecomb-service-center/pull/697#discussion_r494719912



##########
File path: server/service/ms/datasource.go
##########
@@ -18,10 +18,11 @@ package ms
 import (
        "context"
        pb "github.com/apache/servicecomb-service-center/pkg/registry"
+       "github.com/apache/servicecomb-service-center/server/plugin/registry"
 )
 
 type DataSource interface {
-       RegisterService(ctx context.Context, service *pb.CreateServiceRequest) 
(*pb.CreateServiceResponse, error)
+       RegisterService(ctx context.Context, service *pb.CreateServiceRequest) 
(*registry.PluginResponse, error)

Review comment:
       Because I think that, the result(*PluginResponse) of dao layer operation 
need to be checked and returned in datasource  module, if the 
CreateServiceResponse wants to be returned here. 
   However, the datasource module is designed to act like shim between dao 
layer and api bizz layer, **providing sc with ability for developer to design 
different databse kv format according the advantanges of databases**. So this 
module shuoldn't take part in the bussiness operation.

##########
File path: server/service/ms/datasource.go
##########
@@ -18,10 +18,11 @@ package ms
 import (
        "context"
        pb "github.com/apache/servicecomb-service-center/pkg/registry"
+       "github.com/apache/servicecomb-service-center/server/plugin/registry"
 )
 
 type DataSource interface {
-       RegisterService(ctx context.Context, service *pb.CreateServiceRequest) 
(*pb.CreateServiceResponse, error)
+       RegisterService(ctx context.Context, service *pb.CreateServiceRequest) 
(*registry.PluginResponse, error)

Review comment:
       Because I think that, the result(*PluginResponse) of dao layer operation 
need to be checked and returned in datasource  module if the 
CreateServiceResponse wants to be returned here. 
   However, the datasource module is designed to act like shim between dao 
layer and api bizz layer, **providing sc with ability for developer to design 
different databse kv format according the advantanges of databases**. So this 
module shuoldn't take part in the bussiness operation.

##########
File path: server/service/ms/datasource.go
##########
@@ -18,10 +18,11 @@ package ms
 import (
        "context"
        pb "github.com/apache/servicecomb-service-center/pkg/registry"
+       "github.com/apache/servicecomb-service-center/server/plugin/registry"
 )
 
 type DataSource interface {
-       RegisterService(ctx context.Context, service *pb.CreateServiceRequest) 
(*pb.CreateServiceResponse, error)
+       RegisterService(ctx context.Context, service *pb.CreateServiceRequest) 
(*registry.PluginResponse, error)

Review comment:
       ok,I will decouple it and migrate registry next commit




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to