Barrrel or Baral (Garden of Barrel) is an organization created in Ancient times by the Artifical God known as Ganeden.
Barrel were under the same goals as there god to protect the Earth from any catastrophe. The catastrophe itself was categorized by them as "Hyakuja" which included Youkijin, Einst and possibly others.
At one point Barrel went into deep sleep which then, Son Ganlong took over leading the Barrel. However, several Chokijin who were loyal to Guneden betrayed once Ganlong took over thus those who went against Barrel were Categorized as Hyakuja. The war later was named as Kijin Taisen between the Chokijins. Shikyou & Shizai rank and any other lower rank Chokijin (Which are the Youkijin. Ijin in OG Gaiden also part of the Youkijin rank) left Barrel.
The ranks of Chokijin are the following:
Shizai - Apparently all were destroyed during Kijin Taisen. Youkijin - lower ranks
As for what happen with Ryuohki and Kohki. They were also categorized as Hyakuja by Barrel due to going against them. The reason of betrayal was due to vision difference with Ryohki/Kohki and Barrel. Barrel had the ideal to overall save humans as part of protecting the earth while Ryuohki/Kohki wanted to protect humans as a whole. Thus they left barrel while the other two Shijin ranks remained being loyal to Barrel.
As for Guneden, it came from another planet escaping from a catastrophe. Earth was chosen as there last utopia to protect at no cost. Guneden gave blessing to the human race with the Telekenisis which later, by generations, was inherited naturally part of the humans. So far there's no indications who originally created Guneden other than categorized as "ancient civilization". So far there's no (or extremely vague at this point) indication if the "ancient civilization" was connected to the "ancient civilization" that created the Fabla Forest which was a defense system created to seal the "destruction lord".
Also, Tougo Family (Rishu) & Breinstein Family (Ratsel & Rai) were involved in the past wars between Barrel which can be read in the Chokijin Manga.
Four Spirits (四霊) - Based on mythological creatures. - OuryuuOu (応龍皇) - based on Yinglong - RinOuKi (麟王機) - based on the Qilin/Kirin - ReiKiOu (霊亀皇) - based on the Reiki, which is a tortoise - OuOuKi (凰王機) and HouOuKi (鳳王機) - based on the Fenghuang
Four Ills (四凶) - based on monsters - TouTetsuOu (饕餮王) - based on the Taotie. - KyuuKiOu (窮奇王) - based on the Qióngjī, which is similar to the kamaitachi from Japanese mythology - ToukotsuOu (橈机王) - based on the Taowu, destroyed in the Kijin Wars - KontonOu (渾沌王) - based on the Hundun, destroyed in the Kijin Wars
Four Sins (四罪) - based on figures in folklore - 鯀王 (KonOu) - based on Gun, the father of Yu the Great. He failed to stop the Great Flood. The only one of the Four Sins named outright. If we go by the naming scheme of the other Choukijin, the remaining ones would probably be: - KyuukouOu (共工王) - based on Gong Gong, who is (depending on the story) a monster who controls floods, or a human who supposedly caused the Great Flood to undermine Emperor Yao's rule. - KantouOu (驩兜王) - Based on Huan Dou, a corrupt minister who supposedly conspired with Gong Gong to cause the Great Flood. - SanbyouOu (三苗王) - based on (I think?) either a deity of the ancient Miao people, or represents the peoples themselves.
Four Gods (四神) Suzaku, Genbu, Seiryu, Byakko.