Is every commutative ring isomorphic to a product of directly irreducible rings? In the following, all rings are assumed to be commutative, with multiplicative identity.
A ring $R$ is said to be directly irreducible if it is not isomorphic to the direct product of two non trivial rings. An equivalent condition is that $R$ does not contain any idempotent element other than 0 and 1.
It is not hard to prove that any noetherian ring $R$ is isomorphic to a finite direct product of directly irreducible rings (if this wasn't the case, then you could "split" $R$ indefinitely and produce an infinite chain of ideals). Moreover, the factors are isomorphic up to reordering.
Is it true that every ring $R$ is isomorphic to a (possibly infinite) direct product of directly irreducible rings?
 A: No.  For instance, let $R$ be the Boolean ring of subsets of $\mathbb{N}$ that are either finite or cofinite.  Any quotient of $R$ is also a Boolean ring, and the only directly irreducible Boolean ring is $\mathbb{F}_2$.  But $R$ is not a product of copies of $\mathbb{F}_2$, for instance because it is countably infinite.
More generally, in any ring $R$, the set of idempotent elements form a Boolean algebra $B$.  If $R\cong \prod_{i\in I}R_i$ is a product of directly irreducible rings, then $B$ would be isomorphic to the power set algebra $\mathcal{P}(I)$.  So, if $B$ is not a power set algebra, then $R$ cannot be a product of directly irreducible rings.
Note moreover that if $R\cong \prod R_i$ is a product of directly irreducible rings, then the projections $R\to R_i$ are exactly the quotient maps $R\to R/(1-e)$ where $e$ ranges over the atoms of the Boolean algebra $B$ (i.e., the minimal nonzero idempotents of $R$).  So, a ring $R$ is isomorphic to a product of directly irreducible rings iff the canonical map $R\to\prod_{e}R/(1-e)$ is an isomorphism, where $e$ ranges over the atoms of $B$ (note that such a quotient $R/(1-e)$ always is directly irreducible).
Using this criterion, here is an example of a ring that is not a product of directly irreducible rings even though its Boolean algebra of idempotents is a power set algebra.  Let $k$ be an infinite field, let $I$ be an infinite set, and let $R$ be the ring of functions $I\to k$ that take only finitely many values.  Then the Boolean algebra of idempotents in $R$ is $\mathcal{P}(I)$, since the characteristic function of every subset of $I$ is in $R$.  However, the quotient maps $R\to R/(1-e)$ for atoms $e$ are exactly the evaluation maps $R\to k$ at elements of $I$, so the canonical map $R\to\prod R/(1-e)$ is just the inclusion $R\to k^I$.  Since $R$ is not all of $k^I$, it cannot be a product of directly irreducible rings.
