`
gaojingsong
  • 浏览: 1211655 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
文章分类
社区版块
存档分类
最新评论

【CAN算法介绍】

阅读更多

一、CAN介绍

The Content Addressable Network (CAN) is a distributed, decentralized P2P infrastructure that provides hash table functionality on an Internet-like scale. CAN was one of the original four distributed hash table proposals, introduced concurrently with Chord, Pastry, and Tapestry.

 

 

Like other distributed hash tables, CAN is designed to be scalable, fault tolerant, and self-organizing. The architectural design is a virtual multi-dimensional Cartesian coordinate space, a type of overlay network, on a multi-torus. This n-dimensional coordinate space is a virtual logical address, completely independent of the physical location and physical connectivity of the nodes. Points within the space are identified with coordinates. The entire coordinate space is dynamically partitioned among all the nodes in the system such that every node possesses at least one distinct zone within the overall space.

 

二、Routing

A CAN node maintains a routing table that holds the IP address and virtual coordinate zone of each of its neighbors. A node routes a message towards a destination point in the coordinate space. The node first determines which neighboring zone is closest to the destination point, and then looks up that zone's node's IP address via the routing table

 

 

三、Node joining

To join a CAN, a joining node must:

Find a node already in the overlay network.

Identify a zone that can be split

Update the routing tables of nodes neighboring the newly split zone.

To find a node already in the overlay network, bootstrapping nodes may be used to inform the joining node of IP addresses of nodes currently in the overlay network.

 

After the joining node receives an IP address of a node already in the CAN, it can attempt to identify a zone for itself. The joining node randomly picks a point in the coordinate space and sends a join request, directed to the random point, to one of the received IP addresses. The nodes already in the overlay network route the join request to the correct device via their zone-to-IP routing tables. Once the node managing the destination point's zone receives the join request, it may honor the join request by splitting its zone in half, allocating itself the first half, and allocating the joining node the second half. If it does not honor the join request, the joining node keeps picking random points in the coordinate space and sending join requests directed to these random points until it successfully joins the network.

 

After the zone split and allocation is complete, the neighboring nodes are updated with the coordinates of the two new zones and the corresponding IP addresses. Routing tables are updated and updates are propagated across the network.

 

 

四、Node departing

To handle a node departing, the CAN must

identify a node is departing

have the departing node's zone merged or taken over by a neighboring node

update the routing tables across the network.

Detecting a node's departure can be done, for instance, via heartbeat messages that periodically broadcast routing table information between neighbors. After a predetermined period of silence from a neighbor, that neighboring node is determined as failed and is considered a departing node.Alternatively, a node that is willingly departing may broadcast such a notice to its neighbors.

 

After a departing node is identified, its zone must be either merged or taken over. First the departed node's zone is analyzed to determine whether a neighboring node's zone can merge with the departed node's zone to form a valid zone. For example, a zone in a 2d coordinate space must be either a square or rectangle and cannot be L-shaped. The validation test may cycle through all neighboring zones to determine if a successful merge can occur. If one of the potential merges is deemed a valid merge, the zones are then merged. If none of the potential merges are deemed valid, then the neighboring node with the smallest zone takes over control of the departing node's zone. After a take-over, the take-over node may periodically attempt to merge its additionally controlled zones with respective neighboring zones.

 

If the merge is successful, routing tables of neighboring zones' nodes are updated to reflect the merge. The network will see the subsection of the overlay network as one, single zone after a merge and treat all routing processing with this mindset. To effectuate a take-over, the take-over node updates neighboring zones' nodes' routing tables, so that requests to either zone resolve to the take-over node. And, as such, the network still sees the subsection of the overlay network as two separate zones and treats all routing processing with this mindset.

 

 

0
1
分享到:
评论

相关推荐

    基于CAN算法的智能建筑控制系统设计.pdf

    在《基于CAN算法的智能建筑控制系统设计》中,作者徐超探讨了如何利用CAN(Controller Area Network)算法提升智能建筑控制系统的性能。CAN算法是一种广泛应用在汽车和工业自动化领域的通信协议,具有高可靠性和实时...

    一种适用于车联网环境的车载CAN信号打包算法.pdf

    启发式信号打包算法CSP:CSP算法是一种基于信号簇的启发式信号打包算法,用以实现车载CAN网络中带宽利用率的最优化。该算法首先对信号按照周期进行分簇和排序,然后通过两个空闲带宽评价指标来指导信号的打包过程。 ...

    基于CAN算法的智能建筑控制系统设计.rar

    在基于CAN算法的智能建筑控制系统设计中,我们需要理解和应用以下几个关键知识点: 1. **CAN协议基础**:理解CAN协议的基本结构,包括数据帧格式(包含ID、数据和CRC等字段)、仲裁机制(允许节点同时发送数据并...

    CAN总线算法

    在CAN网络的报文传输时,噪声干扰或传输中断等因素往往使接收端收到的报文出现错码。为了及时可靠地把报文传输给对方并有效地检测错误,需要采用差错...详细介绍了CAN总线中循环冗余校验码的差错控制原理及其实现方法。

    对等网络(P2P)中 CAN 算法研究.doc

    对等网络(P2P)中 CAN 算法研究.doc

    避免饥饿的CAN总线高优先级反转算法1

    该算法的核心是采用非抢占式的单调速率算法来动态分配CAN总线报文的优先级,确保低优先级报文也有机会获得传输。 【非抢占式单调速率算法】 非抢占式单调速率算法是一种优化策略,它根据报文的发送速率来分配优先级...

    Vector CANape介绍

    在介绍Vector公司旗下著名的标定工具CANape之前,我们需要明白标定的重要性以及它在车辆系统中的作用。 首先,标定工作之所以必要,是因为在车辆的研发过程中,需要根据实际的车辆状态和性能测试结果来优化ECU的...

    避免饥饿的CAN总线高优先级反转算法.docx

    本文介绍了一种新的避免饥饿的CAN总线高优先级反转算法,该算法通过动态调整消息标识符中的优先级位,有效解决了低优先级消息长时间无法发送的问题。与现有解决方案相比,该算法不仅减少了对额外硬件的需求,还提高...

    DBSCAN.rar_DBSCAN聚类算法matlab程序_camerajwy_dbscan matlab_dnscan算法代

    DBSCAN聚类算法matlab算法部分代码,包含主程序及画图程序

    论文研究-一种快速构建CAN网络拓扑算法.pdf

    受二叉树思想的启发,在P2P网络拓扑管理协议T-Man和Kademlia网络快速构建算法的基础上,提出了从非结构化P2P网络快速构建CAN网络的算法。Kademlia网络为二叉树拓扑结构,CAN网络基于空间划分,由于已经提出了...

    CAN.zip自适应邻域聚类(CAN)的matlab代码

    聂飞平教授提出的CAN算法在处理高维数据和非球形分布数据时具有较好的性能,尤其适合于复杂数据集。 CAN算法的核心思想是基于邻域距离的动态调整,它在执行过程中不断更新每个数据点的邻域半径,以确保邻域内的数据...

    CANape -Driver Assistance功能介绍

    1. 准备阶段:连接车辆,配置CANape软件,加载必要的ECU软件和ADAS算法模型。 2. 数据采集:开启数据记录,让车辆在各种环境下行驶,收集真实数据。 3. 分析与模拟:基于采集的数据进行分析,利用DA插件模拟特定场景...

    CAN总线实时调度算法的应用

    这篇文章有点技术含量,可以读一读,对CAN总线的通讯机制会有所了解。

    基于ARM的CAN总线元素灯同步寻峰算法设计.pdf

    在分析这份文档内容时,我们可以看到本文涉及的知识点主要集中在基于ARM处理器的CAN总线通信技术,以及在分布式原子吸收分析仪器中应用的元素灯同步寻峰算法设计。下面将详细说明文档中所涉及的关键技术点: 1. ...

    CAN通讯C++程序

    利用三纯公司CAN卡通讯编程,通过CAN口通讯。

    周立功can通讯连接库ZLGCANLib.rar

    周立功CAN库通过优化算法和精确的时序控制,确保了在高速通讯下的数据完整性,同时保证了通讯的低延迟,这对于实时性强的车载应用至关重要。例如,车辆的制动系统、动力传动系统等关键部件之间的通信,需要在短时间...

Global site tag (gtag.js) - Google Analytics