io.reactors

protocol

package protocol

Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. protocol
  2. Convenience
  3. Conversions
  4. Patterns
  5. ChannelProtocols
  6. BackpressureProtocols
  7. RouterProtocols
  8. ServerProtocols
  9. AnyRef
  10. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. implicit class BackpressureChannelBuilderOps extends AnyRef

    Methods for creating backpressure channels.

    Methods for creating backpressure channels.

    Definition Classes
    BackpressureProtocols
  2. implicit class BackpressureConnectorOps[T] extends AnyRef

    Methods for starting backpressure protocols on backpressure channels.

    Methods for starting backpressure protocols on backpressure channels.

    Definition Classes
    BackpressureProtocols
  3. trait BackpressureProtocols extends AnyRef

    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:

    • The for-all backpressure policy maintains a fixed number of tokens across all backpressure links. The advantage is that the server cannot be overwhelmed, regardless of the number of clients. The disadvantage is that some clients can fail while holding some of the tokens, in which case tokens are lost. If failures are possible in the system, such scenarios can ultimately starve the protocol.
    • The per-client backpressure policy maintains a fixed number of tokens per each backpressure link. The advantage is that the failure of any single client only obliviates the tokens from the client's own backpressure links, so other clients cannot be starved. The disadvantage is that the total number of clients may be unbounded, which can overwhelm the backpressure server.
  4. implicit class BackpressureServerOps[T] extends AnyRef

    Definition Classes
    BackpressureProtocols
  5. implicit class BackpressureSystemOps extends AnyRef

    Augments reactor systems with operations used to create backpressure reactors.

    Augments reactor systems with operations used to create backpressure reactors.

    Definition Classes
    BackpressureProtocols
  6. trait ChannelProtocols extends AnyRef

    Utilities that manipulate and transform channels.

  7. trait Convenience extends AnyRef

    Contains various convenience operations.

  8. trait Conversions extends AnyRef

    Utilities that convert values of different types to events streams.

  9. implicit class DurationEventOps[T] extends AnyRef

    Definition Classes
    Patterns
  10. implicit class FutureOps[T] extends AnyRef

    Definition Classes
    Conversions
  11. trait Patterns extends AnyRef

    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))
  12. implicit class RouterChannelBuilderOps extends AnyRef

    Definition Classes
    RouterProtocols
  13. implicit class RouterConnectorOps[T] extends AnyRef

    Definition Classes
    RouterProtocols
  14. trait RouterProtocols extends AnyRef

    Communication patterns for routing.

  15. type Server[T, S] = Channel[Req[T, S]]

    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.

    Definition Classes
    ServerProtocols
  16. implicit class ServerChannelBuilderOps extends AnyRef

    Definition Classes
    ServerProtocols
  17. implicit class ServerConnectorOps[T, S] extends AnyRef

    Definition Classes
    ServerProtocols
  18. implicit class ServerOps[T, S] extends AnyRef

    Definition Classes
    ServerProtocols
  19. trait ServerProtocols extends AnyRef

    Communication patterns based on request-reply.

  20. implicit class ServerStreamOps[T, S] extends AnyRef

    Definition Classes
    ServerProtocols
  21. implicit class ServerSystemOps extends AnyRef

    Definition Classes
    ServerProtocols
  22. implicit class TraversableOps[T] extends AnyRef

    Methods that convert collections to event streams.

    Methods that convert collections to event streams.

    Since standard collections are not specialized, boxing is potentially possible.

    Definition Classes
    Conversions

Value Members

  1. object Backoff

    Utility methods for frequently used delay sequences.

    Utility methods for frequently used delay sequences.

    Definition Classes
    Patterns
  2. object Backpressure

    Contains backpressure types and auxiliary classes.

  3. object ChannelProtocols

  4. object Convenience

  5. object Conversions

  6. object Patterns

  7. object Router

    Contains types and factory functions for router protocols.

  8. object Server

    Contains various options for tuning the server protocol.

    Contains various options for tuning the server protocol.

    Definition Classes
    ServerProtocols
  9. implicit def channelOps[T](ch: Channel[T])(implicit arg0: Arrayable[T]): ChannelOps[T]

    Definition Classes
    ChannelProtocols
  10. implicit def reactorSystemOps(system: ReactorSystem): ReactorSystemOps

    Definition Classes
    Convenience
  11. def retry[T](backoffScheme: Seq[Duration])(req: ⇒ Events[T]): Events[T]

    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.

    backoffScheme

    the duration of subsequent delays between requests

    req

    the code that creates the request and a stream of replies

    returns

    the stream of replies that was first to emit an event

    Definition Classes
    Patterns
  12. def retry[T](numTimes: Int, delay: Duration)(req: ⇒ Events[T]): Events[T]

    Retry the specified request a fixed number of times.

    Retry the specified request a fixed number of times.

    numTimes

    the number of times to retry the request

    delay

    the delay between each request

    req

    the code that creates the request and a stream of replies

    returns

    the stream of replies that was first to emit an event

    Definition Classes
    Patterns

Inherited from Convenience

Inherited from Conversions

Inherited from Patterns

Inherited from ChannelProtocols

Inherited from BackpressureProtocols

Inherited from RouterProtocols

Inherited from ServerProtocols

Inherited from AnyRef

Inherited from Any

Ungrouped