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 issueorHelp 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
dubboto 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 ...
随机推荐
- 【c#】设置Socket连接、接收超时
用到Socket,发现如果连接错误,比如Connect的端口不对,会造成很长时间的延时,程序就僵在那里,效果很不好: 在网上找到很方便的设置办法,分享如下: Socket.SetSocketOptio ...
- 安装gstreamer开发环境
ubuntu中安装gstreamer开发环境: * 安装gstreamer基本库,工具,以及插件 sudo apt--dev gstreamer-tools gstreamer0.-tools gst ...
- PHP进制转换[实现2、8、16、36、64进制至10进制相互转换]
自己写了一个PHP进制转换程序,一个类吧,第一次写这个东东,写这个东东,在处理文本文件时能用得到. 可以实现: 10进制转换2.8.16.36.62进制2.8.16.36.62进制转换10进制 有 ...
- ThinkPHP分页实例
ThinkPHP分页实例 (2014-09-20 15:34:36) 很多人初学thinkphp时,不太熟悉thinkphp的分页使用方法,现在将自己整理的分页方法分享下,有需要的朋友可以看看. ...
- Selenium操作之滚动条
在用Selenium做UI自动化时,经常会遇到有些元素找不到之类的问题,但是自己的代码并没有错,元素就是找不到,这是为什么呢?原因很简单,由于页面内容较多,有些内容需要下拉滚动条才会显示,这里介绍一种 ...
- JdbcTemplate中的exectue和queryForList方法的性能对比
@Autowired JdbcTemplate jdbcParam; pstm = jdbcParam.getDataSource() ...
- SQLServerException:通过端口 1433 连接到主机 localhost 的 TCP/IP 连接失败。
一.问题描述: 1.连接数据库时抛出的异常: com.microsoft.sqlserver.jdbc.SQLServerException: 通过端口 1433 连接到主机 localhost 的 ...
- Engineer in the White Spaces
 Engineer in the White Spaces Michael Nygard A SySTEM ConSiSTS oF inTERdEpEndEnT pRogRAMS. We call ...
- backbone Model调用save方法的时候提交方式
horizon使用的是backbone框架,但是我们的后台api都是只接收post请求,请求的路径为/api/,根据backbone的官档解释: backbone的model.save方法会判断当前的 ...
- tree的使用
//html <ul id="tree"></ul> js function initTree() { $('#tree').tree({ url: '/ ...