APIs for dealing with data streams