• PeerSim中一些自己的理解


         PeerSim是用Java语言写的可以模拟P2P系统的软件。刚开始看。有一些比较晦涩的地方,记录一下自己的理解。

    1、这个模拟器的运行过程:

         Simulation ---> read config file ---> set up network (nodes, protocols) ---> initialization (init states of protocols) (Control object) ---> driven engine

    2、Simulation model: 1) network size

                                      2) protocols –> to initialization

                                      3) control –> to monitor some properties –> to modify some parameters

                                      4) Simulator <config.txt>

    3、interfaces:

            Node: network address, contain protocols

            CDProtocol: periodic activity

            Linkable: neighbers in network

            Control: observe and modify the network

    4、Configuration file entries:

            <properties>.<component>[.<parameter>]  [full_path]classname

                     |___________|

                                |_____>mapped to a index(#)

            空格之前的部分叫做Key, 空格之后的叫做Value

            PeerSim可以自动搜索CLASSPATH来确定classname的位置,所以一般不用指定full_path

    5、include.init <> <> … 定义了哪些Initializer 可以运行,并且规定了它们的运行顺序。如果没有指定(即没有include.init这一项),默认是字母顺序执行。

         include还可以有include.protocol <>  和 include.control <> 选项。

          [1] PeerSim HOWTO 1: http://peersim.sourceforge.net/tutorial1/tutorial1.html

  • 相关阅读:
    ABAP学习(26):ZIP打包Excel
    ABAP学习(30):生成随机数
    ABAP学习(28):HTML内容生成
    esp 8266 连接DHT22温室度传感器
    树莓派 连接 5.65inch ePaper Module (F)
    ESP8266NodeMCU 连接 5.65inch ePaper Module (F)
    1. ESP8266NodeMCU 开发环境配置
    2.esp 8266 连接oledqt 显示器
    plt设置savefig的图大小
    tf2.0 实现transformer小改
  • 原文地址:https://www.cnblogs.com/wangshuo/p/2072539.html
Copyright © 2020-2023  润新知