Although North Korea is heavily dependent on China for aid and support, its hardly a vassal state. China and North Korea have had strong disagreements several times in the past, most of which are recent over this nuclear issue, six-party talks, and the general actions of the DPRK. While the DPRK does serve a purpose to China, its important to figure out how valuable that purpose is to them. That is debatable, however what I believe is hardly debatable is that China would go nuclear to protect its North Korean ally. Recently due to their disagreements and US draw downs in Korea, both real and expected, North Korea has increasingly become more and more of a burden to China rather than an asset. One could draw a parallel between China and the DPRK and the views many Americans have towards Europe, that we've done so much for them over the last 50 years and constantly have their back but they don't repay us well.
China is not keen on taking over the world by military means, that is impractical and its likely going to be impossible to challenge the US on the seas for easily the next 100 years. And likewise given China's vast army and our relatively small one which is also deployed in two theaters AND considering China's vast territory its unlikely any large scale ground operations in China will successful either. Therefore China and the US are in a military stalemate before a war has even begun, they cannot strike out onto the oceans and we cannot strike into their land. One also has to remember that a war would greatly hinder China's #1 goal, that is to get rich. Warfare would obviously end most exports for China, which would be a huge hindrance on their economy and social stability as hundreds of millions are put out of work or the Yuan spirals into rapid inflation as China "employs" them all, perhaps both if they attempt a "middle of the road" solution. As for the US we'd lose access to a huge trading partner which would wreck havoc on our economy as well. China doesn't want to take over the world militarily, but perhaps economically.
So in conclusion, while North Korea serves a purposes as a "buffer zone" between the US and its allies and China the decreasing hostility between the US and China due in part to the increased economic interdependency makes that buffer zone less valuable every day.
An interesting question would be if perhaps North Korea has realized this changing dynamic and is seeking to wedge out its own "mini-sphere" more independent of China? Nuclear weapons are a good thing to have in that case as North Korea wants its own deterrent. Personally I dont think so because North Korea's has made any progress towards economic independence and in fact has done a number of things which have made it worse, if that was even possible, such as drastically devaluing its currency. But perhaps its North Korea thinking that its better to make enemies rather than friends for security purposes. Starvation is a means of control in a dictatorship, preserving which is the ultimate North Korea goal, but further alienating itself it protects itself against outside influence via economic improvement or contact with foreigners that would come from economic growth. And by hanging onto its nukes and, hopefully, settling down after carving out its little spot, which its current actions would be attempting to achieve, it can be poor enough to control its people, preserve its regime, and isolated and unfriendly enough for other nations to want to leave alone but not so afraid they'd be willing to attack a nuclear power.