  In this expository article, we describe the recent approach, motivated by
ergodic theory, towards detecting arithmetic patterns in the primes, and in
particular establishing that the primes contain arbitrarily long arithmetic
progressions. One of the driving philosophies is to identify precisely what the
obstructions could be that prevent the primes (or any other set) from behaving
``randomly'', and then either show that the obstructions do not actually occur,
or else convert the obstructions into usable structural information on the
primes.
