Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Distributed Primitives (distributed primitive) for ONOS bit-by-bit learning

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

Distributed Primitives (distributed primitive) for ONOS bit-by-bit learning

EventuallyConsistentMap

Eventually consistent map provides a guarantee of weak consistency in exchange for read / write performance. All reads are performed locally, and all writes are updated locally and then propagated to other copies in the background. Users can use ClockService to configure that the Map,ClockService is used for timestamps to identify various update events. The timestamp is used to ensure that each copy is updated to the local state in the correct order. Eventually consistent map fixes out-of-sync copies due to missing updates through a lightweight background program called anti-entropy Anti-Entropy.

An eventually consistent map completely replicates all its states. This means that each node in the cluster will have a complete copy of the Map content. The state is stored in the memory of each node, which means that a complete cluster restart will result in data loss. We will introduce an option to save the data to disk so that it can survive a full cluster restart.

ConsistentMap

Applications that require strong consistency can use the ConsistentMap primitive. ConsistentMap supports java.util.concurrent.ConcurrentMap-style conditional update operations, which ensures that all operations on all given keys (in Map) are serialized into strong consistency. The basic protocol that allows us to achieve this goal is Raft. In addition, the entire key space (for mapping) is partitioned to ensure good extensibility. For example, each key in a consistency map maps to a single partition or shard. The consistency of each shard is maintained by a separate Raft consensus cluster. This ensures that operations that map to different partition key can be done independently. In the N-node cluster, we created N shards by default. The responsibility for each shard lies with three different nodes, so even if one of the nodes fails, it ensures shard availability.

LeadershipService

ONOS has a service that facilitates the election of leaders on any subject. This service ensures that a single controller node acts as the leader of a given topic at any given point in time. At any given point in time, LeadershipService can facilitate the election of leaders on multiple topics. Similarly, each controller node can also participate in the leadership election of multiple topics at the same time.

DistributedSet

Similar to its name, this is a data structure that provides the concept of set in a distributed environment.

DistributedQueue

Provides a distributed FIFO queue abstraction that supports non-blocking dequeue operations through long polling.

AtomicCounter

This is similar to AtomicLong, but in a distributed environment. The common expression is global unique counting.

AtomicValue

A distributed version of AtomicReference.

LogicalClockService

This service is useful for assigning globally ordered timestamps to various events. This is useful for sorting events in a distributed environment.

ClusterCommunicationService

This service is its basic function, allowing controller instances to communicate with others by creating rpc. The controller can register the handler to be called when a specific type of message is received. The service supports a variety of cluster communication primitives, such as unicast, multicast and broadcast.

ClusterService

This service is used to discover other nodes in the cluster and their current status (alive or dead).

Wiki address: https://wiki.onosproject.org/display/ONOS/Distributed+Primitives

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report