Class DelegatingAvroStoreClient<K,V>

java.lang.Object
com.linkedin.venice.fastclient.InternalAvroStoreClient<K,V>
com.linkedin.venice.fastclient.DelegatingAvroStoreClient<K,V>
All Implemented Interfaces:
AvroGenericReadComputeStoreClient<K,V>, AvroGenericStoreClient<K,V>, Closeable, AutoCloseable
Direct Known Subclasses:
DualReadAvroGenericStoreClient, RetriableAvroGenericStoreClient, StatsAvroGenericStoreClient

public class DelegatingAvroStoreClient<K,V> extends InternalAvroStoreClient<K,V>
Inside Fast-Client, we choose to use n-tier architecture style to build a pipeline to separate different types of logic in different layer.

n-tier architecture => Having multiple layers where each layer wraps the next inner one. Each layer provides some functionality, e.g. stats collection, etc.

Fast-Client's layers include the below components. Check ClientFactory.getAndStartGenericStoreClient(com.linkedin.venice.fastclient.ClientConfig) to figure out how the layers are put together for different requirements.

Layer -1:
AvroGenericStoreClient, AvroGenericReadComputeStoreClient => interfaces: Borrowed from thin-client

Layer 0:
InternalAvroStoreClient implements AvroGenericReadComputeStoreClient => The abstract class implementing above interfaces for fast-client. All other internal implementations of different tiers should extend this class.

Layer 1:
DispatchingAvroGenericStoreClient extends InternalAvroStoreClient => in charge of routing and serialization/de-serialization

Layer 2:
RetriableAvroGenericStoreClient extends DelegatingAvroStoreClient => Adds optional retry ability on top of DispatchingAvroGenericStoreClient

Layer 3:
StatsAvroGenericStoreClient extends DelegatingAvroStoreClient => Adds stats on top of Layer 2 or Layer 1. There is no option to disable it, but if needed, can be disabled.

Layer 4:
DualReadAvroGenericStoreClient extends DelegatingAvroStoreClient => Adds an extra read via thin client on top of Layer 3.

utils class:
DelegatingAvroStoreClient extends InternalAvroStoreClient => Delegator pattern to not override all the functions in every superclass in a duplicate manner.

Interactions between these class for some flows: https://swimlanes.io/u/iHTCBvlf0