Backend for gemstone ranking system.