kabuki | Lightweight actor system built on top of Tokio | Reactive Programming library

 by   carllerche Rust Version: Current License: Non-SPDX

kandi X-RAY | kabuki Summary

kandi X-RAY | kabuki Summary

kabuki is a Rust library typically used in Programming Style, Reactive Programming applications. kabuki has no bugs, it has no vulnerabilities and it has low support. However kabuki has a Non-SPDX License. You can download it from GitHub.

Kabuki provides a simple way to structure concurrent applications built for the Tokio / Futures platform. It is based on the actor model. An actor is a small unit of computation that is used to manage state and resources. It receives messages from other actors and performs some kind of action based on that input. This way, instead of having state and resources accessed concurrently, only a single thread access it and concurrent access is handled through message passing.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              kabuki has a low active ecosystem.
              It has 76 star(s) with 5 fork(s). There are 16 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 4 open issues and 0 have been closed. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of kabuki is current.

            kandi-Quality Quality

              kabuki has 0 bugs and 0 code smells.

            kandi-Security Security

              kabuki has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              kabuki code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              kabuki has a Non-SPDX License.
              Non-SPDX licenses can be open source with a non SPDX compliant license, or non open source licenses, and you need to review them closely before use.

            kandi-Reuse Reuse

              kabuki releases are not available. You will need to build from source code and install.
              Installation instructions are not available. Examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of kabuki
            Get all kandi verified functions for this library.

            kabuki Key Features

            No Key Features are available at this moment for kabuki.

            kabuki Examples and Code Snippets

            No Code Snippets are available at this moment for kabuki.

            Community Discussions

            QUESTION

            Prevent `chan::Receiver` from blocking on empty buffer
            Asked 2017-Oct-22 at 18:41

            I'd like to build an Multi-Producer Multi-Consumer (MPMC) channel with different concurrent tasks processing and producing data in it. Some of these tasks have the responsibility to interface with the filesystem or network.

            Two examples:

            • PrintOutput(String) would be consumed by a logger, a console output, or a GUI.

            • NewJson(String) would be consumed by a logger or a parser.

            To achieve this, I've selected chan as the MPMC channel provider and tokio as the system to manage event loops for each listener on the channel.

            After reading the example on tokio's site, I began to implement futures::stream::Stream for chan::Receiver. This would allow the use of a for each future to listen on the channel. However, the documentation of these two libraries highlights a conflict:

            fn poll(&mut self) -> Poll, Self::Error>

            Attempt to pull out the next value of this stream, returning None if the stream is finished.

            This method, like Future::poll, is the sole method of pulling out a value from a stream. This method must also be run within the context of a task typically and implementors of this trait must ensure that implementations of this method do not block, as it may cause consumers to behave badly.

            fn recv(&self) -> Option

            Receive a value on this channel.

            If this is an asnychronous channel, recv only blocks when the buffer is empty.

            If this is a synchronous channel, recv only blocks when the buffer is empty.

            If this is a rendezvous channel, recv blocks until a corresponding send sends a value.

            For all channels, if the channel is closed and the buffer is empty, then recv always and immediately returns None. (If the buffer is non-empty on a closed channel, then values from the buffer are returned.)

            Values are guaranteed to be received in the same order that they are sent.

            This operation will never panic! but it can deadlock if the channel is never closed.

            chan::Receiver may block when the buffer is empty, but futures::stream::Stream expects to never block when polled.

            If an empty buffer blocks, there isn't a clear way to confirm that it is empty. How do I check if the buffer is empty to prevent blocking?

            Although Kabuki is on my radar and seems to be the most mature of the actor model crates, it almost entirely lacks documentation.

            This is my implementation so far:

            ...

            ANSWER

            Answered 2017-Oct-22 at 13:37

            The chan crate provides a chan_select macro that would allow a non-blocking recv; but to implement Future for such primitives you also need to wake up the task when the channel becomes ready (see futures::task::current()).

            You can implement Future by using existing primitives; implementing new ones is usually more difficult. In this case you probably have to fork chan to make it Future compatible.

            It seems the multiqueue crate has a Future compatible mpmc channel mpmc_fut_queue.

            Source https://stackoverflow.com/questions/46871542

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install kabuki

            You can download it from GitHub.
            Rust is installed and managed by the rustup tool. Rust has a 6-week rapid release process and supports a great number of platforms, so there are many builds of Rust available at any time. Please refer rust-lang.org for more information.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/carllerche/kabuki.git

          • CLI

            gh repo clone carllerche/kabuki

          • sshUrl

            git@github.com:carllerche/kabuki.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Consider Popular Reactive Programming Libraries

            axios

            by axios

            RxJava

            by ReactiveX

            async

            by caolan

            rxjs

            by ReactiveX

            fetch

            by github

            Try Top Libraries by carllerche

            tower-web

            by carllercheRust

            eventual

            by carllercheRust

            codegen

            by carllercheRust

            astaire-old

            by carllercheRuby

            syncbox

            by carllercheRust