Documentation and moving to vuepress
This commit is contained in:
parent
fe12258863
commit
40c7d5299c
37
README.md
37
README.md
|
@ -1,3 +1,13 @@
|
|||
<!-- --- -->
|
||||
<!-- home: true -->
|
||||
<!-- title: Artillery -->
|
||||
<!-- description: Cluster management & Distributed data protocol -->
|
||||
<!-- actionText: Getting Started -->
|
||||
<!-- actionLink: /#/docs -->
|
||||
<!-- footer: Footer -->
|
||||
<!-- --- -->
|
||||
|
||||
|
||||
<div align="center">
|
||||
<img src="https://raw.githubusercontent.com/bastion-rs/artillery/master/img/artillery_cropped.png" width="512" height="512"><br>
|
||||
</div>
|
||||
|
@ -6,30 +16,3 @@
|
|||
|
||||
<h1 align="center">Artillery: Cluster management & Distributed data protocol</h1>
|
||||
|
||||
|
||||
It contains the modules below:
|
||||
* `artillery-ddata`: Used for distributed data replication
|
||||
* `artillery-core`: Contains:
|
||||
* `cluster`: Prepared self-healing cluster structures
|
||||
* `epidemic`: Infection style clustering
|
||||
* `service_discovery`: Service discovery types
|
||||
* `mdns`: MDNS based service discovery
|
||||
* `udp_anycast`: UDP Anycast based service discovery
|
||||
* `artillery-hierman`: Supervision hierarchy management layer (aka Bastion's core carrier protocol)
|
||||
|
||||
## Examples
|
||||
Below you can find examples to learn Artillery.
|
||||
You can also take a look at the [Core Examples](https://github.com/bastion-rs/artillery/tree/master/artillery-core/examples).
|
||||
|
||||
### Launching a local AP Cluster
|
||||
To spawn a local AP cluster at any size you can use the command below in the root directory of the project:
|
||||
```bash
|
||||
$ deployment-tests/cluster-mdns-ap-test.sh -s 50
|
||||
```
|
||||
|
||||
Argument `-s` defines the amount of nodes in the cluster.
|
||||
To shut down the cluster either use:
|
||||
```bash
|
||||
$ killall cball_mdns_sd_infection
|
||||
```
|
||||
or kill processes one by one to see that cluster is self-healing.
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
module.exports = {
|
||||
title: 'Artillery',
|
||||
description: 'Cluster management & Distributed data protocol',
|
||||
theme: 'api',
|
||||
themeConfig: {
|
||||
editLinks: true,
|
||||
sidebarGroupOrder: [
|
||||
'getting-started',
|
||||
'building-blocks',
|
||||
'examples',
|
||||
],
|
||||
}
|
||||
}
|
|
@ -6,32 +6,3 @@
|
|||
|
||||
<h1 align="center">Artillery: Cluster management & Distributed data protocol</h1>
|
||||
|
||||
|
||||
# Module Structure
|
||||
|
||||
It contains the modules below:
|
||||
* `artillery-ddata`: Used for distributed data replication
|
||||
* `artillery-core`: Contains:
|
||||
* `cluster`: Prepared self-healing cluster structures
|
||||
* `epidemic`: Infection style clustering
|
||||
* `service_discovery`: Service discovery types
|
||||
* `mdns`: MDNS based service discovery
|
||||
* `udp_anycast`: UDP Anycast based service discovery
|
||||
* `artillery-hierman`: Supervision hierarchy management layer (aka Bastion's core carrier protocol)
|
||||
|
||||
## Examples
|
||||
Below you can find examples to learn Artillery.
|
||||
You can also take a look at the [Core Examples](https://github.com/bastion-rs/artillery/tree/master/artillery-core/examples).
|
||||
|
||||
### Launching a local AP Cluster
|
||||
To spawn a local AP cluster at any size you can use the command below in the root directory of the project:
|
||||
```bash
|
||||
$ deployment-tests/cluster-mdns-ap-test.sh -s 50
|
||||
```
|
||||
|
||||
Argument `-s` defines the amount of nodes in the cluster.
|
||||
To shut down the cluster either use:
|
||||
```bash
|
||||
$ killall cball_mdns_sd_infection
|
||||
```
|
||||
or kill processes one by one to see that cluster is self-healing.
|
||||
|
|
|
@ -0,0 +1,81 @@
|
|||
---
|
||||
title: 'Primitives'
|
||||
---
|
||||
|
||||
<Block>
|
||||
# Primitives
|
||||
</Block>
|
||||
|
||||
|
||||
<Block>
|
||||
|
||||
Artillery Core consists of various primitives. We will start with Service Discovery primitives and pave out way to Cluster primitives.
|
||||
|
||||
</Block>
|
||||
|
||||
|
||||
<Block>
|
||||
|
||||
## Service Discovery Primitives
|
||||
|
||||
For distributed operation we need to have a service discovery to find out who is operating/serving which services and service capabilities.
|
||||
|
||||
Our design consists of various service discovery techniques.
|
||||
|
||||
</Block>
|
||||
|
||||
|
||||
<Block>
|
||||
|
||||
## UDP Anycast
|
||||
|
||||
We have UDP anycast which allows the devices in the same network to nag each other continuously with a specific set of service requests to form a cluster initiation.
|
||||
|
||||
**NOTE:** Convergance of the UDP anycast might take longer time than the other zeroconf approaches.
|
||||
|
||||
<Example>
|
||||
|
||||
```rust
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Ord, PartialOrd, PartialEq)]
|
||||
struct ExampleSDReply {
|
||||
ip: String,
|
||||
port: u16,
|
||||
}
|
||||
|
||||
let epidemic_sd_config = ExampleSDReply {
|
||||
ip: "127.0.0.1".into(),
|
||||
port: 1337, // Cluster Formation Port of this instance
|
||||
};
|
||||
|
||||
let reply = ServiceDiscoveryReply {
|
||||
serialized_data: serde_json::to_string(&epidemic_sd_config).unwrap(),
|
||||
};
|
||||
|
||||
// Initialize receiver channels
|
||||
let (tx, discoveries) = channel();
|
||||
|
||||
// Register seeker endpoint
|
||||
sd.register_seeker(tx).unwrap();
|
||||
|
||||
// Sometimes you seek for nodes,
|
||||
// sometimes you need to be a listener to respond them.
|
||||
if let Some(_) = seeker {
|
||||
sd.seek_peers().unwrap();
|
||||
} else {
|
||||
sd.set_listen_for_peers(true).unwrap();
|
||||
}
|
||||
|
||||
for discovery in discoveries.iter() {
|
||||
let discovery: ExampleSDReply =
|
||||
serde_json::from_str(&discovery.serialized_data).unwrap();
|
||||
if discovery.port != epidemic_sd_config.port {
|
||||
debug!("Seed node address came");
|
||||
let seed_node = format!("{}:{}", discovery.ip, discovery.port);
|
||||
// We have received a discovery request.
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
</Example>
|
||||
|
||||
</Block>
|
|
@ -0,0 +1,38 @@
|
|||
---
|
||||
title: 'Local Examples'
|
||||
---
|
||||
|
||||
<Block>
|
||||
# Local Examples
|
||||
</Block>
|
||||
|
||||
<Block>
|
||||
|
||||
## Cluster Examples
|
||||
Below you can find examples to learn Artillery.
|
||||
You can also take a look at the [Core Examples](https://github.com/bastion-rs/artillery/tree/master/artillery-core/examples).
|
||||
|
||||
</Block>
|
||||
|
||||
<Block>
|
||||
|
||||
## Launching a local AP Cluster
|
||||
To spawn a local AP cluster at any size you can use the command below in the root directory of the project.
|
||||
|
||||
<Example>
|
||||
|
||||
```bash
|
||||
$ deployment-tests/cluster-mdns-ap-test.sh -s 50
|
||||
```
|
||||
|
||||
```bash
|
||||
$ killall cball_mdns_sd_infection
|
||||
```
|
||||
|
||||
</Example>
|
||||
|
||||
Argument `-s` defines the amount of nodes in the cluster.
|
||||
To shut down the cluster either use `killall` or kill processes
|
||||
one by one to see that cluster is self-healing.
|
||||
|
||||
</Block>
|
|
@ -0,0 +1,71 @@
|
|||
---
|
||||
title: 'Getting Started'
|
||||
---
|
||||
|
||||
<Block>
|
||||
# Getting Started
|
||||
</Block>
|
||||
|
||||
|
||||
<Block>
|
||||
|
||||
## Basics
|
||||
|
||||
To use Artillery, you need to evaluate your requirements for distributed operation very carefully.
|
||||
Every layer in artillery is usable modularly. Artillery uses "Take it or leave it" approach.
|
||||
If you don't need it you don't include.
|
||||
|
||||
Artillery consists of various layers. Layers can have various consistency degree and capability model.
|
||||
Artillery layers are build on top each other. Most basic layer is `Core`.
|
||||
Core layer contains various prepared cluster configurations.
|
||||
Currently it is supporting:
|
||||
* **AP(Availability, Partition Tolerance** Cluster mode
|
||||
* **CP(Consistency, Partition Tolerance)** Cluster mode (soon)
|
||||
|
||||
In addition to cluster modes, it contains primitives to build your own cluster structures for your own designated environment.
|
||||
|
||||
<Example>
|
||||
|
||||
* `artillery-core`
|
||||
* `cluster`: Prepared self-healing cluster structures
|
||||
* `epidemic`: Infection style clustering
|
||||
* `service_discovery`: Service discovery types
|
||||
* `mdns`: MDNS based service discovery
|
||||
* `udp_anycast`: UDP Anycast based service discovery
|
||||
(aka [Bastion](https://bastion.rs)'s core carrier protocol)
|
||||
|
||||
</Example>
|
||||
|
||||
</Block>
|
||||
|
||||
<Block>
|
||||
|
||||
## Distributed Data
|
||||
|
||||
You might want to pass by the distributed configuration part and directly looking forward to have a distributed
|
||||
data primitives. Like replicating your local map to some other instance's local map etc.
|
||||
|
||||
This is where `Ddata` package kicks in. `Ddata` supplies the most basic distributed data dissemination at the highest abstraction level.
|
||||
|
||||
<Example>
|
||||
|
||||
* `artillery-ddata`: Used for distributed data replication
|
||||
|
||||
</Example>
|
||||
|
||||
</Block>
|
||||
|
||||
|
||||
<Block>
|
||||
|
||||
## Hierarchy Management
|
||||
|
||||
This layer is specifically build for Bastion and it's distributed communication.
|
||||
It contains a Hierarchy Management protocol. This protocol manages remote processes, links as well as their state.
|
||||
|
||||
<Example>
|
||||
|
||||
* `artillery-hierman`: Supervision hierarchy management layer
|
||||
|
||||
</Example>
|
||||
</Block>
|
|
@ -1,21 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Document</title>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
|
||||
<meta name="description" content="Description">
|
||||
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
|
||||
<link rel="stylesheet" href="//unpkg.com/docsify/lib/themes/vue.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<script>
|
||||
window.$docsify = {
|
||||
name: '',
|
||||
repo: ''
|
||||
}
|
||||
</script>
|
||||
<script src="//unpkg.com/docsify/lib/docsify.min.js"></script>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue