In Japan the political system was feudal. The country was divided into 250 sectors. The administration of s each sector was entrusted to a Daikyo who were a group of feudal lords. Over the Daikyo there were Shoguns. Edo (the modem Tokyo) was the capital. The shoguns often asked the Daikyo to spend time in the capital. This was to prevent any threat from them. The shoguns also controlled important cities and mines.
The Samurai were a set of warriors and they were the elite in the administration. They assisted the Shoguns and, Daikyos.