A lattice for describing the end points associated with a service and how they are compartmentalized. The basic idea behind a lattice is to describe the availability and fault-isolating compartments in which service end points are located. Lattice can be N-dimensional, where each dimension is a type of dependency that may cause a fault. An example of a one dimensional lattice is a service that is spread across multiple Amazon Web Services availability zones. For example some end points may be in availability zone us-east-1a, some in us-east-1b and some in us-east-1c. With a Lattice we can associate each endpoint with its availability zone and also simulate failure of any zone and generate a new lattice with the failed endpoints removed.
us-east-1a us-east-1b us-east-1c +--------------+--------------+--------------+ | | | | | A B C D E F | G H I J K L | M N O P Q R | | | | | +--------------+--------------+--------------+
With a Lattice we can associate each endpoint with its availability zone and also simulate failure of any zone and generate a new lattice with the failed endpoints removed.
simulateFailure("AvailabilityZone", "us-east-1a") = us-east-1b us-east-1c +--------------+--------------+ | | | | F G H I J | K L M N O | | | | +--------------+--------------+
A more complex example is a two dimensional lattice. For example a service may consist of endpoints in multiple availability zones by may also use run two different software implementations in each zone. Since a bug in one implementation could impact many end points, this is considered an orthagonal axis in the lattice.
us-east-1a us-east-1b us-east-1c +--------------+--------------+--------------+ | | | | Python | A B C | G H I | M N O | | | | | +--------------+--------------+--------------+ | | | | Ruby | D E F | J K L | P Q R | | | | | +--------------+--------------+--------------+
Again, failures may be simulated, now in two different dimensions. For example;
simulateFailure("AvailabilityZone", "us-east-1b") = us-east-1a us-east-1c +--------------+--------------+ | | | Python | A B C | M N O | | | | +--------------+--------------+ | | | Ruby | D E F | P Q R | | | | +--------------+--------------+ simulateFailure("SoftwareImplementation", "Python") = us-east-1a us-east-1b us-east-1c +--------------+--------------+--------------+ | | | | Ruby | D E F | J K L | P Q R | | | | | +--------------+--------------+--------------+
Higher dimensional lattices are also permitted.
@param < T> The type for the endpoints in the lattice.