Prefix sum algorithm implementation for a web service infrastructure