Streams are ecosystems that provide the basic requirements for life including water, nutrients, energy, and an electron acceptor like oxygen. Organisms living in streams must find ways to obtain these necessities in the flowing water environment. The riffle habitat within streams provides advantages for both autotrophs and heterotrophs due to higher oxygen, light levels, and habitat structure compared to pools. Woody debris and other obstacles are important for creating microhabitats and retaining organic matter that fuels the food web.