Dani Alves is completely irreplacable. There is absolutely nobody in the world who is like him, or who is as good as him in his position. We could get the next best right back in the world, but he would not bring to the team what Dani brings. His passing, his first touch, his composure, his tactical nouse, his chemistry with teammates... not to mention how popular he is in the dressing room. Age should not be an issue, as he has shown no signs of physical decline, and even when he eventually does I doubt it will have too much impact on his game as he has never been a physical player.
He is a Barca legend, a key player from our best ever team, and a key player still. Pay him what he wants, give him however many years he wants; he has earnt it more than most. We spend millions on players like Douglas and Vermaalen and people laugh it off as a joke, but are disgusted at the idea of a club legend wanting an extra year on his contract. Let's not forget that the only reason Xavi is going to Qatar is for money, and it would be wrong to say that he doesn't care about Barca, so why is Dani being chastised?
In my opinion we should keep him at all costs until the end of his career, and appreciate how lucky we are because when he is gone he will be sorely missed.