Server-side middleware for PhD project.