Primary producers in all of these ecosystems vary. In rainforests, the primary producers include trees, shrubs, and epiphytes. An epiphyte is a plant that grows on another plant but it not directly parasitic. In mangroves, they are epiphyte and mangroves. The term mangrove describes how the trees live, it is not a taxonomic term. It simply describes a tree that lives in salt water. In a reef, the primary producers are corals, seagrass, and macroalgae (seaweed). Interestingly corals are also predators of the reef. The algae they are in a symbiotic relationship (zooxanthellae) with undergoes photosynthesis during the day. At night they hunt small organisms in the water and spear them with tiny barbs.
Herbivores (or primary consumers) in the mangroves, rainforest, and reefs all vary. In rainforests, these include birds, monkeys, agouti, tapir, butterflies, and sloths. In the mangroves there are fewer herbivores, these include mollusks and crabs. In the reef system, most organisms are herbivores. These include coral, smaller fish, sponges, plankton, and mollusks.
Predators (secondary and tertiary consumers) occur in low abundance in all of the ecosystems because they have large energy requirements. Rainforest predators include large cats, snakes, and some monkeys. Mangroves predators include birds of prey, wild cats, and larger fish. Coral reef predators include larger fishes (parrot, sturgeon, and barracuda), lobsters, and sea turtles. These predators are then preyed on by reef sharks. All of these ecosystems share an important tertiary consumer; humans. The coral reef is the only system with nonhuman tertiary consumers.
Decomposers serve important roles in all of the ecosystems because they make nutrients available for biological use again. The rainforest is known to contain numerous decomposers which means that nutrients are put back into the ecosystem quickly. These decomposers include mushrooms, molds, and insects. In the mangroves, decomposition does not occur rapidly which allows for the burying of carbon-containing compounds (e.g. carbon sequestration). Decomposers include crabs and fungus. Note that crabs take part in several levels of the food web. Decomposers in coral reefs include snails, sea cucumber, crabs, and worms. All of the ecosystems contain bacterial decomposers as well.