【框架----Dubbo】基于开源Dubbo分布式RPC服务框架的部署整合
一、前言
Dubbo 作為SOA服務(wù)化治理方案的核心框架,用于提高業(yè)務(wù)邏輯的復(fù)用、整合、集中管理,具有極高的可靠性(HA)和伸縮性,被應(yīng)用于阿里巴巴各成員站點(diǎn),同時(shí)在包括JD、當(dāng)當(dāng)在內(nèi)的眾多互聯(lián)網(wǎng)項(xiàng)目中有著廣泛應(yīng)用。dubbo?通過高性能 RPC 實(shí)現(xiàn)服務(wù)的輸出和輸入功能,框架基于?Spring Framework 進(jìn)行無縫集成,使用過程中基本看不到 Dubbo API的直接調(diào)用,Dubbo服務(wù)支持RMI、Hessian、Dubbo、WebService等眾多通信協(xié)議,同時(shí)提供了對服務(wù)的監(jiān)控和管理平臺,屬于一套完整的SOA解決方案。
詳細(xì)介紹請參照官方地址:?http://alibaba.github.io/dubbo-doc-static/Home-zh.htm?,不再重復(fù)描述,本文主要記錄了詳細(xì)的開發(fā)整合步驟。?引用一張官方提供的dubbo架構(gòu)圖:
-
Provider ? ?暴露服務(wù)方稱之為“服務(wù)提供者”。
-
Consumer?調(diào)用遠(yuǎn)程服務(wù)方稱之為“服務(wù)消費(fèi)者”。
-
Registry ? ?服務(wù)注冊與發(fā)現(xiàn)的中心目錄服務(wù)稱之為“服務(wù)注冊中心”。
-
Monitor ? ? 統(tǒng)計(jì)服務(wù)的調(diào)用次調(diào)和調(diào)用時(shí)間的日志服務(wù)稱之為“服務(wù)監(jiān)控中心”。
- Container ?服務(wù)運(yùn)行“容器”。
二、源碼構(gòu)建
1、dubbo基于maven構(gòu)建,需要先配置maven環(huán)境,當(dāng)然如果你不想構(gòu)建源碼,也可以直接下載對應(yīng)版本的發(fā)行包。
2、dubbo構(gòu)建需要依賴opensesame組件,先通過?git 獲取并安裝opensesame,源碼地址:
https://github.com/alibaba/opensesame//github.com/alibaba/opensesame執(zhí)行maven安裝:mvn install
3、通過下面?git 地址獲取對應(yīng)版本的?dubbo 源碼,官方推薦使用 dubbo 2.4.9,本文基于trunk版本構(gòu)建。
https://github.com/alibaba/dubbo//github.com/alibaba/dubbomaven構(gòu)建:mvn clean install?-Dmaven.test.skip,在漫長的等待后(過程需要通過網(wǎng)絡(luò)下載依賴資源)會有如下提示,生成的?jar 包位于各自目錄的target文件夾。
[INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] [INFO] dubbo-parent ....................................... SUCCESS [ 1.272 s] [INFO] dubbo-common ....................................... SUCCESS [ 4.572 s] [INFO] dubbo-container .................................... SUCCESS [ 0.024 s] [INFO] dubbo-container-api ................................ SUCCESS [ 1.148 s] [INFO] dubbo-container-spring ............................. SUCCESS [ 0.524 s] [INFO] dubbo-container-jetty .............................. SUCCESS [ 0.420 s] [INFO] dubbo-container-log4j .............................. SUCCESS [ 0.448 s] [INFO] dubbo-container-logback ............................ SUCCESS [ 0.468 s] [INFO] dubbo-remoting ..................................... SUCCESS [ 0.016 s] [INFO] dubbo-remoting-api ................................. SUCCESS [ 1.864 s] [INFO] dubbo-remoting-netty ............................... SUCCESS [ 1.125 s] [INFO] dubbo-remoting-mina ................................ SUCCESS [ 0.696 s] [INFO] dubbo-remoting-grizzly ............................. SUCCESS [ 0.680 s] [INFO] dubbo-remoting-p2p ................................. SUCCESS [ 1.048 s] [INFO] dubbo-remoting-http ................................ SUCCESS [ 0.616 s] [INFO] dubbo-remoting-zookeeper ........................... SUCCESS [ 0.716 s] [INFO] dubbo-rpc .......................................... SUCCESS [ 0.016 s] [INFO] dubbo-rpc-api ...................................... SUCCESS [ 1.608 s] [INFO] dubbo-rpc-default .................................. SUCCESS [ 1.396 s] [INFO] dubbo-rpc-injvm .................................... SUCCESS [ 0.760 s] [INFO] dubbo-rpc-rmi ...................................... SUCCESS [ 0.416 s] [INFO] dubbo-rpc-hessian .................................. SUCCESS [ 0.584 s] [INFO] dubbo-rpc-http ..................................... SUCCESS [ 0.580 s] [INFO] dubbo-rpc-webservice ............................... SUCCESS [ 0.536 s] [INFO] dubbo-cluster ...................................... SUCCESS [ 2.208 s] [INFO] dubbo-registry ..................................... SUCCESS [ 0.020 s] [INFO] dubbo-registry-api ................................. SUCCESS [ 1.241 s] [INFO] dubbo-monitor ...................................... SUCCESS [ 0.016 s] [INFO] dubbo-monitor-api .................................. SUCCESS [ 0.464 s] [INFO] dubbo-filter ....................................... SUCCESS [ 0.016 s] [INFO] dubbo-filter-validation ............................ SUCCESS [ 0.608 s] [INFO] dubbo-filter-cache ................................. SUCCESS [ 0.604 s] [INFO] dubbo-registry-default ............................. SUCCESS [ 0.540 s] [INFO] dubbo-monitor-default .............................. SUCCESS [ 0.588 s] [INFO] dubbo-registry-multicast ........................... SUCCESS [ 0.632 s] [INFO] dubbo-config ....................................... SUCCESS [ 0.016 s] [INFO] dubbo-config-api ................................... SUCCESS [ 1.500 s] [INFO] dubbo-config-spring ................................ SUCCESS [ 1.520 s] [INFO] dubbo------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] [INFO] dubbo-parent ....................................... SUCCESS [ 1.272 s] [INFO] dubbo-common ....................................... SUCCESS [ 4.572 s] [INFO] dubbo-container .................................... SUCCESS [ 0.024 s] [INFO] dubbo-container-api ................................ SUCCESS [ 1.148 s] [INFO] dubbo-container-spring ............................. SUCCESS [ 0.524 s] [INFO] dubbo-container-jetty .............................. SUCCESS [ 0.420 s] [INFO] dubbo-container-log4j .............................. SUCCESS [ 0.448 s] [INFO] dubbo-container-logback ............................ SUCCESS [ 0.468 s] [INFO] dubbo-remoting ..................................... SUCCESS [ 0.016 s] [INFO] dubbo-remoting-api ................................. SUCCESS [ 1.864 s] [INFO] dubbo-remoting-netty ............................... SUCCESS [ 1.125 s] [INFO] dubbo-remoting-mina ................................ SUCCESS [ 0.696 s] [INFO] dubbo-remoting-grizzly ............................. SUCCESS [ 0.680 s] [INFO] dubbo-remoting-p2p ................................. SUCCESS [ 1.048 s] [INFO] dubbo-remoting-http ................................ SUCCESS [ 0.616 s] [INFO] dubbo-remoting-zookeeper ........................... SUCCESS [ 0.716 s] [INFO] dubbo-rpc .......................................... SUCCESS [ 0.016 s] [INFO] dubbo-rpc-api ...................................... SUCCESS [ 1.608 s] [INFO] dubbo-rpc-default .................................. SUCCESS [ 1.396 s] [INFO] dubbo-rpc-injvm .................................... SUCCESS [ 0.760 s] [INFO] dubbo-rpc-rmi ...................................... SUCCESS [ 0.416 s] [INFO] dubbo-rpc-hessian .................................. SUCCESS [ 0.584 s] [INFO] dubbo-rpc-http ..................................... SUCCESS [ 0.580 s] [INFO] dubbo-rpc-webservice ............................... SUCCESS [ 0.536 s] [INFO] dubbo-cluster ...................................... SUCCESS [ 2.208 s] [INFO] dubbo-registry ..................................... SUCCESS [ 0.020 s] [INFO] dubbo-registry-api ................................. SUCCESS [ 1.241 s] [INFO] dubbo-monitor ...................................... SUCCESS [ 0.016 s] [INFO] dubbo-monitor-api .................................. SUCCESS [ 0.464 s] [INFO] dubbo-filter ....................................... SUCCESS [ 0.016 s] [INFO] dubbo-filter-validation ............................ SUCCESS [ 0.608 s] [INFO] dubbo-filter-cache ................................. SUCCESS [ 0.604 s] [INFO] dubbo-registry-default ............................. SUCCESS [ 0.540 s] [INFO] dubbo-monitor-default .............................. SUCCESS [ 0.588 s] [INFO] dubbo-registry-multicast ........................... SUCCESS [ 0.632 s] [INFO] dubbo-config ....................................... SUCCESS [ 0.016 s] [INFO] dubbo-config-api ................................... SUCCESS [ 1.500 s] [INFO] dubbo-config-spring ................................ SUCCESS [ 1.520 s] [INFO] dubbo總結(jié)
以上是生活随笔為你收集整理的【框架----Dubbo】基于开源Dubbo分布式RPC服务框架的部署整合的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: dspemif怎么读_DSP技术在EMI
- 下一篇: java 字符串去重排序