Whisper :
It’s a light-weight protocol that can be used to communicate between D-Apps. It’s ideal for limited message transfer that would last long for limited time and it also provides encryption during message transfer.
Configuring Whisper is only available via geth console(consumable via Web3) ,but not with solidity (might come up in future ).
Usage : https://github.com/ethereum/wiki/wiki/Whisper-Overview
Swarm :
It’s a distributed de-centralized storage mechanism. Storing large piece of data is always costly in blockchain and Swarm provides a decentralized network where you could store all the large piece of information and get back the hash and push the hash to blockchain instead dumping all of the data to the blockchain. IPFS and Filecoin are other example of system like swarm.
Usage : https://swarm-guide.readthedocs.io/en/latest/installation.html