Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Igni/actor branch replay #327

Draft
wants to merge 41 commits into
base: relrin/bastion-actor-trait
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
aa066f2
Igni/affine steal sort (#261)
o0Ignition0o Sep 24, 2020
6234445
(cargo-release) version 0.4.0
o0Ignition0o Sep 24, 2020
80c58ff
(cargo-release) bastion-executor start next development iteration 0.4…
o0Ignition0o Sep 24, 2020
ff3b755
bump executor dependency
o0Ignition0o Sep 24, 2020
dc175cb
(cargo-release) version 0.4.3
o0Ignition0o Sep 24, 2020
6e58b06
(cargo-release) start next development iteration 0.4.4-alpha.0
o0Ignition0o Sep 24, 2020
a2a5885
Fix grammar/typos (#276)
tuxiqae Oct 6, 2020
1383c19
it -> if (#278)
tuxiqae Oct 11, 2020
44f433f
chore: update dependencies (#288)
Keruspe Nov 6, 2020
a478cc6
use old state to restart the child (#289)
poonai Dec 3, 2020
bd6c164
override the redundancy based on the resizer (#292)
poonai Dec 7, 2020
fb38a40
bump lever and nuclei (#300)
o0Ignition0o Feb 1, 2021
599a852
Fix clippy warnings (#301)
vertexclique Feb 1, 2021
25e4ec1
Bastion executor version alignment (#302)
vertexclique Feb 1, 2021
851207d
(cargo-release) version 0.4.1
vertexclique Feb 1, 2021
5c99157
(cargo-release) version 0.4.4
vertexclique Feb 1, 2021
8664483
(cargo-release) start next development iteration 0.4.5-alpha.0
vertexclique Feb 1, 2021
39ff2b8
wip, allow to run tokio based futures in the bastion executor (#299)
o0Ignition0o Feb 1, 2021
cbef837
put the dependency to lightproc back
o0Ignition0o Feb 1, 2021
fbcc301
update rand (#304)
Keruspe Feb 3, 2021
c7eb00f
bump nightly versions (#306)
o0Ignition0o Feb 3, 2021
206ee5a
target minor versions of lightproc instead of patch (#305)
o0Ignition0o Feb 3, 2021
7f438ca
update miri flags (#275)
o0Ignition0o Feb 3, 2021
0693624
Fix an issue which-in the service doesn't die when `../data/distwrite…
tuxiqae Feb 3, 2021
0d159ea
Change the supervisor creation order in the broadcast message example…
o0Ignition0o Feb 3, 2021
ac238b3
Updating the Bastion architecture image and adding it to README.md. …
fosdickio Mar 1, 2021
8d6707f
Translate doc link to intra-doc-link, fix broken links (#310)
scrabsha Mar 2, 2021
835be05
Add MessageHandler (#309)
scrabsha Mar 2, 2021
674deb1
Improve readme (#312)
oScape Mar 3, 2021
93b66e4
Fix a typo in children doc (#314)
kanru Mar 13, 2021
c8f1506
Lower dispatcher log to debug (#315)
vertexclique Mar 21, 2021
e923d55
Export MessageHandler to the prelude (#317)
scrabsha Mar 26, 2021
c6016a9
named Distributor (#319)
o0Ignition0o Apr 6, 2021
1c4ffb3
depend on lightproc master branch so we can compile
o0Ignition0o Apr 9, 2021
90b8a09
proposal: distributor request fn (#321)
o0Ignition0o Apr 13, 2021
24f5522
remove clippy inline lints, that's too much noise for now (#326)
o0Ignition0o Apr 13, 2021
f1697b3
bump dependencies (#324)
o0Ignition0o Apr 13, 2021
abf58c2
From ea44f84050bd3fdf43a844f70bbf465457a38f54 Mon Sep 17 00:00:00 2001
nicolaiunrein Apr 14, 2021
c55bd6a
keep actors and current code side by side
o0Ignition0o Apr 14, 2021
51fdce3
apply globalcontainer and tests on top of it
o0Ignition0o Apr 14, 2021
1413088
global state tests
o0Ignition0o Apr 14, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 0 additions & 16 deletions .github/workflows/clippy.yml

This file was deleted.

13 changes: 2 additions & 11 deletions .github/workflows/miri.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Install
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2020-06-22
toolchain: nightly-2021-03-20
override: true
- uses: davidB/rust-cargo-make@v1
with:
Expand All @@ -24,13 +24,4 @@ jobs:
RUST_BACKTRACE: full
RUST_LOG: 'trace'
run: |
rustup component add miri
cargo miri setup
cargo clean
# Do some Bastion shake
cd src/bastion && \
cargo miri test --features lever/nightly -- -Zmiri-disable-isolation -Zmiri-ignore-leaks -- dispatcher && \
cargo miri test --features lever/nightly -- -Zmiri-disable-isolation -Zmiri-ignore-leaks -- path && \
cargo miri test --features lever/nightly -- -Zmiri-disable-isolation -Zmiri-ignore-leaks -- broadcast && \
cargo miri test --features lever/nightly -- -Zmiri-disable-isolation -Zmiri-ignore-leaks -- children_ref && \
cd -
tools/miri.sh
2 changes: 1 addition & 1 deletion .github/workflows/sanitizers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Install
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2020-03-08
toolchain: nightly-2021-03-20
override: true
- uses: davidB/rust-cargo-make@v1
with:
Expand Down
187 changes: 91 additions & 96 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,82 +2,73 @@
<img src="https://github.com/bastion-rs/bastion/blob/master/img/bastion.png"><br>
</div>

-----------------

<h1 align="center">Highly-available Distributed Fault-tolerant Runtime</h1>
---

<table align=left style='float: left; margin: 4px 10px 0px 0px; border: 1px solid #000000;'>
<tr>
<td>Latest Release</td>
<td>
<a href="https://crates.io/crates/bastion">
<img alt="Crates.io" src="https://img.shields.io/crates/v/bastion.svg?style=popout-square">
</a>
</td>
</tr>
<tr>
<td></td>
</tr>
<tr>
<td>License</td>
<td>
<a href="https://github.com/bastion-rs/bastion/blob/master/LICENSE">
<img alt="Crates.io" src="https://img.shields.io/crates/l/bastion.svg?style=popout-square">
</a>
</td>
</tr>
<tr>
<td>Doc [Bastion]</td>
<td>
<a href="https://docs.rs/bastion">
<img alt="Documentation (Bastion)" src="https://img.shields.io/badge/rustdoc-bastion-blue.svg" />
</a>
</td>
</tr>
<tr>
<table>
<tr>
<td>Latest Release</td>
<td>
<a href="https://crates.io/crates/bastion">
<img alt="Crates.io" src="https://img.shields.io/crates/v/bastion.svg?style=popout-square">
</a>
</td>
<td>License</td>
<td>
<a href="https://github.com/bastion-rs/bastion/blob/master/LICENSE">
<img alt="Crates.io" src="https://img.shields.io/crates/l/bastion.svg?style=popout-square">
</a>
</td>
</tr>
<tr>
<td>Doc [Bastion]</td>
<td>
<a href="https://docs.rs/bastion">
<img alt="Documentation (Bastion)" src="https://img.shields.io/badge/rustdoc-bastion-blue.svg" />
</a>
</td>
<td>Downloads</td>
<td>
<a href="https://crates.io/crates/bastion">
<img alt="Crates.io" src="https://img.shields.io/crates/d/bastion.svg?style=popout-square">
</a>
</td>
</tr>
<tr>
<td>Doc [Bastion Executor]</td>
<td>
<a href="https://docs.rs/bastion-executor">
<img alt="Documentation (Bastion Executor)" src="https://img.shields.io/badge/rustdoc-bastion_executor-blue.svg" />
</a>
</td>
</tr>
<tr>
<td>Doc [LightProc]</td>
<td>
<a href="https://docs.rs/lightproc">
<img alt="Documentation (LightProc)" src="https://img.shields.io/badge/rustdoc-lightproc-blue.svg" />
</a>
</td>
</tr>
<tr>
<td>Build Status</td>
<td>
<a href="https://github.com/bastion-rs/bastion/actions">
<img alt="Build Status" src="https://github.com/bastion-rs/bastion/workflows/CI/badge.svg" />
</a>
</td>
</tr>
<tr>
<td>Downloads</td>
<td>
<a href="https://crates.io/crates/bastion">
<img alt="Crates.io" src="https://img.shields.io/crates/d/bastion.svg?style=popout-square">
</a>
</td>
</tr>
<tr>
<td>Discord</td>
<td>
<a href="https://discord.gg/DqRqtRT">
<img src="https://img.shields.io/discord/628383521450360842.svg?logo=discord" />
</a>
</td>
</tr>
<td>
<a href="https://docs.rs/bastion-executor">
<img alt="Documentation (Bastion Executor)" src="https://img.shields.io/badge/rustdoc-bastion_executor-blue.svg" />
</a>
</td>
<td>Discord</td>
<td>
<a href="https://discord.gg/DqRqtRT">
<img src="https://img.shields.io/discord/628383521450360842.svg?logo=discord" />
</a>
</td>
</tr>
<tr>
</tr>
<tr>
<td>Doc [LightProc]</td>
<td>
<a href="https://docs.rs/lightproc">
<img alt="Documentation (LightProc)" src="https://img.shields.io/badge/rustdoc-lightproc-blue.svg" />
</a>
</td>
<td>Build Status</td>
<td>
<a href="https://github.com/bastion-rs/bastion/actions">
<img alt="Build Status" src="https://github.com/bastion-rs/bastion/workflows/CI/badge.svg" />
</a>
</td>
</tr>
</table>

---

<h1 align="center">Highly-available Distributed Fault-tolerant Runtime</h1>

Bastion is a highly-available, fault-tolerant runtime system with dynamic, dispatch-oriented, lightweight process model. It supplies actor-model-like concurrency with a lightweight process implementation and utilizes all of the system resources efficiently guaranteeing of at-most-once message delivery.

---
Expand All @@ -87,6 +78,23 @@ Bastion is a highly-available, fault-tolerant runtime system with dynamic, dispa
Bastion comes with a default one-for-one strategy root supervisor.
You can use this to launch automatically supervised tasks.

## Get Started

Include bastion to your project with:
```toml
bastion = "0.4"
```

### Documentation

Official documentation is hosted on [docs.rs](https://docs.rs/bastion).

### Examples

Check the [getting started example](https://github.com/bastion-rs/bastion/blob/master/src/bastion/examples/getting_started.rs) in <code>bastion/examples</code>

[Examples](https://github.com/bastion-rs/bastion/blob/master/src/bastion/examples) cover possible use cases of the crate.

## Features
* Message-based communication makes this project a lean mesh of actor system.
* Without web servers, weird shenanigans, forced trait implementations, and static dispatch.
Expand Down Expand Up @@ -144,50 +152,37 @@ It's independent of it's framework implementation. It uses lightproc to encapsul
### [Agnostik](https://github.com/bastion-rs/agnostik)
Agnostik is a layer between your application and the executor for your async stuff. It lets you switch the executors smooth and easy without having to change your applications code. Valid features are `runtime_bastion` (default), `runtime_tokio`, `runtime_asyncstd` and `runtime_nostd` (coming soon).

## Get Started
Check the [getting started example](https://github.com/bastion-rs/bastion/blob/master/src/bastion/examples/getting_started.rs) in <code>bastion/examples</code>

[Examples](https://github.com/bastion-rs/bastion/blob/master/src/bastion/examples) cover possible use cases of the crate.

Include bastion to your project with:
```toml
bastion = "0.4"
```

For more information please check [Bastion Documentation](https://docs.rs/bastion)

## Architecture of the Runtime
Runtime is structured by the user. Only root supervision comes in batteries-included fashion.
Worker code, worker group redundancy, supervisors and their supervision strategies are defined by the user.

## License

Licensed under either of

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

at your option.

## Documentation
Supervision strategies define how child actor failures are handled, how often a child can fail, and how long to wait before a child actor is recreated. As the name suggests, One-For-One strategy means the supervision strategy is applied only to the failed child. All-For-One strategy means that the supervision strategy is applied to all the actor siblings as well. One-for-one supervision is used at the root supervisor, while child groups may have different strategies like rest-for-one or one-for-all.

Official documentation is hosted on [docs.rs](https://docs.rs/bastion).
![Bastion Architecture](img/bastion-architecture.png)

## Getting Help
## Community
### Getting Help
Please head to our [Discord](https://discord.gg/DqRqtRT) or use [StackOverflow](https://stackoverflow.com/questions/tagged/bastion)

## Discussion and Development
### Discussion and Development
We use [Discord](https://discord.gg/DqRqtRT) for development discussions. Also please don't hesitate to open issues on GitHub ask for features, report bugs, comment on design and more!
More interaction and more ideas are better!

## Contributing to Bastion [![Open Source Helpers](https://www.codetriage.com/bastion-rs/bastion/badges/users.svg)](https://www.codetriage.com/bastion-rs/bastion)
### Contributing to Bastion [![Open Source Helpers](https://www.codetriage.com/bastion-rs/bastion/badges/users.svg)](https://www.codetriage.com/bastion-rs/bastion)

All contributions, bug reports, bug fixes, documentation improvements, enhancements and ideas are welcome.

A detailed overview on how to contribute can be found in the [CONTRIBUTING guide](https://github.com/bastion-rs/.github/blob/master/CONTRIBUTING.md) on GitHub[.](https://youtu.be/w55YCDzZjvA)

## License

Licensed under either of

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

at your option.

[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fbastion-rs%2Fbastion.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fbastion-rs%2Fbastion?ref=badge_large)

[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fbastion-rs%2Fbastion.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fbastion-rs%2Fbastion?ref=badge_shield)
Binary file added img/bastion-architecture.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 19 additions & 12 deletions src/bastion-executor/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ name = "bastion-executor"
# - Update CHANGELOG.md.
# - npm install -g auto-changelog && auto-changelog at the root
# - Create "v0.x.y" git tag at the root of the project.
version = "0.3.7-alpha.0"
version = "0.4.1"
description = "Cache affine NUMA-aware executor for Rust"
authors = ["Mahmut Bulut <[email protected]>"]
keywords = ["fault-tolerant", "runtime", "actor", "system"]
Expand All @@ -25,34 +25,41 @@ travis-ci = { repository = "bastion-rs/bastion", branch = "master" }
maintenance = { status = "actively-developed" }

[features]
unstable = ["numanji", "allocator-suite", "jemallocator"]
unstable = []
tokio-runtime = ["tokio"]

[dependencies]
lightproc = "0.3.5"
bastion-utils = "0.3.2"
# lightproc = "0.3"
lightproc = { git = "https://github.com/bastion-rs/bastion.git" }
# lightproc = { path = "../lightproc" }
# bastion-utils = { path = "../bastion-utils" }

crossbeam-utils = "0.7"
crossbeam-channel = "0.4"
crossbeam-epoch = "0.8"
crossbeam-utils = "0.8"
crossbeam-channel = "0.5"
crossbeam-epoch = "0.9"
lazy_static = "1.4"
libc = "0.2"
num_cpus = "1.13"
pin-utils = "0.1.0"

# Allocator
numanji = { version = "^0.1", optional = true, default-features = false }
allocator-suite = { version = "^0.1", optional = true, default-features = false }
arrayvec = { version = "0.5.1", features = ["array-sizes-129-255"]}
arrayvec = { version = "0.7.0" }
futures-timer = "3.0.2"
once_cell = "1.4.0"
lever = "0.1"
tracing = "0.1.19"
crossbeam-queue = "0.3.0"

[target.'cfg(not(any(target_os = "android", target_os = "linux")))'.dependencies]
jemallocator = { version = "^0.3", optional = true, default-features = false }
# Feature tokio
tokio = {version = "1.1", features = ["rt", "rt-multi-thread"], optional = true }

[target.'cfg(target_os = "windows")'.dependencies]
winapi = { version = "^0.3.8", features = ["basetsd"] }

[dev-dependencies]
proptest = "^0.10"
tokio = {version = "1.1", features = ["rt", "rt-multi-thread", "macros"] }
tokio-test = "0.4.0"
proptest = "^1.0"
futures = "0.3.5"
tracing-subscriber = "0.2.11"
Loading