FlowDB: Integrating Stream Processing and Consistent State Management