BUG-5280: add AbstractClientConnection 10/44910/72
authorRobert Varga <rovarga@cisco.com>
Tue, 30 Aug 2016 15:57:41 +0000 (17:57 +0200)
committerRobert Varga <rovarga@cisco.com>
Mon, 21 Nov 2016 16:38:53 +0000 (17:38 +0100)
Introduce a connection concept. This is a replacement for
the request queue, as it turns out we do need the concept
of a full connection (e.g. generational logic).

This comes from the need to sensibly switch behaviors
as the locality of the backend leader changes.

This patch implements two sets of strategies for dealing
with reconnect:

The first one assumes long-lived state and is used for
proxies dealing with histories. Here we make sure to
reinstantiate and replace them in a map, as we want
new transactions to follow the new semantic and we do not
want to tear histories down or follow inefficient paths.

The second one assumes short-lived state and is used for
proxies dealing with individual transactions. Transactions
are assumed to come and go rapidly and therefore we
do not replace the proxies in maps (as they will be
short-lived), but rather forwards operations to successors.

The first strategy has a higher access cost, but its state
is always fully uptodate when reconnect finishes, while
the second strategy favor access time, but operations end
up "trailing" and will be forwarded (and hence inefficient)
until the transaction completes.

Change-Id: I7fd9e21c749f55b91229bf0b671c8dcf2e4d5982
Signed-off-by: Robert Varga <rovarga@cisco.com>

No differences found