I installed an Air Zound air horn on my bike. It has a plastic canister which you fill with up to 80psi of air using a standard bicycle pump. And it's very loud at 115 decibels.
So far it's saved me from a couple of inattentive drivers and a couple of dogs who wanted to chase my bike. A loud blast from the horn startles the dog for a moment and allows me to put some distance between us.
These things should be standard equipment on any bicycle, they're great!