Bastion: the missing part of actor-model programming in rust

栏目: IT技术 · 发布时间: 4年前

内容简介: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

Bastion: the missing part of actor-model programming in rust

Highly-available Distributed* Fault-tolerant Runtime

Latest Release
License
Doc [Bastion]
Doc [Bastion Executor]
Doc [LightProc]
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 a lightweight process implementation and utilizes all of the system resources efficiently guaranteeing of at-most-once message delivery.

Please note that Bastion is not production-ready yet and might break some backward compatibility for now.

Usage

Bastion comes with a default one-for-one strategy root supervisor. You can use this to launch automatically supervised tasks.

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.

Guarantees

  • 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 and lightproc layers.
  • Faster middleware development.
  • Above all "fault-tolerance".

Why Bastion?

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 with orchestration systems?
  • Do I want to implement my own application lifecycle?

Get Started

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

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.

You can see architecture of the framework HERE .

Projects using Bastion

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.
  • In AWS Lambdas we have used Bastion to enable retry mechanism and try different parsing strategies for data to be processed.

License

Licensed under either of

at your option.

Documentation

Official documentation is hosted on docs.rs .

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

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.

* Currently, we are working on distributed properties and protocol .


以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

大数据供应链

大数据供应链

娜达·R·桑德斯 (Nada R. Sanders) / 丁晓松 / 中国人民大学出版社 / 2015-7-1 / CNY 55.00

第一本大数据供应链落地之道的权威著作,全球顶级供应链管理专家娜达·桑德斯博士聚焦传统供应链模式向大数据转型,助力工业4.0时代智能供应链构建。 在靠大数据驱动供应链处于领先地位的企业中,45% 是零售商,如沃尔玛、亚马逊,而22%是快消企业,如戴尔电脑。他们都前所未有地掌控了自己的供应链。在库存管理、订单履行率、原材料和产品交付上具有更为广阔的视野。利用具有预见性的大数据分析结果,可以使供需......一起来看看 《大数据供应链》 这本书的介绍吧!

随机密码生成器
随机密码生成器

多种字符组合密码

UNIX 时间戳转换
UNIX 时间戳转换

UNIX 时间戳转换