Are you replacing just the pads, or pads with holders; or is the bolt integral with the rubber?
If it is pads in holders - the open end goes towards the rear so that the braking force pushes the pads into the holders.
Otherwise is really has practically no difference.
At the surface speed of a bike wheel, the direction of the grooves has no difference in removal rate of water from the rim surface.