Machine Learning for Emergent Middleware