The answer to this question depends on your region and the market’s need. Coffee shops have their own style, and they need a view and effort to last. Also, they have to keep pace with development. Moreover, there has to be a unique thing for taking pictures by people. Usually, coffee shops earn a lot in the first one or two years; then people head for something different!
As for restaurants, it depends on the food. They need time to be popular and for people to come from everywhere. Furthermore, they might last for years as long as the food has the same taste with good quality.