modify astream interfaces and impl astream demo