Put 2 cups of water to boil in an electric jug/kettle or on the stove.
Slice the shallot or other onion very thin.
Slice the green chili very thin (you can remove the seeds if you like to take some of the 'heat' out of the dish).
Slice the ginger into thin strips (see picture).
Strip the leaflets from the sprig of curry leaf.
Dry roast the cup of semolina. To do this put the frypan on the stove and when hot add the semolina. Don't have any oil in the frypan. Keep stirring the semolina with a wooden or other cooking spoon so it doesn't burn. You want it to just turn colour from white to dark cream. You will be able to smell the difference between the raw semolina and the semolina as it roasts. If in doubt, roast in the pan for 5 minutes, stirring all the time, then take the frypan off the heat and keep stirring the semolina as it continues to cook with just the heat of the frypan.
Tip the semolina out of the frypan and put it to one side.
Put the 2 tbsp of oil into the frying pan and put the pan back on the fire. Let the oil heat up - say 2 or 3 minutes at most.
Add the yellow and black dhals, the mustard seed and the cumin seed to the frying pan and sauté for a minute or two stirring gently all the time.
Add the onions, ginger, and curry leaves to the frying pan and sauté, stirring, till the onion softens. Be careful - curry leaves can spit so stand back when you toss them in.
If the water has boiled add it to the semolina a little at a time. If it hasn't boiled take the frying pan off the stove till the water has boiled, then put it back on the stove and add the water a little at a time. You are doing this, as you do with a risotto, to control how wet your semolina mix - the uppuma - gets. You want it to lift off the base and sides of the pan in a thickish lump but not be solid, and you definitely don't want it to be sloppy. You want it thicker than porridge, though. If you have ever cooked polenta or eaten a slice of cooked polenta, that's the consistency you are looking for. See the picture.
Add a little salt as you are stirring the semolina. When you have it at the right consistency, check the taste and add more salt if you like.
If you semolina is still too dry when you have used all the boiling water, add a little more and keep working it till you have a nice consistency.