Brazil and Turkey: The Global Middle Class Rises

Why are Brazil and Turkey both facing mass protests right now? What makes the two cases similar and what makes them different?