The theoretical subject (routing, etc.) you're looking for is Delay Tolerant Networking.
At the user layer, IPFS or a better collaborative, content-addressed filesytem could be used - request a movie, then watch it once it downloads in 20 minutes. Once it's cached locally, anyone else can access it instantly. Federated communication apps with state-resolution (like Matrix but more asynchronous) would allow instant local communications, while still seamlessly supporting interplanetary contact.