Middleware for Differentiated Quality in Spontaneous Networks