Methods for creating backpressure channels.
Methods for creating backpressure channels.
Methods for starting backpressure protocols on backpressure channels.
Methods for starting backpressure protocols on backpressure channels.
Communication patterns based on backpressure.
Communication patterns based on backpressure.
Backpressure ensures that the backpressure server has a bound on the number of events in its event queue, at all times. This is achieved by preventing the clients from sending too many events.
Clients must ask the backpressure server for a backpressure link. When a client receives a link, it must check if it has sufficient budget to send events to the server, and potentially wait before sending an event. The budget is spent each time that the client sends an event, and replenished when the server sends a token.
There are several kinds of backpressure exposed by this module:
Augments reactor systems with operations used to create backpressure reactors.
Augments reactor systems with operations used to create backpressure reactors.
Utilities that manipulate and transform channels.
Contains various convenience operations.
Utilities that convert values of different types to events streams.
General communication patterns.
General communication patterns.
Allows specifying communication patterns in a generic way.
As an example, one can declaratively retry server requests until a timeout, by sending a throttled sequence of requests until a timeout, and taking the first reply that comes:
Seq(1, 2, 4).toEvents.throttle(x => x.seconds).map(_ => server ? "req") .first.until(timeout(3.seconds))
Communication patterns for routing.
A server channel accepts tuples with the request event and channel to reply on.
A server channel accepts tuples with the request event and channel to reply on.
Communication patterns based on request-reply.
Methods that convert collections to event streams.
Methods that convert collections to event streams.
Since standard collections are not specialized, boxing is potentially possible.
Utility methods for frequently used delay sequences.
Utility methods for frequently used delay sequences.
Contains backpressure types and auxiliary classes.
Contains types and factory functions for router protocols.
Contains various options for tuning the server protocol.
Contains various options for tuning the server protocol.
Retry the specified request with a backoff scheme.
Retry the specified request with a backoff scheme.
After a stream from one of the requests starts emitting events, all the other requests are unsubscribed from, and not further retrying takes place.
To create different backoff schemes, see the Backoff
object.
the duration of subsequent delays between requests
the code that creates the request and a stream of replies
the stream of replies that was first to emit an event
Retry the specified request a fixed number of times.
Retry the specified request a fixed number of times.
the number of times to retry the request
the delay between each request
the code that creates the request and a stream of replies
the stream of replies that was first to emit an event