Apache Dubbo(孵化)是一种基于Java的高性能开源RPC框架。请访问官方网站以获取快速入门和文档,以及Wiki获取新闻,常见问题和发行说明。我们现在正在收集dubbo用户信息,以帮助我们更好地改进Dubbo,请参阅。亲切地帮助我们提供你的问题#1012:通缉:谁在使用dubbo,谢谢:)
- 基于透明接口的RPC
- 智能负载平衡
- 自动服务注册和发现
- 高扩展性
- 运行时流量路由
- 可视化的服务治理
以下代码段来自Dubbo Samples。在继续阅读之前,您可以克隆示例项目并进入dubbo-samples-api
子目录。
# git clone https://github.com/apache/incubator-dubbo-samples.git
# cd incubator-dubbo-samples/dubbo-samples-api
There's a README file under dubbo-samples-api
directory. 阅读并按照说明尝试此示例。
<properties>
<dubbo.version>2.7.1</dubbo.version>
</properties>
<dependencies>
<dependency>
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo</artifactId>
<version>${dubbo.version}</version>
</dependency>
<dependency>
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-dependencies-zookeeper</artifactId>
<version>${dubbo.version}</version>
<type>pom</type>
</dependency>
</dependencies>
package org.apache.dubbo.samples.api;
public interface GreetingService {
String sayHello(String name);
}
See api/GreetingService.java on GitHub.
package org.apache.dubbo.samples.provider;
import org.apache.dubbo.samples.api.GreetingService;
public class GreetingServiceImpl implements GreetingService {
@Override
public String sayHello(String name) {
return "Hello " + name;
}
}
See provider/GreetingServiceImpl.java on GitHub.
package org.apache.dubbo.demo.provider;
import org.apache.dubbo.config.ApplicationConfig;
import org.apache.dubbo.config.RegistryConfig;
import org.apache.dubbo.config.ServiceConfig;
import org.apache.dubbo.samples.api.GreetingService;
import java.io.IOException;
public class Application {
public static void main(String[] args) throws IOException {
ServiceConfig<GreetingService> serviceConfig = new ServiceConfig<GreetingService>();
serviceConfig.setApplication(new ApplicationConfig("first-dubbo-provider"));
serviceConfig.setRegistry(new RegistryConfig("multicast://224.5.6.7:1234"));
serviceConfig.setInterface(GreetingService.class);
serviceConfig.setRef(new GreetingServiceImpl());
serviceConfig.export();
System.in.read();
}
}
See provider/Application.java on GitHub.
# mvn clean package
# mvn -Djava.net.preferIPv4Stack=true -Dexec.mainClass=org.apache.dubbo.demo.provider.Application exec:java
package org.apache.dubbo.demo.consumer;
import org.apache.dubbo.config.ApplicationConfig;
import org.apache.dubbo.config.ReferenceConfig;
import org.apache.dubbo.config.RegistryConfig;
import org.apache.dubbo.samples.api.GreetingService;
public class Application {
public static void main(String[] args) {
ReferenceConfig<GreetingService> referenceConfig = new ReferenceConfig<GreetingService>();
referenceConfig.setApplication(new ApplicationConfig("first-dubbo-consumer"));
referenceConfig.setRegistry(new RegistryConfig("multicast://224.5.6.7:1234"));
referenceConfig.setInterface(GreetingService.class);
GreetingService greetingService = referenceConfig.get();
System.out.println(greetingService.sayHello("world"));
}
}
# mvn clean package
# mvn -Djava.net.preferIPv4Stack=true -Dexec.mainClass=org.apache.dubbo.demo.consumer.Application exec:java
The consumer will print out Hello world
on the screen.
See consumer/Application.java on GitHub.
- Your first Dubbo application - 这是一个101教程,用于显示更多详细信息,使用相同的代码。
- Dubbo user manual - How to use Dubbo and all its features.
- Dubbo developer guide - 如何参与dubbo开发。
- Dubbo admin manual - How to admin and manage Dubbo services.
If you want to try out the cutting-edge features, you can built with the following commands. (Java 1.8 is required to build the master branch)
mvn clean install
-
Mailing(邮件) list:
- dev list: for dev/user discussion(讨论). subscribe(订阅), unsubscribe, archive(档案), guide
-
Bugs: Issues
-
Gitter: Gitter channel
-
Twitter: @ApacheDubbo
有关提交补丁和贡献工作流程的详细信息,请参阅贡献。
- 看一下名为
Good first issue
或Help wanted
的标签问题。 - 加入关于邮件列表的讨论,订阅指南。
- 回答有关问题的问题。
- 修复问题上报告的错误,并向我们发送拉取请求。
- 查看现有的pull request。
- 改进网站,通常我们需要 * 博文 * 文件翻译 * 使用有关如何在企业系统中使用Dubbo的案例。
- 改进dubbo-admin / dubbo-monitor。
- 参与生态系统中列出的项目。
- 上述未提及的任何形式的贡献。
- 如果您想贡献,请发送电子邮件至[email protected]告诉我们!
Please follow the template for reporting any issues.
Please report security vulnerability to us privately.
- Dubbo Ecosystem Entry - A GitHub group
dubbo
to gather all Dubbo relevant projects not appropriate in apache group yet - Dubbo Website - Apache Dubbo(孵化)官方网站
- Dubbo Samples - samples for Apache Dubbo (incubating)
- Dubbo Spring Boot - Spring Boot Project for Dubbo
- Dubbo Admin - The reference(参考) implementation(实现) for Dubbo admin
Apache Dubbo is under the Apache 2.0 license. See the LICENSE file for details.