Dubbo (from Ali Baba)
Dubbo is a distributed service framework, providing high performance and long-distance call service call PRC program transparent.
Dubbo's features
through spring configuration can be completed as a service, for applications without intrusion. (SpringCloud certain invasion)
publish interface and Model layer into the warehouse through the maven install & deploy command, the caller only need to rely on the service interface and the model layer to
achieve registration services and heartbeat detected by zookeeper set by the pre-gateWay risk gateway (Clound use Zuul load balancing requests steering Eureka server) isolated from the external direct calls atomic services
Dubbo core member (below):
- Provider: exposure service provider, the service can be started by means of a jar or container (the container needs to be started using Docker)
- Consumer: the service consumer calls the remote service.
- Registry: Service Registry and Discovery Center. (Zookeeper)
- Monitor: statistical services and the number of calls, call time monitoring center. (Page dubbo of the console can be displayed, only a simple version)
- Container: container services running.
SprIng + dubbo implementation
pom.xml
<dependency>
<groundId>com.alibaba<groundId>
<artifactId>dubbo<artifactId>
<version>2.4.10<version>
</dependency>
dubbo Service Provider: service interface and service interface and ordinary, like, do not know they have been called by an RPC framework.
Spring.xml
<!--接入DUBBO的应用名 -->
<dubbo:application name="ws-demo" />
<!-- 注册仓库地址:Zookeeper组件, 192.168.128:2181 -->
<dubbo:registry address="zookeeper://192.168.128:2181"/>
<!-- 用dubbo协议在20880端口暴露服务 -->
<dubbo:protocol name="dubbo" port="20880">
<!-- 接口实现类Bean 使用@Compent注解的当时注册 -->
<dubbo:service interface="接口" ref=“接口实现类”/>
dubbo service consumers: only need to know to access the service interface (the specific method to obtain from the service provider in)
<!--接入DUBBO的应用名 -->
<dubbo:application name="ws-demo-client" />
<!-- 注册仓库地址:Zookeeper组件, 192.168.128:2181 -->
<dubbo:registry address="zookeeper://192.168.128:2181"/>
<!-- 接口实现类Bean 使用@Compent注解的当时注册 -->
<dubbo:reference id="Bean名" interface="接口"/>
Apache Thrift is the difference dubbo
-
dubbo itself is a comprehensive SOA solution, thrift rpc service is only a framework;
-
dubbo currently mainly used java, thrift can be used for various languages presently known;
-
dubbo can be used as a thrift rpc service components, dubbo also has built-in components rpc