Design and Optimization Aspects of a Distributed Programmable Architecture for Monitoring Gigabit Networks