I don't know what the solution is, but with the expected upcoming cap increase, I believe that there will be even less parity in basketball (which there is already very little of). In a sport in which a single player can have a bigger impact on the game, there may not be a solution. With stars teaming up in big-markets, it leaves small-market franchises on the outside looking in. The only way a small-market team can combat this is by doing what Utah (& MIN/PHI/etc) is attempting to do (& GSW/OKC did), which is acquire as much talent as possible via the draft & retain it as long as possible. MLB adapted a competitive balance system in which (if I'm not mistaken) teams are allotted extra draft picks based on market size. Obviously this exact method isn't applicable to the NBA, but hopefully there is a solution to what is clearly a problem.
Again, I'm not sure if there is a viable solution, but when a team that can't attract high-level FA's has to decide between losing it's most talented players without receiving any compensation in return or overpaying in order to retain them, they are put in a lose-lose situation. Maybe there can be a system similar to MLB FA where there are type A & B FA's in which the signing team is forced to compensate the other team with draft picks. There probably isn't a realistic solution though, & small-market teams will likely always have to be conscientious of how they handle their most valuable players (look at the different situations DEN & UTA are in due to how they handled their unlikely to re-sign star players in Melo & D-Will). Luckily for us, despite being a small-market franchise, we are in a better situation than most big-market franchises are due to smart drafting, resource allocation, & asset management.