Expand description

A Pattern defines the way elements select their destinations.

see new_pattern for documentation on the configuration syntax of predefined patterns.

Structs

Interpretate the origin as with cartesian coordinates. Then add each coordinate with a given factor. It uses default f64 as usize, so a small epsilon may be desired. We do not restrict the destination size to be equal to the source size.

Interpretate the origin as with cartesian coordinates and apply transformations. May permute the dimensions if they have same side. May complement the dimensions. Order of composition is: first shift, second permute -> last complement.

Divide the topology according to some given link classes, considering the graph components if the other links were removed. Then apply the global_pattern among the components and select randomly inside the destination comonent. Note that this uses the topology and will cause problems if used as a sub-pattern.

The pattern resulting of composing a list of patterns. destination=patterns[len-1]( patterns[len-2] ( ... (patterns[1] ( patterns[0]( origin ) )) ) ).

Each source keeps a shuffled list of destinations to which send. Once all have sent it is rebuilt and shuffled again. Independently of past requests, decisions or origin.

Use a permutation given via a file. See RandomPermutation.

The destinations are selected from a given pool of servers.

The argument to a builder funtion of patterns.

The pattern resulting of composing a pattern with itself a number of times..

A pattern given by blocks. The elements are divided by blocks of size block_size. The global_pattern is used to describe the communication among different blocks and the block_pattern to describe the communication inside a block. Seen as a graph, this is the Kronecker product of the block graph with the global graph. Thus the origin a position i in the block j will select the destination at position b(i) in the block g(j), where b(i) is the destination via the block_pattern and g(j) is the destination via the global_pattern.

Build a random involution on initialization, which is then kept constant. An involution is a permutation that is a pairing/matching; if a is the destination of b then b is the destination of a. It will panic if given an odd size. See Randompermutation.

Use either of several patterns, with probability proportional to a weight.

Build a random permutation on initialization, which is then kept constant. This allows self-messages; with a reasonable probability of having one. See RandomInvolution and FileMap.

Each destination request will be uniform random among all the range 0..size minus the origin. Independently of past requests, decisions or origin. TODO: for some meta-patterns it would be useful to allow self-messages.

Traits

A Pattern describes how a set of entities decides destinations into another set of entities. The entities are initially servers, but after some operators it may mean router, rows/columns, or other agrupations. The source and target set may be or not be the same. Or even be of different size. Thus, a Pattern is a generalization of the mathematical concept of function.

Functions

Build a new pattern. Patterns are maps between two sets which may depend on the RNG. Generally over the whole set of servers, but sometimes among routers or groups. Check the domentation of the parent Traffic/Permutation for its interpretation.