paradigm: distributed sample rank code