  This paper can be thought of as an extended introduction to arXiv:0708.3398;
nevertheless, most of its results are not covered by loc. cit. We consider the
derived categories of DG-modules, DG-comodules, and DG-contramodules, the
coderived and contraderived categories of CDG-modules, the coderived categories
of CDG-comodules, and the contraderived categories of CDG-contramodules. The
equivalence between the latter two categories (the comodule-contramodule
correspondence) is established. Nonhomogeneous Koszul duality or "triality" (an
equivalence between exotic derived categories corresponding to Koszul dual
(C)DG-algebra and CDG-coalgebra) is obtained in the conilpotent and
nonconilpotent versions. Various $A_\infty$-structures are considered, and a
number of model category structures are described. Homogeneous Koszul duality
and $D$-$\Omega$ duality are discussed in the appendices.
