Skip to content
Commits on Apr 12, 2012
  1. @mariusae

    [split] finagle-core: introduce Transports and Dispatchers

    mariusae committed Apr 12, 2012
    A transport is a representation of a stream of objects that may be
    read from and written to asynchronously. Transports are connected to
    some endpoint, typically via a channel pipeline that performs
    encoding and decoding.
    Dispatchers bridge services onto transports.
    This splits the finagle world into two neat(er) parts, and allows for
    greater composability and modularity. In particular, after this
    change, a codec may provide its own dispatcher to implement
    multiplexing, pipelining and the like.
    The change also simplifies a lot of the current functionality, making
    it easier to reason about and test.
    Next, I'm going to take this split a little bit further: I'll likely
    introduce a "Listener" which can accept a transport:
    trait Listener[In, Out] {
      def accept(): Future[Transport[In, Out]]
    and a "Connecter" on the client
    trait Connecter[In, Out] {
      def connect(remote: SocketAddress): Future[Transport[In, Out]]
    after that, finagle will be neatly split into the pipeline stack and
    the service stack, allowing us to build & test these separately. For
    example, currently there is poor integration testing in the
    particular service stack that the client & server builder sets up.
    After this change, it'll be much simpler to test the two halves in
Something went wrong with that request. Please try again.