A Framework for Real-Time Process Control