* add dubbo mvc feign client to support mvc remote call * add dubbo mvc dispatcher servlet * add dubbo mvc dispatcher servlet * add MvcDispatcherServlet unit test * add dubbo mvc feign client to support mvc remote call * add dubbo mvc dispatcher servlet * add Dubbo mvc Provider RPCInvocation create * mvc remove unused code * remove mvc unused test code * remove unused code * BodyProviderParamParser param type modify * modify pom dependency version * add dubbo-metadata-api dependency * 新增依赖Jakarta支持 tomcat10 * ApplicationModel load ParamParser * ParamParser header & param map convert * ParamParser header & param map convert * 1 增加mvc协议 2 删除多余的resource包 * 1 增加mvc协议 2 增加netter server for http * 重构 NettyHttpClient NettyHttpServer * add path parse util & requestTemplate * add mvc consumer http-connection * mvc change HttpConnectionPreBuildIntercept name and add SerializeBodyIntercept extend * 1. 迁移mvc代码到rest下,合并http统一解析逻辑 2. 删除多余新增的remoting 调用模块 * 解决报错 * 1 抽象http 调用 2 改造rest调用风格 * 修改方法命名 * 修改方法名 * 删除多余的clients * 还原restprotocol,逻辑迁移至新分支 3.2_refactor_rest_protocol * add provider PathMatcher * add ServiceRestMetadata PathMatcher * add ServiceRestMetadata PathMatcher * add jax_rs and mvc annotation class constants * refactor PathMatcher name * add annotation class * maintain rest metadata * maintain jax_rs and mvc annotation * maintain jax_rs and mvc annotation * remove mvc module * remove rest mvc code to code review * add springmvc & rest annotation api module * add springmvc & rest annotation api module * add pathMatcher equal test * remove mvc module * rest provider RPCInvocation build * RPCInvocation build add dubbo-metadata-api dependency * RestMethodMetadata add method to consumer service map * RestMethodMetadata add method to consumer service map * rest consumer HttpInvokeInvocationHandler * rest consumer HttpInvokeInvocationHandler * add dubbo-metadata-api dependency * dubbo-rpc pom fix * 移动模块 * 删除模块引用 * consumer metadata resolve * RestProtocol consumer * RestProtocol consumer * requestConvert adaptive * JSON serializeObject to outputStream * JsonUtilsTest serialize & unSerialize * ok http client * http client reconstruct * rest protocol BaseConvert * rest protocol ParamParser reconstruct * rest protocol addKeepAliveHeader * requestTemplate isBodyEmpty() * remove unused code * create ConsumerParseContext * body default byte[0] * rest http message decode * writeTextContent & writeJsonContent & writeFormContent * remove mvc & rest annotation module * remove provider code * fix some pr advice * Add ASF license header for newly created files * move RestClientFactory code to dubbo-remoting-http * exact request convert code to a factory class * modify request convert code * modify dubbo-dependencies-bom * modify dubbo-remoting-http pom * refactor spi resource file name * dubbo-metadata-api remove dubbo-configcenter-zookeeper dependency for cyclic reference * newly create file add ASF * fix compile error * Enhance Code * add rest protocol ConsumerParamParser * some fix * rest json content-type test * RestProtocol merge doRefer code to protocolBindingRefer * remove restInvoker * rest protocol add JsonFactory to support custom * rest protocol add JsonFactory to support custom * jaxrs rest ParamNoAnnotatedProcessor support fix * add rest http message encode * add rest http message encode * rest okHttpClient requestBody fix * rest jaxrs form content-type support * RestProtocol protocolBindingRefer reconstruct * RestProtocol protocolBindingRefer reconstruct object to invoker & Invocation * move RequestTemplate to remoting-http * rest unit test * add httpclient & url connection rest client * Enhance invocation * enhance * add ParameterTypesComparator for metadataMap * add ASF for new file * Fix conflict * Fix header * fix import * fix import * fix import * fix import * fix import * Fix json * revert some change * Remove jsonfactory * Remove jsonfactory * Simplify rest client * Fix protocol * fix codec * tmp disable test * rest metadata resolver add interface judge * add rest metadata resolve unit test & fix AbstractServiceRestMetadataResolver * org.apache.dubbo.metadata.rest.ParamType null exclude & add default accept header * RestProtocolTest refer add context path unit test * some fix * ADD TODO * RESOLVE HTTP client java.net.SocketException: socket closed * RESOLVE HTTP client java.net.SocketException: socket closed * add spring mvc rest protocol unit test * rest protocol http response code deal * rest protocol http response message * fix some review advice * fix some review advice * add rest metadata resolve unit test & fix AbstractServiceRestMetadataResolver * org.apache.dubbo.metadata.rest.ParamType null exclude & add default accept header * RestProtocolTest refer add context path unit test * some fix * fix some review advice * add spring mvc rest protocol unit test * rest protocol http response code deal * rest protocol http response message * URLConnectionRestClient getMessage * remove unused import * import fix * code merge * code merge * code merge * code merge * code merge * Fix conflicts * change restResult InputStream to bytes protect from fd leak * merge code * Fix import * Fix import * Fix uts * Remove unused code * Fix logger * Update okhttp version * Update okhttp version * rest protocol add AnotherUserRestService service ut * rest protocol add String & byteArray codec * Fix version * Fix uts * rest protocol add XMLCodec * stream release * ServiceRestMetadata port change int to Integer * service RestMetadata service map init * xml codec change for xxe * Fix import * code style * code style * Fix shade --------- Co-authored-by: suncr <suncairong@moresec.cn> Co-authored-by: Liujunjie <42363259+LiujunjieALiling@users.noreply.github.com> Co-authored-by: junjie3.liu <junjie3.liu@ximalaya.com> Co-authored-by: Albumen Kevin <jhq0812@gmail.com> |
||
|---|---|---|
| .github | ||
| .mvn/wrapper | ||
| codestyle | ||
| dubbo-build-tools | ||
| dubbo-cluster | ||
| dubbo-common | ||
| dubbo-compatible | ||
| dubbo-compiler | ||
| dubbo-config | ||
| dubbo-configcenter | ||
| dubbo-container | ||
| dubbo-demo | ||
| dubbo-dependencies | ||
| dubbo-dependencies-bom | ||
| dubbo-distribution | ||
| dubbo-filter | ||
| dubbo-kubernetes | ||
| dubbo-metadata | ||
| dubbo-metrics | ||
| dubbo-monitor | ||
| dubbo-native | ||
| dubbo-native-plugin | ||
| dubbo-plugin | ||
| dubbo-registry | ||
| dubbo-remoting | ||
| dubbo-rpc | ||
| dubbo-serialization | ||
| dubbo-spring-boot | ||
| dubbo-test | ||
| dubbo-xds | ||
| .asf.yaml | ||
| .editorconfig | ||
| .gitattributes | ||
| .gitignore | ||
| .licenserc.yaml | ||
| CHANGES.md | ||
| CODE_OF_CONDUCT.md | ||
| CONTRIBUTING.md | ||
| Jenkinsfile | ||
| Jenkinsfile.sonar | ||
| LICENSE | ||
| NOTICE | ||
| PULL_REQUEST_TEMPLATE.md | ||
| README.md | ||
| SECURITY.md | ||
| codecov.yml | ||
| licenseCheck.sh | ||
| mvnw | ||
| mvnw.cmd | ||
| pom.xml | ||
README.md
Apache Dubbo Project
Apache Dubbo is a high-performance, Java-based open-source RPC framework. Please visit the official site for the quick start guide and documentation, as well as the wiki for news, FAQ, and release notes.
We are now collecting Dubbo user info to help us to improve Dubbo further. Kindly support us by providing your usage information on issue#9436: Wanted: who's using dubbo, thanks :)
Architecture
Features
- Transparent interface based RPC
- Intelligent load balancing
- Automatic service registration and discovery
- High extensibility
- Runtime traffic routing
- Visualized service governance
Getting started
The following code snippet comes from Dubbo Samples. You may clone the sample project and step into the dubbo-samples-api subdirectory before proceeding.
git clone https://github.com/apache/dubbo-samples.git
cd dubbo-samples/dubbo-samples-api
There's a README file under dubbo-samples-api directory. We recommend referencing the samples in that directory by following the below-mentioned instructions:
Maven dependency
<properties>
<dubbo.version>3.0.10</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>
Define service interfaces
package org.apache.dubbo.samples.api;
public interface GreetingsService {
String sayHi(String name);
}
See api/GreetingsService.java on GitHub.
Implement service interface for the provider
package org.apache.dubbo.samples.provider;
import org.apache.dubbo.samples.api.GreetingsService;
public class GreetingsServiceImpl implements GreetingsService {
@Override
public String sayHi(String name) {
return "hi, " + name;
}
}
See provider/GreetingsServiceImpl.java on GitHub.
Start service provider
package org.apache.dubbo.samples.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.GreetingsService;
import java.util.concurrent.CountDownLatch;
public class Application {
private static String zookeeperHost = System.getProperty("zookeeper.address", "127.0.0.1");
public static void main(String[] args) throws Exception {
ServiceConfig<GreetingsService> service = new ServiceConfig<>();
service.setApplication(new ApplicationConfig("first-dubbo-provider"));
service.setRegistry(new RegistryConfig("zookeeper://" + zookeeperHost + ":2181"));
service.setInterface(GreetingsService.class);
service.setRef(new GreetingsServiceImpl());
service.export();
System.out.println("dubbo service started");
new CountDownLatch(1).await();
}
}
See provider/Application.java on GitHub.
Build and run the provider
mvn clean package
mvn -Djava.net.preferIPv4Stack=true -Dexec.mainClass=org.apache.dubbo.samples.provider.Application exec:java
Call remote service in the consumer
package org.apache.dubbo.samples.client;
import org.apache.dubbo.config.ApplicationConfig;
import org.apache.dubbo.config.ReferenceConfig;
import org.apache.dubbo.config.RegistryConfig;
import org.apache.dubbo.samples.api.GreetingsService;
public class Application {
private static String zookeeperHost = System.getProperty("zookeeper.address", "127.0.0.1");
public static void main(String[] args) {
ReferenceConfig<GreetingsService> reference = new ReferenceConfig<>();
reference.setApplication(new ApplicationConfig("first-dubbo-consumer"));
reference.setRegistry(new RegistryConfig("zookeeper://" + zookeeperHost + ":2181"));
reference.setInterface(GreetingsService.class);
GreetingsService service = reference.get();
String message = service.sayHi("dubbo");
System.out.println(message);
}
}
See consumer/Application.java on GitHub.
Build and run the consumer
mvn clean package
mvn -Djava.net.preferIPv4Stack=true -Dexec.mainClass=org.apache.dubbo.samples.client.Application exec:java
The consumer will print out hi, dubbo on the screen.
Next steps
- Your first Dubbo application - A 101 tutorial to reveal more details, with the same code above.
- Dubbo user manual - How to use Dubbo and all its features.
- Dubbo developer guide - How to involve in Dubbo development.
- Dubbo admin manual - How to admin and manage Dubbo services.
Building
If you want to try out the cutting-edge features, you can build with the following commands. (Java 1.8 is needed to build the master branch)
mvn clean install
Contact
-
Mailing list:
- dev list: for dev/user discussion. subscribe, unsubscribe, archive, guide
-
Bugs: Issues
-
Gitter: Gitter channel
-
Twitter: @ApacheDubbo
Contributing
See CONTRIBUTING for details on submitting patches and the contribution workflow.
How can I contribute?
- Take a look at issues with tags marked
Good first issueorHelp wanted. - Join the discussion on the mailing list, subscription guide.
- Answer questions on issues.
- Fix bugs reported on issues, and send us a pull request.
- Review the existing pull request.
- Improve the website, typically we need
- blog post
- translation on documentation
- use cases around the integration of Dubbo in enterprise systems.
- Improve the dubbo-admin/dubbo-monitor.
- Contribute to the projects listed in ecosystem.
- Other forms of contribution not explicitly enumerated above.
- If you would like to contribute, please send an email to dev@dubbo.apache.org to let us know!
Reporting bugs
Please follow the template for reporting any issues.
Reporting a security vulnerability
Please report security vulnerabilities to us privately.
Dubbo ecosystem
- Dubbo Ecosystem Entry - A GitHub group
dubboto gather all Dubbo relevant projects not appropriate in apache group yet - Dubbo Website - Apache Dubbo official website
- Dubbo Samples - samples for Apache Dubbo
- Dubbo Spring Boot - Spring Boot Project for Dubbo
- Dubbo Admin - The reference implementation for Dubbo admin
- Dubbo Awesome - Dubbo's slides and video links in Meetup
Language
License
Apache Dubbo software is licenced under the Apache License Version 2.0. See the LICENSE file for details.
