Implement some pluggable workers that work on incoming metric batches.
Create MDBs for some ad-hoc processing from the rest-servlet and send back the result to the client.
Those are not fully fleshed out, but show how aggregation plugins may look like.