You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2022/10/26 02:18:40 UTC

[GitHub] [dubbo] AlbumenJ opened a new issue, #10831: Provide ScopeModel

AlbumenJ opened a new issue, #10831:
URL: https://github.com/apache/dubbo/issues/10831

   FrameworkModel -> ApplicationModel -> ModuleModel,中间的映射都是 1:N 的
   
   抽象这三个能力是为了实现 Dubbo 的多实例支持,FrameworkModel 是实现类似 JVM 租户级别的隔离,ApplicationModel 是为了实现一个机器上发布多个应用(如 demo-application1 和 demo-application2 一起发布),ModuleModel 是为了实现服务生命周期的独立管理(如一个 demo-application 可以由多个 Spring 容器共同提供)。
   
   所以一个 Dubbo 服务是对应到 ModuleModel 上的。
   
   举一个复杂一些的例子,比如:
   
   目前需要发布 DemoInterface1、DemoInterface2、DemoInterface3、DemoInterface4 四个服务
   订阅 DemoService1、DemoService2、DemoService3、DemoService4 四个服务
   
   其中 DemoInterface1 和 DemoInterface2 由 demo-application-1 这个应用名发布(而且由 2 个 Spring Context 分别管理),DemoInterface3 和 DemoInterface4 demo-application-2 这个应用名发布 ,DemoService1、DemoService2、DemoService3、DemoService4 由 demo-application-3 这个应用名订阅。此外出于多租户的考虑,DemoInterface1、DemoInterface2、DemoInterface3、DemoInterface4 在 20880 端口和 20881 端口都独立发布,这 8 个服务(多租户 2 * 4 个服务)的实现都不一样。
   
   那么实际上 Scope 的层级结构是:
   
   ```
   FrameworkModel (1) -> ApplicationModel (1.1 demo-application-1) -> ModuleModel (1.1.1 Spring Context 1) -> DemoInterface1 (bind on 20880)
   FrameworkModel (1) -> ApplicationModel (1.1 demo-application-1) -> ModuleModel (1.1.2 Spring Context 2) -> DemoInterface2 (bind on 20880)
   FrameworkModel (1) -> ApplicationModel (1.1 demo-application-2) -> ModuleModel (1.2.1 Spring Context) -> DemoInterface3 (bind on 20880)
   FrameworkModel (1) -> ApplicationModel (1.1 demo-application-2) -> ModuleModel (1.2.1 Spring Context) -> DemoInterface4 (bind on 20880)
   FrameworkModel (1) -> ApplicationModel (1.1 demo-application-3) -> ModuleModel (1.3.1 Spring Context) -> DemoService1
   FrameworkModel (1) -> ApplicationModel (1.1 demo-application-3) -> ModuleModel (1.3.1 Spring Context) -> DemoService2
   FrameworkModel (1) -> ApplicationModel (1.1 demo-application-3) -> ModuleModel (1.3.1 Spring Context) -> DemoService3
   FrameworkModel (1) -> ApplicationModel (1.1 demo-application-3) -> ModuleModel (1.3.1 Spring Context) -> DemoService4
   
   FrameworkModel (2) -> ApplicationModel (2.1 demo-application-1) -> ModuleModel (2.1.1 Spring Context 1) -> DemoInterface1 (bind on 20881)
   FrameworkModel (2) -> ApplicationModel (2.1 demo-application-1) -> ModuleModel (2.1.2 Spring Context 2) -> DemoInterface2 (bind on 20881)
   FrameworkModel (2) -> ApplicationModel (2.1 demo-application-2) -> ModuleModel (2.2.1 Spring Context) -> DemoInterface3 (bind on 20881)
   FrameworkModel (2) -> ApplicationModel (2.1 demo-application-2) -> ModuleModel (2.2.1 Spring Context) -> DemoInterface4 (bind on 20881)
   FrameworkModel (2) -> ApplicationModel (2.1 demo-application-3) -> ModuleModel (2.3.1 Spring Context) -> DemoService1
   FrameworkModel (2) -> ApplicationModel (2.1 demo-application-3) -> ModuleModel (2.3.1 Spring Context) -> DemoService2
   FrameworkModel (2) -> ApplicationModel (2.1 demo-application-3) -> ModuleModel (2.3.1 Spring Context) -> DemoService3
   FrameworkModel (2) -> ApplicationModel (2.1 demo-application-3) -> ModuleModel (2.3.1 Spring Context) -> DemoService4
   ```
   
   上述所有服务独立工作,互相不影响
   
   这一块需要出一个具体的文档来说明
   
   _Originally posted by @AlbumenJ in https://github.com/apache/dubbo/issues/10829#issuecomment-1291402547_
         


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [I] Provide ScopeModel Related Docs [dubbo]

Posted by "Sakuragi27 (via GitHub)" <gi...@apache.org>.
Sakuragi27 commented on issue #10831:
URL: https://github.com/apache/dubbo/issues/10831#issuecomment-1809751670

   请问这块有文档了吗,感觉还是不好理解


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] namelessssssssssss commented on issue #10831: Provide ScopeModel Related Docs

Posted by "namelessssssssssss (via GitHub)" <gi...@apache.org>.
namelessssssssssss commented on issue #10831:
URL: https://github.com/apache/dubbo/issues/10831#issuecomment-1498927134

   Please assign me.


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [I] Provide ScopeModel Related Docs [dubbo]

Posted by "namelessssssssssss (via GitHub)" <gi...@apache.org>.
namelessssssssssss commented on issue #10831:
URL: https://github.com/apache/dubbo/issues/10831#issuecomment-1809766736

   > 请问这块有文档了吗,感觉还是不好理解
   https://cn.dubbo.apache.org/zh-cn/blog/1/01/01/dubbo-3-%E4%B8%AD%E7%9A%84%E4%B8%89%E5%B1%82%E9%85%8D%E7%BD%AE%E9%9A%94%E7%A6%BB/
   可以参考一下,后边会继续补充
   
   


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org