Skip to content

Commit

Permalink
docs: lints and typos
Browse files Browse the repository at this point in the history
  • Loading branch information
kbknapp committed Apr 13, 2023
1 parent e2f15de commit a7c98fd
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 21 deletions.
33 changes: 15 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,10 @@ for a network coordinate system.
A network coordinate system allows nodes to accurately estimate network
latencies by merely exchanging coordinates.


<!-- vim-markdown-toc GFM -->

* [Violin - The Pitch](#violin---the-pitch)
* [Violin - The Anit-Pitch](#violin---the-anit-pitch)
* [Violin - The Anti-Pitch](#violin---the-anti-pitch)
* [Compile from Source](#compile-from-source)
* [Usage](#usage)
* [Benchmarks](#benchmarks)
Expand Down Expand Up @@ -43,7 +42,7 @@ measures against node `Origin`, node `B` does the same. Then `A` can be given
the coordinates to `B` and accurately estimate the latency without ever having
measured `B` directly.

## Violin - The Anit-Pitch
## Violin - The Anti-Pitch

Vivaldi isn't a magic bullet and still requires measuring real latencies to
adjust the coordinates. In a naive implementation, conducting a latency check
Expand All @@ -52,19 +51,17 @@ latency check directly as the answer. However, this is not how it's supposed to
be used.

Transferring a Violin coordinate in practice can be comparable data to a small
set of ICMP messages. For example an 8-Dimension coordinate (plus three
set of ICMP messages. For example an 8-Dimension coordinate (plus three
additional `f64`s of metadata) is 88 bytes. However, unlike ICMP messages, the
Violin coordinates are a single transmission and only need to be re-transmitted
on significant change. Work could even be done to only transmit deltas as well.

## Compile from Source

Ensure you have a [Rust toolchain installed][rustup].
Ensure you have a [Rust toolchain installed][rustup], and have cloned the repository locally.

```
$ git clone https://github.com/kbknapp/violin
$ cd violin
$ RUSTFLAGS='-Ctarget-cpu=native' cargo build --release
```sh
RUSTFLAGS='-Ctarget-cpu=native' cargo build --release
```

**NOTE:** The `RUSTFLAGS` can be omitted. However, if on a recent CPU that
Expand Down Expand Up @@ -103,7 +100,7 @@ println!("a's estimate to b: {:.2}ms", a.distance_to(&b.coordinate()).as_millis(
## Benchmarks

A set of benchmarks are included using 8D, 4D, and 2D coordinates both using
`heap::VecD` (requires the `alloc` feature) and `heapless::VecD`.
`heap::VecD` (requires the `alloc` feature) and `heapless::VecD`.

The benchmarks measure both the higher level `Node` as well as a lower level
`Coord` abstractions.
Expand Down Expand Up @@ -167,8 +164,8 @@ Again, it should be rare for a low power device to need to do

This crate is licensed under either of

* [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0)
* [MIT license](http://opensource.org/licenses/MIT)
* [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0)
* [MIT license](http://opensource.org/licenses/MIT)

at your option.

Expand All @@ -180,12 +177,12 @@ dual licensed as above, without any additional terms or conditions.

## Related Papers and Research

- [Vivaldi - A Decentralized Network Coordinate System][1](PDF)
- [Network Coordinates in the Wild][2](PDF)
- [Towards Network Triangle Inequality Violation Aware Distributed Systems][3](PDF)
- [On Suitability of Euclidean Embedding for Host-based Network Coordinate Systems][4](PDF)
- [Practical, Distributed Network Coordinates][5](PDF)
- [Armon Dadgar on Vivaldi: Decentralized Network Coordinate System][6](Video)
* [Vivaldi - A Decentralized Network Coordinate System][1](PDF)
* [Network Coordinates in the Wild][2](PDF)
* [Towards Network Triangle Inequality Violation Aware Distributed Systems][3](PDF)
* [On Suitability of Euclidean Embedding for Host-based Network Coordinate Systems][4](PDF)
* [Practical, Distributed Network Coordinates][5](PDF)
* [Armon Dadgar on Vivaldi: Decentralized Network Coordinate System][6](Video)

[//]: # (badges)

Expand Down
6 changes: 3 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
//! <!-- vim-markdown-toc GFM -->
//!
//! * [Violin - The Pitch](#violin---the-pitch)
//! * [Violin - The Anit-Pitch](#violin---the-anit-pitch)
//! * [Violin - The Anti-Pitch](#violin---the-anti-pitch)
//! * [Compile from Source](#compile-from-source)
//! * [Usage](#usage)
//! * [Benchmarks](#benchmarks)
Expand Down Expand Up @@ -43,7 +43,7 @@
//! given the coordinates to `B` and accurately estimate the latency without
//! ever having measured `B` directly.
//!
//! ## Violin - The Anit-Pitch
//! ## Violin - The Anti-Pitch
//!
//! Vivaldi isn't a magic bullet and still requires measuring real latencies to
//! adjust the coordinates. In a naive implementation, conducting a latency
Expand Down Expand Up @@ -268,7 +268,7 @@ where
const LEN: usize;

/// Returns a unit vector (`â`) from `other` pointing at `self` along
/// with the magnitude of the difference beand tween both vectors
/// with the magnitude of the difference between both vectors
fn unit_vector_from(&self, other: &Self) -> (f64, Self) {
let diff = self.difference(other);
let mag = diff.magnitude();
Expand Down

0 comments on commit a7c98fd

Please sign in to comment.