Machine Learning in Emergent Middleware