Programmable engine for high performance analytics at the edge of the network