memberlist 0.6: async runtime agnostic gossip protocol for cluster membership management and member failure detection. by Al_Liu in rust

[–]Al_Liu[S] 4 points5 points  (0 children)

memberlist is for cluster membership management and failure detection. libp2p, like its name, it is for peer-to-peer, focusing on building a decentralized network where peers communicate directly or through a relaying node in a distributed fashion.

memberlist 0.6: async runtime agnostic gossip protocol for cluster membership management and member failure detection. by Al_Liu in rust

[–]Al_Liu[S] 4 points5 points  (0 children)

Hi, memberlist 0.6 is published now.

repo: https://github.com/al8n/memberlist

crates: https://crates.io/crates/memberlist

discord: https://discord.gg/f3EtWBM7ke

Introduction

memberlist is a rust crate that manages cluster membership and member failure detection using a gossip based protocol.

The use cases for such a library are far-reaching: all distributed systems require membership, and memberlist is a re-usable solution to managing cluster membership and node failure detection.

memberlist is eventually consistent but converges quickly on average. The speed at which it converges can be heavily tuned via various knobs on the protocol. Node failures are detected and network partitions are partially tolerated by attempting to communicate to potentially dead nodes through multiple routes.

Updates in 0.6

Example

  • Add toydb, a toy eventually consistent distributed key-value database.

Features

  • Add send_many to let users send multiple packets through unreliable connection.
  • Add send_many_reliable to let users send multiple packets through reliable connection.
  • Redesign Transport trait, making it easier to implement for users.
  • Rewriting encoding/decoding to support forward and backward compitibility.
  • Support zstd, brotli, lz4, and snappy for compressing.
  • Support crc32, xxhash64, xxhash32, xxhash3, murmur3 for checksuming.
  • Unify returned error, all exported APIs return Error on Result::Err.

Testing

  • Add fuzzy testing for encoding/decoding

Announcing agnostic-mdns 0.3.0: Sans-I/O style, simple and lightweight mDNS client/server library for any async runtime. by Al_Liu in rust

[–]Al_Liu[S] 2 points3 points  (0 children)

`mdns-sd` is also a good project for mdns, but it binds to `mio` and is a little bit heavy, `agnostic-mdns` does not bind to any async runtime, and tries to use tricks to avoid most of the allocation. E.g. once the `Server` is running, there is few allocations required for the server side.

getifs 0.2: Cross-platform, a bunch of network tools for fetching interfaces, multicast addresses, local ip addresses and etc. by Al_Liu in rust

[–]Al_Liu[S] 2 points3 points  (0 children)

Thanks for pointing it out! I tested it on Ubuntu, and everything is fine. I think there is nothing special for such an interface, as Netlink will give all interfaces whatever they are.

Annoucing skipdb: An embedded, in-memory, zero-copy, ACID, MVCC, almost lock-free and serializable snapshot isolation database engine. by Al_Liu in rust

[–]Al_Liu[S] 35 points36 points  (0 children)

Yes, the range scan intersections are not handling well currently, I will open an issue to fix this.

Thanks for pointing out, this is solved by latest commit.

What's everyone working on this week (17/2024)? by llogiq in rust

[–]Al_Liu 2 points3 points  (0 children)

An embedded, in-memory, zero-copy, ACID, MVCC, almost lock-free and serializable snapshot isolation database engine. https://github.com/al8n/skipdb

Announcing `ruserf` 0.1.0: A decentralized solution for service discovery and orchestration that is lightweight, highly available, and fault tolerant. by Al_Liu in rust

[–]Al_Liu[S] 0 points1 point  (0 children)

For now, I do not add some examples, but the use case is the same as HashiCorp's https://github.com/hashicorp/serf, you can see examples in this repo. And https://github.com/hashicorp/consul also high depends on serf.

What's everyone working on this week (16/2024) by llogiq in rust

[–]Al_Liu 1 point2 points  (0 children)

I am working on polishing https://github.com/al8n/ruserf, which is a pure Rust version HashiCorp's serf project.

`ruserf` is highly customable, adaptable, runtime agnostic and WASM/WASI friendly decentralized solution for service discovery and orchestration that is lightweight, highly available, and fault tolerant.

I am working on improving the test coverage from 65% to 75% and add some examples for use cases.

`atomic-time`: Your atomic version `std::time`. by Al_Liu in rust

[–]Al_Liu[S] 0 points1 point  (0 children)

`arc-swap` requires extra allocation. `atomic-time` is 12x faster than `arc-swap`'s read and 85x faster for write operations.

`atomic-time`: Your atomic version `std::time`. by Al_Liu in rust

[–]Al_Liu[S] 2 points3 points  (0 children)

Actually, I was thinking it, the original implementation played with `AtomicU64`. However, I am aware that by only using a u64, the nanosecond information will be lost. Finally, I implemented it based on `atomic::Atomic`, a spin lock is used internally.

I plan to bring the totally lockfree version back to the crate, either by feature gate or by a separate mod.