"China and Vietnam have been working on their relationship for 4,000 years, and some days the work goes better than others," said Brantly Womack, a professor of foreign affairs at the University of Virginia who has written extensively on the countries.