You've probably seen a biosphere ecosystem before. It's a glass orb filled with water, some aquatic plants, and some small animals like freshwater shrimp. The only input to the otherwise closed system is sunlight, and the goal is to keep the lifeforms inside the glass sphere going as long as possible. When I was at Make magazine we made a biosphere and it remained healthy for over five years.
Orb Farm is a web-based biosphere simulator. You are given an empty glass sphere, and you can fill it with glass, sand, stone, wood, water, algae, Daphnia, grass, bacteria, fish, goldfish, and, er, donuts. The game was created by Max Bittker.