Calculate rating on backend