A distributed state-based entity management system for web applications built in PHP