I had my palace placed at the center of the city because its the farthest from the edges of the city because it could be very easily raided from enemy's and bad people. My government officials would live near the palace and because the king would be able to call them to his side if he needed help or if he was just asking questions. Then I would have a wall made of extremely sturdy stone so it could take centuries to erode into a pile of dust and pebbles. Nobles would be important because they are the center of social media in the city and keep it from being a city full of very angry, paranoid people. Then there would be another wall with weapons that can shoot all the way out past the final wall. The peasants and slaves have to choice of living under protection of the outer ring which is the most heavily fortified wall in the city with hundreds of troops lining the tops and bottoms that are armed and it will also have different weaponry installed within and on top of the wall.