I was a youngish male (35) when I was set upon by a group of teens in West Oakland in the streets of a "project" that I rarely ran through--knew better, but I was in a hurry. I got away with only a bruise from a pop bottle hurled from a distance because, luckily, I was in stride already and on a pretty fair pace. The pack of angry teens backed off after just one long block chasing after me. I would not have wanted to try to outrun them from a dead start. This has happened enough, the attacks, especially from dogs that....
I started carrying a "monopod," a one-legged camera support pole that I used in photographing track meets in crowded situations. It is aluminum and light-weight, "telescopes," for different lengths, is very metallic-looking (which somehow disuades dogs and bad boys, and it can deliver a healthy whack at a safe distance.
I have since tried other "warding off" sticks, made of aluminum window frames, plain pipes and so forth. It is probably best to carry something that cannot be construed as an obvious weapon, for legal and public relations value.
You never know which of the entities you run into is going to be dangerous, whether dog or human (and yes, it's the human's fault about the dogs.) I always try warding off and simply waving the shiny "stick or pole" first, since so often this disuades attacks. Only go for the hit, when it appears to be a last line of defense. And only only public streets or areas.
Don't assume a dog is nice because he's quiet and slow moving, just like you don't assume it's mean because it barks and runs. Be nice but be safe.
jim