Spring Boot Dubbo Dubbok spring cloud
比较spring cloud和dubbo,各自的优缺点是什么 - 趁年轻再疯狂一次吧 - CSDN博客 https://blog.csdn.net/u010664947/article/details/80007767
网易考拉海购Dubbok框架优化详解_存储_基础信息化_文章_e-works数字化企业网 http://articles.e-works.net.cn/storage/article133435.htm
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 dubbo-samples-api
sub directory before read on.
# git clone https://github.com/dubbo/dubbo-samples.git
# cd dubbo-samples/dubbo-samples-api
There's a README file under dubbo-samples-api
directory. Read it and try this sample out by following the instructions.
Maven dependency
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>dubbo</artifactId>
<version>2.6.4</version>
</dependency>
Define service interfaces
package org.apache.dubbo.demo.api; public interface GreetingService {
String sayHello(String name);
}
See api/GreetingService.java on GitHub.
Implement service interface for the provider
package org.apache.dubbo.demo.provider; import org.apache.dubbo.demo.GreetingService; public class GreetingServiceImpl implements GreetingService {
public String sayHello(String name) {
return "Hello " + name;
}
}
See provider/GreetingServiceImpl.java on GitHub.
Start service provider
package org.apache.dubbo.demo.provider; import com.alibaba.dubbo.config.ApplicationConfig;
import com.alibaba.dubbo.config.RegistryConfig;
import com.alibaba.dubbo.config.ServiceConfig;
import org.apache.dubbo.demo.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.
Build and run the provider
# mvn clean package
# mvn -Djava.net.preferIPv4Stack=true -Dexec.mainClass=org.apache.dubbo.demo.provider.Application exec:java
Call remote service in consumer
package org.apache.dubbo.demo.consumer; import com.alibaba.dubbo.config.ApplicationConfig;
import com.alibaba.dubbo.config.ReferenceConfig;
import com.alibaba.dubbo.config.RegistryConfig;
import org.apache.dubbo.demo.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"));
}
}
Build and run the consumer
# 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.
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 invovle in Dubbo development.
- Dubbo admin manual - How to admin and manage Dubbo services.
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 tag called
Good first issue
orHelp wanted
. - Join the discussion on mailing list, subscription guide.
- Answer questions on issues.
- Fix bugs reported on issues, and send us pull request.
- Review the existing pull request.
- Improve the website, typically we need
- blog post
- translation on documentation
- use cases about how Dubbo is being used in enterprise system.
- Improve the dubbo-ops/dubbo-monitor.
- Contribute to the projects listed in ecosystem.
- Any form of contribution that is not mentioned above.
- If you would like to contribute, please send an email to dev@dubbo.incubator.apache.org to let us know!
Reporting bugs
Please follow the template for reporting any issues.
Reporting a security vulnerability
Please report security vulnerability to us privately.
Dubbo eco system
- Dubbo Ecosystem Entry - A GitHub group
dubbo
to gather all Dubbo relevant projects not appropriate in apache group yet - Dubbo Website - Apache Dubbo (incubating) official website
- Dubbo Samples - samples for Apache Dubbo (incubating)
- Dubbo Spring Boot - Spring Boot Project for Dubbo
- Dubbo OPS - The reference implementation for Dubbo admin
Spring Boot Dubbo Dubbok spring cloud的更多相关文章
- Spring Boot Dubbo applications.properties 配置清单
摘要: 原创出处 www.bysocket.com 「泥瓦匠BYSocket 」欢迎转载,保留摘要,谢谢! 『 与其纠结,不如行动学习.Innovate ,And out execute ! 』 本文 ...
- 【spring cloud】子模块module -->导入一个新的spring boot项目作为spring cloud的一个子模块微服务,怎么做/或者 每次导入一个新的spring boot项目,IDEA不识别子module,启动类无法启动/右下角没有蓝色图标
如题:导入一个新的spring boot项目作为spring cloud的一个子模块微服务,怎么做 或者说每次导入一个新的spring boot项目,IDEA不识别,启动类无法启动,怎么解决 下面分别 ...
- Spring Boot可以离开Spring Cloud独立使用开发项目,但是Spring Cloud离不开Spring Boot,属于依赖的关系。
Spring Boot 是 Spring 的一套快速配置脚手架,可以基于Spring Boot 快速开发单个微服务,Spring Cloud是一个基于Spring Boot实现的云应用开发工具:Spr ...
- spring boot +dubbo+zookeeper
dubbo是一个分布式服务框架,致力于提供高性能和透明化的RPC远程服务调用方案,以及SOA服务治理方案. 结合本公司的开发也是用的dubbo这款优秀的框架,加上 最近工作重心的.所以对于dubbo的 ...
- Spring Boot版本,Spring Cloud版本与组件版本关系
我们在学习Spring Cloud时,可能总是碰到以下问题: 1.Spring Boot版本与Spring Cloud版本关系 2.启动时,报莫名其妙的错,稀里糊涂的换个版本就好了 3.这么多版本,用 ...
- Spring Boot(十三):spring boot小技巧
Spring Boot(十三):spring boot小技巧 一.初始化数据 我们在做测试的时候经常需要初始化导入一些数据,如何来处理呢?会有两种选择,一种是使用Jpa,另外一种是Spring JDB ...
- spring boot入门教程——Spring Boot快速入门指南
Spring Boot已成为当今最流行的微服务开发框架,本文是如何使用Spring Boot快速开始Web微服务开发的指南,我们将使创建一个可运行的包含内嵌Web容器(默认使用的是Tomcat)的可运 ...
- 【Spring Boot】利用 Spring Boot Admin 进行项目监控管理
利用 Spring Boot Admin 进行项目监控管理 一.Spring Boot Admin 是什么 Spring Boot Admin (SBA) 是一个社区开源项目,用于管理和监视 Spri ...
- Spring Boot (十): Spring Boot Admin 监控 Spring Boot 应用
Spring Boot (十): Spring Boot Admin 监控 Spring Boot 应用 1. 引言 在上一篇文章<Spring Boot (九): 微服务应用监控 Spring ...
随机推荐
- 最全面的 Sublime Text 使用指南
最全面的 Sublime Text 使用指南 摘要(Abstract) 本文系统全面的介绍了Sublime Text,旨在成为最优秀的Sublime Text中文教程. 前言(Prologue) ...
- iOS关于版本更新的问题
// 获取app版本 NSString *app_Version = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBun ...
- 做过的自定义 View
做过的自定义 View android view custom 音频条状图 需求 详细设计 具体实现 音频条状图 需求 音频图 最终效果类似于音频图中的条状图 只是效果模拟,并不监听真实的音频 条的宽 ...
- 基于ZK的分布式锁实现
import java.util.concurrent.TimeUnit; import org.apache.curator.framework.CuratorFramework; import o ...
- 解决windows server 2008 r2 右键没有个性化
装完系统发现桌面上只有一个回收站我的电脑 网络邻居 控制板面都没有好像win7家庭版也没有右键–个性化设置上google百度了下 也还漫简单的点左下角的开始-运行:"C:\Windows\s ...
- Linq Mysql GroupBy语句的问题处理
语句如下: var resumeList = db.ChannelResume.Where(model); var groupValues = resumeList.GroupBy(t => n ...
- 打包iOS应用程序
如果想要将做的iOS应用程序装到自己的iOS设备上测试.或者装在别人的iOS设备上,或者想发布到App Store里,先要给应用签名.签名就要有证书,这就需要申请证书的过程了. 把自己的应用程序装到设 ...
- android camera之nv21旋转
这周做的一个android的camera开发,需要获取到视频帧数据,并且需要是nv21格式的byte数组,并且视频帧的图像需要是正方向的.和android相机打过交道的都清楚,android的came ...
- 破解idea注册码
添加 “0.0.0.0 account.jetbrains.com”到host, hosts位置:C:\Windows\System32\drivers\etc 获取注册码网址: http://ide ...
- 当您尝试再次安装 SQL Server 时,SQL Server 2008年安装将会失败
症状 当您尝试在一台服务器上安装 Microsoft SQL Server 2008年时,则安装将失败.当您尝试在同一台服务器上重新安装 SQL Server 2008年的相同副本时,此安装也将失败. ...