Architecting data-driven apps