Diaspora is a 1997 science fiction novel by Australian writer Greg Egan.
Warning: Spoilers follow
In Diaspora, most human beings have uploaded into virtual reality-based communities, called polises (Greek for city), where they live as virtual beings. An unprecedented range of possibilities and experiences then opens to humanity, free from the constraints of the physical world. The novel makes a good job of depicting what would be an (astounding, for us) day-to-day life in such an environment.
The novel title derives from the main quest that one of the polises, Carter-Zimmerman, begins in the physical world (much to the amusement of the other polises), to find the reason for a paradoxical acceleration of a cosmic event that threatens to wipe out the remaining body-bound humans ("fleshers") on earth, in the process discovering a message from a previous civilization. This discovery leads to knowledge of an even more threatening problem: the end of the physical universe itself.
Egan is a master in depicting extremely advanced technology and the magic-like possibilities of a virtual world in almost a dismissive way, but always keeping strict observance to the law of physics.