dubbo简单示例

2019-09-06

1 Zookeeper注册中心的搭建(windows单机)

  1. 下载zookeeper压缩包并解压到 D:\zookeeper\apache-zookeeper-3.5.5-bin,官网地址:http://www.apache.org/dyn/closer.cgi/zookeeper/
  2. 进入conf目录将 zoo_sample.cfg 改名为 zoo.cfg。
    默认配置如下:
    # The number of milliseconds of each tick
    tickTime=2000
    # The number of ticks that the initial
    # synchronization phase can take
    initLimit=5
    # The number of ticks that can pass between
    # sending a request and getting an acknowledgement
    syncLimit=2
    # the directory where the snapshot is stored.
    # do not use /tmp for storage, /tmp here is just
    # example sakes.
    dataDir=D:\\zookeeper\\data
    dataLogDir=D:\\zookeeper\\log
    # the port at which the clients will connect
    clientPort=2181
    # the maximum number of client connections.
    # increase this if you need to handle more clients
    #maxClientCnxns=60
    #
    # Be sure to read the maintenance section of the
    # administrator guide before turning on autopurge.
    #
    # http://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_maintenance
    #
    # The number of snapshots to retain in dataDir
    #autopurge.snapRetainCount=3
    # Purge task interval in hours
    # Set to "0" to disable auto purge feature
    #autopurge.purgeInterval=1
  3. 进入bin目录双击 zkServer.cmd,若启动成功,则windows单机版zookeeper搭建成功

2 dubbo-admin安装与使用

dubbo-admin git: https://github.com/apache/incubator-dubbo-ops下载。

注意:最新的dubbo-admin集成了springboot,可以打包为jar运行。

也可以从 https://gitee.com/jingyang3877/all-examples 直接下载jar包

执行以下命令打jar包:

mvn package -DskipTests=true

在jar包目录下,执行以下命令启动

java -jar dubbo-admin-xxx.jar

注意:dubbo-admin的端口默认是7001,dubbo注册中心的地址是本机的2181端口

图1 dubbo管理

Socket通信原理

如何实现一个简单的RPC

最全最简单的dubbo教程-开篇《一》

服务之间的调用之RPC、Restful深入理解

面试问题:REST与RPC区别?

Zookeeper注册中心的搭建-windows单机

dubbo-admin安装与使用

dubbo简单示例的更多相关文章

  1. dubbo+zookeeper+springboot简单示例

    目录 dubbo+zookeeper+springboot简单示例 zookeeper安装使用 api子模块 生产者producer 消费者consumer @(目录) dubbo+zookeeper ...

  2. Linux下的C Socket编程 -- server端的简单示例

    Linux下的C Socket编程(三) server端的简单示例 经过前面的client端的学习,我们已经知道了如何创建socket,所以接下来就是去绑定他到具体的一个端口上面去. 绑定socket ...

  3. C# 构建XML(简单示例)

    C# 构建XML的简单示例: var pars = new Dictionary<string, string> { {"url","https://www. ...

  4. 根据juery CSS点击一个标签弹出一个遮罩层的简单示例

    <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <m ...

  5. ACEXML解析XML文件——简单示例程序

    掌握了ACMXML库解析XML文件的方法后,下面来实现一个比较完整的程序. 定义基本结构 xml文件格式如下 <?xml version="1.0"?> <roo ...

  6. demo工程的清单文件及activity中api代码简单示例

    第一步注册一个账户,并创建一个应用.获取app ID与 app Key. 第二步下载sdk 第三步新建工程,修改清单文件,导入相关的sdk文件及调用相应的api搞定. 3.1 修改清单文件,主要是加入 ...

  7. spring-servlet.xml简单示例

    spring-servlet.xml简单示例 某个项目中的spring-servlet.xml 记下来以后研究用 <!-- springMVC简单配置 --> <?xml versi ...

  8. SignalR 简单示例

    一.什么是 SignalR ASP.NET SignalR is a library for ASP.NET developers that simplifies the process of add ...

  9. Web API 简单示例

    一.RESTful和Web API Representational State Transfer (REST) is a software architecture style consisting ...

随机推荐

  1. sql server union与unionALL区别

    两种用法 一样, 查询字段类型需要一致 union 会自动去重 union all  不会去重 select name ,age from student union select name ,age ...

  2. vs2017js 方法注释

    vs2017给js方法加注释,就像给C#类似 例如 function test1(a,b,c){ .... } 在function的上一行,打一个 " / " 再连续按两下 &qu ...

  3. 第一章 Maven 安装配置

    Maven基于(POM)项目对象模型,通过一小段描述信息来管理项目的构建.文档.和报告的项目管理软件,类似于php 的管理构建工具composer. 有关详细的Maven学习,可以参考学习https: ...

  4. 下载安装Tomcat教程

    注:由于我的笔记不知怎么滴不能复制粘贴我就直接贴图了

  5. AI面试-算法结构基础

    其实目前国内几乎只要是技术岗,面试中都100%会问算法和数据结构. 这两者能快速体现候选人真实的水平,比如代码量,代码的质量,性能,思维是否有逻辑,是否灵活. 算法结果概述 1.前言 1.应用范围:机 ...

  6. Android 指定调用已安装的某个“相机”App

    在做项目时,有这样一个需求:如果我的手机中安装了四个相机软件,那么,在调用系统相机的时候,这四个相机软件都会被列出来,但是其中的两个在拍照完后并不能将拍得的照片返回给我,因此,能不能指定开启一个我已知 ...

  7. 机器学习笔记7:矩阵分解Recommender.Matrix.Factorization

    目录 1矩阵分解概述 1.1用在什么地方 1.2推荐的原理 2矩阵分解的原理 2.1目标函数 2.2 损失函数 2.3 通过梯度下降的方法求得结果 3 代码实现 参考地址: 贪心学院:https:// ...

  8. 【Spring Boot】Spring Boot之整合RabbitMQ并实现消息的发送和接收

    一.项目配置 1)引入maven坐标 <!--amqp--> <dependency> <groupId>org.springframework.boot</ ...

  9. MGR基本使用(转)

    第一章:MGR介绍 MGR(MySQL Group Replication)是一个MySQL Server插件,可用于创建弹性,高可用MySQL集群方案.有一个内置的组成员服务,在任何给定的时间点,保 ...

  10. GStreamer: your gstreamer installation is missing a required plugin in funct

    # yum install gstreamer-plugins-* //问题依旧 别人回答: 编解码不对应? 我印象中GStreamer解码器分什么good,bad 取决你要读什么媒体,需要装些插件的 ...