An in-vacuum undulator (IVU) provides a means to reach high-brilliance x rays in medium energy storage rings. The development of short period undulators with low phase errors creates the opportunity for an unprecedented brilliant light source in a storage ring. Since the spectral quality from cryogenic permanent magnet undulators (CPMUs) has surpassed that of IVUs, NdFeB or PrFeB CPMUs have been proposed for many new advanced storage rings to reach high brilliance x-ray photon beams. In a low emittance ring, not only the performance of the undulator but also the choice of the lattice functions are important design considerations. Optimum betatron functions and a zero-dispersion function shall be provided in the straight sections for IVU/CPMUs. In this paper, relevant factors and design issues for IVUs and CPMUs are discussed together with many technological challenges in short period undulators associated with beam induced-heat load, phase errors, and the deformation of support girders.