The key to a vent pipe is it must stay dry. So, if you are venting horizontally, you need to ensure that the line stays clear of blockages, and if any water gets into the vent, it can run into the sewer.
You are limited to the distance you can run a horizontal vent pipe, with some placing the maximum length at 8 feet.
The answer is to run the pipe along a gradient, so while it is horizontal, the water still flows downhill towards the sewer without creating a trap.