Latest Release | |
License | |
Build Status | |
Downloads | |
Discord |
Bastion is a highly-available, fault-tolerant runtime system with dynamic dispatch oriented lightweight process model. It supplies actor model like concurrency with lightweight process implementation and utilize all the system resources efficiently with giving promise of at-most-once message delivery guarantee.
Please note that Bastion is not production-ready yet and might break some backward compatibility for now.
Bastion comes with a default one-for-one strategy root supervisor. You can use this to launch automatically supervised tasks.
- Message-based communication makes this project a lean mesh of actor system.
- without web servers, weird shenanigans, forced trait implementations, and static dispatch.
- Runtime fault-tolerance makes it a good candidate for distributed systems.
- If you want to smell of Erlang and it's powerful aspects in Rust. That's it!
- Completely asynchronous runtime with NUMA-aware and cache-affine SMP executor.
- Exploiting hardware locality wherever it is possible. It is designed for servers.
- Supervision system makes it easy to manage lifecycles.
- Kill your application in certain condition or restart you subprocesses whenever a certain condition met.
- At most once delivery for all the messages.
- Completely asynchronous system design.
- Asynchronous program boundaries with [fort].
- Dynamic supervision of supervisors (adding a subtree later during the execution)
- Lifecycle management both at
futures
andlightproc
layers. - Faster middleware development.
- Above all "fault-tolerance".
If one of the questions below answered with yes, then Bastion is just for you:
- Do I need fault-tolerancy in my project?
- Do I hate to implement weird Actor traits?
- I shouldn't need a webserver to run an actor system, right?
- Do I want to make my existing code unbreakable?
- Do I have some trust issues against orchestration systems? Because I want to implement my own application lifecycle.
Check the getting started example in bastion/examples
Examples cover possible use cases of the crate.
Include bastion to your project with:
bastion = "0.3"
For more information please check Bastion Documentation
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.
You can see architecture of the framework HERE.
If you are using Bastion open a PR so we can include it in our showcase.
- SkyNet (a Discord bot which is resending deleted messages)
- Skynet is running since 0.1.3 release of Bastion on the cloud and haven't killed yet.
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Official documentation is hosted on docs.rs.
Please head to our Discord or use StackOverflow
We use Discord 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!
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 on GitHub.