  We investigate interactions between Ramsey theory, topological dynamics, and
model theory. We introduce various Ramsey-like properties for first order
theories and characterize them in terms of the appropriate dynamical properties
of the theories in question (such as [extreme] amenability of a theory or some
properties of the associated Ellis semigroups). Then we relate them to
profiniteness and triviality of the Ellis groups of first order theories. In
particular, we find various criteria for [pro]finiteness and for triviality of
the Ellis group of a given theory from which we obtain wide classes of examples
of theories with [pro]finite or trivial Ellis groups. As an initial motivation,
we note that profiniteness of the Ellis group of a theory implies that the
Kim-Pillay Galois group of this theory is also profinite, which in turn is
equivalent to the equality of the Shelah and Kim-Pillay strong types. We also
find several concrete examples illustrating the lack of implications between
some fundamental properties. In the appendix, we give a full computation of the
Ellis group of the theory of the random hypergraph with one binary and one
4-ary relation. This example shows that the assumption of NIP in the version of
Newelski's conjecture for amenable theories (proved in [15]) cannot be dropped.
