For some reason, I find it easier to tune out the conversation at a bar than at a coffee shop. I like to be around people, too. I just find that if I'm at a bar/coffee shop people start talking to me and I'm too nice to tell them not to. Lol.
I set up a writing room, even bought an old writing desk to go in it, but I tend to set up on the dining table where there's more room. I think for some reason my creative room space isn't very creative, or something. I've written in cafes sometimes too, but I need a chair that back onto the wall, as I hate people looking over my shoulder!
Get a nice big set of cans, and wear them all the time. When someone starts to ask you something, look away and move your head in time to the music.
Okay, some might call me kooky, but I don't care... Feng Shui helped me address these issues (which affect me, too). The spot my desks sits in my room is the corner that associates with relationships. That is what writing is about, to me--one's relationship with life, with people, with things, etc. I also have my desk situated so I don't have the door to my back. If you can't see where people enter or see into your room from where you are situated, it's supposed to be a taboo in Feng Shui. It's like energy always directed at your back. For me, that equals distraction. I used to have a small 2'x4' desk and found that it cramped my creativity as well, one of the reasons why I got the honker I have now. The big space is like a constant invitation to be creative.