Membrane-assisted crystallization technology