https://github.com/bastion-rs/bastion Skip to content Toggle navigation Sign up * Product + Actions Automate any workflow + Packages Host and manage packages + Security Find and fix vulnerabilities + Codespaces Instant dev environments + Copilot Write better code with AI + Code review Manage code changes + Issues Plan and track work + Discussions Collaborate outside of code + Explore + All features + Documentation + GitHub Skills + Blog * Solutions + By Plan + Enterprise + Teams + Compare all + By Solution + CI/CD & Automation + DevOps + DevSecOps + Case Studies + Customer Stories + Resources * Open Source + GitHub Sponsors Fund open source developers + The ReadME Project GitHub community articles + Repositories + Topics + Trending + Collections * Pricing [ ] * # In this repository All GitHub | Jump to | * No suggested jump to results * # In this repository All GitHub | Jump to | * # In this organization All GitHub | Jump to | * # In this repository All GitHub | Jump to | Sign in Sign up {{ message }} bastion-rs / bastion Public * * Notifications * Fork 96 * Star 2.5k Highly-available Distributed Fault-tolerant Runtime www.bastion-rs.com License Apache-2.0, MIT licenses found Licenses found Apache-2.0 LICENSE-APACHE MIT LICENSE-MIT 2.5k stars 96 forks Star Notifications * Code * Issues 42 * Pull requests 8 * Discussions * Actions * Projects 1 * Security * Insights More * Code * Issues * Pull requests * Discussions * Actions * Projects * Security * Insights bastion-rs/bastion This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. master Switch branches/tags [ ] Branches Tags Could not load branches Nothing to show {{ refName }} default View all branches Could not load tags Nothing to show {{ refName }} default View all tags Name already in use A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch? Cancel Create 28 branches 31 tags Code * Clone HTTPS GitHub CLI [https://github.com/b] Use Git or checkout with SVN using the web URL. [gh repo clone bastio] Work fast with our official CLI. Learn more. * Open with GitHub Desktop * Download ZIP Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching Xcode If nothing happens, download Xcode and try again. Launching Visual Studio Code Your codespace will open once ready. There was a problem preparing your codespace, please try again. Latest commit @o0Ignition0o o0Ignition0o start iteration 0.4.6-alpha.0 ... 48d4c73 Jan 8, 2022 start iteration 0.4.6-alpha.0 48d4c73 Git stats * 606 commits Files Permalink Failed to load latest commit information. Type Name Latest commit message Commit time .github img src tools .auto-changelog .gitignore CHANGELOG.md Cargo.toml LICENSE-APACHE LICENSE-MIT README.md SECURITY.md rustfmt.toml View code [ ] Highly-available Distributed Fault-tolerant Runtime Usage Get Started Documentation Examples Features Guarantees Why Bastion? Bastion Ecosystem Nuclei LightProc Bastion Executor Agnostik Architecture of the Runtime Community Getting Help Discussion and Development Contributing to Bastion License README.md [bastion] --------------------------------------------------------------------- Latest Release Crates.io License Crates.io Doc [Bastion] Documentation (Bastion) Downloads Crates.io Doc [Bastion Documentation (Bastion Discord [6874747073] Executor] Executor) Doc [LightProc] Documentation (LightProc) Build Build Status Status --------------------------------------------------------------------- Highly-available Distributed Fault-tolerant Runtime 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. --------------------------------------------------------------------- Usage 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: bastion = "0.4" Documentation Official documentation is hosted on docs.rs. Examples Check the getting started example in bastion/examples 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. * Runtime fault-tolerance makes it a good candidate for distributed systems. + If you want the smell of Erlang and the powerful aspects of 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 is met. * Automatic member discovery, cluster formation and custom message passing between cluster members. + Using zeroconf or not, launch your bastion cluster from everywhere, with a single actor block. * Proactive IO system which doesn't depend on anything other than futures. + Bastion's proactive IO has scatter/gather operations, io_uring support and much more... Guarantees * At most once delivery for all 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 and lightproc layers. * Faster middleware development. * Fault tolerance above all. Why Bastion? If you answer any of the questions below with yes, then Bastion is just for you: * Do I want proactive IO? * Do I need fault-tolerance 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 with orchestration systems? * Do I want to implement my own application lifecycle? Bastion Ecosystem Bastion Ecosystem is here to provide you a way to customize it. If you don't need to, or if you are a newcomers, you can install and use Bastion without knowing how everything works under the hood. We hope to find you on this section soon. Nuclei Nuclei is proactive IO system that can be independently used without executor restriction. It is also powering Bastion's IO system. You can learn more about Nuclei here, check out Nuclei's repo for more sophisticated use cases. LightProc LightProc is Lightweight Process abstraction for Rust. It uses futures with lifecycle callbacks to implement Erlang like processes and contains basic pid to identify processes. All panics inside futures are propagated to upper layers. Bastion Executor Bastion Executor is NUMA-aware SMP based Fault-tolerant Executor, highly-available and async communication oriented. It's independent of it's framework implementation. It uses lightproc to encapsulate and provide fault-tolerance to your future based workloads. You can use your futures with lightproc to run your workloads on Bastion Executor without the need to have framework. 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). 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. 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. Bastion Architecture Community Getting Help Please head to our Discord or use StackOverflow Discussion and Development 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! Contributing to Bastion Open Source Helpers 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. License 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. FOSSA Status FOSSA Status About Highly-available Distributed Fault-tolerant Runtime www.bastion-rs.com Topics rust distributed-systems asynchronous fault-tolerance concurrency rust-language distributed actor smp supervision hacktoberfest numa-aware Resources Readme License Apache-2.0, MIT licenses found Licenses found Apache-2.0 LICENSE-APACHE MIT LICENSE-MIT Code of conduct Code of conduct Security policy Security policy Stars 2.5k stars Watchers 62 watching Forks 96 forks Releases 3 Bastion 0.4.1-alpha 1 Latest Jul 30, 2020 + 2 releases Sponsor this project * open_collective opencollective.com/bastion Packages 0 No packages published Used by 172 * @trvinh99 * @getong * @zrus * @zrus * @zrus * @smartbigant * @speculare-cloud * @speculare-cloud + 164 Contributors 29 * @vertexclique * @r3v2d0g * @o0Ignition0o * @Relrin * @JohnTitor * @Stupremee * @onsails * @oScape * @lurk-skywater * @Keruspe * @xmclark + 18 contributors Languages * Rust 99.8% * Shell 0.2% Footer (c) 2022 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact GitHub * Pricing * API * Training * Blog * About You can't perform that action at this time. You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.