学习分布式soa框架dubbo
来源:互联网 发布:jdbc mysql陶伟基 编辑:程序博客网 时间:2024/06/05 10:36
下载源代码 : https://github.com/alibaba/dubbo.git
官网 : http://dubbo.io
以下是官网操作说明 :
Dubbo is a distributed service framework enpowers applications with service import/export capability with high performance RPC.It's composed of three kernel parts:Remoting: a network communication framework provides sync-over-async and request-response messaging.Clustering: a remote procedure call abstraction with load-balancing/failover/clustering capabilities.Registry: a service directory framework for service registration and service event publish/subscriptionFor more, please refer to: http://code.alibabatech.com/wiki/display/dubbo================================================================Quick Start================================================================Export remote service: <bean id="barService" class="com.foo.BarServiceImpl" /> <dubbo:service interface="com.foo.BarService" ref="barService" />Refer remote service: <dubbo:reference id="barService" interface="com.foo.BarService" /> <bean id="barAction" class="com.foo.BarAction"> <property name="barService" ref="barService" /> </bean>================================================================Source Building================================================================0. Install the git and maven command line: yum install git or: apt-get install git cd ~ wget http://www.apache.org/dist//maven/binaries/apache-maven-2.2.1-bin.tar.gz tar zxvf apache-maven-2.2.1-bin.tar.gz vi .bash_profile - edit: export PATH=$PATH:~/apache-maven-2.2.1/bin source .bash_profile1. Checkout the dubbo source code: cd ~ git clone https://github.com/alibaba/dubbo.git dubbo git checkout -b dubbo-2.4.0 git checkout master2. Import the dubbo source code to eclipse project: cd ~/dubbo mvn eclipse:eclipse Eclipse -> Menu -> File -> Import -> Exsiting Projects to Workspace -> Browse -> Finish Context Menu -> Run As -> Java Application: dubbo-demo-provider/src/test/java/com.alibaba.dubbo.demo.provider.DemoProvider dubbo-demo-consumer/src/test/java/com.alibaba.dubbo.demo.consumer.DemoConsumer dubbo-monitor-simple/src/test/java/com.alibaba.dubbo.monitor.simple.SimpleMonitor dubbo-registry-simple/src/test/java/com.alibaba.dubbo.registry.simple.SimpleRegistry Edit Config: dubbo-demo-provider/src/test/resources/dubbo.properties dubbo-demo-consumer/src/test/resources/dubbo.properties dubbo-monitor-simple/src/test/resources/dubbo.properties dubbo-registry-simple/src/test/resources/dubbo.properties3. Build the dubbo binary package: cd ~/dubbo mvn clean install -Dmaven.test.skip cd dubbo/target ls4. Install the demo provider: cd ~/dubbo/dubbo-demo-provider/target tar zxvf dubbo-demo-provider-2.4.0-assembly.tar.gz cd dubbo-demo-provider-2.4.0/bin ./start.sh5. Install the demo consumer: cd ~/dubbo/dubbo-demo-consumer/target tar zxvf dubbo-demo-consumer-2.4.0-assembly.tar.gz cd dubbo-demo-consumer-2.4.0/bin ./start.sh cd ../logs tail -f stdout.log6. Install the simple monitor: cd ~/dubbo/dubbo-simple-monitor/target tar zxvf dubbo-simple-monitor-2.4.0-assembly.tar.gz cd dubbo-simple-monitor-2.4.0/bin ./start.sh http://127.0.0.1:80807. Install the simple registry: cd ~/dubbo/dubbo-simple-registry/target tar zxvf dubbo-simple-registry-2.4.0-assembly.tar.gz cd dubbo-simple-registry-2.4.0/bin ./start.sh cd ~/dubbo/dubbo-demo-provider/conf vi dubbo.properties - edit: dubbo.registry.adddress=dubbo://127.0.0.1:9090 cd ../bin ./restart.sh cd ~/dubbo/dubbo-demo-consumer/conf vi dubbo.properties - edit: dubbo.registry.adddress=dubbo://127.0.0.1:9090 cd ../bin ./restart.sh cd ~/dubbo/dubbo-simple-monitor/conf vi dubbo.properties - edit: dubbo.registry.adddress=dubbo://127.0.0.1:9090 cd ../bin ./restart.sh8. Install the zookeeper registry: cd ~ wget http://www.apache.org/dist//zookeeper/zookeeper-3.3.3/zookeeper-3.3.3.tar.gz tar zxvf zookeeper-3.3.3.tar.gz cd zookeeper-3.3.3/conf cp zoo_sample.cfg zoo.cfg vi zoo.cfg - edit: dataDir=/home/xxx/data cd ../bin ./zkServer.sh start cd ~/dubbo/dubbo-demo-provider/conf vi dubbo.properties - edit: dubbo.registry.adddress=zookeeper://127.0.0.1:2181 cd ../bin ./restart.sh cd ~/dubbo/dubbo-demo-consumer/conf vi dubbo.properties - edit: dubbo.registry.adddress=zookeeper://127.0.0.1:2181 cd ../bin ./restart.sh cd ~/dubbo/dubbo-simple-monitor/conf vi dubbo.properties - edit: dubbo.registry.adddress=zookeeper://127.0.0.1:2181 cd ../bin ./restart.sh9. Install the redis registry: cd ~ wget http://redis.googlecode.com/files/redis-2.4.8.tar.gz tar xzf redis-2.4.8.tar.gz cd redis-2.4.8 make nohup ./src/redis-server redis.conf & cd ~/dubbo/dubbo-demo-provider/conf vi dubbo.properties - edit: dubbo.registry.adddress=redis://127.0.0.1:6379 cd ../bin ./restart.sh cd ~/dubbo/dubbo-demo-consumer/conf vi dubbo.properties - edit: dubbo.registry.adddress=redis://127.0.0.1:6379 cd ../bin ./restart.sh cd ~/dubbo/dubbo-simple-monitor/conf vi dubbo.properties - edit: dubbo.registry.adddress=redis://127.0.0.1:6379 cd ../bin ./restart.sh10. Install the admin console: cd ~/dubbo/dubbo-admin mvn jetty:run -Ddubbo.registry.address=zookeeper://127.0.0.1:2181 http://root:root@127.0.0.1:8080
0 0
- 学习分布式soa框架dubbo
- dubbo分布式SOA框架
- SOA分布式框架之dubbo
- SOA分布式RPC框架Dubbo
- Dubbo分布式框架学习
- 淘宝SOA框架dubbo学习--异步调用
- 阿里巴巴分布式服务框架dubbo学习笔记
- Dubbo分布式框架学习(2)
- 淘宝SOA框架dubbo学习(1)--first demo
- 淘宝SOA框架dubbo学习(1)--first demo
- Dubbo分布式服务框架
- dubbo分布式服务框架
- 分布式服务框架DUBBO
- Dubbo分布式服务框架
- 分布式框架Dubbo
- Dubbo分布式服务框架
- 分布式服务框架 Dubbo
- 分布式服务框架--Dubbo
- 欧几里得算法求最大公约数
- 搭建C++与C#的OpenGL环境
- Fresco源码解析 - 本地编译
- 归并排序分析
- mysql导出csv打开乱码解决方法
- 学习分布式soa框架dubbo
- 同步SVN时,路径出现乱码的解决方法。
- vs2010工程属性配置--输出目录的配置
- 求最大连续子序列和4种算法解析
- 向升序单向链表中插入一个节点
- 静态链接库、动态链接库与COM组件的区别
- 关于freemarker的classic_compatible属性的使用场景和解决
- SQL SERVER数据库备份与恢复
- LeetCode-5 Longest Palindromic Substring(求最长回文子串)