XWare: a Middleware for Prognostics and Health Management in Education