My homebrew world uses a caste system which is loosely based off of the four-tiered caste system which was present in Feudal Japan and the Floating World period up through the 1860's. I would love to explain this all, but I have found an excellent source which can do it for me, so I will defer here to this article by Kallie Szczepanski.
"Between the 12th and 19th centuries, feudal Japan had an elaborate four tier class system.
Unlike European feudal society, in which the peasants (or serfs) were at the bottom, the Japanese feudal class structure placed merchants on the lowest rung. Confucian ideals emphasized the importance of productive members of society, so farmers and fishermen had higher status than shop-keepers in Japan.
At the top of the heap was the samurai class.
The Samurai Class:
Feudal Japanese society was dominated by the samurai warrior class. Although they made up only about 10% of the population, samurai and their daimyo lords wielded enormous power.
When a samurai passed, members of the lower classes were required to bow and show respect. If a farmer or artisan refused to bow, the samurai was legally entitled to chop off the recalcitrant person's head.
Samurai answered only to the daimyo for whom they worked. The daimyo, in turn, answered only to the shogun.
There were about 260 daimyo by the end of the feudal era. Each daimyo controlled a broad area of land, and had an army of samurai.
The Farmers / Peasants:
Just below the samurai on the social ladder were the farmers or peasants.
According to Confucian ideals, farmers were superior to artisans and merchants because they produced the food that all the other classes depended upon.
Although technically they were considered an honored class, the farmers lived under a crushing tax burden for much of the feudal era.
During the reign of the third Tokugawa shogun, Iemitsu, farmers were not allowed to eat any of the rice they grew. They had to hand it all over to their daimyo, and then wait for him to give some back as charity.
Although artisans produced many beautiful and necessary goods, such as clothes, cooking utensils, and woodblock prints, they were considered less important than the farmers.
Even skilled samurai sword makers and boatwrights belonged to this third tier of society in feudal Japan.
The artisan class lived in its own section of the major cities, segregated from the samurai (who usually lived in the daimyos' castles), and from the lower merchant class.
The bottom rung of feudal Japanese society was occupied by merchants, both traveling traders and shop-keepers.
Merchants were ostracized as "parasites" who profited from the labor of the more productive peasant and artisan classes. Not only did merchants live in a separate section of each city, but the higher classes were forbidden to mix with them except on business.
Nonetheless, many merchant families were able to amass large fortunes. As their economic power grew, the restrictions against them weakened."
you can find the full text of this article here: http://asianhistory.about.com/od/japan/p/ShogJapanClass.htm