After a century of relative stability of the electricity industry, extensive deployment of distributed energy resources and recent advances in computation and communication technologies have changed the nature of how we consume, trade, and apply energy. The power system is facing a transition from its traditional hierarchical structure to a more deregulated model by introducing new energy distribution models such as peer-to-peer sharing for connected communities. The proven effectiveness of P2P sharing in benefiting both prosumers and the grid has been demonstrated in many studies and pilot projects. However, there is still no extensive implementation of such sharing models in today's electricity markets. This paper aims to shed some light on this gap through a comprehensive overview of recent advances in the P2P energy system and an insightful discussion of the challenges that need to be addressed in order to establish P2P sharing as a viable energy management option in today's electricity market. To this end, in this article, we provide some background on different aspects of P2P sharing. Then, we discuss advances in P2P sharing through a systematic domain-based classification. We also review different pilot projects on P2P sharing across the globe. Finally, we identify and discuss a number of challenges that need to be addressed for scaling up P2P sharing in the electricity market followed by concluding remarks at the end of the paper.