Functional compartmentalization in bacteria and archaea