Dubbo: Hope to split the sub-module deployed to maven alone.

Created on 5 Feb 2018  ·  8Comments  ·  Source: apache/dubbo

When extending dubbo features, we only expect to rely on one of the sub-modules, which is not conducive to isolation of hierarchical dependencies.

eg:
I want to add new registry support, I only care about the registry api.

typrefactor

Most helpful comment

The modular is on progress now, we plan to keep the core structure unchanged while introduce the following small changes:

  1. extract serialization module from dubbo-common.
  2. change module name dubbo-rpc-default to dubbo-rpc-dubbo.

For dubbo users, they should mainly care about the following modules:

  • dubbo-rpc-dubbo - P2P Remoting RPC
  • dubbo-remoting-netty - Network Communication
  • dubbo-registry-zookeeper - Service Registry&Discovery, LoadBalance
  • dubbo-serialization-hessian2 - Serialization
  • dubbo-config-spring/api - Configuration

All 8 comments

if your regristry support can be public, i suggest you add it to your dubbo branch and submit a pr to this project.

@kimmking Thanks for your reply, We are planing to open source extension for dubbo and wish dubbo can split the sub-module deployed to maven alone, because sometime not all features should submit to master branch, we want new features are based on plugability, not be embbed in dubbo.
@chickenlj

The modular is on progress now, we plan to keep the core structure unchanged while introduce the following small changes:

  1. extract serialization module from dubbo-common.
  2. change module name dubbo-rpc-default to dubbo-rpc-dubbo.

For dubbo users, they should mainly care about the following modules:

  • dubbo-rpc-dubbo - P2P Remoting RPC
  • dubbo-remoting-netty - Network Communication
  • dubbo-registry-zookeeper - Service Registry&Discovery, LoadBalance
  • dubbo-serialization-hessian2 - Serialization
  • dubbo-config-spring/api - Configuration

@chickenlj How to deal with the module of api ?

For example, you can add the following dependencies to enable P2P RPC:

  • dubbo-rpc-dubbo
  • dubbo-remoting-netty
  • dubbo-serialization-hessian2
  • dubbo-config-spring

And if you also add dubbo-registry-zookeeper, you will have a registry integration and consumers will find service providers automatically and do load-balance between providers; Otherwise, you can also use Service Registry abilities provided by other infrastructures, such as K8S.

@zonghaishang
API will still be packaged separately, as a plugin developer, you can depend on an single API.
My explanation above is mainly from the perspective of end users, for example:
dubbo-registry-zookeeper will pass dubbo-registry-api, zookeeper, and other modules as transitive dependencies, so users don't need to care about these.

@chickenlj Thanks ,That's what i want.

Now, if you don't like the all-in-one jar, you can introduce dubbo to your project using the following pom:

<dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.alibaba</groupId>
                <artifactId>dubbo-bom</artifactId>
                <version>2.6.1</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

<dependencies>
        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>dubbo-config-spring</artifactId>
        </dependency>
        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>dubbo-registry-zookeeper</artifactId>
        </dependency>
        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>dubbo-rpc-dubbo</artifactId>
        </dependency>
        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>dubbo-remoting-netty</artifactId>
        </dependency>
        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>dubbo-serialization-hessian2</artifactId>
        </dependency>
    </dependencies>
Was this page helpful?
0 / 5 - 0 ratings

Related issues

yangpancode picture yangpancode  ·  4Comments

wangxiaobai83 picture wangxiaobai83  ·  4Comments

sunyongfengchina picture sunyongfengchina  ·  3Comments

ANZHONGGEN picture ANZHONGGEN  ·  3Comments

PulauBusing picture PulauBusing  ·  3Comments