Commit Graph

76 Commits

Author SHA1 Message Date
Jon Gjengset 8df2a3e410
step 1: move all things to where they're going
Note that this also moves all crates from `log` to `tracing`.
It also does not set any dependencies as optional.
2020-03-31 13:31:21 -04:00
Lucio Franco e2f1a49cf3
Update the rest of the crates and upgrade ready cache to `std::f… (#379)
* Update hedge, filter, load, load-shed, and more

* Update ready cache

* Prepare release for ready-cache

* fix merge

* Update balance

* Prepare balance release
2019-12-05 14:21:47 -05:00
Lucio Franco 0d2a3778ad
Update `tower` and `tower-util` and prep for release (#378)
* Update tower and tower-util

* Prepare them for release

* fmt

* Get tower tests working
2019-12-04 22:48:43 -05:00
Lucio Franco 54dd475ec0
Update buffer and prepare for release (#377)
* Update buffer and prepare for release

* Update tower-buffer/src/service.rs

Co-Authored-By: Eliza Weisman <eliza@buoyant.io>

* fmt
2019-12-04 20:31:27 -05:00
Lucio Franco 15c58e8842
Update retry and prepare for release (#376)
* Update retry and prepare for release

* fmt
2019-12-04 19:36:46 -05:00
Lucio Franco 877c194b1b
Update tower-limit and prepare for release (#375)
* wip

* Refactor limit tests and prep for release
2019-12-04 09:53:52 -05:00
Lucio Franco ec6215fb2f
Update timeout, tower-test and reconnect (#373)
* Update timeout and prepare 0.3

* Update tower-test and prepare release

* Update lib doc path

* Update reconnect and prepare for release
2019-12-02 19:14:15 -05:00
David Barsky 45e311c2f2 layer: Prepare 0.3.0 Release (#372)
* layer: prepare 0.3.0 release

* fmt

* Update tower-layer/src/lib.rs
2019-11-29 16:09:47 -05:00
Lucio Franco b6c67182cb
make: Prepare 0.3 release and update docs (#370)
* make: Prepare 0.3 release and update docs

* rebase against origin/master + get doc tests to compile

* fmt

* fix build
2019-11-29 15:44:03 -05:00
Lucio Franco c3c6780d31
service: Update docs and prepare for 0.3 release (#369)
* service: Update docs and prepare for 0.3 release

* Update rustmft

* Disable main tower crate
2019-11-29 11:48:08 -05:00
Lucio Franco bb5c02ca58
Disable all crates execpt tower-service 2019-11-29 09:23:54 -05:00
David Barsky a4c02f5d9c Revert "get building"
186a0fb4a3
2019-11-28 15:21:27 -05:00
David Barsky 186a0fb4a3 get building 2019-11-28 15:15:41 -05:00
Lucio Franco 87ad2e1cc8 Merge remote-tracking branch 'origin/master' into v0.3.x 2019-11-26 10:32:02 -05:00
Oliver Gould 7e55b7fa0b
Introduce tower-ready-cache (#303)
In #293, `balance` was refactored to manage dispatching requests over a
set of equivalent inner services that may or may not be ready.

This change extracts the core logic of managing a cache of ready
services into a dedicated crate, leaving the balance crate to deal with
node selection.
2019-11-12 09:44:16 -08:00
Lucio Franco abe5b78542
Remove tokio alpha.6 patches (#357)
* Remove tokio alpha.6 patches

* Remove ci patch
2019-09-30 21:15:26 -04:00
Taiki Endo 03dc7069aa Update pin-project to 0.4 (#350) 2019-09-30 14:58:27 -04:00
Jon Gjengset 3d642f5ca0
This bumps tower-hedge to 0.3.0-alpha.1 (#334) 2019-09-11 14:00:22 -04:00
Jon Gjengset 87976ae418
Update tower-balance to std::future (#335)
This bumps tower-balance to 0.3.0-alpha.1

It also adds delegate impls for `Discover` through `Pin`, and makes `tower-load::Constant: Debug`.
2019-09-10 18:15:32 -04:00
Jon Gjengset 1ca999fde1
Update tower-spawn-ready to std::future (#332)
This bumps tower-spawn-ready to 0.3.0-alpha.1
2019-09-10 17:06:34 -04:00
Jon Gjengset 0802ca2bce
Update tower-util and tower to std::future (#330)
This bumps tower-util and tower to 0.3.0-alpha.1
2019-09-10 14:51:07 -04:00
Jon Gjengset 9691d0d379
Update tower-reconnect to std::future (#333)
This bumps tower-reconnect to 0.3.0-alpha.1

It also makes the tower-make version consistent
2019-09-10 11:48:01 -04:00
Jon Gjengset adca66cf74
Update tower-filter to std::future (#331)
This bumps tower-filter to 0.3.0-alpha.1
2019-09-10 11:39:51 -04:00
Jon Gjengset 4eb47b01dc
Update tower-timeout to std::future (#328)
This bumps tower-timeout to 0.3.0-alpha.1
2019-09-09 16:20:09 -04:00
Jon Gjengset 4f71951221
Update tower-retry to std::future (#326)
This bumps tower-retry to 0.3.0-alpha.1
2019-09-09 15:10:46 -04:00
Jon Gjengset 154bd69b9f
Update tower-limit to std::future (#324)
This bumps tower-limit to 0.3.0-alpha.1
2019-09-09 12:09:41 -04:00
Jon Gjengset 390e124525
Update tower-load-shed to std::future (#325)
This bumps tower-load-shed to 0.3.0-alpha.1
2019-09-09 12:09:19 -04:00
Jon Gjengset 693965fa4a
Update tower-buffer to std::future (#323)
This bumps tower-buffer to 0.3.0-alpha.1
2019-09-09 12:07:28 -04:00
Jon Gjengset f8097a60f6
Update tower-load to std::future (#321)
This bumps tower-load to 0.3.0-alpha.1
2019-09-09 09:22:49 -04:00
Jon Gjengset db116d1937
Update tower-layer to std::future (#322)
This bumps tower-layer to 0.3.0-alpha.1
2019-09-07 00:22:18 -04:00
Jon Gjengset 5ad02b73d9
Update tower-discover to std::future (#320)
This bumps tower-discover to 0.3.0-alpha.1
2019-09-07 00:20:21 -04:00
John Doneth 7ae5967e7a Update tower-test to std::future::Future (#316)
* update tower-test to std::future

* refactoring tower-test tests

* everything works

* whoops, un-delete the tower dir

* cleanup & update links

* undo changes to tower-filter for this PR

* use pin_utils::unsafe_pinned

* use tokio-test
2019-09-03 10:26:46 -04:00
Stan Bondi ae611db665 Update `service_fn` to `std::future::Future` (#318)
This small PR ports service_fn to `std::future`.
2019-09-03 10:12:33 -04:00
Lucio Franco 652137aaa3
Update MakeService and MakeConnection (#313)
* Update MakeService and MakeConnection

* Create tower-make crate

* Remove Makers from tower-util
2019-08-27 12:39:14 -04:00
Lucio Franco fe9cef6006
Update `tower-service` to `std::future::Future` (#311) 2019-08-20 14:31:09 -04:00
Oliver Gould a496fbf72c
Extract tower-load from tower-balance (#285)
The tower-balance crate includes the `Load` and `Instrument` traits,
which are likely useful outside of balancers; and certainly have no
tight coupling with any specific balancer implementation. This change
extracts these protocol-agnostic traits into a dedicated crate.

The `Load` trait includes a latency-aware _PeakEWMA_ load strategy as
well as a simple _PendingRequests_ strategy for latency-agnostic
applications.

The `Instrument` trait is used by both of these strategies to track
in-flight requests without knowing protocol details. It is expected that
protocol-specific crates will provide, for instance, HTTP
time-to-first-byte latency strategies.

A default `NoInstrument` implementation tracks the a request until its
response future is satisfied.

This crate should only be published once tower-balance is published.

Part of https://github.com/tower-rs/tower/issues/286
2019-05-29 10:32:02 -07:00
Oliver Gould 42f4b7781e
spawn-ready: Drives a service's readiness on an executor (#283)
Some layers cannot guarantee that they will poll inner services in a
timely fashion. For instance, the balancer polls its inner services to
check for readiness, but it does so randomly. If its inner service
must be polled several times to become ready, e.g., because it's driving
the initiation of a TLS connection, then the balancer may not drive the
handshake to completion.

The `SpawnReady` layer ensures that its inner service is driven to
readiness by spawning a background task.
2019-05-29 09:57:46 -07:00
Alex Leong 73c74252e6 Add hedge retry middleware (#236)
Add tower-hedge, a layer that preemptively retries requests which have been
outstanding for longer than a given latency percentile.  If either of the original
future or the retry future completes, that value is used.  For more information
about hedge requests, see: [The Tail at Scale][1]

[1]: https://cseweb.ucsd.edu/~gmporter/classes/fa17/cse124/post/schedule/p74-dean.pdf

Signed-off-by: Alex Leong <alex@buoyant.io>
2019-04-27 09:32:26 -07:00
Carl Lerche 14f4259518
Prepare release (#273)
The following crates are to be released:

- tower
- tower-buffer
- tower-discover
- tower-layer
- tower-limit
- tower-load-shed
- tower-retry
- tower-service
- tower-test
- tower-timeout
- tower-util
2019-04-26 21:31:25 -07:00
Carl Lerche ef6d203b47
Create `tower-test` and include tower-mock. (#237)
tower-mock is deleted in favor of having a single test crate. This crate
also includes a new macro: `assert_request_eq!`.
2019-04-07 20:42:18 -07:00
Carl Lerche 16f2d2b4fa
Consolidate `limit` layers (#235)
* Consolidate `limit` layers

- `InFlightLimit` and `RateLimit` are moved into `tower-limit` crate.
- `InFlightLimit` is renamed to `ConcurrencyLimit`.

Fixes #225
2019-04-05 20:08:43 -07:00
Carl Lerche f1bb22a296
util: rename tower-service-util -> tower-util (#212) 2019-03-27 16:34:56 -07:00
Lucio Franco 476f085c89
Introduce the `ServiceBuilder` (#175)
The `ServiceBuilder` composes layers together and produces either a `MakeService` or a `Service` wrapped by those layers.
2019-03-26 10:14:42 -04:00
Sean McArthur db2f0ecfb3
Introduce tower-load-shed (#204)
Provides a middleware that immediately fails any request if the
underlying service isn't ready yet. This is useful when used in
conjunction with `InFlightLimit` or others, so that requests are
rejected immediately, instead of keeping track of extra pending
requests.
2019-03-20 15:48:10 -07:00
Carl Lerche 263c680ea6 Remove tower-watch (#200) 2019-03-19 18:18:59 -07:00
Carl Lerche 92f4a0cb72
Rename tower-util -> tower (#197) 2019-03-15 10:53:19 -07:00
Carl Lerche acda5a75b9
Initial introduction of tower-service-util (#193) 2019-03-14 11:27:36 -07:00
Carl Lerche 794aa44c4b
Create subdir for tower crate (#182) 2019-03-06 07:54:39 -08:00
Lucio Franco c5d70481bd
layer: Add `tower-layer` and the `Layer` trait (#163)
This change introduces the new `tower-layer` crate and the foundational `Layer` trait to go along with it. This trait allows one to easily compose a set of `Service`s that take an inner service. These services only modify the request/response. This also provides the `Layer` implementation for many of the tower crates.
2019-02-27 15:28:42 -05:00
Carl Lerche 25eb52153d
Remove DirectService (#160) 2019-02-16 10:21:59 -08:00